From 9e136cf48c67d6cbf40244fe2cc80a9022dd7996 Mon Sep 17 00:00:00 2001 From: Andrea Lin Date: Mon, 9 Jul 2018 15:20:02 -0700 Subject: [PATCH] Release gapics (#3423) Generated with googleapis/gapic-generator#2131 to fix error in LoggingClient (see fix at andreamlin/google-cloud-java@386c987) Update google-common-protos to v 1.12.0. Add google-cloud-tasks for the first time. Remove LoggingSmokeTest.java, because the Logging smoke config has been removed from googleapis/googleapis, and the existing LoggingSmokeTest.java is incompatible with the current google-cloud-logging/src/main. --- .../google/privacy/dlp/v2/DlpServiceGrpc.java | 250 +- .../logging/v2/LoggingServiceV2Grpc.java | 16 +- .../grpc-google-cloud-tasks-v2beta2/pom.xml | 31 + .../cloud/tasks/v2beta2/CloudTasksGrpc.java | 2574 +++++++++++ google-api-grpc/pom.xml | 14 +- .../com/google/privacy/dlp/v2/Action.java | 6 +- .../dlp/v2/AnalyzeDataSourceRiskDetails.java | 3874 ++++++++++++++++- ...AnalyzeDataSourceRiskDetailsOrBuilder.java | 13 + .../privacy/dlp/v2/BucketingConfig.java | 2 + .../google/privacy/dlp/v2/ContentItem.java | 48 +- .../privacy/dlp/v2/ContentItemOrBuilder.java | 12 +- .../dlp/v2/CryptoReplaceFfxFpeConfig.java | 4 +- .../google/privacy/dlp/v2/CustomInfoType.java | 280 +- .../dlp/v2/CustomInfoTypeOrBuilder.java | 57 +- .../privacy/dlp/v2/DateShiftConfig.java | 6 +- .../privacy/dlp/v2/DeidentifyTemplate.java | 2 + .../com/google/privacy/dlp/v2/DlpProto.java | 1433 +++--- .../com/google/privacy/dlp/v2/Finding.java | 52 +- .../privacy/dlp/v2/FindingOrBuilder.java | 14 +- .../dlp/v2/FixedSizeBucketingConfig.java | 2 + .../com/google/privacy/dlp/v2/InfoType.java | 35 +- .../privacy/dlp/v2/InfoTypeOrBuilder.java | 10 +- .../dlp/v2/InfoTypeTransformations.java | 140 +- .../google/privacy/dlp/v2/InspectConfig.java | 214 +- .../dlp/v2/InspectConfigOrBuilder.java | 47 +- .../privacy/dlp/v2/InspectTemplate.java | 6 +- .../com/google/privacy/dlp/v2/JobTrigger.java | 2 + .../com/google/privacy/dlp/v2/Likelihood.java | 4 +- .../dlp/v2/ListJobTriggersRequest.java | 133 +- .../v2/ListJobTriggersRequestOrBuilder.java | 38 +- .../privacy/dlp/v2/OutputStorageConfig.java | 207 +- .../dlp/v2/OutputStorageConfigOrBuilder.java | 54 +- .../google/privacy/dlp/v2/PrivacyMetric.java | 2070 ++++++++- .../dlp/v2/PrivacyMetricOrBuilder.java | 13 + .../com/google/privacy/dlp/v2/QuasiId.java | 1454 +++++++ .../privacy/dlp/v2/QuasiIdOrBuilder.java | 123 + .../privacy/dlp/v2/RedactImageRequest.java | 97 +- .../dlp/v2/RedactImageRequestOrBuilder.java | 10 + .../privacy/dlp/v2/RedactImageResponse.java | 229 + .../dlp/v2/RedactImageResponseOrBuilder.java | 25 + .../privacy/dlp/v2/RiskAnalysisJobConfig.java | 6 +- .../com/google/privacy/dlp/v2/Schedule.java | 48 +- .../privacy/dlp/v2/ScheduleOrBuilder.java | 12 +- .../privacy/dlp/v2/StatisticalTable.java | 2060 +++++++++ .../dlp/v2/StatisticalTableOrBuilder.java | 109 + .../java/com/google/privacy/dlp/v2/Table.java | 4 + .../proto/google/privacy/dlp/v2/dlp.proto | 310 +- .../proto/google/privacy/dlp/v2/storage.proto | 32 +- .../logging/v2/CreateExclusionRequest.java | 39 +- .../logging/v2/CreateLogMetricRequest.java | 39 +- .../google/logging/v2/CreateSinkRequest.java | 39 +- .../logging/v2/DeleteExclusionRequest.java | 37 +- .../logging/v2/DeleteLogMetricRequest.java | 37 +- .../google/logging/v2/DeleteLogRequest.java | 37 +- .../google/logging/v2/DeleteSinkRequest.java | 37 +- .../logging/v2/GetExclusionRequest.java | 37 +- .../logging/v2/GetLogMetricRequest.java | 37 +- .../com/google/logging/v2/GetSinkRequest.java | 37 +- .../logging/v2/ListExclusionsRequest.java | 39 +- .../logging/v2/ListExclusionsResponse.java | 39 +- .../logging/v2/ListLogEntriesRequest.java | 91 +- .../v2/ListLogEntriesRequestOrBuilder.java | 16 +- .../logging/v2/ListLogEntriesResponse.java | 39 +- .../logging/v2/ListLogMetricsRequest.java | 39 +- .../logging/v2/ListLogMetricsResponse.java | 39 +- .../google/logging/v2/ListLogsRequest.java | 39 +- .../google/logging/v2/ListLogsResponse.java | 39 +- ...stMonitoredResourceDescriptorsRequest.java | 39 +- ...tMonitoredResourceDescriptorsResponse.java | 39 +- .../google/logging/v2/ListSinksRequest.java | 39 +- .../google/logging/v2/ListSinksResponse.java | 39 +- .../java/com/google/logging/v2/LogEntry.java | 502 ++- .../google/logging/v2/LogEntryOperation.java | 39 +- .../google/logging/v2/LogEntryOrBuilder.java | 85 +- .../com/google/logging/v2/LogEntryProto.java | 34 +- .../logging/v2/LogEntrySourceLocation.java | 39 +- .../com/google/logging/v2/LogExclusion.java | 61 +- .../logging/v2/LogExclusionOrBuilder.java | 6 +- .../java/com/google/logging/v2/LogMetric.java | 70 +- .../google/logging/v2/LogMetricOrBuilder.java | 8 +- .../java/com/google/logging/v2/LogSink.java | 161 +- .../google/logging/v2/LogSinkOrBuilder.java | 32 +- .../google/logging/v2/LoggingConfigProto.java | 192 +- .../logging/v2/LoggingMetricsProto.java | 78 +- .../com/google/logging/v2/LoggingProto.java | 93 +- .../logging/v2/UpdateExclusionRequest.java | 39 +- .../logging/v2/UpdateLogMetricRequest.java | 39 +- .../google/logging/v2/UpdateSinkRequest.java | 39 +- .../v2/WriteLogEntriesPartialErrors.java | 40 +- .../logging/v2/WriteLogEntriesRequest.java | 307 +- .../v2/WriteLogEntriesRequestOrBuilder.java | 51 +- .../logging/v2/WriteLogEntriesResponse.java | 25 + .../proto/google/logging/v2/log_entry.proto | 28 +- .../proto/google/logging/v2/logging.proto | 65 +- .../google/logging/v2/logging_config.proto | 208 +- .../google/logging/v2/logging_metrics.proto | 26 +- .../proto-google-cloud-tasks-v2beta2/pom.xml | 36 + .../tasks/v2beta2/AcknowledgeTaskRequest.java | 857 ++++ .../AcknowledgeTaskRequestOrBuilder.java | 71 + .../tasks/v2beta2/AppEngineHttpRequest.java | 1834 ++++++++ .../AppEngineHttpRequestOrBuilder.java | 325 ++ .../tasks/v2beta2/AppEngineHttpTarget.java | 692 +++ .../v2beta2/AppEngineHttpTargetOrBuilder.java | 46 + .../cloud/tasks/v2beta2/AppEngineRouting.java | 1559 +++++++ .../v2beta2/AppEngineRoutingOrBuilder.java | 233 + .../cloud/tasks/v2beta2/AttemptStatus.java | 1373 ++++++ .../tasks/v2beta2/AttemptStatusOrBuilder.java | 124 + .../tasks/v2beta2/CancelLeaseRequest.java | 1031 +++++ .../v2beta2/CancelLeaseRequestOrBuilder.java | 106 + .../cloud/tasks/v2beta2/CloudTasksProto.java | 431 ++ .../tasks/v2beta2/CreateQueueRequest.java | 840 ++++ .../v2beta2/CreateQueueRequestOrBuilder.java | 68 + .../tasks/v2beta2/CreateTaskRequest.java | 1312 ++++++ .../v2beta2/CreateTaskRequestOrBuilder.java | 177 + .../tasks/v2beta2/DeleteQueueRequest.java | 566 +++ .../v2beta2/DeleteQueueRequestOrBuilder.java | 31 + .../tasks/v2beta2/DeleteTaskRequest.java | 568 +++ .../v2beta2/DeleteTaskRequestOrBuilder.java | 31 + .../cloud/tasks/v2beta2/GetQueueRequest.java | 566 +++ .../v2beta2/GetQueueRequestOrBuilder.java | 31 + .../cloud/tasks/v2beta2/GetTaskRequest.java | 740 ++++ .../v2beta2/GetTaskRequestOrBuilder.java | 66 + .../cloud/tasks/v2beta2/HttpMethod.java | 191 + .../tasks/v2beta2/LeaseTasksRequest.java | 1434 ++++++ .../v2beta2/LeaseTasksRequestOrBuilder.java | 182 + .../tasks/v2beta2/LeaseTasksResponse.java | 834 ++++ .../v2beta2/LeaseTasksResponseOrBuilder.java | 53 + .../tasks/v2beta2/ListQueuesRequest.java | 1061 +++++ .../v2beta2/ListQueuesRequestOrBuilder.java | 107 + .../tasks/v2beta2/ListQueuesResponse.java | 1027 +++++ .../v2beta2/ListQueuesResponseOrBuilder.java | 81 + .../cloud/tasks/v2beta2/ListTasksRequest.java | 1207 +++++ .../v2beta2/ListTasksRequestOrBuilder.java | 134 + .../tasks/v2beta2/ListTasksResponse.java | 1020 +++++ .../v2beta2/ListTasksResponseOrBuilder.java | 79 + .../cloud/tasks/v2beta2/LocationName.java | 189 + .../tasks/v2beta2/PauseQueueRequest.java | 566 +++ .../v2beta2/PauseQueueRequestOrBuilder.java | 31 + .../cloud/tasks/v2beta2/ProjectName.java | 166 + .../cloud/tasks/v2beta2/PullMessage.java | 726 +++ .../tasks/v2beta2/PullMessageOrBuilder.java | 62 + .../cloud/tasks/v2beta2/PullTarget.java | 396 ++ .../tasks/v2beta2/PullTargetOrBuilder.java | 9 + .../tasks/v2beta2/PurgeQueueRequest.java | 566 +++ .../v2beta2/PurgeQueueRequestOrBuilder.java | 31 + .../com/google/cloud/tasks/v2beta2/Queue.java | 2575 +++++++++++ .../google/cloud/tasks/v2beta2/QueueName.java | 212 + .../cloud/tasks/v2beta2/QueueOrBuilder.java | 290 ++ .../cloud/tasks/v2beta2/QueueProto.java | 113 + .../cloud/tasks/v2beta2/RateLimits.java | 822 ++++ .../tasks/v2beta2/RateLimitsOrBuilder.java | 84 + .../tasks/v2beta2/RenewLeaseRequest.java | 1296 ++++++ .../v2beta2/RenewLeaseRequestOrBuilder.java | 140 + .../tasks/v2beta2/ResumeQueueRequest.java | 566 +++ .../v2beta2/ResumeQueueRequestOrBuilder.java | 31 + .../cloud/tasks/v2beta2/RetryConfig.java | 1921 ++++++++ .../tasks/v2beta2/RetryConfigOrBuilder.java | 242 + .../cloud/tasks/v2beta2/RunTaskRequest.java | 742 ++++ .../v2beta2/RunTaskRequestOrBuilder.java | 66 + .../cloud/tasks/v2beta2/TargetProto.java | 136 + .../com/google/cloud/tasks/v2beta2/Task.java | 2350 ++++++++++ .../google/cloud/tasks/v2beta2/TaskName.java | 235 + .../cloud/tasks/v2beta2/TaskOrBuilder.java | 242 + .../google/cloud/tasks/v2beta2/TaskProto.java | 114 + .../cloud/tasks/v2beta2/TaskStatus.java | 1091 +++++ .../tasks/v2beta2/TaskStatusOrBuilder.java | 99 + .../tasks/v2beta2/UpdateQueueRequest.java | 927 ++++ .../v2beta2/UpdateQueueRequestOrBuilder.java | 77 + .../cloud/tasks/v2beta2/cloudtasks.proto | 855 ++++ .../google/cloud/tasks/v2beta2/queue.proto | 357 ++ .../google/cloud/tasks/v2beta2/target.proto | 347 ++ .../google/cloud/tasks/v2beta2/task.proto | 180 + .../google/cloud/vision/v1/GeometryProto.java | 5 +- .../cloud/vision/v1/ImageAnnotatorProto.java | 6 +- .../cloud/vision/v1/TextAnnotationProto.java | 4 +- .../cloud/vision/v1/WebDetectionProto.java | 5 +- .../google/cloud/vision/v1/geometry.proto | 1 + .../cloud/vision/v1/image_annotator.proto | 2 +- .../cloud/vision/v1/text_annotation.proto | 1 + .../cloud/vision/v1/web_detection.proto | 2 +- google-cloud-bom/pom.xml | 25 +- .../google/cloud/dlp/v2/DlpServiceClient.java | 207 +- .../com/google/cloud/dlp/v2/package-info.java | 2 + .../google-cloud-logging/pom.xml | 5 + .../google/cloud/logging/v2/ConfigClient.java | 96 + .../cloud/logging/v2/LoggingClient.java | 66 +- .../v2/stub/ConfigServiceV2StubSettings.java | 26 +- .../v2/stub/LoggingServiceV2StubSettings.java | 24 +- .../v2/stub/MetricsServiceV2StubSettings.java | 12 +- .../cloud/logging/v2/ConfigClientTest.java | 58 +- .../cloud/logging/v2/LoggingClientTest.java | 10 +- .../cloud/logging/v2/LoggingSmokeTest.java | 74 - .../cloud/logging/v2/MetricsClientTest.java | 12 +- .../google-cloud-tasks/README.md | 102 + .../google-cloud-tasks/pom.xml | 87 + .../cloud/tasks/v2beta2/CloudTasksClient.java | 2966 +++++++++++++ .../tasks/v2beta2/CloudTasksSettings.java | 379 ++ .../cloud/tasks/v2beta2/package-info.java | 38 + .../tasks/v2beta2/stub/CloudTasksStub.java | 155 + .../v2beta2/stub/CloudTasksStubSettings.java | 856 ++++ .../stub/GrpcCloudTasksCallableFactory.java | 116 + .../v2beta2/stub/GrpcCloudTasksStub.java | 741 ++++ .../tasks/v2beta2/CloudTasksClientTest.java | 868 ++++ .../cloud/tasks/v2beta2/MockCloudTasks.java | 57 + .../tasks/v2beta2/MockCloudTasksImpl.java | 362 ++ google-cloud-clients/pom.xml | 3 +- versions.txt | 3 + 207 files changed, 64143 insertions(+), 2570 deletions(-) create mode 100644 google-api-grpc/grpc-google-cloud-tasks-v2beta2/pom.xml create mode 100644 google-api-grpc/grpc-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksGrpc.java create mode 100644 google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java create mode 100644 google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java create mode 100644 google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/pom.xml create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AcknowledgeTaskRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AcknowledgeTaskRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpTarget.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpTargetOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineRouting.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineRoutingOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AttemptStatus.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AttemptStatusOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CancelLeaseRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CancelLeaseRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateQueueRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateQueueRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteQueueRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteQueueRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteTaskRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteTaskRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetTaskRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetTaskRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpMethod.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksResponse.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksResponseOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesResponse.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesResponseOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksResponse.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksResponseOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LocationName.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PauseQueueRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PauseQueueRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ProjectName.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullMessage.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullMessageOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullTarget.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullTargetOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PurgeQueueRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PurgeQueueRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueName.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimits.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimitsOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RenewLeaseRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RenewLeaseRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ResumeQueueRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ResumeQueueRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfig.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfigOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RunTaskRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RunTaskRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TargetProto.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Task.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskName.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskProto.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskStatus.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskStatusOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UpdateQueueRequest.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UpdateQueueRequestOrBuilder.java create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto create mode 100644 google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto delete mode 100644 google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingSmokeTest.java create mode 100644 google-cloud-clients/google-cloud-tasks/README.md create mode 100644 google-cloud-clients/google-cloud-tasks/pom.xml create mode 100644 google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java create mode 100644 google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksSettings.java create mode 100644 google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/package-info.java create mode 100644 google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStub.java create mode 100644 google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java create mode 100644 google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksCallableFactory.java create mode 100644 google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksStub.java create mode 100644 google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientTest.java create mode 100644 google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasks.java create mode 100644 google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasksImpl.java diff --git a/google-api-grpc/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java b/google-api-grpc/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java index d291ae3451ab..563aa1ce9b87 100644 --- a/google-api-grpc/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java +++ b/google-api-grpc/grpc-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpServiceGrpc.java @@ -23,6 +23,8 @@ * blocks or images. * The service also includes methods for sensitive data redaction and * scheduling of data scans on Google Cloud Platform based data sets. + * To learn more about concepts and find how-to guides see + * https://cloud.google.com/dlp/docs/. * */ @javax.annotation.Generated( @@ -992,6 +994,8 @@ public static DlpServiceFutureStub newFutureStub( * blocks or images. * The service also includes methods for sensitive data redaction and * scheduling of data scans on Google Cloud Platform based data sets. + * To learn more about concepts and find how-to guides see + * https://cloud.google.com/dlp/docs/. * */ public static abstract class DlpServiceImplBase implements io.grpc.BindableService { @@ -1000,8 +1004,11 @@ public static abstract class DlpServiceImplBase implements io.grpc.BindableServi *
      * Finds potentially sensitive info in content.
      * This method has limits on input size, processing time, and output size.
-     * [How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for
-     * images](/dlp/docs/inspecting-images)
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
+     * and https://cloud.google.com/dlp/docs/inspecting-text,
      * 
*/ public void inspectContent(com.google.privacy.dlp.v2.InspectContentRequest request, @@ -1013,7 +1020,11 @@ public void inspectContent(com.google.privacy.dlp.v2.InspectContentRequest reque *
      * Redacts potentially sensitive info from an image.
      * This method has limits on input size, processing time, and output size.
-     * [How-to guide](/dlp/docs/redacting-sensitive-data-images)
+     * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
*/ public void redactImage(com.google.privacy.dlp.v2.RedactImageRequest request, @@ -1025,7 +1036,11 @@ public void redactImage(com.google.privacy.dlp.v2.RedactImageRequest request, *
      * De-identifies potentially sensitive info from a ContentItem.
      * This method has limits on input size and output size.
-     * [How-to guide](/dlp/docs/deidentify-sensitive-data)
+     * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
*/ public void deidentifyContent(com.google.privacy.dlp.v2.DeidentifyContentRequest request, @@ -1036,6 +1051,9 @@ public void deidentifyContent(com.google.privacy.dlp.v2.DeidentifyContentRequest /** *
      * Re-identifies content that has been de-identified.
+     * See
+     * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
+     * to learn more.
      * 
*/ public void reidentifyContent(com.google.privacy.dlp.v2.ReidentifyContentRequest request, @@ -1046,8 +1064,8 @@ public void reidentifyContent(com.google.privacy.dlp.v2.ReidentifyContentRequest /** *
      * Returns a list of the sensitive information types that the DLP API
-     * supports. For more information, see [Listing supported predefined
-     * infoTypes](/dlp/docs/listing-infotypes).
+     * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
+     * learn more.
      * 
*/ public void listInfoTypes(com.google.privacy.dlp.v2.ListInfoTypesRequest request, @@ -1059,6 +1077,7 @@ public void listInfoTypes(com.google.privacy.dlp.v2.ListInfoTypesRequest request *
      * Creates an InspectTemplate for re-using frequently used configuration
      * for inspecting content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public void createInspectTemplate(com.google.privacy.dlp.v2.CreateInspectTemplateRequest request, @@ -1069,6 +1088,7 @@ public void createInspectTemplate(com.google.privacy.dlp.v2.CreateInspectTemplat /** *
      * Updates the InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public void updateInspectTemplate(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest request, @@ -1079,6 +1099,7 @@ public void updateInspectTemplate(com.google.privacy.dlp.v2.UpdateInspectTemplat /** *
      * Gets an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public void getInspectTemplate(com.google.privacy.dlp.v2.GetInspectTemplateRequest request, @@ -1089,6 +1110,7 @@ public void getInspectTemplate(com.google.privacy.dlp.v2.GetInspectTemplateReque /** *
      * Lists InspectTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public void listInspectTemplates(com.google.privacy.dlp.v2.ListInspectTemplatesRequest request, @@ -1099,6 +1121,7 @@ public void listInspectTemplates(com.google.privacy.dlp.v2.ListInspectTemplatesR /** *
      * Deletes an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public void deleteInspectTemplate(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest request, @@ -1110,6 +1133,8 @@ public void deleteInspectTemplate(com.google.privacy.dlp.v2.DeleteInspectTemplat *
      * Creates a DeidentifyTemplate for re-using frequently used configuration
      * for de-identifying content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public void createDeidentifyTemplate(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest request, @@ -1120,6 +1145,8 @@ public void createDeidentifyTemplate(com.google.privacy.dlp.v2.CreateDeidentifyT /** *
      * Updates the DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public void updateDeidentifyTemplate(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest request, @@ -1130,6 +1157,8 @@ public void updateDeidentifyTemplate(com.google.privacy.dlp.v2.UpdateDeidentifyT /** *
      * Gets a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public void getDeidentifyTemplate(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest request, @@ -1140,6 +1169,8 @@ public void getDeidentifyTemplate(com.google.privacy.dlp.v2.GetDeidentifyTemplat /** *
      * Lists DeidentifyTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public void listDeidentifyTemplates(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest request, @@ -1150,6 +1181,8 @@ public void listDeidentifyTemplates(com.google.privacy.dlp.v2.ListDeidentifyTemp /** *
      * Deletes a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public void deleteDeidentifyTemplate(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest request, @@ -1161,6 +1194,7 @@ public void deleteDeidentifyTemplate(com.google.privacy.dlp.v2.DeleteDeidentifyT *
      * Creates a job trigger to run DLP actions such as scanning storage for
      * sensitive information on a set schedule.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public void createJobTrigger(com.google.privacy.dlp.v2.CreateJobTriggerRequest request, @@ -1171,6 +1205,7 @@ public void createJobTrigger(com.google.privacy.dlp.v2.CreateJobTriggerRequest r /** *
      * Updates a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public void updateJobTrigger(com.google.privacy.dlp.v2.UpdateJobTriggerRequest request, @@ -1181,6 +1216,7 @@ public void updateJobTrigger(com.google.privacy.dlp.v2.UpdateJobTriggerRequest r /** *
      * Gets a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public void getJobTrigger(com.google.privacy.dlp.v2.GetJobTriggerRequest request, @@ -1191,6 +1227,7 @@ public void getJobTrigger(com.google.privacy.dlp.v2.GetJobTriggerRequest request /** *
      * Lists job triggers.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public void listJobTriggers(com.google.privacy.dlp.v2.ListJobTriggersRequest request, @@ -1201,6 +1238,7 @@ public void listJobTriggers(com.google.privacy.dlp.v2.ListJobTriggersRequest req /** *
      * Deletes a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public void deleteJobTrigger(com.google.privacy.dlp.v2.DeleteJobTriggerRequest request, @@ -1211,7 +1249,11 @@ public void deleteJobTrigger(com.google.privacy.dlp.v2.DeleteJobTriggerRequest r /** *
      * Creates a new job to inspect storage or calculate risk metrics.
-     * [How-to guide](/dlp/docs/compute-risk-analysis).
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
*/ public void createDlpJob(com.google.privacy.dlp.v2.CreateDlpJobRequest request, @@ -1222,6 +1264,8 @@ public void createDlpJob(com.google.privacy.dlp.v2.CreateDlpJobRequest request, /** *
      * Lists DlpJobs that match the specified filter in the request.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
      * 
*/ public void listDlpJobs(com.google.privacy.dlp.v2.ListDlpJobsRequest request, @@ -1232,6 +1276,8 @@ public void listDlpJobs(com.google.privacy.dlp.v2.ListDlpJobsRequest request, /** *
      * Gets the latest state of a long-running DlpJob.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
      * 
*/ public void getDlpJob(com.google.privacy.dlp.v2.GetDlpJobRequest request, @@ -1244,6 +1290,8 @@ public void getDlpJob(com.google.privacy.dlp.v2.GetDlpJobRequest request, * Deletes a long-running DlpJob. This method indicates that the client is * no longer interested in the DlpJob result. The job will be cancelled if * possible. + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * */ public void deleteDlpJob(com.google.privacy.dlp.v2.DeleteDlpJobRequest request, @@ -1256,6 +1304,8 @@ public void deleteDlpJob(com.google.privacy.dlp.v2.DeleteDlpJobRequest request, * Starts asynchronous cancellation on a long-running DlpJob. The server * makes a best effort to cancel the DlpJob, but success is not * guaranteed. + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * */ public void cancelDlpJob(com.google.privacy.dlp.v2.CancelDlpJobRequest request, @@ -1452,6 +1502,8 @@ public void cancelDlpJob(com.google.privacy.dlp.v2.CancelDlpJobRequest request, * blocks or images. * The service also includes methods for sensitive data redaction and * scheduling of data scans on Google Cloud Platform based data sets. + * To learn more about concepts and find how-to guides see + * https://cloud.google.com/dlp/docs/. * */ public static final class DlpServiceStub extends io.grpc.stub.AbstractStub { @@ -1474,8 +1526,11 @@ protected DlpServiceStub build(io.grpc.Channel channel, *
      * Finds potentially sensitive info in content.
      * This method has limits on input size, processing time, and output size.
-     * [How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for
-     * images](/dlp/docs/inspecting-images)
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
+     * and https://cloud.google.com/dlp/docs/inspecting-text,
      * 
*/ public void inspectContent(com.google.privacy.dlp.v2.InspectContentRequest request, @@ -1488,7 +1543,11 @@ public void inspectContent(com.google.privacy.dlp.v2.InspectContentRequest reque *
      * Redacts potentially sensitive info from an image.
      * This method has limits on input size, processing time, and output size.
-     * [How-to guide](/dlp/docs/redacting-sensitive-data-images)
+     * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
*/ public void redactImage(com.google.privacy.dlp.v2.RedactImageRequest request, @@ -1501,7 +1560,11 @@ public void redactImage(com.google.privacy.dlp.v2.RedactImageRequest request, *
      * De-identifies potentially sensitive info from a ContentItem.
      * This method has limits on input size and output size.
-     * [How-to guide](/dlp/docs/deidentify-sensitive-data)
+     * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
*/ public void deidentifyContent(com.google.privacy.dlp.v2.DeidentifyContentRequest request, @@ -1513,6 +1576,9 @@ public void deidentifyContent(com.google.privacy.dlp.v2.DeidentifyContentRequest /** *
      * Re-identifies content that has been de-identified.
+     * See
+     * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
+     * to learn more.
      * 
*/ public void reidentifyContent(com.google.privacy.dlp.v2.ReidentifyContentRequest request, @@ -1524,8 +1590,8 @@ public void reidentifyContent(com.google.privacy.dlp.v2.ReidentifyContentRequest /** *
      * Returns a list of the sensitive information types that the DLP API
-     * supports. For more information, see [Listing supported predefined
-     * infoTypes](/dlp/docs/listing-infotypes).
+     * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
+     * learn more.
      * 
*/ public void listInfoTypes(com.google.privacy.dlp.v2.ListInfoTypesRequest request, @@ -1538,6 +1604,7 @@ public void listInfoTypes(com.google.privacy.dlp.v2.ListInfoTypesRequest request *
      * Creates an InspectTemplate for re-using frequently used configuration
      * for inspecting content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public void createInspectTemplate(com.google.privacy.dlp.v2.CreateInspectTemplateRequest request, @@ -1549,6 +1616,7 @@ public void createInspectTemplate(com.google.privacy.dlp.v2.CreateInspectTemplat /** *
      * Updates the InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public void updateInspectTemplate(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest request, @@ -1560,6 +1628,7 @@ public void updateInspectTemplate(com.google.privacy.dlp.v2.UpdateInspectTemplat /** *
      * Gets an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public void getInspectTemplate(com.google.privacy.dlp.v2.GetInspectTemplateRequest request, @@ -1571,6 +1640,7 @@ public void getInspectTemplate(com.google.privacy.dlp.v2.GetInspectTemplateReque /** *
      * Lists InspectTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public void listInspectTemplates(com.google.privacy.dlp.v2.ListInspectTemplatesRequest request, @@ -1582,6 +1652,7 @@ public void listInspectTemplates(com.google.privacy.dlp.v2.ListInspectTemplatesR /** *
      * Deletes an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public void deleteInspectTemplate(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest request, @@ -1594,6 +1665,8 @@ public void deleteInspectTemplate(com.google.privacy.dlp.v2.DeleteInspectTemplat *
      * Creates a DeidentifyTemplate for re-using frequently used configuration
      * for de-identifying content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public void createDeidentifyTemplate(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest request, @@ -1605,6 +1678,8 @@ public void createDeidentifyTemplate(com.google.privacy.dlp.v2.CreateDeidentifyT /** *
      * Updates the DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public void updateDeidentifyTemplate(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest request, @@ -1616,6 +1691,8 @@ public void updateDeidentifyTemplate(com.google.privacy.dlp.v2.UpdateDeidentifyT /** *
      * Gets a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public void getDeidentifyTemplate(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest request, @@ -1627,6 +1704,8 @@ public void getDeidentifyTemplate(com.google.privacy.dlp.v2.GetDeidentifyTemplat /** *
      * Lists DeidentifyTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public void listDeidentifyTemplates(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest request, @@ -1638,6 +1717,8 @@ public void listDeidentifyTemplates(com.google.privacy.dlp.v2.ListDeidentifyTemp /** *
      * Deletes a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public void deleteDeidentifyTemplate(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest request, @@ -1650,6 +1731,7 @@ public void deleteDeidentifyTemplate(com.google.privacy.dlp.v2.DeleteDeidentifyT *
      * Creates a job trigger to run DLP actions such as scanning storage for
      * sensitive information on a set schedule.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public void createJobTrigger(com.google.privacy.dlp.v2.CreateJobTriggerRequest request, @@ -1661,6 +1743,7 @@ public void createJobTrigger(com.google.privacy.dlp.v2.CreateJobTriggerRequest r /** *
      * Updates a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public void updateJobTrigger(com.google.privacy.dlp.v2.UpdateJobTriggerRequest request, @@ -1672,6 +1755,7 @@ public void updateJobTrigger(com.google.privacy.dlp.v2.UpdateJobTriggerRequest r /** *
      * Gets a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public void getJobTrigger(com.google.privacy.dlp.v2.GetJobTriggerRequest request, @@ -1683,6 +1767,7 @@ public void getJobTrigger(com.google.privacy.dlp.v2.GetJobTriggerRequest request /** *
      * Lists job triggers.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public void listJobTriggers(com.google.privacy.dlp.v2.ListJobTriggersRequest request, @@ -1694,6 +1779,7 @@ public void listJobTriggers(com.google.privacy.dlp.v2.ListJobTriggersRequest req /** *
      * Deletes a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public void deleteJobTrigger(com.google.privacy.dlp.v2.DeleteJobTriggerRequest request, @@ -1705,7 +1791,11 @@ public void deleteJobTrigger(com.google.privacy.dlp.v2.DeleteJobTriggerRequest r /** *
      * Creates a new job to inspect storage or calculate risk metrics.
-     * [How-to guide](/dlp/docs/compute-risk-analysis).
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
*/ public void createDlpJob(com.google.privacy.dlp.v2.CreateDlpJobRequest request, @@ -1717,6 +1807,8 @@ public void createDlpJob(com.google.privacy.dlp.v2.CreateDlpJobRequest request, /** *
      * Lists DlpJobs that match the specified filter in the request.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
      * 
*/ public void listDlpJobs(com.google.privacy.dlp.v2.ListDlpJobsRequest request, @@ -1728,6 +1820,8 @@ public void listDlpJobs(com.google.privacy.dlp.v2.ListDlpJobsRequest request, /** *
      * Gets the latest state of a long-running DlpJob.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
      * 
*/ public void getDlpJob(com.google.privacy.dlp.v2.GetDlpJobRequest request, @@ -1741,6 +1835,8 @@ public void getDlpJob(com.google.privacy.dlp.v2.GetDlpJobRequest request, * Deletes a long-running DlpJob. This method indicates that the client is * no longer interested in the DlpJob result. The job will be cancelled if * possible. + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * */ public void deleteDlpJob(com.google.privacy.dlp.v2.DeleteDlpJobRequest request, @@ -1754,6 +1850,8 @@ public void deleteDlpJob(com.google.privacy.dlp.v2.DeleteDlpJobRequest request, * Starts asynchronous cancellation on a long-running DlpJob. The server * makes a best effort to cancel the DlpJob, but success is not * guaranteed. + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * */ public void cancelDlpJob(com.google.privacy.dlp.v2.CancelDlpJobRequest request, @@ -1771,6 +1869,8 @@ public void cancelDlpJob(com.google.privacy.dlp.v2.CancelDlpJobRequest request, * blocks or images. * The service also includes methods for sensitive data redaction and * scheduling of data scans on Google Cloud Platform based data sets. + * To learn more about concepts and find how-to guides see + * https://cloud.google.com/dlp/docs/. * */ public static final class DlpServiceBlockingStub extends io.grpc.stub.AbstractStub { @@ -1793,8 +1893,11 @@ protected DlpServiceBlockingStub build(io.grpc.Channel channel, *
      * Finds potentially sensitive info in content.
      * This method has limits on input size, processing time, and output size.
-     * [How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for
-     * images](/dlp/docs/inspecting-images)
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
+     * and https://cloud.google.com/dlp/docs/inspecting-text,
      * 
*/ public com.google.privacy.dlp.v2.InspectContentResponse inspectContent(com.google.privacy.dlp.v2.InspectContentRequest request) { @@ -1806,7 +1909,11 @@ public com.google.privacy.dlp.v2.InspectContentResponse inspectContent(com.googl *
      * Redacts potentially sensitive info from an image.
      * This method has limits on input size, processing time, and output size.
-     * [How-to guide](/dlp/docs/redacting-sensitive-data-images)
+     * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
*/ public com.google.privacy.dlp.v2.RedactImageResponse redactImage(com.google.privacy.dlp.v2.RedactImageRequest request) { @@ -1818,7 +1925,11 @@ public com.google.privacy.dlp.v2.RedactImageResponse redactImage(com.google.priv *
      * De-identifies potentially sensitive info from a ContentItem.
      * This method has limits on input size and output size.
-     * [How-to guide](/dlp/docs/deidentify-sensitive-data)
+     * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to
+     * learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
*/ public com.google.privacy.dlp.v2.DeidentifyContentResponse deidentifyContent(com.google.privacy.dlp.v2.DeidentifyContentRequest request) { @@ -1829,6 +1940,9 @@ public com.google.privacy.dlp.v2.DeidentifyContentResponse deidentifyContent(com /** *
      * Re-identifies content that has been de-identified.
+     * See
+     * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example
+     * to learn more.
      * 
*/ public com.google.privacy.dlp.v2.ReidentifyContentResponse reidentifyContent(com.google.privacy.dlp.v2.ReidentifyContentRequest request) { @@ -1839,8 +1953,8 @@ public com.google.privacy.dlp.v2.ReidentifyContentResponse reidentifyContent(com /** *
      * Returns a list of the sensitive information types that the DLP API
-     * supports. For more information, see [Listing supported predefined
-     * infoTypes](/dlp/docs/listing-infotypes).
+     * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to
+     * learn more.
      * 
*/ public com.google.privacy.dlp.v2.ListInfoTypesResponse listInfoTypes(com.google.privacy.dlp.v2.ListInfoTypesRequest request) { @@ -1852,6 +1966,7 @@ public com.google.privacy.dlp.v2.ListInfoTypesResponse listInfoTypes(com.google. *
      * Creates an InspectTemplate for re-using frequently used configuration
      * for inspecting content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public com.google.privacy.dlp.v2.InspectTemplate createInspectTemplate(com.google.privacy.dlp.v2.CreateInspectTemplateRequest request) { @@ -1862,6 +1977,7 @@ public com.google.privacy.dlp.v2.InspectTemplate createInspectTemplate(com.googl /** *
      * Updates the InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public com.google.privacy.dlp.v2.InspectTemplate updateInspectTemplate(com.google.privacy.dlp.v2.UpdateInspectTemplateRequest request) { @@ -1872,6 +1988,7 @@ public com.google.privacy.dlp.v2.InspectTemplate updateInspectTemplate(com.googl /** *
      * Gets an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate(com.google.privacy.dlp.v2.GetInspectTemplateRequest request) { @@ -1882,6 +1999,7 @@ public com.google.privacy.dlp.v2.InspectTemplate getInspectTemplate(com.google.p /** *
      * Lists InspectTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public com.google.privacy.dlp.v2.ListInspectTemplatesResponse listInspectTemplates(com.google.privacy.dlp.v2.ListInspectTemplatesRequest request) { @@ -1892,6 +2010,7 @@ public com.google.privacy.dlp.v2.ListInspectTemplatesResponse listInspectTemplat /** *
      * Deletes an InspectTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates to learn more.
      * 
*/ public com.google.protobuf.Empty deleteInspectTemplate(com.google.privacy.dlp.v2.DeleteInspectTemplateRequest request) { @@ -1903,6 +2022,8 @@ public com.google.protobuf.Empty deleteInspectTemplate(com.google.privacy.dlp.v2 *
      * Creates a DeidentifyTemplate for re-using frequently used configuration
      * for de-identifying content, images, and storage.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public com.google.privacy.dlp.v2.DeidentifyTemplate createDeidentifyTemplate(com.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest request) { @@ -1913,6 +2034,8 @@ public com.google.privacy.dlp.v2.DeidentifyTemplate createDeidentifyTemplate(com /** *
      * Updates the DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public com.google.privacy.dlp.v2.DeidentifyTemplate updateDeidentifyTemplate(com.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest request) { @@ -1923,6 +2046,8 @@ public com.google.privacy.dlp.v2.DeidentifyTemplate updateDeidentifyTemplate(com /** *
      * Gets a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate(com.google.privacy.dlp.v2.GetDeidentifyTemplateRequest request) { @@ -1933,6 +2058,8 @@ public com.google.privacy.dlp.v2.DeidentifyTemplate getDeidentifyTemplate(com.go /** *
      * Lists DeidentifyTemplates.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse listDeidentifyTemplates(com.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest request) { @@ -1943,6 +2070,8 @@ public com.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse listDeidentifyT /** *
      * Deletes a DeidentifyTemplate.
+     * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn
+     * more.
      * 
*/ public com.google.protobuf.Empty deleteDeidentifyTemplate(com.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest request) { @@ -1954,6 +2083,7 @@ public com.google.protobuf.Empty deleteDeidentifyTemplate(com.google.privacy.dlp *
      * Creates a job trigger to run DLP actions such as scanning storage for
      * sensitive information on a set schedule.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public com.google.privacy.dlp.v2.JobTrigger createJobTrigger(com.google.privacy.dlp.v2.CreateJobTriggerRequest request) { @@ -1964,6 +2094,7 @@ public com.google.privacy.dlp.v2.JobTrigger createJobTrigger(com.google.privacy. /** *
      * Updates a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public com.google.privacy.dlp.v2.JobTrigger updateJobTrigger(com.google.privacy.dlp.v2.UpdateJobTriggerRequest request) { @@ -1974,6 +2105,7 @@ public com.google.privacy.dlp.v2.JobTrigger updateJobTrigger(com.google.privacy. /** *
      * Gets a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public com.google.privacy.dlp.v2.JobTrigger getJobTrigger(com.google.privacy.dlp.v2.GetJobTriggerRequest request) { @@ -1984,6 +2116,7 @@ public com.google.privacy.dlp.v2.JobTrigger getJobTrigger(com.google.privacy.dlp /** *
      * Lists job triggers.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public com.google.privacy.dlp.v2.ListJobTriggersResponse listJobTriggers(com.google.privacy.dlp.v2.ListJobTriggersRequest request) { @@ -1994,6 +2127,7 @@ public com.google.privacy.dlp.v2.ListJobTriggersResponse listJobTriggers(com.goo /** *
      * Deletes a job trigger.
+     * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more.
      * 
*/ public com.google.protobuf.Empty deleteJobTrigger(com.google.privacy.dlp.v2.DeleteJobTriggerRequest request) { @@ -2004,7 +2138,11 @@ public com.google.protobuf.Empty deleteJobTrigger(com.google.privacy.dlp.v2.Dele /** *
      * Creates a new job to inspect storage or calculate risk metrics.
-     * [How-to guide](/dlp/docs/compute-risk-analysis).
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
+     * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
*/ public com.google.privacy.dlp.v2.DlpJob createDlpJob(com.google.privacy.dlp.v2.CreateDlpJobRequest request) { @@ -2015,6 +2153,8 @@ public com.google.privacy.dlp.v2.DlpJob createDlpJob(com.google.privacy.dlp.v2.C /** *
      * Lists DlpJobs that match the specified filter in the request.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
      * 
*/ public com.google.privacy.dlp.v2.ListDlpJobsResponse listDlpJobs(com.google.privacy.dlp.v2.ListDlpJobsRequest request) { @@ -2025,6 +2165,8 @@ public com.google.privacy.dlp.v2.ListDlpJobsResponse listDlpJobs(com.google.priv /** *
      * Gets the latest state of a long-running DlpJob.
+     * See https://cloud.google.com/dlp/docs/inspecting-storage and
+     * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more.
      * 
*/ public com.google.privacy.dlp.v2.DlpJob getDlpJob(com.google.privacy.dlp.v2.GetDlpJobRequest request) { @@ -2037,6 +2179,8 @@ public com.google.privacy.dlp.v2.DlpJob getDlpJob(com.google.privacy.dlp.v2.GetD * Deletes a long-running DlpJob. This method indicates that the client is * no longer interested in the DlpJob result. The job will be cancelled if * possible. + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * */ public com.google.protobuf.Empty deleteDlpJob(com.google.privacy.dlp.v2.DeleteDlpJobRequest request) { @@ -2049,6 +2193,8 @@ public com.google.protobuf.Empty deleteDlpJob(com.google.privacy.dlp.v2.DeleteDl * Starts asynchronous cancellation on a long-running DlpJob. The server * makes a best effort to cancel the DlpJob, but success is not * guaranteed. + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * */ public com.google.protobuf.Empty cancelDlpJob(com.google.privacy.dlp.v2.CancelDlpJobRequest request) { @@ -2065,6 +2211,8 @@ public com.google.protobuf.Empty cancelDlpJob(com.google.privacy.dlp.v2.CancelDl * blocks or images. * The service also includes methods for sensitive data redaction and * scheduling of data scans on Google Cloud Platform based data sets. + * To learn more about concepts and find how-to guides see + * https://cloud.google.com/dlp/docs/. * */ public static final class DlpServiceFutureStub extends io.grpc.stub.AbstractStub { @@ -2087,8 +2235,11 @@ protected DlpServiceFutureStub build(io.grpc.Channel channel, *
      * Finds potentially sensitive info in content.
      * This method has limits on input size, processing time, and output size.
-     * [How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for
-     * images](/dlp/docs/inspecting-images)
+     * When no InfoTypes or CustomInfoTypes are specified in this request, the
+     * system will automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
+     * For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images
+     * and https://cloud.google.com/dlp/docs/inspecting-text,
      * 
*/ public com.google.common.util.concurrent.ListenableFuture inspectContent( @@ -2101,7 +2252,11 @@ public com.google.common.util.concurrent.ListenableFuture * Redacts potentially sensitive info from an image. * This method has limits on input size, processing time, and output size. - * [How-to guide](/dlp/docs/redacting-sensitive-data-images) + * See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to + * learn more. + * When no InfoTypes or CustomInfoTypes are specified in this request, the + * system will automatically choose what detectors to run. By default this may + * be all types, but may change over time as detectors are updated. * */ public com.google.common.util.concurrent.ListenableFuture redactImage( @@ -2114,7 +2269,11 @@ public com.google.common.util.concurrent.ListenableFuture * De-identifies potentially sensitive info from a ContentItem. * This method has limits on input size and output size. - * [How-to guide](/dlp/docs/deidentify-sensitive-data) + * See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to + * learn more. + * When no InfoTypes or CustomInfoTypes are specified in this request, the + * system will automatically choose what detectors to run. By default this may + * be all types, but may change over time as detectors are updated. * */ public com.google.common.util.concurrent.ListenableFuture deidentifyContent( @@ -2126,6 +2285,9 @@ public com.google.common.util.concurrent.ListenableFuture * Re-identifies content that has been de-identified. + * See + * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example + * to learn more. * */ public com.google.common.util.concurrent.ListenableFuture reidentifyContent( @@ -2137,8 +2299,8 @@ public com.google.common.util.concurrent.ListenableFuture * Returns a list of the sensitive information types that the DLP API - * supports. For more information, see [Listing supported predefined - * infoTypes](/dlp/docs/listing-infotypes). + * supports. See https://cloud.google.com/dlp/docs/infotypes-reference to + * learn more. * */ public com.google.common.util.concurrent.ListenableFuture listInfoTypes( @@ -2151,6 +2313,7 @@ public com.google.common.util.concurrent.ListenableFuture * Creates an InspectTemplate for re-using frequently used configuration * for inspecting content, images, and storage. + * See https://cloud.google.com/dlp/docs/creating-templates to learn more. * */ public com.google.common.util.concurrent.ListenableFuture createInspectTemplate( @@ -2162,6 +2325,7 @@ public com.google.common.util.concurrent.ListenableFuture * Updates the InspectTemplate. + * See https://cloud.google.com/dlp/docs/creating-templates to learn more. * */ public com.google.common.util.concurrent.ListenableFuture updateInspectTemplate( @@ -2173,6 +2337,7 @@ public com.google.common.util.concurrent.ListenableFuture * Gets an InspectTemplate. + * See https://cloud.google.com/dlp/docs/creating-templates to learn more. * */ public com.google.common.util.concurrent.ListenableFuture getInspectTemplate( @@ -2184,6 +2349,7 @@ public com.google.common.util.concurrent.ListenableFuture * Lists InspectTemplates. + * See https://cloud.google.com/dlp/docs/creating-templates to learn more. * */ public com.google.common.util.concurrent.ListenableFuture listInspectTemplates( @@ -2195,6 +2361,7 @@ public com.google.common.util.concurrent.ListenableFuture * Deletes an InspectTemplate. + * See https://cloud.google.com/dlp/docs/creating-templates to learn more. * */ public com.google.common.util.concurrent.ListenableFuture deleteInspectTemplate( @@ -2207,6 +2374,8 @@ public com.google.common.util.concurrent.ListenableFuture * Creates a DeidentifyTemplate for re-using frequently used configuration * for de-identifying content, images, and storage. + * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + * more. * */ public com.google.common.util.concurrent.ListenableFuture createDeidentifyTemplate( @@ -2218,6 +2387,8 @@ public com.google.common.util.concurrent.ListenableFuture * Updates the DeidentifyTemplate. + * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + * more. * */ public com.google.common.util.concurrent.ListenableFuture updateDeidentifyTemplate( @@ -2229,6 +2400,8 @@ public com.google.common.util.concurrent.ListenableFuture * Gets a DeidentifyTemplate. + * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + * more. * */ public com.google.common.util.concurrent.ListenableFuture getDeidentifyTemplate( @@ -2240,6 +2413,8 @@ public com.google.common.util.concurrent.ListenableFuture * Lists DeidentifyTemplates. + * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + * more. * */ public com.google.common.util.concurrent.ListenableFuture listDeidentifyTemplates( @@ -2251,6 +2426,8 @@ public com.google.common.util.concurrent.ListenableFuture * Deletes a DeidentifyTemplate. + * See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + * more. * */ public com.google.common.util.concurrent.ListenableFuture deleteDeidentifyTemplate( @@ -2263,6 +2440,7 @@ public com.google.common.util.concurrent.ListenableFuture * Creates a job trigger to run DLP actions such as scanning storage for * sensitive information on a set schedule. + * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * */ public com.google.common.util.concurrent.ListenableFuture createJobTrigger( @@ -2274,6 +2452,7 @@ public com.google.common.util.concurrent.ListenableFuture * Updates a job trigger. + * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * */ public com.google.common.util.concurrent.ListenableFuture updateJobTrigger( @@ -2285,6 +2464,7 @@ public com.google.common.util.concurrent.ListenableFuture * Gets a job trigger. + * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * */ public com.google.common.util.concurrent.ListenableFuture getJobTrigger( @@ -2296,6 +2476,7 @@ public com.google.common.util.concurrent.ListenableFuture * Lists job triggers. + * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * */ public com.google.common.util.concurrent.ListenableFuture listJobTriggers( @@ -2307,6 +2488,7 @@ public com.google.common.util.concurrent.ListenableFuture * Deletes a job trigger. + * See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * */ public com.google.common.util.concurrent.ListenableFuture deleteJobTrigger( @@ -2318,7 +2500,11 @@ public com.google.common.util.concurrent.ListenableFuture * Creates a new job to inspect storage or calculate risk metrics. - * [How-to guide](/dlp/docs/compute-risk-analysis). + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the + * system will automatically choose what detectors to run. By default this may + * be all types, but may change over time as detectors are updated. * */ public com.google.common.util.concurrent.ListenableFuture createDlpJob( @@ -2330,6 +2516,8 @@ public com.google.common.util.concurrent.ListenableFuture * Lists DlpJobs that match the specified filter in the request. + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * */ public com.google.common.util.concurrent.ListenableFuture listDlpJobs( @@ -2341,6 +2529,8 @@ public com.google.common.util.concurrent.ListenableFuture * Gets the latest state of a long-running DlpJob. + * See https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * */ public com.google.common.util.concurrent.ListenableFuture getDlpJob( @@ -2354,6 +2544,8 @@ public com.google.common.util.concurrent.ListenableFuture */ public com.google.common.util.concurrent.ListenableFuture deleteDlpJob( @@ -2367,6 +2559,8 @@ public com.google.common.util.concurrent.ListenableFuture */ public com.google.common.util.concurrent.ListenableFuture cancelDlpJob( diff --git a/google-api-grpc/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java b/google-api-grpc/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java index 9972029726d2..8c154f0bab4b 100644 --- a/google-api-grpc/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java +++ b/google-api-grpc/grpc-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingServiceV2Grpc.java @@ -261,12 +261,14 @@ public void deleteLog(com.google.logging.v2.DeleteLogRequest request, /** *
-     * ## Log entry resources
      * Writes log entries to Stackdriver Logging. This API method is the
      * only way to send log entries to Stackdriver Logging. This method
      * is used, directly or indirectly, by the Stackdriver Logging agent
      * (fluentd) and all logging libraries configured to use Stackdriver
      * Logging.
+     * A single request may contain log entries for a maximum of 1000
+     * different resources (projects, organizations, billing accounts or
+     * folders)
      * 
*/ public void writeLogEntries(com.google.logging.v2.WriteLogEntriesRequest request, @@ -386,12 +388,14 @@ public void deleteLog(com.google.logging.v2.DeleteLogRequest request, /** *
-     * ## Log entry resources
      * Writes log entries to Stackdriver Logging. This API method is the
      * only way to send log entries to Stackdriver Logging. This method
      * is used, directly or indirectly, by the Stackdriver Logging agent
      * (fluentd) and all logging libraries configured to use Stackdriver
      * Logging.
+     * A single request may contain log entries for a maximum of 1000
+     * different resources (projects, organizations, billing accounts or
+     * folders)
      * 
*/ public void writeLogEntries(com.google.logging.v2.WriteLogEntriesRequest request, @@ -474,12 +478,14 @@ public com.google.protobuf.Empty deleteLog(com.google.logging.v2.DeleteLogReques /** *
-     * ## Log entry resources
      * Writes log entries to Stackdriver Logging. This API method is the
      * only way to send log entries to Stackdriver Logging. This method
      * is used, directly or indirectly, by the Stackdriver Logging agent
      * (fluentd) and all logging libraries configured to use Stackdriver
      * Logging.
+     * A single request may contain log entries for a maximum of 1000
+     * different resources (projects, organizations, billing accounts or
+     * folders)
      * 
*/ public com.google.logging.v2.WriteLogEntriesResponse writeLogEntries(com.google.logging.v2.WriteLogEntriesRequest request) { @@ -559,12 +565,14 @@ public com.google.common.util.concurrent.ListenableFuture - * ## Log entry resources * Writes log entries to Stackdriver Logging. This API method is the * only way to send log entries to Stackdriver Logging. This method * is used, directly or indirectly, by the Stackdriver Logging agent * (fluentd) and all logging libraries configured to use Stackdriver * Logging. + * A single request may contain log entries for a maximum of 1000 + * different resources (projects, organizations, billing accounts or + * folders) * */ public com.google.common.util.concurrent.ListenableFuture writeLogEntries( diff --git a/google-api-grpc/grpc-google-cloud-tasks-v2beta2/pom.xml b/google-api-grpc/grpc-google-cloud-tasks-v2beta2/pom.xml new file mode 100644 index 000000000000..e369024eda94 --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-tasks-v2beta2/pom.xml @@ -0,0 +1,31 @@ + + 4.0.0 + grpc-google-cloud-tasks-v2beta2 + 0.18.1-SNAPSHOT + grpc-google-cloud-tasks-v2beta2 + GRPC library for grpc-google-cloud-tasks-v2beta2 + + com.google.api.grpc + google-api-grpc + 0.18.1-SNAPSHOT + + + + io.grpc + grpc-stub + compile + + + io.grpc + grpc-protobuf + compile + + + com.google.api.grpc + proto-google-cloud-tasks-v2beta2 + compile + + + diff --git a/google-api-grpc/grpc-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksGrpc.java b/google-api-grpc/grpc-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksGrpc.java new file mode 100644 index 000000000000..08b5c1c2153a --- /dev/null +++ b/google-api-grpc/grpc-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksGrpc.java @@ -0,0 +1,2574 @@ +package com.google.cloud.tasks.v2beta2; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + *
+ * Cloud Tasks allows developers to manage the execution of background
+ * work in their applications.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.10.0)", + comments = "Source: google/cloud/tasks/v2beta2/cloudtasks.proto") +public final class CloudTasksGrpc { + + private CloudTasksGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.tasks.v2beta2.CloudTasks"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListQueuesMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_LIST_QUEUES = getListQueuesMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getListQueuesMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getListQueuesMethod() { + return getListQueuesMethodHelper(); + } + + private static io.grpc.MethodDescriptor getListQueuesMethodHelper() { + io.grpc.MethodDescriptor getListQueuesMethod; + if ((getListQueuesMethod = CloudTasksGrpc.getListQueuesMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getListQueuesMethod = CloudTasksGrpc.getListQueuesMethod) == null) { + CloudTasksGrpc.getListQueuesMethod = getListQueuesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "ListQueues")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.ListQueuesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.ListQueuesResponse.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("ListQueues")) + .build(); + } + } + } + return getListQueuesMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetQueueMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_GET_QUEUE = getGetQueueMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getGetQueueMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getGetQueueMethod() { + return getGetQueueMethodHelper(); + } + + private static io.grpc.MethodDescriptor getGetQueueMethodHelper() { + io.grpc.MethodDescriptor getGetQueueMethod; + if ((getGetQueueMethod = CloudTasksGrpc.getGetQueueMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getGetQueueMethod = CloudTasksGrpc.getGetQueueMethod) == null) { + CloudTasksGrpc.getGetQueueMethod = getGetQueueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "GetQueue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.GetQueueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("GetQueue")) + .build(); + } + } + } + return getGetQueueMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateQueueMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_CREATE_QUEUE = getCreateQueueMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getCreateQueueMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getCreateQueueMethod() { + return getCreateQueueMethodHelper(); + } + + private static io.grpc.MethodDescriptor getCreateQueueMethodHelper() { + io.grpc.MethodDescriptor getCreateQueueMethod; + if ((getCreateQueueMethod = CloudTasksGrpc.getCreateQueueMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getCreateQueueMethod = CloudTasksGrpc.getCreateQueueMethod) == null) { + CloudTasksGrpc.getCreateQueueMethod = getCreateQueueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "CreateQueue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.CreateQueueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("CreateQueue")) + .build(); + } + } + } + return getCreateQueueMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getUpdateQueueMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_UPDATE_QUEUE = getUpdateQueueMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getUpdateQueueMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getUpdateQueueMethod() { + return getUpdateQueueMethodHelper(); + } + + private static io.grpc.MethodDescriptor getUpdateQueueMethodHelper() { + io.grpc.MethodDescriptor getUpdateQueueMethod; + if ((getUpdateQueueMethod = CloudTasksGrpc.getUpdateQueueMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getUpdateQueueMethod = CloudTasksGrpc.getUpdateQueueMethod) == null) { + CloudTasksGrpc.getUpdateQueueMethod = getUpdateQueueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "UpdateQueue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.UpdateQueueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("UpdateQueue")) + .build(); + } + } + } + return getUpdateQueueMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getDeleteQueueMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_DELETE_QUEUE = getDeleteQueueMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getDeleteQueueMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getDeleteQueueMethod() { + return getDeleteQueueMethodHelper(); + } + + private static io.grpc.MethodDescriptor getDeleteQueueMethodHelper() { + io.grpc.MethodDescriptor getDeleteQueueMethod; + if ((getDeleteQueueMethod = CloudTasksGrpc.getDeleteQueueMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getDeleteQueueMethod = CloudTasksGrpc.getDeleteQueueMethod) == null) { + CloudTasksGrpc.getDeleteQueueMethod = getDeleteQueueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "DeleteQueue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.DeleteQueueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("DeleteQueue")) + .build(); + } + } + } + return getDeleteQueueMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getPurgeQueueMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_PURGE_QUEUE = getPurgeQueueMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getPurgeQueueMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getPurgeQueueMethod() { + return getPurgeQueueMethodHelper(); + } + + private static io.grpc.MethodDescriptor getPurgeQueueMethodHelper() { + io.grpc.MethodDescriptor getPurgeQueueMethod; + if ((getPurgeQueueMethod = CloudTasksGrpc.getPurgeQueueMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getPurgeQueueMethod = CloudTasksGrpc.getPurgeQueueMethod) == null) { + CloudTasksGrpc.getPurgeQueueMethod = getPurgeQueueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "PurgeQueue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.PurgeQueueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("PurgeQueue")) + .build(); + } + } + } + return getPurgeQueueMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getPauseQueueMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_PAUSE_QUEUE = getPauseQueueMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getPauseQueueMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getPauseQueueMethod() { + return getPauseQueueMethodHelper(); + } + + private static io.grpc.MethodDescriptor getPauseQueueMethodHelper() { + io.grpc.MethodDescriptor getPauseQueueMethod; + if ((getPauseQueueMethod = CloudTasksGrpc.getPauseQueueMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getPauseQueueMethod = CloudTasksGrpc.getPauseQueueMethod) == null) { + CloudTasksGrpc.getPauseQueueMethod = getPauseQueueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "PauseQueue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.PauseQueueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("PauseQueue")) + .build(); + } + } + } + return getPauseQueueMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getResumeQueueMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_RESUME_QUEUE = getResumeQueueMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getResumeQueueMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getResumeQueueMethod() { + return getResumeQueueMethodHelper(); + } + + private static io.grpc.MethodDescriptor getResumeQueueMethodHelper() { + io.grpc.MethodDescriptor getResumeQueueMethod; + if ((getResumeQueueMethod = CloudTasksGrpc.getResumeQueueMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getResumeQueueMethod = CloudTasksGrpc.getResumeQueueMethod) == null) { + CloudTasksGrpc.getResumeQueueMethod = getResumeQueueMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "ResumeQueue")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.ResumeQueueRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("ResumeQueue")) + .build(); + } + } + } + return getResumeQueueMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetIamPolicyMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_GET_IAM_POLICY = getGetIamPolicyMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getGetIamPolicyMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getGetIamPolicyMethod() { + return getGetIamPolicyMethodHelper(); + } + + private static io.grpc.MethodDescriptor getGetIamPolicyMethodHelper() { + io.grpc.MethodDescriptor getGetIamPolicyMethod; + if ((getGetIamPolicyMethod = CloudTasksGrpc.getGetIamPolicyMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getGetIamPolicyMethod = CloudTasksGrpc.getGetIamPolicyMethod) == null) { + CloudTasksGrpc.getGetIamPolicyMethod = getGetIamPolicyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "GetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("GetIamPolicy")) + .build(); + } + } + } + return getGetIamPolicyMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getSetIamPolicyMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_SET_IAM_POLICY = getSetIamPolicyMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getSetIamPolicyMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getSetIamPolicyMethod() { + return getSetIamPolicyMethodHelper(); + } + + private static io.grpc.MethodDescriptor getSetIamPolicyMethodHelper() { + io.grpc.MethodDescriptor getSetIamPolicyMethod; + if ((getSetIamPolicyMethod = CloudTasksGrpc.getSetIamPolicyMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getSetIamPolicyMethod = CloudTasksGrpc.getSetIamPolicyMethod) == null) { + CloudTasksGrpc.getSetIamPolicyMethod = getSetIamPolicyMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "SetIamPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.Policy.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("SetIamPolicy")) + .build(); + } + } + } + return getSetIamPolicyMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getTestIamPermissionsMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_TEST_IAM_PERMISSIONS = getTestIamPermissionsMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getTestIamPermissionsMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getTestIamPermissionsMethod() { + return getTestIamPermissionsMethodHelper(); + } + + private static io.grpc.MethodDescriptor getTestIamPermissionsMethodHelper() { + io.grpc.MethodDescriptor getTestIamPermissionsMethod; + if ((getTestIamPermissionsMethod = CloudTasksGrpc.getTestIamPermissionsMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getTestIamPermissionsMethod = CloudTasksGrpc.getTestIamPermissionsMethod) == null) { + CloudTasksGrpc.getTestIamPermissionsMethod = getTestIamPermissionsMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "TestIamPermissions")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.iam.v1.TestIamPermissionsResponse.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("TestIamPermissions")) + .build(); + } + } + } + return getTestIamPermissionsMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getListTasksMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_LIST_TASKS = getListTasksMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getListTasksMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getListTasksMethod() { + return getListTasksMethodHelper(); + } + + private static io.grpc.MethodDescriptor getListTasksMethodHelper() { + io.grpc.MethodDescriptor getListTasksMethod; + if ((getListTasksMethod = CloudTasksGrpc.getListTasksMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getListTasksMethod = CloudTasksGrpc.getListTasksMethod) == null) { + CloudTasksGrpc.getListTasksMethod = getListTasksMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "ListTasks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.ListTasksRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.ListTasksResponse.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("ListTasks")) + .build(); + } + } + } + return getListTasksMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getGetTaskMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_GET_TASK = getGetTaskMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getGetTaskMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getGetTaskMethod() { + return getGetTaskMethodHelper(); + } + + private static io.grpc.MethodDescriptor getGetTaskMethodHelper() { + io.grpc.MethodDescriptor getGetTaskMethod; + if ((getGetTaskMethod = CloudTasksGrpc.getGetTaskMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getGetTaskMethod = CloudTasksGrpc.getGetTaskMethod) == null) { + CloudTasksGrpc.getGetTaskMethod = getGetTaskMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "GetTask")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.GetTaskRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.Task.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("GetTask")) + .build(); + } + } + } + return getGetTaskMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCreateTaskMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_CREATE_TASK = getCreateTaskMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getCreateTaskMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getCreateTaskMethod() { + return getCreateTaskMethodHelper(); + } + + private static io.grpc.MethodDescriptor getCreateTaskMethodHelper() { + io.grpc.MethodDescriptor getCreateTaskMethod; + if ((getCreateTaskMethod = CloudTasksGrpc.getCreateTaskMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getCreateTaskMethod = CloudTasksGrpc.getCreateTaskMethod) == null) { + CloudTasksGrpc.getCreateTaskMethod = getCreateTaskMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "CreateTask")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.CreateTaskRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.Task.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("CreateTask")) + .build(); + } + } + } + return getCreateTaskMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getDeleteTaskMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_DELETE_TASK = getDeleteTaskMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getDeleteTaskMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getDeleteTaskMethod() { + return getDeleteTaskMethodHelper(); + } + + private static io.grpc.MethodDescriptor getDeleteTaskMethodHelper() { + io.grpc.MethodDescriptor getDeleteTaskMethod; + if ((getDeleteTaskMethod = CloudTasksGrpc.getDeleteTaskMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getDeleteTaskMethod = CloudTasksGrpc.getDeleteTaskMethod) == null) { + CloudTasksGrpc.getDeleteTaskMethod = getDeleteTaskMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "DeleteTask")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.DeleteTaskRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("DeleteTask")) + .build(); + } + } + } + return getDeleteTaskMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getLeaseTasksMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_LEASE_TASKS = getLeaseTasksMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getLeaseTasksMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getLeaseTasksMethod() { + return getLeaseTasksMethodHelper(); + } + + private static io.grpc.MethodDescriptor getLeaseTasksMethodHelper() { + io.grpc.MethodDescriptor getLeaseTasksMethod; + if ((getLeaseTasksMethod = CloudTasksGrpc.getLeaseTasksMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getLeaseTasksMethod = CloudTasksGrpc.getLeaseTasksMethod) == null) { + CloudTasksGrpc.getLeaseTasksMethod = getLeaseTasksMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "LeaseTasks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.LeaseTasksRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.LeaseTasksResponse.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("LeaseTasks")) + .build(); + } + } + } + return getLeaseTasksMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getAcknowledgeTaskMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_ACKNOWLEDGE_TASK = getAcknowledgeTaskMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getAcknowledgeTaskMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getAcknowledgeTaskMethod() { + return getAcknowledgeTaskMethodHelper(); + } + + private static io.grpc.MethodDescriptor getAcknowledgeTaskMethodHelper() { + io.grpc.MethodDescriptor getAcknowledgeTaskMethod; + if ((getAcknowledgeTaskMethod = CloudTasksGrpc.getAcknowledgeTaskMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getAcknowledgeTaskMethod = CloudTasksGrpc.getAcknowledgeTaskMethod) == null) { + CloudTasksGrpc.getAcknowledgeTaskMethod = getAcknowledgeTaskMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "AcknowledgeTask")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("AcknowledgeTask")) + .build(); + } + } + } + return getAcknowledgeTaskMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getRenewLeaseMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_RENEW_LEASE = getRenewLeaseMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getRenewLeaseMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getRenewLeaseMethod() { + return getRenewLeaseMethodHelper(); + } + + private static io.grpc.MethodDescriptor getRenewLeaseMethodHelper() { + io.grpc.MethodDescriptor getRenewLeaseMethod; + if ((getRenewLeaseMethod = CloudTasksGrpc.getRenewLeaseMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getRenewLeaseMethod = CloudTasksGrpc.getRenewLeaseMethod) == null) { + CloudTasksGrpc.getRenewLeaseMethod = getRenewLeaseMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "RenewLease")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.RenewLeaseRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.Task.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("RenewLease")) + .build(); + } + } + } + return getRenewLeaseMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getCancelLeaseMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_CANCEL_LEASE = getCancelLeaseMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getCancelLeaseMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getCancelLeaseMethod() { + return getCancelLeaseMethodHelper(); + } + + private static io.grpc.MethodDescriptor getCancelLeaseMethodHelper() { + io.grpc.MethodDescriptor getCancelLeaseMethod; + if ((getCancelLeaseMethod = CloudTasksGrpc.getCancelLeaseMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getCancelLeaseMethod = CloudTasksGrpc.getCancelLeaseMethod) == null) { + CloudTasksGrpc.getCancelLeaseMethod = getCancelLeaseMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "CancelLease")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.CancelLeaseRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.Task.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("CancelLease")) + .build(); + } + } + } + return getCancelLeaseMethod; + } + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + @java.lang.Deprecated // Use {@link #getRunTaskMethod()} instead. + public static final io.grpc.MethodDescriptor METHOD_RUN_TASK = getRunTaskMethodHelper(); + + private static volatile io.grpc.MethodDescriptor getRunTaskMethod; + + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static io.grpc.MethodDescriptor getRunTaskMethod() { + return getRunTaskMethodHelper(); + } + + private static io.grpc.MethodDescriptor getRunTaskMethodHelper() { + io.grpc.MethodDescriptor getRunTaskMethod; + if ((getRunTaskMethod = CloudTasksGrpc.getRunTaskMethod) == null) { + synchronized (CloudTasksGrpc.class) { + if ((getRunTaskMethod = CloudTasksGrpc.getRunTaskMethod) == null) { + CloudTasksGrpc.getRunTaskMethod = getRunTaskMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName( + "google.cloud.tasks.v2beta2.CloudTasks", "RunTask")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.RunTaskRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.tasks.v2beta2.Task.getDefaultInstance())) + .setSchemaDescriptor(new CloudTasksMethodDescriptorSupplier("RunTask")) + .build(); + } + } + } + return getRunTaskMethod; + } + + /** + * Creates a new async stub that supports all call types for the service + */ + public static CloudTasksStub newStub(io.grpc.Channel channel) { + return new CloudTasksStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CloudTasksBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new CloudTasksBlockingStub(channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary calls on the service + */ + public static CloudTasksFutureStub newFutureStub( + io.grpc.Channel channel) { + return new CloudTasksFutureStub(channel); + } + + /** + *
+   * Cloud Tasks allows developers to manage the execution of background
+   * work in their applications.
+   * 
+ */ + public static abstract class CloudTasksImplBase implements io.grpc.BindableService { + + /** + *
+     * Lists queues.
+     * Queues are returned in lexicographical order.
+     * 
+ */ + public void listQueues(com.google.cloud.tasks.v2beta2.ListQueuesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getListQueuesMethodHelper(), responseObserver); + } + + /** + *
+     * Gets a queue.
+     * 
+ */ + public void getQueue(com.google.cloud.tasks.v2beta2.GetQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetQueueMethodHelper(), responseObserver); + } + + /** + *
+     * Creates a queue.
+     * Queues created with this method allow tasks to live for a maximum of 31
+     * days. After a task is 31 days old, the task will be deleted regardless of whether
+     * it was dispatched or not.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public void createQueue(com.google.cloud.tasks.v2beta2.CreateQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateQueueMethodHelper(), responseObserver); + } + + /** + *
+     * Updates a queue.
+     * This method creates the queue if it does not exist and updates
+     * the queue if it does exist.
+     * Queues created with this method allow tasks to live for a maximum of 31
+     * days. After a task is 31 days old, the task will be deleted regardless of whether
+     * it was dispatched or not.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public void updateQueue(com.google.cloud.tasks.v2beta2.UpdateQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateQueueMethodHelper(), responseObserver); + } + + /** + *
+     * Deletes a queue.
+     * This command will delete the queue even if it has tasks in it.
+     * Note: If you delete a queue, a queue with the same name can't be created
+     * for 7 days.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public void deleteQueue(com.google.cloud.tasks.v2beta2.DeleteQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteQueueMethodHelper(), responseObserver); + } + + /** + *
+     * Purges a queue by deleting all of its tasks.
+     * All tasks created before this method is called are permanently deleted.
+     * Purge operations can take up to one minute to take effect. Tasks
+     * might be dispatched before the purge takes effect. A purge is irreversible.
+     * 
+ */ + public void purgeQueue(com.google.cloud.tasks.v2beta2.PurgeQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getPurgeQueueMethodHelper(), responseObserver); + } + + /** + *
+     * Pauses the queue.
+     * If a queue is paused then the system will stop dispatching tasks
+     * until the queue is resumed via
+     * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added
+     * when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+     * 
+ */ + public void pauseQueue(com.google.cloud.tasks.v2beta2.PauseQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getPauseQueueMethodHelper(), responseObserver); + } + + /** + *
+     * Resume a queue.
+     * This method resumes a queue after it has been
+     * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or
+     * [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored
+     * in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it
+     * will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING].
+     * WARNING: Resuming many high-QPS queues at the same time can
+     * lead to target overloading. If you are resuming high-QPS
+     * queues, follow the 500/50/5 pattern described in
+     * [Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf).
+     * 
+ */ + public void resumeQueue(com.google.cloud.tasks.v2beta2.ResumeQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getResumeQueueMethodHelper(), responseObserver); + } + + /** + *
+     * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue].
+     * Returns an empty policy if the resource exists and does not have a policy
+     * set.
+     * Authorization requires the following [Google IAM](/iam) permission on the
+     * specified resource parent:
+     * * `cloudtasks.queues.getIamPolicy`
+     * 
+ */ + public void getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetIamPolicyMethodHelper(), responseObserver); + } + + /** + *
+     * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing
+     * policy.
+     * Note: The Cloud Console does not check queue-level IAM permissions yet.
+     * Project-level permissions are required to use the Cloud Console.
+     * Authorization requires the following [Google IAM](/iam) permission on the
+     * specified resource parent:
+     * * `cloudtasks.queues.setIamPolicy`
+     * 
+ */ + public void setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getSetIamPolicyMethodHelper(), responseObserver); + } + + /** + *
+     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue].
+     * If the resource does not exist, this will return an empty set of
+     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Note: This operation is designed to be used for building permission-aware
+     * UIs and command-line tools, not for authorization checking. This operation
+     * may "fail open" without warning.
+     * 
+ */ + public void testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getTestIamPermissionsMethodHelper(), responseObserver); + } + + /** + *
+     * Lists the tasks in a queue.
+     * By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved
+     * due to performance considerations;
+     * [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the
+     * subset of information which is returned.
+     * 
+ */ + public void listTasks(com.google.cloud.tasks.v2beta2.ListTasksRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getListTasksMethodHelper(), responseObserver); + } + + /** + *
+     * Gets a task.
+     * 
+ */ + public void getTask(com.google.cloud.tasks.v2beta2.GetTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetTaskMethodHelper(), responseObserver); + } + + /** + *
+     * Creates a task and adds it to a queue.
+     * Tasks cannot be updated after creation; there is no UpdateTask command.
+     * * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),
+     *   the maximum task size is 100KB.
+     * * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this
+     *   the maximum task size is 1MB.
+     * 
+ */ + public void createTask(com.google.cloud.tasks.v2beta2.CreateTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateTaskMethodHelper(), responseObserver); + } + + /** + *
+     * Deletes a task.
+     * A task can be deleted if it is scheduled or dispatched. A task
+     * cannot be deleted if it has completed successfully or permanently
+     * failed.
+     * 
+ */ + public void deleteTask(com.google.cloud.tasks.v2beta2.DeleteTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteTaskMethodHelper(), responseObserver); + } + + /** + *
+     * Leases tasks from a pull queue for
+     * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * This method is invoked by the worker to obtain a lease. The
+     * worker must acknowledge the task via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have
+     * performed the work associated with the task.
+     * The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that
+     * the worker needs to perform the work associated with the task. To
+     * return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set
+     * [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to
+     * [FULL][google.cloud.tasks.v2beta2.Task.View.FULL].
+     * A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
+     * requests are allowed per
+     * queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+     * is returned when this limit is
+     * exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+     * is also returned when
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+     * is exceeded.
+     * 
+ */ + public void leaseTasks(com.google.cloud.tasks.v2beta2.LeaseTasksRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getLeaseTasksMethodHelper(), responseObserver); + } + + /** + *
+     * Acknowledges a pull task.
+     * The worker, that is, the entity that
+     * [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method
+     * to indicate that the work associated with the task has finished.
+     * The worker must acknowledge a task within the
+     * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease
+     * will expire and the task will become available to be leased
+     * again. After the task is acknowledged, it will not be returned
+     * by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
+     * [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
+     * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+     * 
+ */ + public void acknowledgeTask(com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getAcknowledgeTaskMethodHelper(), responseObserver); + } + + /** + *
+     * Renew the current lease of a pull task.
+     * The worker can use this method to extend the lease by a new
+     * duration, starting from now. The new task lease will be
+     * returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
+     * 
+ */ + public void renewLease(com.google.cloud.tasks.v2beta2.RenewLeaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getRenewLeaseMethodHelper(), responseObserver); + } + + /** + *
+     * Cancel a pull task's lease.
+     * The worker can use this method to cancel a task's lease by
+     * setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will
+     * make the task available to be leased to the next caller of
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+     * 
+ */ + public void cancelLease(com.google.cloud.tasks.v2beta2.CancelLeaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCancelLeaseMethodHelper(), responseObserver); + } + + /** + *
+     * Forces a task to run now.
+     * When this method is called, Cloud Tasks will dispatch the task, even if
+     * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or
+     * is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+     * This command is meant to be used for manual debugging. For
+     * example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed
+     * task after a fix has been made or to manually force a task to be
+     * dispatched now.
+     * The dispatched task is returned. That is, the task that is returned
+     * contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but
+     * before the task is received by its target.
+     * If Cloud Tasks receives a successful response from the task's
+     * target, then the task will be deleted; otherwise the task's
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified
+     * in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig].
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
+     * task that has already succeeded or permanently failed.
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a
+     * [pull task][google.cloud.tasks.v2beta2.PullMessage].
+     * 
+ */ + public void runTask(com.google.cloud.tasks.v2beta2.RunTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getRunTaskMethodHelper(), responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListQueuesMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.ListQueuesRequest, + com.google.cloud.tasks.v2beta2.ListQueuesResponse>( + this, METHODID_LIST_QUEUES))) + .addMethod( + getGetQueueMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.GetQueueRequest, + com.google.cloud.tasks.v2beta2.Queue>( + this, METHODID_GET_QUEUE))) + .addMethod( + getCreateQueueMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.CreateQueueRequest, + com.google.cloud.tasks.v2beta2.Queue>( + this, METHODID_CREATE_QUEUE))) + .addMethod( + getUpdateQueueMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.UpdateQueueRequest, + com.google.cloud.tasks.v2beta2.Queue>( + this, METHODID_UPDATE_QUEUE))) + .addMethod( + getDeleteQueueMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.DeleteQueueRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_QUEUE))) + .addMethod( + getPurgeQueueMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.PurgeQueueRequest, + com.google.cloud.tasks.v2beta2.Queue>( + this, METHODID_PURGE_QUEUE))) + .addMethod( + getPauseQueueMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.PauseQueueRequest, + com.google.cloud.tasks.v2beta2.Queue>( + this, METHODID_PAUSE_QUEUE))) + .addMethod( + getResumeQueueMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.ResumeQueueRequest, + com.google.cloud.tasks.v2beta2.Queue>( + this, METHODID_RESUME_QUEUE))) + .addMethod( + getGetIamPolicyMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.iam.v1.GetIamPolicyRequest, + com.google.iam.v1.Policy>( + this, METHODID_GET_IAM_POLICY))) + .addMethod( + getSetIamPolicyMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.iam.v1.SetIamPolicyRequest, + com.google.iam.v1.Policy>( + this, METHODID_SET_IAM_POLICY))) + .addMethod( + getTestIamPermissionsMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.iam.v1.TestIamPermissionsRequest, + com.google.iam.v1.TestIamPermissionsResponse>( + this, METHODID_TEST_IAM_PERMISSIONS))) + .addMethod( + getListTasksMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.ListTasksRequest, + com.google.cloud.tasks.v2beta2.ListTasksResponse>( + this, METHODID_LIST_TASKS))) + .addMethod( + getGetTaskMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.GetTaskRequest, + com.google.cloud.tasks.v2beta2.Task>( + this, METHODID_GET_TASK))) + .addMethod( + getCreateTaskMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.CreateTaskRequest, + com.google.cloud.tasks.v2beta2.Task>( + this, METHODID_CREATE_TASK))) + .addMethod( + getDeleteTaskMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.DeleteTaskRequest, + com.google.protobuf.Empty>( + this, METHODID_DELETE_TASK))) + .addMethod( + getLeaseTasksMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.LeaseTasksRequest, + com.google.cloud.tasks.v2beta2.LeaseTasksResponse>( + this, METHODID_LEASE_TASKS))) + .addMethod( + getAcknowledgeTaskMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest, + com.google.protobuf.Empty>( + this, METHODID_ACKNOWLEDGE_TASK))) + .addMethod( + getRenewLeaseMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.RenewLeaseRequest, + com.google.cloud.tasks.v2beta2.Task>( + this, METHODID_RENEW_LEASE))) + .addMethod( + getCancelLeaseMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.CancelLeaseRequest, + com.google.cloud.tasks.v2beta2.Task>( + this, METHODID_CANCEL_LEASE))) + .addMethod( + getRunTaskMethodHelper(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.tasks.v2beta2.RunTaskRequest, + com.google.cloud.tasks.v2beta2.Task>( + this, METHODID_RUN_TASK))) + .build(); + } + } + + /** + *
+   * Cloud Tasks allows developers to manage the execution of background
+   * work in their applications.
+   * 
+ */ + public static final class CloudTasksStub extends io.grpc.stub.AbstractStub { + private CloudTasksStub(io.grpc.Channel channel) { + super(channel); + } + + private CloudTasksStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudTasksStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new CloudTasksStub(channel, callOptions); + } + + /** + *
+     * Lists queues.
+     * Queues are returned in lexicographical order.
+     * 
+ */ + public void listQueues(com.google.cloud.tasks.v2beta2.ListQueuesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListQueuesMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets a queue.
+     * 
+ */ + public void getQueue(com.google.cloud.tasks.v2beta2.GetQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetQueueMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a queue.
+     * Queues created with this method allow tasks to live for a maximum of 31
+     * days. After a task is 31 days old, the task will be deleted regardless of whether
+     * it was dispatched or not.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public void createQueue(com.google.cloud.tasks.v2beta2.CreateQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateQueueMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Updates a queue.
+     * This method creates the queue if it does not exist and updates
+     * the queue if it does exist.
+     * Queues created with this method allow tasks to live for a maximum of 31
+     * days. After a task is 31 days old, the task will be deleted regardless of whether
+     * it was dispatched or not.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public void updateQueue(com.google.cloud.tasks.v2beta2.UpdateQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateQueueMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a queue.
+     * This command will delete the queue even if it has tasks in it.
+     * Note: If you delete a queue, a queue with the same name can't be created
+     * for 7 days.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public void deleteQueue(com.google.cloud.tasks.v2beta2.DeleteQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteQueueMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Purges a queue by deleting all of its tasks.
+     * All tasks created before this method is called are permanently deleted.
+     * Purge operations can take up to one minute to take effect. Tasks
+     * might be dispatched before the purge takes effect. A purge is irreversible.
+     * 
+ */ + public void purgeQueue(com.google.cloud.tasks.v2beta2.PurgeQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getPurgeQueueMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Pauses the queue.
+     * If a queue is paused then the system will stop dispatching tasks
+     * until the queue is resumed via
+     * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added
+     * when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+     * 
+ */ + public void pauseQueue(com.google.cloud.tasks.v2beta2.PauseQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getPauseQueueMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Resume a queue.
+     * This method resumes a queue after it has been
+     * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or
+     * [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored
+     * in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it
+     * will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING].
+     * WARNING: Resuming many high-QPS queues at the same time can
+     * lead to target overloading. If you are resuming high-QPS
+     * queues, follow the 500/50/5 pattern described in
+     * [Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf).
+     * 
+ */ + public void resumeQueue(com.google.cloud.tasks.v2beta2.ResumeQueueRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getResumeQueueMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue].
+     * Returns an empty policy if the resource exists and does not have a policy
+     * set.
+     * Authorization requires the following [Google IAM](/iam) permission on the
+     * specified resource parent:
+     * * `cloudtasks.queues.getIamPolicy`
+     * 
+ */ + public void getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetIamPolicyMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing
+     * policy.
+     * Note: The Cloud Console does not check queue-level IAM permissions yet.
+     * Project-level permissions are required to use the Cloud Console.
+     * Authorization requires the following [Google IAM](/iam) permission on the
+     * specified resource parent:
+     * * `cloudtasks.queues.setIamPolicy`
+     * 
+ */ + public void setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSetIamPolicyMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue].
+     * If the resource does not exist, this will return an empty set of
+     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Note: This operation is designed to be used for building permission-aware
+     * UIs and command-line tools, not for authorization checking. This operation
+     * may "fail open" without warning.
+     * 
+ */ + public void testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getTestIamPermissionsMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Lists the tasks in a queue.
+     * By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved
+     * due to performance considerations;
+     * [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the
+     * subset of information which is returned.
+     * 
+ */ + public void listTasks(com.google.cloud.tasks.v2beta2.ListTasksRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListTasksMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Gets a task.
+     * 
+ */ + public void getTask(com.google.cloud.tasks.v2beta2.GetTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetTaskMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Creates a task and adds it to a queue.
+     * Tasks cannot be updated after creation; there is no UpdateTask command.
+     * * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),
+     *   the maximum task size is 100KB.
+     * * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this
+     *   the maximum task size is 1MB.
+     * 
+ */ + public void createTask(com.google.cloud.tasks.v2beta2.CreateTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateTaskMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Deletes a task.
+     * A task can be deleted if it is scheduled or dispatched. A task
+     * cannot be deleted if it has completed successfully or permanently
+     * failed.
+     * 
+ */ + public void deleteTask(com.google.cloud.tasks.v2beta2.DeleteTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteTaskMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Leases tasks from a pull queue for
+     * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * This method is invoked by the worker to obtain a lease. The
+     * worker must acknowledge the task via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have
+     * performed the work associated with the task.
+     * The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that
+     * the worker needs to perform the work associated with the task. To
+     * return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set
+     * [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to
+     * [FULL][google.cloud.tasks.v2beta2.Task.View.FULL].
+     * A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
+     * requests are allowed per
+     * queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+     * is returned when this limit is
+     * exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+     * is also returned when
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+     * is exceeded.
+     * 
+ */ + public void leaseTasks(com.google.cloud.tasks.v2beta2.LeaseTasksRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getLeaseTasksMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Acknowledges a pull task.
+     * The worker, that is, the entity that
+     * [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method
+     * to indicate that the work associated with the task has finished.
+     * The worker must acknowledge a task within the
+     * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease
+     * will expire and the task will become available to be leased
+     * again. After the task is acknowledged, it will not be returned
+     * by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
+     * [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
+     * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+     * 
+ */ + public void acknowledgeTask(com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getAcknowledgeTaskMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Renew the current lease of a pull task.
+     * The worker can use this method to extend the lease by a new
+     * duration, starting from now. The new task lease will be
+     * returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
+     * 
+ */ + public void renewLease(com.google.cloud.tasks.v2beta2.RenewLeaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRenewLeaseMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Cancel a pull task's lease.
+     * The worker can use this method to cancel a task's lease by
+     * setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will
+     * make the task available to be leased to the next caller of
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+     * 
+ */ + public void cancelLease(com.google.cloud.tasks.v2beta2.CancelLeaseRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCancelLeaseMethodHelper(), getCallOptions()), request, responseObserver); + } + + /** + *
+     * Forces a task to run now.
+     * When this method is called, Cloud Tasks will dispatch the task, even if
+     * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or
+     * is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+     * This command is meant to be used for manual debugging. For
+     * example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed
+     * task after a fix has been made or to manually force a task to be
+     * dispatched now.
+     * The dispatched task is returned. That is, the task that is returned
+     * contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but
+     * before the task is received by its target.
+     * If Cloud Tasks receives a successful response from the task's
+     * target, then the task will be deleted; otherwise the task's
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified
+     * in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig].
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
+     * task that has already succeeded or permanently failed.
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a
+     * [pull task][google.cloud.tasks.v2beta2.PullMessage].
+     * 
+ */ + public void runTask(com.google.cloud.tasks.v2beta2.RunTaskRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getRunTaskMethodHelper(), getCallOptions()), request, responseObserver); + } + } + + /** + *
+   * Cloud Tasks allows developers to manage the execution of background
+   * work in their applications.
+   * 
+ */ + public static final class CloudTasksBlockingStub extends io.grpc.stub.AbstractStub { + private CloudTasksBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private CloudTasksBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudTasksBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new CloudTasksBlockingStub(channel, callOptions); + } + + /** + *
+     * Lists queues.
+     * Queues are returned in lexicographical order.
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.ListQueuesResponse listQueues(com.google.cloud.tasks.v2beta2.ListQueuesRequest request) { + return blockingUnaryCall( + getChannel(), getListQueuesMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Gets a queue.
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.Queue getQueue(com.google.cloud.tasks.v2beta2.GetQueueRequest request) { + return blockingUnaryCall( + getChannel(), getGetQueueMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Creates a queue.
+     * Queues created with this method allow tasks to live for a maximum of 31
+     * days. After a task is 31 days old, the task will be deleted regardless of whether
+     * it was dispatched or not.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.Queue createQueue(com.google.cloud.tasks.v2beta2.CreateQueueRequest request) { + return blockingUnaryCall( + getChannel(), getCreateQueueMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Updates a queue.
+     * This method creates the queue if it does not exist and updates
+     * the queue if it does exist.
+     * Queues created with this method allow tasks to live for a maximum of 31
+     * days. After a task is 31 days old, the task will be deleted regardless of whether
+     * it was dispatched or not.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.Queue updateQueue(com.google.cloud.tasks.v2beta2.UpdateQueueRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateQueueMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Deletes a queue.
+     * This command will delete the queue even if it has tasks in it.
+     * Note: If you delete a queue, a queue with the same name can't be created
+     * for 7 days.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public com.google.protobuf.Empty deleteQueue(com.google.cloud.tasks.v2beta2.DeleteQueueRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteQueueMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Purges a queue by deleting all of its tasks.
+     * All tasks created before this method is called are permanently deleted.
+     * Purge operations can take up to one minute to take effect. Tasks
+     * might be dispatched before the purge takes effect. A purge is irreversible.
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.Queue purgeQueue(com.google.cloud.tasks.v2beta2.PurgeQueueRequest request) { + return blockingUnaryCall( + getChannel(), getPurgeQueueMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Pauses the queue.
+     * If a queue is paused then the system will stop dispatching tasks
+     * until the queue is resumed via
+     * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added
+     * when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.Queue pauseQueue(com.google.cloud.tasks.v2beta2.PauseQueueRequest request) { + return blockingUnaryCall( + getChannel(), getPauseQueueMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Resume a queue.
+     * This method resumes a queue after it has been
+     * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or
+     * [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored
+     * in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it
+     * will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING].
+     * WARNING: Resuming many high-QPS queues at the same time can
+     * lead to target overloading. If you are resuming high-QPS
+     * queues, follow the 500/50/5 pattern described in
+     * [Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf).
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.Queue resumeQueue(com.google.cloud.tasks.v2beta2.ResumeQueueRequest request) { + return blockingUnaryCall( + getChannel(), getResumeQueueMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue].
+     * Returns an empty policy if the resource exists and does not have a policy
+     * set.
+     * Authorization requires the following [Google IAM](/iam) permission on the
+     * specified resource parent:
+     * * `cloudtasks.queues.getIamPolicy`
+     * 
+ */ + public com.google.iam.v1.Policy getIamPolicy(com.google.iam.v1.GetIamPolicyRequest request) { + return blockingUnaryCall( + getChannel(), getGetIamPolicyMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing
+     * policy.
+     * Note: The Cloud Console does not check queue-level IAM permissions yet.
+     * Project-level permissions are required to use the Cloud Console.
+     * Authorization requires the following [Google IAM](/iam) permission on the
+     * specified resource parent:
+     * * `cloudtasks.queues.setIamPolicy`
+     * 
+ */ + public com.google.iam.v1.Policy setIamPolicy(com.google.iam.v1.SetIamPolicyRequest request) { + return blockingUnaryCall( + getChannel(), getSetIamPolicyMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue].
+     * If the resource does not exist, this will return an empty set of
+     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Note: This operation is designed to be used for building permission-aware
+     * UIs and command-line tools, not for authorization checking. This operation
+     * may "fail open" without warning.
+     * 
+ */ + public com.google.iam.v1.TestIamPermissionsResponse testIamPermissions(com.google.iam.v1.TestIamPermissionsRequest request) { + return blockingUnaryCall( + getChannel(), getTestIamPermissionsMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Lists the tasks in a queue.
+     * By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved
+     * due to performance considerations;
+     * [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the
+     * subset of information which is returned.
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.ListTasksResponse listTasks(com.google.cloud.tasks.v2beta2.ListTasksRequest request) { + return blockingUnaryCall( + getChannel(), getListTasksMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Gets a task.
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.Task getTask(com.google.cloud.tasks.v2beta2.GetTaskRequest request) { + return blockingUnaryCall( + getChannel(), getGetTaskMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Creates a task and adds it to a queue.
+     * Tasks cannot be updated after creation; there is no UpdateTask command.
+     * * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),
+     *   the maximum task size is 100KB.
+     * * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this
+     *   the maximum task size is 1MB.
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.Task createTask(com.google.cloud.tasks.v2beta2.CreateTaskRequest request) { + return blockingUnaryCall( + getChannel(), getCreateTaskMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Deletes a task.
+     * A task can be deleted if it is scheduled or dispatched. A task
+     * cannot be deleted if it has completed successfully or permanently
+     * failed.
+     * 
+ */ + public com.google.protobuf.Empty deleteTask(com.google.cloud.tasks.v2beta2.DeleteTaskRequest request) { + return blockingUnaryCall( + getChannel(), getDeleteTaskMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Leases tasks from a pull queue for
+     * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * This method is invoked by the worker to obtain a lease. The
+     * worker must acknowledge the task via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have
+     * performed the work associated with the task.
+     * The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that
+     * the worker needs to perform the work associated with the task. To
+     * return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set
+     * [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to
+     * [FULL][google.cloud.tasks.v2beta2.Task.View.FULL].
+     * A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
+     * requests are allowed per
+     * queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+     * is returned when this limit is
+     * exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+     * is also returned when
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+     * is exceeded.
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.LeaseTasksResponse leaseTasks(com.google.cloud.tasks.v2beta2.LeaseTasksRequest request) { + return blockingUnaryCall( + getChannel(), getLeaseTasksMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Acknowledges a pull task.
+     * The worker, that is, the entity that
+     * [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method
+     * to indicate that the work associated with the task has finished.
+     * The worker must acknowledge a task within the
+     * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease
+     * will expire and the task will become available to be leased
+     * again. After the task is acknowledged, it will not be returned
+     * by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
+     * [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
+     * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+     * 
+ */ + public com.google.protobuf.Empty acknowledgeTask(com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest request) { + return blockingUnaryCall( + getChannel(), getAcknowledgeTaskMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Renew the current lease of a pull task.
+     * The worker can use this method to extend the lease by a new
+     * duration, starting from now. The new task lease will be
+     * returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.Task renewLease(com.google.cloud.tasks.v2beta2.RenewLeaseRequest request) { + return blockingUnaryCall( + getChannel(), getRenewLeaseMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Cancel a pull task's lease.
+     * The worker can use this method to cancel a task's lease by
+     * setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will
+     * make the task available to be leased to the next caller of
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.Task cancelLease(com.google.cloud.tasks.v2beta2.CancelLeaseRequest request) { + return blockingUnaryCall( + getChannel(), getCancelLeaseMethodHelper(), getCallOptions(), request); + } + + /** + *
+     * Forces a task to run now.
+     * When this method is called, Cloud Tasks will dispatch the task, even if
+     * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or
+     * is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+     * This command is meant to be used for manual debugging. For
+     * example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed
+     * task after a fix has been made or to manually force a task to be
+     * dispatched now.
+     * The dispatched task is returned. That is, the task that is returned
+     * contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but
+     * before the task is received by its target.
+     * If Cloud Tasks receives a successful response from the task's
+     * target, then the task will be deleted; otherwise the task's
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified
+     * in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig].
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
+     * task that has already succeeded or permanently failed.
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a
+     * [pull task][google.cloud.tasks.v2beta2.PullMessage].
+     * 
+ */ + public com.google.cloud.tasks.v2beta2.Task runTask(com.google.cloud.tasks.v2beta2.RunTaskRequest request) { + return blockingUnaryCall( + getChannel(), getRunTaskMethodHelper(), getCallOptions(), request); + } + } + + /** + *
+   * Cloud Tasks allows developers to manage the execution of background
+   * work in their applications.
+   * 
+ */ + public static final class CloudTasksFutureStub extends io.grpc.stub.AbstractStub { + private CloudTasksFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private CloudTasksFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudTasksFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new CloudTasksFutureStub(channel, callOptions); + } + + /** + *
+     * Lists queues.
+     * Queues are returned in lexicographical order.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listQueues( + com.google.cloud.tasks.v2beta2.ListQueuesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListQueuesMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Gets a queue.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getQueue( + com.google.cloud.tasks.v2beta2.GetQueueRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetQueueMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Creates a queue.
+     * Queues created with this method allow tasks to live for a maximum of 31
+     * days. After a task is 31 days old, the task will be deleted regardless of whether
+     * it was dispatched or not.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createQueue( + com.google.cloud.tasks.v2beta2.CreateQueueRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateQueueMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Updates a queue.
+     * This method creates the queue if it does not exist and updates
+     * the queue if it does exist.
+     * Queues created with this method allow tasks to live for a maximum of 31
+     * days. After a task is 31 days old, the task will be deleted regardless of whether
+     * it was dispatched or not.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture updateQueue( + com.google.cloud.tasks.v2beta2.UpdateQueueRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateQueueMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Deletes a queue.
+     * This command will delete the queue even if it has tasks in it.
+     * Note: If you delete a queue, a queue with the same name can't be created
+     * for 7 days.
+     * WARNING: Using this method may have unintended side effects if you are
+     * using an App Engine `queue.yaml` or `queue.xml` file to manage your queues.
+     * Read
+     * [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml)
+     * before using this method.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteQueue( + com.google.cloud.tasks.v2beta2.DeleteQueueRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteQueueMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Purges a queue by deleting all of its tasks.
+     * All tasks created before this method is called are permanently deleted.
+     * Purge operations can take up to one minute to take effect. Tasks
+     * might be dispatched before the purge takes effect. A purge is irreversible.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture purgeQueue( + com.google.cloud.tasks.v2beta2.PurgeQueueRequest request) { + return futureUnaryCall( + getChannel().newCall(getPurgeQueueMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Pauses the queue.
+     * If a queue is paused then the system will stop dispatching tasks
+     * until the queue is resumed via
+     * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added
+     * when the queue is paused. A queue is paused if its
+     * [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture pauseQueue( + com.google.cloud.tasks.v2beta2.PauseQueueRequest request) { + return futureUnaryCall( + getChannel().newCall(getPauseQueueMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Resume a queue.
+     * This method resumes a queue after it has been
+     * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or
+     * [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored
+     * in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it
+     * will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING].
+     * WARNING: Resuming many high-QPS queues at the same time can
+     * lead to target overloading. If you are resuming high-QPS
+     * queues, follow the 500/50/5 pattern described in
+     * [Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf).
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture resumeQueue( + com.google.cloud.tasks.v2beta2.ResumeQueueRequest request) { + return futureUnaryCall( + getChannel().newCall(getResumeQueueMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue].
+     * Returns an empty policy if the resource exists and does not have a policy
+     * set.
+     * Authorization requires the following [Google IAM](/iam) permission on the
+     * specified resource parent:
+     * * `cloudtasks.queues.getIamPolicy`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getIamPolicy( + com.google.iam.v1.GetIamPolicyRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetIamPolicyMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing
+     * policy.
+     * Note: The Cloud Console does not check queue-level IAM permissions yet.
+     * Project-level permissions are required to use the Cloud Console.
+     * Authorization requires the following [Google IAM](/iam) permission on the
+     * specified resource parent:
+     * * `cloudtasks.queues.setIamPolicy`
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture setIamPolicy( + com.google.iam.v1.SetIamPolicyRequest request) { + return futureUnaryCall( + getChannel().newCall(getSetIamPolicyMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue].
+     * If the resource does not exist, this will return an empty set of
+     * permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error.
+     * Note: This operation is designed to be used for building permission-aware
+     * UIs and command-line tools, not for authorization checking. This operation
+     * may "fail open" without warning.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture testIamPermissions( + com.google.iam.v1.TestIamPermissionsRequest request) { + return futureUnaryCall( + getChannel().newCall(getTestIamPermissionsMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Lists the tasks in a queue.
+     * By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved
+     * due to performance considerations;
+     * [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the
+     * subset of information which is returned.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture listTasks( + com.google.cloud.tasks.v2beta2.ListTasksRequest request) { + return futureUnaryCall( + getChannel().newCall(getListTasksMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Gets a task.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getTask( + com.google.cloud.tasks.v2beta2.GetTaskRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetTaskMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Creates a task and adds it to a queue.
+     * Tasks cannot be updated after creation; there is no UpdateTask command.
+     * * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget),
+     *   the maximum task size is 100KB.
+     * * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this
+     *   the maximum task size is 1MB.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture createTask( + com.google.cloud.tasks.v2beta2.CreateTaskRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateTaskMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Deletes a task.
+     * A task can be deleted if it is scheduled or dispatched. A task
+     * cannot be deleted if it has completed successfully or permanently
+     * failed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture deleteTask( + com.google.cloud.tasks.v2beta2.DeleteTaskRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteTaskMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Leases tasks from a pull queue for
+     * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * This method is invoked by the worker to obtain a lease. The
+     * worker must acknowledge the task via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have
+     * performed the work associated with the task.
+     * The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that
+     * the worker needs to perform the work associated with the task. To
+     * return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set
+     * [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to
+     * [FULL][google.cloud.tasks.v2beta2.Task.View.FULL].
+     * A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
+     * requests are allowed per
+     * queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+     * is returned when this limit is
+     * exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED]
+     * is also returned when
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+     * is exceeded.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture leaseTasks( + com.google.cloud.tasks.v2beta2.LeaseTasksRequest request) { + return futureUnaryCall( + getChannel().newCall(getLeaseTasksMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Acknowledges a pull task.
+     * The worker, that is, the entity that
+     * [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method
+     * to indicate that the work associated with the task has finished.
+     * The worker must acknowledge a task within the
+     * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease
+     * will expire and the task will become available to be leased
+     * again. After the task is acknowledged, it will not be returned
+     * by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks],
+     * [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or
+     * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture acknowledgeTask( + com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest request) { + return futureUnaryCall( + getChannel().newCall(getAcknowledgeTaskMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Renew the current lease of a pull task.
+     * The worker can use this method to extend the lease by a new
+     * duration, starting from now. The new task lease will be
+     * returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture renewLease( + com.google.cloud.tasks.v2beta2.RenewLeaseRequest request) { + return futureUnaryCall( + getChannel().newCall(getRenewLeaseMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Cancel a pull task's lease.
+     * The worker can use this method to cancel a task's lease by
+     * setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will
+     * make the task available to be leased to the next caller of
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture cancelLease( + com.google.cloud.tasks.v2beta2.CancelLeaseRequest request) { + return futureUnaryCall( + getChannel().newCall(getCancelLeaseMethodHelper(), getCallOptions()), request); + } + + /** + *
+     * Forces a task to run now.
+     * When this method is called, Cloud Tasks will dispatch the task, even if
+     * the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or
+     * is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED].
+     * This command is meant to be used for manual debugging. For
+     * example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed
+     * task after a fix has been made or to manually force a task to be
+     * dispatched now.
+     * The dispatched task is returned. That is, the task that is returned
+     * contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but
+     * before the task is received by its target.
+     * If Cloud Tasks receives a successful response from the task's
+     * target, then the task will be deleted; otherwise the task's
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified
+     * in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig].
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns
+     * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a
+     * task that has already succeeded or permanently failed.
+     * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a
+     * [pull task][google.cloud.tasks.v2beta2.PullMessage].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture runTask( + com.google.cloud.tasks.v2beta2.RunTaskRequest request) { + return futureUnaryCall( + getChannel().newCall(getRunTaskMethodHelper(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_QUEUES = 0; + private static final int METHODID_GET_QUEUE = 1; + private static final int METHODID_CREATE_QUEUE = 2; + private static final int METHODID_UPDATE_QUEUE = 3; + private static final int METHODID_DELETE_QUEUE = 4; + private static final int METHODID_PURGE_QUEUE = 5; + private static final int METHODID_PAUSE_QUEUE = 6; + private static final int METHODID_RESUME_QUEUE = 7; + private static final int METHODID_GET_IAM_POLICY = 8; + private static final int METHODID_SET_IAM_POLICY = 9; + private static final int METHODID_TEST_IAM_PERMISSIONS = 10; + private static final int METHODID_LIST_TASKS = 11; + private static final int METHODID_GET_TASK = 12; + private static final int METHODID_CREATE_TASK = 13; + private static final int METHODID_DELETE_TASK = 14; + private static final int METHODID_LEASE_TASKS = 15; + private static final int METHODID_ACKNOWLEDGE_TASK = 16; + private static final int METHODID_RENEW_LEASE = 17; + private static final int METHODID_CANCEL_LEASE = 18; + private static final int METHODID_RUN_TASK = 19; + + 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 CloudTasksImplBase serviceImpl; + private final int methodId; + + MethodHandlers(CloudTasksImplBase 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_QUEUES: + serviceImpl.listQueues((com.google.cloud.tasks.v2beta2.ListQueuesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_QUEUE: + serviceImpl.getQueue((com.google.cloud.tasks.v2beta2.GetQueueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_QUEUE: + serviceImpl.createQueue((com.google.cloud.tasks.v2beta2.CreateQueueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_QUEUE: + serviceImpl.updateQueue((com.google.cloud.tasks.v2beta2.UpdateQueueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_QUEUE: + serviceImpl.deleteQueue((com.google.cloud.tasks.v2beta2.DeleteQueueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PURGE_QUEUE: + serviceImpl.purgeQueue((com.google.cloud.tasks.v2beta2.PurgeQueueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PAUSE_QUEUE: + serviceImpl.pauseQueue((com.google.cloud.tasks.v2beta2.PauseQueueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESUME_QUEUE: + serviceImpl.resumeQueue((com.google.cloud.tasks.v2beta2.ResumeQueueRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_IAM_POLICY: + serviceImpl.getIamPolicy((com.google.iam.v1.GetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SET_IAM_POLICY: + serviceImpl.setIamPolicy((com.google.iam.v1.SetIamPolicyRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_TEST_IAM_PERMISSIONS: + serviceImpl.testIamPermissions((com.google.iam.v1.TestIamPermissionsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_TASKS: + serviceImpl.listTasks((com.google.cloud.tasks.v2beta2.ListTasksRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_TASK: + serviceImpl.getTask((com.google.cloud.tasks.v2beta2.GetTaskRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_TASK: + serviceImpl.createTask((com.google.cloud.tasks.v2beta2.CreateTaskRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_TASK: + serviceImpl.deleteTask((com.google.cloud.tasks.v2beta2.DeleteTaskRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LEASE_TASKS: + serviceImpl.leaseTasks((com.google.cloud.tasks.v2beta2.LeaseTasksRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ACKNOWLEDGE_TASK: + serviceImpl.acknowledgeTask((com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RENEW_LEASE: + serviceImpl.renewLease((com.google.cloud.tasks.v2beta2.RenewLeaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CANCEL_LEASE: + serviceImpl.cancelLease((com.google.cloud.tasks.v2beta2.CancelLeaseRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RUN_TASK: + serviceImpl.runTask((com.google.cloud.tasks.v2beta2.RunTaskRequest) 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 CloudTasksBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CloudTasksBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CloudTasks"); + } + } + + private static final class CloudTasksFileDescriptorSupplier + extends CloudTasksBaseDescriptorSupplier { + CloudTasksFileDescriptorSupplier() {} + } + + private static final class CloudTasksMethodDescriptorSupplier + extends CloudTasksBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + CloudTasksMethodDescriptorSupplier(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 (CloudTasksGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CloudTasksFileDescriptorSupplier()) + .addMethod(getListQueuesMethodHelper()) + .addMethod(getGetQueueMethodHelper()) + .addMethod(getCreateQueueMethodHelper()) + .addMethod(getUpdateQueueMethodHelper()) + .addMethod(getDeleteQueueMethodHelper()) + .addMethod(getPurgeQueueMethodHelper()) + .addMethod(getPauseQueueMethodHelper()) + .addMethod(getResumeQueueMethodHelper()) + .addMethod(getGetIamPolicyMethodHelper()) + .addMethod(getSetIamPolicyMethodHelper()) + .addMethod(getTestIamPermissionsMethodHelper()) + .addMethod(getListTasksMethodHelper()) + .addMethod(getGetTaskMethodHelper()) + .addMethod(getCreateTaskMethodHelper()) + .addMethod(getDeleteTaskMethodHelper()) + .addMethod(getLeaseTasksMethodHelper()) + .addMethod(getAcknowledgeTaskMethodHelper()) + .addMethod(getRenewLeaseMethodHelper()) + .addMethod(getCancelLeaseMethodHelper()) + .addMethod(getRunTaskMethodHelper()) + .build(); + } + } + } + return result; + } +} diff --git a/google-api-grpc/pom.xml b/google-api-grpc/pom.xml index 481914fed904..26ce5d9e3e29 100644 --- a/google-api-grpc/pom.xml +++ b/google-api-grpc/pom.xml @@ -117,7 +117,7 @@ com.google.api.grpc proto-google-common-protos - 1.11.0 + 1.12.0 com.google.api.grpc @@ -356,6 +356,16 @@ grpc-google-cloud-speech-v1 0.18.1-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-tasks-v2beta2 + 0.18.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-tasks-v2beta2 + 0.18.1-SNAPSHOT + com.google.api.grpc proto-google-cloud-texttospeech-v1 @@ -522,6 +532,7 @@ grpc-google-cloud-speech-v1 grpc-google-cloud-speech-v1beta1 grpc-google-cloud-speech-v1p1beta1 + grpc-google-cloud-tasks-v2beta2 grpc-google-cloud-texttospeech-v1 grpc-google-cloud-texttospeech-v1beta1 grpc-google-cloud-trace-v1 @@ -559,6 +570,7 @@ proto-google-cloud-speech-v1 proto-google-cloud-speech-v1beta1 proto-google-cloud-speech-v1p1beta1 + proto-google-cloud-tasks-v2beta2 proto-google-cloud-texttospeech-v1 proto-google-cloud-texttospeech-v1beta1 proto-google-cloud-trace-v1 diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java index f050d50fb8e5..78243c0bebdf 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Action.java @@ -6,6 +6,7 @@ /** *
  * A task to execute on the completion of a job.
+ * See https://cloud.google.com/dlp/docs/concepts-actions to learn more.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.Action} @@ -141,7 +142,7 @@ public interface SaveFindingsOrBuilder extends * If set, the detailed findings will be persisted to the specified * OutputStorageConfig. Only a single instance of this action can be * specified. - * Compatible with: Inspect + * Compatible with: Inspect, Risk * * * Protobuf type {@code google.privacy.dlp.v2.Action.SaveFindings} @@ -408,7 +409,7 @@ protected Builder newBuilderForType( * If set, the detailed findings will be persisted to the specified * OutputStorageConfig. Only a single instance of this action can be * specified. - * Compatible with: Inspect + * Compatible with: Inspect, Risk * * * Protobuf type {@code google.privacy.dlp.v2.Action.SaveFindings} @@ -2079,6 +2080,7 @@ protected Builder newBuilderForType( /** *
    * A task to execute on the completion of a job.
+   * See https://cloud.google.com/dlp/docs/concepts-actions to learn more.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.Action} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java index 0d99f490cca9..1895141ff1d4 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetails.java @@ -149,6 +149,20 @@ private AnalyzeDataSourceRiskDetails( resultCase_ = 7; break; } + case 74: { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder subBuilder = null; + if (resultCase_ == 9) { + subBuilder = ((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_).toBuilder(); + } + result_ = + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_); + result_ = subBuilder.buildPartial(); + } + resultCase_ = 9; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -13815,186 +13829,3528 @@ public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResu } - private int resultCase_ = 0; - private java.lang.Object result_; - public enum ResultCase - implements com.google.protobuf.Internal.EnumLite { - NUMERICAL_STATS_RESULT(3), - CATEGORICAL_STATS_RESULT(4), - K_ANONYMITY_RESULT(5), - L_DIVERSITY_RESULT(6), - K_MAP_ESTIMATION_RESULT(7), - RESULT_NOT_SET(0); - private final int value; - private ResultCase(int value) { - this.value = value; - } + public interface DeltaPresenceEstimationResultOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) + com.google.protobuf.MessageOrBuilder { + /** - * @deprecated Use {@link #forNumber(int)} instead. + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; */ - @java.lang.Deprecated - public static ResultCase valueOf(int value) { - return forNumber(value); - } - - public static ResultCase forNumber(int value) { - switch (value) { - case 3: return NUMERICAL_STATS_RESULT; - case 4: return CATEGORICAL_STATS_RESULT; - case 5: return K_ANONYMITY_RESULT; - case 6: return L_DIVERSITY_RESULT; - case 7: return K_MAP_ESTIMATION_RESULT; - case 0: return RESULT_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ResultCase - getResultCase() { - return ResultCase.forNumber( - resultCase_); - } - - public static final int REQUESTED_PRIVACY_METRIC_FIELD_NUMBER = 1; - private com.google.privacy.dlp.v2.PrivacyMetric requestedPrivacyMetric_; - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - public boolean hasRequestedPrivacyMetric() { - return requestedPrivacyMetric_ != null; - } - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - public com.google.privacy.dlp.v2.PrivacyMetric getRequestedPrivacyMetric() { - return requestedPrivacyMetric_ == null ? com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : requestedPrivacyMetric_; - } - /** - *
-   * Privacy metric to compute.
-   * 
- * - * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; - */ - public com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getRequestedPrivacyMetricOrBuilder() { - return getRequestedPrivacyMetric(); - } - - public static final int REQUESTED_SOURCE_TABLE_FIELD_NUMBER = 2; - private com.google.privacy.dlp.v2.BigQueryTable requestedSourceTable_; - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - public boolean hasRequestedSourceTable() { - return requestedSourceTable_ != null; - } - /** - *
-   * Input dataset to compute metrics over.
-   * 
- * - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - public com.google.privacy.dlp.v2.BigQueryTable getRequestedSourceTable() { - return requestedSourceTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : requestedSourceTable_; + java.util.List + getDeltaPresenceEstimationHistogramList(); + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDeltaPresenceEstimationHistogram(int index); + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + int getDeltaPresenceEstimationHistogramCount(); + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + java.util.List + getDeltaPresenceEstimationHistogramOrBuilderList(); + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder getDeltaPresenceEstimationHistogramOrBuilder( + int index); } /** *
-   * Input dataset to compute metrics over.
+   * Result of the δ-presence computation. Note that these results are an
+   * estimation, not exact values.
    * 
* - * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; - */ - public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getRequestedSourceTableOrBuilder() { - return getRequestedSourceTable(); - } - - public static final int NUMERICAL_STATS_RESULT_FIELD_NUMBER = 3; - /** - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - */ - public boolean hasNumericalStatsResult() { - return resultCase_ == 3; - } - /** - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult} */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getNumericalStatsResult() { - if (resultCase_ == 3) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; + public static final class DeltaPresenceEstimationResult extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) + DeltaPresenceEstimationResultOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeltaPresenceEstimationResult.newBuilder() to construct. + private DeltaPresenceEstimationResult(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); - } - /** - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder getNumericalStatsResultOrBuilder() { - if (resultCase_ == 3) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; + private DeltaPresenceEstimationResult() { + deltaPresenceEstimationHistogram_ = java.util.Collections.emptyList(); } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); - } - public static final int CATEGORICAL_STATS_RESULT_FIELD_NUMBER = 4; - /** - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - public boolean hasCategoricalStatsResult() { - return resultCase_ == 4; - } - /** - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getCategoricalStatsResult() { - if (resultCase_ == 4) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); - } - /** - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder getCategoricalStatsResultOrBuilder() { - if (resultCase_ == 4) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; + private DeltaPresenceEstimationResult( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + deltaPresenceEstimationHistogram_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + deltaPresenceEstimationHistogram_.add( + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + deltaPresenceEstimationHistogram_ = java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); - } - public static final int K_ANONYMITY_RESULT_FIELD_NUMBER = 5; - /** - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - */ - public boolean hasKAnonymityResult() { - return resultCase_ == 5; - } - /** - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; - */ - public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getKAnonymityResult() { - if (resultCase_ == 5) { - return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_; + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder.class); } - return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); - } - /** - * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + + public interface DeltaPresenceEstimationQuasiIdValuesOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + java.util.List + getQuasiIdsValuesList(); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + int getQuasiIdsValuesCount(); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + java.util.List + getQuasiIdsValuesOrBuilderList(); + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index); + + /** + *
+       * The estimated probability that a given individual sharing these
+       * quasi-identifier values is in the dataset. This value, typically called
+       * δ, is the ratio between the number of records in the dataset with these
+       * quasi-identifier values, and the total number of individuals (inside
+       * *and* outside the dataset) with these quasi-identifier values.
+       * For example, if there are 15 individuals in the dataset who share the
+       * same quasi-identifier values, and an estimated 100 people in the entire
+       * population with these values, then δ is 0.15.
+       * 
+ * + * double estimated_probability = 2; + */ + double getEstimatedProbability(); + } + /** + *
+     * A tuple of values for the quasi-identifier columns.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues} + */ + public static final class DeltaPresenceEstimationQuasiIdValues extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) + DeltaPresenceEstimationQuasiIdValuesOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeltaPresenceEstimationQuasiIdValues.newBuilder() to construct. + private DeltaPresenceEstimationQuasiIdValues(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeltaPresenceEstimationQuasiIdValues() { + quasiIdsValues_ = java.util.Collections.emptyList(); + estimatedProbability_ = 0D; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeltaPresenceEstimationQuasiIdValues( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + quasiIdsValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIdsValues_.add( + input.readMessage(com.google.privacy.dlp.v2.Value.parser(), extensionRegistry)); + break; + } + case 17: { + + estimatedProbability_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder.class); + } + + private int bitField0_; + public static final int QUASI_IDS_VALUES_FIELD_NUMBER = 1; + private java.util.List quasiIdsValues_; + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List getQuasiIdsValuesList() { + return quasiIdsValues_; + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List + getQuasiIdsValuesOrBuilderList() { + return quasiIdsValues_; + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public int getQuasiIdsValuesCount() { + return quasiIdsValues_.size(); + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { + return quasiIdsValues_.get(index); + } + /** + *
+       * The quasi-identifier values.
+       * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index) { + return quasiIdsValues_.get(index); + } + + public static final int ESTIMATED_PROBABILITY_FIELD_NUMBER = 2; + private double estimatedProbability_; + /** + *
+       * The estimated probability that a given individual sharing these
+       * quasi-identifier values is in the dataset. This value, typically called
+       * δ, is the ratio between the number of records in the dataset with these
+       * quasi-identifier values, and the total number of individuals (inside
+       * *and* outside the dataset) with these quasi-identifier values.
+       * For example, if there are 15 individuals in the dataset who share the
+       * same quasi-identifier values, and an estimated 100 people in the entire
+       * population with these values, then δ is 0.15.
+       * 
+ * + * double estimated_probability = 2; + */ + public double getEstimatedProbability() { + return estimatedProbability_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIdsValues_.size(); i++) { + output.writeMessage(1, quasiIdsValues_.get(i)); + } + if (estimatedProbability_ != 0D) { + output.writeDouble(2, estimatedProbability_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIdsValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIdsValues_.get(i)); + } + if (estimatedProbability_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, estimatedProbability_); + } + size += unknownFields.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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) obj; + + boolean result = true; + result = result && getQuasiIdsValuesList() + .equals(other.getQuasiIdsValuesList()); + result = result && ( + java.lang.Double.doubleToLongBits(getEstimatedProbability()) + == java.lang.Double.doubleToLongBits( + other.getEstimatedProbability())); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQuasiIdsValuesCount() > 0) { + hash = (37 * hash) + QUASI_IDS_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsValuesList().hashCode(); + } + hash = (37 * hash) + ESTIMATED_PROBABILITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getEstimatedProbability())); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues 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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues 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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues 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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 tuple of values for the quasi-identifier columns.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsValuesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsValuesBuilder_.clear(); + } + estimatedProbability_ = 0D; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance(); + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (quasiIdsValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + quasiIdsValues_ = java.util.Collections.unmodifiableList(quasiIdsValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIdsValues_ = quasiIdsValues_; + } else { + result.quasiIdsValues_ = quasiIdsValuesBuilder_.build(); + } + result.estimatedProbability_ = estimatedProbability_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance()) return this; + if (quasiIdsValuesBuilder_ == null) { + if (!other.quasiIdsValues_.isEmpty()) { + if (quasiIdsValues_.isEmpty()) { + quasiIdsValues_ = other.quasiIdsValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.addAll(other.quasiIdsValues_); + } + onChanged(); + } + } else { + if (!other.quasiIdsValues_.isEmpty()) { + if (quasiIdsValuesBuilder_.isEmpty()) { + quasiIdsValuesBuilder_.dispose(); + quasiIdsValuesBuilder_ = null; + quasiIdsValues_ = other.quasiIdsValues_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsValuesFieldBuilder() : null; + } else { + quasiIdsValuesBuilder_.addAllMessages(other.quasiIdsValues_); + } + } + } + if (other.getEstimatedProbability() != 0D) { + setEstimatedProbability(other.getEstimatedProbability()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List quasiIdsValues_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsValuesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + quasiIdsValues_ = new java.util.ArrayList(quasiIdsValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> quasiIdsValuesBuilder_; + + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List getQuasiIdsValuesList() { + if (quasiIdsValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIdsValues_); + } else { + return quasiIdsValuesBuilder_.getMessageList(); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public int getQuasiIdsValuesCount() { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.size(); + } else { + return quasiIdsValuesBuilder_.getCount(); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value getQuasiIdsValues(int index) { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.get(index); + } else { + return quasiIdsValuesBuilder_.getMessage(index); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder setQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.set(index, value); + onChanged(); + } else { + quasiIdsValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder setQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues(com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(value); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value value) { + if (quasiIdsValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(index, value); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addQuasiIdsValues( + int index, com.google.privacy.dlp.v2.Value.Builder builderForValue) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder addAllQuasiIdsValues( + java.lang.Iterable values) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIdsValues_); + onChanged(); + } else { + quasiIdsValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder clearQuasiIdsValues() { + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public Builder removeQuasiIdsValues(int index) { + if (quasiIdsValuesBuilder_ == null) { + ensureQuasiIdsValuesIsMutable(); + quasiIdsValues_.remove(index); + onChanged(); + } else { + quasiIdsValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder getQuasiIdsValuesBuilder( + int index) { + return getQuasiIdsValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.ValueOrBuilder getQuasiIdsValuesOrBuilder( + int index) { + if (quasiIdsValuesBuilder_ == null) { + return quasiIdsValues_.get(index); } else { + return quasiIdsValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List + getQuasiIdsValuesOrBuilderList() { + if (quasiIdsValuesBuilder_ != null) { + return quasiIdsValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIdsValues_); + } + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder() { + return getQuasiIdsValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public com.google.privacy.dlp.v2.Value.Builder addQuasiIdsValuesBuilder( + int index) { + return getQuasiIdsValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.Value.getDefaultInstance()); + } + /** + *
+         * The quasi-identifier values.
+         * 
+ * + * repeated .google.privacy.dlp.v2.Value quasi_ids_values = 1; + */ + public java.util.List + getQuasiIdsValuesBuilderList() { + return getQuasiIdsValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder> + getQuasiIdsValuesFieldBuilder() { + if (quasiIdsValuesBuilder_ == null) { + quasiIdsValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.Value, com.google.privacy.dlp.v2.Value.Builder, com.google.privacy.dlp.v2.ValueOrBuilder>( + quasiIdsValues_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + quasiIdsValues_ = null; + } + return quasiIdsValuesBuilder_; + } + + private double estimatedProbability_ ; + /** + *
+         * The estimated probability that a given individual sharing these
+         * quasi-identifier values is in the dataset. This value, typically called
+         * δ, is the ratio between the number of records in the dataset with these
+         * quasi-identifier values, and the total number of individuals (inside
+         * *and* outside the dataset) with these quasi-identifier values.
+         * For example, if there are 15 individuals in the dataset who share the
+         * same quasi-identifier values, and an estimated 100 people in the entire
+         * population with these values, then δ is 0.15.
+         * 
+ * + * double estimated_probability = 2; + */ + public double getEstimatedProbability() { + return estimatedProbability_; + } + /** + *
+         * The estimated probability that a given individual sharing these
+         * quasi-identifier values is in the dataset. This value, typically called
+         * δ, is the ratio between the number of records in the dataset with these
+         * quasi-identifier values, and the total number of individuals (inside
+         * *and* outside the dataset) with these quasi-identifier values.
+         * For example, if there are 15 individuals in the dataset who share the
+         * same quasi-identifier values, and an estimated 100 people in the entire
+         * population with these values, then δ is 0.15.
+         * 
+ * + * double estimated_probability = 2; + */ + public Builder setEstimatedProbability(double value) { + + estimatedProbability_ = value; + onChanged(); + return this; + } + /** + *
+         * The estimated probability that a given individual sharing these
+         * quasi-identifier values is in the dataset. This value, typically called
+         * δ, is the ratio between the number of records in the dataset with these
+         * quasi-identifier values, and the total number of individuals (inside
+         * *and* outside the dataset) with these quasi-identifier values.
+         * For example, if there are 15 individuals in the dataset who share the
+         * same quasi-identifier values, and an estimated 100 people in the entire
+         * population with these values, then δ is 0.15.
+         * 
+ * + * double estimated_probability = 2; + */ + public Builder clearEstimatedProbability() { + + estimatedProbability_ = 0D; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeltaPresenceEstimationQuasiIdValues parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeltaPresenceEstimationQuasiIdValues(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DeltaPresenceEstimationHistogramBucketOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) + com.google.protobuf.MessageOrBuilder { + + /** + *
+       * Between 0 and 1.
+       * 
+ * + * double min_probability = 1; + */ + double getMinProbability(); + + /** + *
+       * Always greater than or equal to min_probability.
+       * 
+ * + * double max_probability = 2; + */ + double getMaxProbability(); + + /** + *
+       * Number of records within these probability bounds.
+       * 
+ * + * int64 bucket_size = 5; + */ + long getBucketSize(); + + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + java.util.List + getBucketValuesList(); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getBucketValues(int index); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + int getBucketValuesCount(); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + java.util.List + getBucketValuesOrBuilderList(); + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( + int index); + + /** + *
+       * Total number of distinct quasi-identifier tuple values in this bucket.
+       * 
+ * + * int64 bucket_value_count = 7; + */ + long getBucketValueCount(); + } + /** + *
+     * A DeltaPresenceEstimationHistogramBucket message with the following
+     * values:
+     *   min_probability: 0.1
+     *   max_probability: 0.2
+     *   frequency: 42
+     * means that there are 42 records for which δ is in [0.1, 0.2). An
+     * important particular case is when min_probability = max_probability = 1:
+     * then, every individual who shares this quasi-identifier combination is in
+     * the dataset.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket} + */ + public static final class DeltaPresenceEstimationHistogramBucket extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) + DeltaPresenceEstimationHistogramBucketOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeltaPresenceEstimationHistogramBucket.newBuilder() to construct. + private DeltaPresenceEstimationHistogramBucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeltaPresenceEstimationHistogramBucket() { + minProbability_ = 0D; + maxProbability_ = 0D; + bucketSize_ = 0L; + bucketValues_ = java.util.Collections.emptyList(); + bucketValueCount_ = 0L; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeltaPresenceEstimationHistogramBucket( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 9: { + + minProbability_ = input.readDouble(); + break; + } + case 17: { + + maxProbability_ = input.readDouble(); + break; + } + case 40: { + + bucketSize_ = input.readInt64(); + break; + } + case 50: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + bucketValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000008; + } + bucketValues_.add( + input.readMessage(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.parser(), extensionRegistry)); + break; + } + case 56: { + + bucketValueCount_ = input.readInt64(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder.class); + } + + private int bitField0_; + public static final int MIN_PROBABILITY_FIELD_NUMBER = 1; + private double minProbability_; + /** + *
+       * Between 0 and 1.
+       * 
+ * + * double min_probability = 1; + */ + public double getMinProbability() { + return minProbability_; + } + + public static final int MAX_PROBABILITY_FIELD_NUMBER = 2; + private double maxProbability_; + /** + *
+       * Always greater than or equal to min_probability.
+       * 
+ * + * double max_probability = 2; + */ + public double getMaxProbability() { + return maxProbability_; + } + + public static final int BUCKET_SIZE_FIELD_NUMBER = 5; + private long bucketSize_; + /** + *
+       * Number of records within these probability bounds.
+       * 
+ * + * int64 bucket_size = 5; + */ + public long getBucketSize() { + return bucketSize_; + } + + public static final int BUCKET_VALUES_FIELD_NUMBER = 6; + private java.util.List bucketValues_; + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public java.util.List getBucketValuesList() { + return bucketValues_; + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public java.util.List + getBucketValuesOrBuilderList() { + return bucketValues_; + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public int getBucketValuesCount() { + return bucketValues_.size(); + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getBucketValues(int index) { + return bucketValues_.get(index); + } + /** + *
+       * Sample of quasi-identifier tuple values in this bucket. The total
+       * number of classes returned per bucket is capped at 20.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( + int index) { + return bucketValues_.get(index); + } + + public static final int BUCKET_VALUE_COUNT_FIELD_NUMBER = 7; + private long bucketValueCount_; + /** + *
+       * Total number of distinct quasi-identifier tuple values in this bucket.
+       * 
+ * + * int64 bucket_value_count = 7; + */ + public long getBucketValueCount() { + return bucketValueCount_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (minProbability_ != 0D) { + output.writeDouble(1, minProbability_); + } + if (maxProbability_ != 0D) { + output.writeDouble(2, maxProbability_); + } + if (bucketSize_ != 0L) { + output.writeInt64(5, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + output.writeMessage(6, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + output.writeInt64(7, bucketValueCount_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (minProbability_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, minProbability_); + } + if (maxProbability_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, maxProbability_); + } + if (bucketSize_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(5, bucketSize_); + } + for (int i = 0; i < bucketValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, bucketValues_.get(i)); + } + if (bucketValueCount_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(7, bucketValueCount_); + } + size += unknownFields.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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) obj; + + boolean result = true; + result = result && ( + java.lang.Double.doubleToLongBits(getMinProbability()) + == java.lang.Double.doubleToLongBits( + other.getMinProbability())); + result = result && ( + java.lang.Double.doubleToLongBits(getMaxProbability()) + == java.lang.Double.doubleToLongBits( + other.getMaxProbability())); + result = result && (getBucketSize() + == other.getBucketSize()); + result = result && getBucketValuesList() + .equals(other.getBucketValuesList()); + result = result && (getBucketValueCount() + == other.getBucketValueCount()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MIN_PROBABILITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMinProbability())); + hash = (37 * hash) + MAX_PROBABILITY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaxProbability())); + hash = (37 * hash) + BUCKET_SIZE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketSize()); + if (getBucketValuesCount() > 0) { + hash = (37 * hash) + BUCKET_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getBucketValuesList().hashCode(); + } + hash = (37 * hash) + BUCKET_VALUE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getBucketValueCount()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket 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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket 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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket 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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 DeltaPresenceEstimationHistogramBucket message with the following
+       * values:
+       *   min_probability: 0.1
+       *   max_probability: 0.2
+       *   frequency: 42
+       * means that there are 42 records for which δ is in [0.1, 0.2). An
+       * important particular case is when min_probability = max_probability = 1:
+       * then, every individual who shares this quasi-identifier combination is in
+       * the dataset.
+       * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getBucketValuesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + minProbability_ = 0D; + + maxProbability_ = 0D; + + bucketSize_ = 0L; + + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + } else { + bucketValuesBuilder_.clear(); + } + bucketValueCount_ = 0L; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance(); + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.minProbability_ = minProbability_; + result.maxProbability_ = maxProbability_; + result.bucketSize_ = bucketSize_; + if (bucketValuesBuilder_ == null) { + if (((bitField0_ & 0x00000008) == 0x00000008)) { + bucketValues_ = java.util.Collections.unmodifiableList(bucketValues_); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.bucketValues_ = bucketValues_; + } else { + result.bucketValues_ = bucketValuesBuilder_.build(); + } + result.bucketValueCount_ = bucketValueCount_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance()) return this; + if (other.getMinProbability() != 0D) { + setMinProbability(other.getMinProbability()); + } + if (other.getMaxProbability() != 0D) { + setMaxProbability(other.getMaxProbability()); + } + if (other.getBucketSize() != 0L) { + setBucketSize(other.getBucketSize()); + } + if (bucketValuesBuilder_ == null) { + if (!other.bucketValues_.isEmpty()) { + if (bucketValues_.isEmpty()) { + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureBucketValuesIsMutable(); + bucketValues_.addAll(other.bucketValues_); + } + onChanged(); + } + } else { + if (!other.bucketValues_.isEmpty()) { + if (bucketValuesBuilder_.isEmpty()) { + bucketValuesBuilder_.dispose(); + bucketValuesBuilder_ = null; + bucketValues_ = other.bucketValues_; + bitField0_ = (bitField0_ & ~0x00000008); + bucketValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getBucketValuesFieldBuilder() : null; + } else { + bucketValuesBuilder_.addAllMessages(other.bucketValues_); + } + } + } + if (other.getBucketValueCount() != 0L) { + setBucketValueCount(other.getBucketValueCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private double minProbability_ ; + /** + *
+         * Between 0 and 1.
+         * 
+ * + * double min_probability = 1; + */ + public double getMinProbability() { + return minProbability_; + } + /** + *
+         * Between 0 and 1.
+         * 
+ * + * double min_probability = 1; + */ + public Builder setMinProbability(double value) { + + minProbability_ = value; + onChanged(); + return this; + } + /** + *
+         * Between 0 and 1.
+         * 
+ * + * double min_probability = 1; + */ + public Builder clearMinProbability() { + + minProbability_ = 0D; + onChanged(); + return this; + } + + private double maxProbability_ ; + /** + *
+         * Always greater than or equal to min_probability.
+         * 
+ * + * double max_probability = 2; + */ + public double getMaxProbability() { + return maxProbability_; + } + /** + *
+         * Always greater than or equal to min_probability.
+         * 
+ * + * double max_probability = 2; + */ + public Builder setMaxProbability(double value) { + + maxProbability_ = value; + onChanged(); + return this; + } + /** + *
+         * Always greater than or equal to min_probability.
+         * 
+ * + * double max_probability = 2; + */ + public Builder clearMaxProbability() { + + maxProbability_ = 0D; + onChanged(); + return this; + } + + private long bucketSize_ ; + /** + *
+         * Number of records within these probability bounds.
+         * 
+ * + * int64 bucket_size = 5; + */ + public long getBucketSize() { + return bucketSize_; + } + /** + *
+         * Number of records within these probability bounds.
+         * 
+ * + * int64 bucket_size = 5; + */ + public Builder setBucketSize(long value) { + + bucketSize_ = value; + onChanged(); + return this; + } + /** + *
+         * Number of records within these probability bounds.
+         * 
+ * + * int64 bucket_size = 5; + */ + public Builder clearBucketSize() { + + bucketSize_ = 0L; + onChanged(); + return this; + } + + private java.util.List bucketValues_ = + java.util.Collections.emptyList(); + private void ensureBucketValuesIsMutable() { + if (!((bitField0_ & 0x00000008) == 0x00000008)) { + bucketValues_ = new java.util.ArrayList(bucketValues_); + bitField0_ |= 0x00000008; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder> bucketValuesBuilder_; + + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public java.util.List getBucketValuesList() { + if (bucketValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(bucketValues_); + } else { + return bucketValuesBuilder_.getMessageList(); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public int getBucketValuesCount() { + if (bucketValuesBuilder_ == null) { + return bucketValues_.size(); + } else { + return bucketValuesBuilder_.getCount(); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues getBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); + } else { + return bucketValuesBuilder_.getMessage(index); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.set(index, value); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder setBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.set(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues value) { + if (bucketValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureBucketValuesIsMutable(); + bucketValues_.add(index, value); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addBucketValues( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder builderForValue) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.add(index, builderForValue.build()); + onChanged(); + } else { + bucketValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder addAllBucketValues( + java.lang.Iterable values) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bucketValues_); + onChanged(); + } else { + bucketValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder clearBucketValues() { + if (bucketValuesBuilder_ == null) { + bucketValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + } else { + bucketValuesBuilder_.clear(); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public Builder removeBucketValues(int index) { + if (bucketValuesBuilder_ == null) { + ensureBucketValuesIsMutable(); + bucketValues_.remove(index); + onChanged(); + } else { + bucketValuesBuilder_.remove(index); + } + return this; + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder getBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().getBuilder(index); + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder getBucketValuesOrBuilder( + int index) { + if (bucketValuesBuilder_ == null) { + return bucketValues_.get(index); } else { + return bucketValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public java.util.List + getBucketValuesOrBuilderList() { + if (bucketValuesBuilder_ != null) { + return bucketValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(bucketValues_); + } + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder addBucketValuesBuilder() { + return getBucketValuesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance()); + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder addBucketValuesBuilder( + int index) { + return getBucketValuesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.getDefaultInstance()); + } + /** + *
+         * Sample of quasi-identifier tuple values in this bucket. The total
+         * number of classes returned per bucket is capped at 20.
+         * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + */ + public java.util.List + getBucketValuesBuilderList() { + return getBucketValuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder> + getBucketValuesFieldBuilder() { + if (bucketValuesBuilder_ == null) { + bucketValuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValuesOrBuilder>( + bucketValues_, + ((bitField0_ & 0x00000008) == 0x00000008), + getParentForChildren(), + isClean()); + bucketValues_ = null; + } + return bucketValuesBuilder_; + } + + private long bucketValueCount_ ; + /** + *
+         * Total number of distinct quasi-identifier tuple values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 7; + */ + public long getBucketValueCount() { + return bucketValueCount_; + } + /** + *
+         * Total number of distinct quasi-identifier tuple values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 7; + */ + public Builder setBucketValueCount(long value) { + + bucketValueCount_ = value; + onChanged(); + return this; + } + /** + *
+         * Total number of distinct quasi-identifier tuple values in this bucket.
+         * 
+ * + * int64 bucket_value_count = 7; + */ + public Builder clearBucketValueCount() { + + bucketValueCount_ = 0L; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeltaPresenceEstimationHistogramBucket parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeltaPresenceEstimationHistogramBucket(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int DELTA_PRESENCE_ESTIMATION_HISTOGRAM_FIELD_NUMBER = 1; + private java.util.List deltaPresenceEstimationHistogram_; + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public java.util.List getDeltaPresenceEstimationHistogramList() { + return deltaPresenceEstimationHistogram_; + } + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public java.util.List + getDeltaPresenceEstimationHistogramOrBuilderList() { + return deltaPresenceEstimationHistogram_; + } + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public int getDeltaPresenceEstimationHistogramCount() { + return deltaPresenceEstimationHistogram_.size(); + } + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDeltaPresenceEstimationHistogram(int index) { + return deltaPresenceEstimationHistogram_.get(index); + } + /** + *
+     * The intervals [min_probability, max_probability) do not overlap. If a
+     * value doesn't correspond to any such interval, the associated frequency
+     * is zero. For example, the following records:
+     *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+     *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+     *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+     * mean that there are no record with an estimated probability in [0.1, 0.2)
+     * nor larger or equal to 0.4.
+     * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder getDeltaPresenceEstimationHistogramOrBuilder( + int index) { + return deltaPresenceEstimationHistogram_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < deltaPresenceEstimationHistogram_.size(); i++) { + output.writeMessage(1, deltaPresenceEstimationHistogram_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < deltaPresenceEstimationHistogram_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, deltaPresenceEstimationHistogram_.get(i)); + } + size += unknownFields.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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult other = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) obj; + + boolean result = true; + result = result && getDeltaPresenceEstimationHistogramList() + .equals(other.getDeltaPresenceEstimationHistogramList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDeltaPresenceEstimationHistogramCount() > 0) { + hash = (37 * hash) + DELTA_PRESENCE_ESTIMATION_HISTOGRAM_FIELD_NUMBER; + hash = (53 * hash) + getDeltaPresenceEstimationHistogramList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult 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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult 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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult 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.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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; + } + /** + *
+     * Result of the δ-presence computation. Note that these results are an
+     * estimation, not exact values.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.class, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDeltaPresenceEstimationHistogramFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (deltaPresenceEstimationHistogramBuilder_ == null) { + deltaPresenceEstimationHistogram_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + deltaPresenceEstimationHistogramBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult build() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult buildPartial() { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult result = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult(this); + int from_bitField0_ = bitField0_; + if (deltaPresenceEstimationHistogramBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + deltaPresenceEstimationHistogram_ = java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deltaPresenceEstimationHistogram_ = deltaPresenceEstimationHistogram_; + } else { + result.deltaPresenceEstimationHistogram_ = deltaPresenceEstimationHistogramBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) { + return mergeFrom((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult other) { + if (other == com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance()) return this; + if (deltaPresenceEstimationHistogramBuilder_ == null) { + if (!other.deltaPresenceEstimationHistogram_.isEmpty()) { + if (deltaPresenceEstimationHistogram_.isEmpty()) { + deltaPresenceEstimationHistogram_ = other.deltaPresenceEstimationHistogram_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.addAll(other.deltaPresenceEstimationHistogram_); + } + onChanged(); + } + } else { + if (!other.deltaPresenceEstimationHistogram_.isEmpty()) { + if (deltaPresenceEstimationHistogramBuilder_.isEmpty()) { + deltaPresenceEstimationHistogramBuilder_.dispose(); + deltaPresenceEstimationHistogramBuilder_ = null; + deltaPresenceEstimationHistogram_ = other.deltaPresenceEstimationHistogram_; + bitField0_ = (bitField0_ & ~0x00000001); + deltaPresenceEstimationHistogramBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDeltaPresenceEstimationHistogramFieldBuilder() : null; + } else { + deltaPresenceEstimationHistogramBuilder_.addAllMessages(other.deltaPresenceEstimationHistogram_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List deltaPresenceEstimationHistogram_ = + java.util.Collections.emptyList(); + private void ensureDeltaPresenceEstimationHistogramIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + deltaPresenceEstimationHistogram_ = new java.util.ArrayList(deltaPresenceEstimationHistogram_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder> deltaPresenceEstimationHistogramBuilder_; + + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public java.util.List getDeltaPresenceEstimationHistogramList() { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + return java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); + } else { + return deltaPresenceEstimationHistogramBuilder_.getMessageList(); + } + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public int getDeltaPresenceEstimationHistogramCount() { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + return deltaPresenceEstimationHistogram_.size(); + } else { + return deltaPresenceEstimationHistogramBuilder_.getCount(); + } + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket getDeltaPresenceEstimationHistogram(int index) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + return deltaPresenceEstimationHistogram_.get(index); + } else { + return deltaPresenceEstimationHistogramBuilder_.getMessage(index); + } + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder setDeltaPresenceEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket value) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.set(index, value); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder setDeltaPresenceEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder builderForValue) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.set(index, builderForValue.build()); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder addDeltaPresenceEstimationHistogram(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket value) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.add(value); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder addDeltaPresenceEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket value) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.add(index, value); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder addDeltaPresenceEstimationHistogram( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder builderForValue) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.add(builderForValue.build()); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder addDeltaPresenceEstimationHistogram( + int index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder builderForValue) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.add(index, builderForValue.build()); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder addAllDeltaPresenceEstimationHistogram( + java.lang.Iterable values) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + ensureDeltaPresenceEstimationHistogramIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, deltaPresenceEstimationHistogram_); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder clearDeltaPresenceEstimationHistogram() { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + deltaPresenceEstimationHistogram_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.clear(); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public Builder removeDeltaPresenceEstimationHistogram(int index) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + ensureDeltaPresenceEstimationHistogramIsMutable(); + deltaPresenceEstimationHistogram_.remove(index); + onChanged(); + } else { + deltaPresenceEstimationHistogramBuilder_.remove(index); + } + return this; + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder getDeltaPresenceEstimationHistogramBuilder( + int index) { + return getDeltaPresenceEstimationHistogramFieldBuilder().getBuilder(index); + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder getDeltaPresenceEstimationHistogramOrBuilder( + int index) { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + return deltaPresenceEstimationHistogram_.get(index); } else { + return deltaPresenceEstimationHistogramBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public java.util.List + getDeltaPresenceEstimationHistogramOrBuilderList() { + if (deltaPresenceEstimationHistogramBuilder_ != null) { + return deltaPresenceEstimationHistogramBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(deltaPresenceEstimationHistogram_); + } + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder addDeltaPresenceEstimationHistogramBuilder() { + return getDeltaPresenceEstimationHistogramFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance()); + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder addDeltaPresenceEstimationHistogramBuilder( + int index) { + return getDeltaPresenceEstimationHistogramFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.getDefaultInstance()); + } + /** + *
+       * The intervals [min_probability, max_probability) do not overlap. If a
+       * value doesn't correspond to any such interval, the associated frequency
+       * is zero. For example, the following records:
+       *   {min_probability: 0, max_probability: 0.1, frequency: 17}
+       *   {min_probability: 0.2, max_probability: 0.3, frequency: 42}
+       *   {min_probability: 0.3, max_probability: 0.4, frequency: 99}
+       * mean that there are no record with an estimated probability in [0.1, 0.2)
+       * nor larger or equal to 0.4.
+       * 
+ * + * repeated .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + */ + public java.util.List + getDeltaPresenceEstimationHistogramBuilderList() { + return getDeltaPresenceEstimationHistogramFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder> + getDeltaPresenceEstimationHistogramFieldBuilder() { + if (deltaPresenceEstimationHistogramBuilder_ == null) { + deltaPresenceEstimationHistogramBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucketOrBuilder>( + deltaPresenceEstimationHistogram_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + deltaPresenceEstimationHistogram_ = null; + } + return deltaPresenceEstimationHistogramBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) + private static final com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult(); + } + + public static com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeltaPresenceEstimationResult parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeltaPresenceEstimationResult(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int resultCase_ = 0; + private java.lang.Object result_; + public enum ResultCase + implements com.google.protobuf.Internal.EnumLite { + NUMERICAL_STATS_RESULT(3), + CATEGORICAL_STATS_RESULT(4), + K_ANONYMITY_RESULT(5), + L_DIVERSITY_RESULT(6), + K_MAP_ESTIMATION_RESULT(7), + DELTA_PRESENCE_ESTIMATION_RESULT(9), + RESULT_NOT_SET(0); + private final int value; + private ResultCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ResultCase valueOf(int value) { + return forNumber(value); + } + + public static ResultCase forNumber(int value) { + switch (value) { + case 3: return NUMERICAL_STATS_RESULT; + case 4: return CATEGORICAL_STATS_RESULT; + case 5: return K_ANONYMITY_RESULT; + case 6: return L_DIVERSITY_RESULT; + case 7: return K_MAP_ESTIMATION_RESULT; + case 9: return DELTA_PRESENCE_ESTIMATION_RESULT; + case 0: return RESULT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public ResultCase + getResultCase() { + return ResultCase.forNumber( + resultCase_); + } + + public static final int REQUESTED_PRIVACY_METRIC_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.PrivacyMetric requestedPrivacyMetric_; + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + public boolean hasRequestedPrivacyMetric() { + return requestedPrivacyMetric_ != null; + } + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + public com.google.privacy.dlp.v2.PrivacyMetric getRequestedPrivacyMetric() { + return requestedPrivacyMetric_ == null ? com.google.privacy.dlp.v2.PrivacyMetric.getDefaultInstance() : requestedPrivacyMetric_; + } + /** + *
+   * Privacy metric to compute.
+   * 
+ * + * .google.privacy.dlp.v2.PrivacyMetric requested_privacy_metric = 1; + */ + public com.google.privacy.dlp.v2.PrivacyMetricOrBuilder getRequestedPrivacyMetricOrBuilder() { + return getRequestedPrivacyMetric(); + } + + public static final int REQUESTED_SOURCE_TABLE_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.BigQueryTable requestedSourceTable_; + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + public boolean hasRequestedSourceTable() { + return requestedSourceTable_ != null; + } + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + public com.google.privacy.dlp.v2.BigQueryTable getRequestedSourceTable() { + return requestedSourceTable_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : requestedSourceTable_; + } + /** + *
+   * Input dataset to compute metrics over.
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable requested_source_table = 2; + */ + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getRequestedSourceTableOrBuilder() { + return getRequestedSourceTable(); + } + + public static final int NUMERICAL_STATS_RESULT_FIELD_NUMBER = 3; + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + public boolean hasNumericalStatsResult() { + return resultCase_ == 3; + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult getNumericalStatsResult() { + if (resultCase_ == 3) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult numerical_stats_result = 3; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResultOrBuilder getNumericalStatsResultOrBuilder() { + if (resultCase_ == 3) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.getDefaultInstance(); + } + + public static final int CATEGORICAL_STATS_RESULT_FIELD_NUMBER = 4; + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + public boolean hasCategoricalStatsResult() { + return resultCase_ == 4; + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult getCategoricalStatsResult() { + if (resultCase_ == 4) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult categorical_stats_result = 4; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResultOrBuilder getCategoricalStatsResultOrBuilder() { + if (resultCase_ == 4) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.getDefaultInstance(); + } + + public static final int K_ANONYMITY_RESULT_FIELD_NUMBER = 5; + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + */ + public boolean hasKAnonymityResult() { + return resultCase_ == 5; + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult getKAnonymityResult() { + if (resultCase_ == 5) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.getDefaultInstance(); + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult k_anonymity_result = 5; */ public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResultOrBuilder getKAnonymityResultOrBuilder() { if (resultCase_ == 5) { @@ -14055,6 +17411,32 @@ public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResu return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.getDefaultInstance(); } + public static final int DELTA_PRESENCE_ESTIMATION_RESULT_FIELD_NUMBER = 9; + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public boolean hasDeltaPresenceEstimationResult() { + return resultCase_ == 9; + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDeltaPresenceEstimationResult() { + if (resultCase_ == 9) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder getDeltaPresenceEstimationResultOrBuilder() { + if (resultCase_ == 9) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -14088,6 +17470,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (resultCase_ == 7) { output.writeMessage(7, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_); } + if (resultCase_ == 9) { + output.writeMessage(9, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_); + } unknownFields.writeTo(output); } @@ -14124,6 +17509,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) result_); } + if (resultCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -14174,6 +17563,10 @@ public boolean equals(final java.lang.Object obj) { result = result && getKMapEstimationResult() .equals(other.getKMapEstimationResult()); break; + case 9: + result = result && getDeltaPresenceEstimationResult() + .equals(other.getDeltaPresenceEstimationResult()); + break; case 0: default: } @@ -14217,6 +17610,10 @@ public int hashCode() { hash = (37 * hash) + K_MAP_ESTIMATION_RESULT_FIELD_NUMBER; hash = (53 * hash) + getKMapEstimationResult().hashCode(); break; + case 9: + hash = (37 * hash) + DELTA_PRESENCE_ESTIMATION_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getDeltaPresenceEstimationResult().hashCode(); + break; case 0: default: } @@ -14434,6 +17831,13 @@ public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails buildPartial() { result.result_ = kMapEstimationResultBuilder_.build(); } } + if (resultCase_ == 9) { + if (deltaPresenceEstimationResultBuilder_ == null) { + result.result_ = result_; + } else { + result.result_ = deltaPresenceEstimationResultBuilder_.build(); + } + } result.resultCase_ = resultCase_; onBuilt(); return result; @@ -14503,6 +17907,10 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails mergeKMapEstimationResult(other.getKMapEstimationResult()); break; } + case DELTA_PRESENCE_ESTIMATION_RESULT: { + mergeDeltaPresenceEstimationResult(other.getDeltaPresenceEstimationResult()); + break; + } case RESULT_NOT_SET: { break; } @@ -15534,6 +18942,142 @@ public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResu onChanged();; return kMapEstimationResultBuilder_; } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder> deltaPresenceEstimationResultBuilder_; + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public boolean hasDeltaPresenceEstimationResult() { + return resultCase_ == 9; + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDeltaPresenceEstimationResult() { + if (deltaPresenceEstimationResultBuilder_ == null) { + if (resultCase_ == 9) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } else { + if (resultCase_ == 9) { + return deltaPresenceEstimationResultBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public Builder setDeltaPresenceEstimationResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult value) { + if (deltaPresenceEstimationResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + result_ = value; + onChanged(); + } else { + deltaPresenceEstimationResultBuilder_.setMessage(value); + } + resultCase_ = 9; + return this; + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public Builder setDeltaPresenceEstimationResult( + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder builderForValue) { + if (deltaPresenceEstimationResultBuilder_ == null) { + result_ = builderForValue.build(); + onChanged(); + } else { + deltaPresenceEstimationResultBuilder_.setMessage(builderForValue.build()); + } + resultCase_ = 9; + return this; + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public Builder mergeDeltaPresenceEstimationResult(com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult value) { + if (deltaPresenceEstimationResultBuilder_ == null) { + if (resultCase_ == 9 && + result_ != com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance()) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.newBuilder((com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_) + .mergeFrom(value).buildPartial(); + } else { + result_ = value; + } + onChanged(); + } else { + if (resultCase_ == 9) { + deltaPresenceEstimationResultBuilder_.mergeFrom(value); + } + deltaPresenceEstimationResultBuilder_.setMessage(value); + } + resultCase_ = 9; + return this; + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public Builder clearDeltaPresenceEstimationResult() { + if (deltaPresenceEstimationResultBuilder_ == null) { + if (resultCase_ == 9) { + resultCase_ = 0; + result_ = null; + onChanged(); + } + } else { + if (resultCase_ == 9) { + resultCase_ = 0; + result_ = null; + } + deltaPresenceEstimationResultBuilder_.clear(); + } + return this; + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder getDeltaPresenceEstimationResultBuilder() { + return getDeltaPresenceEstimationResultFieldBuilder().getBuilder(); + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder getDeltaPresenceEstimationResultOrBuilder() { + if ((resultCase_ == 9) && (deltaPresenceEstimationResultBuilder_ != null)) { + return deltaPresenceEstimationResultBuilder_.getMessageOrBuilder(); + } else { + if (resultCase_ == 9) { + return (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_; + } + return com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + } + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder> + getDeltaPresenceEstimationResultFieldBuilder() { + if (deltaPresenceEstimationResultBuilder_ == null) { + if (!(resultCase_ == 9)) { + result_ = com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.getDefaultInstance(); + } + deltaPresenceEstimationResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.Builder, com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder>( + (com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) result_, + getParentForChildren(), + isClean()); + result_ = null; + } + resultCase_ = 9; + onChanged();; + return deltaPresenceEstimationResultBuilder_; + } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java index 56e293a60648..f19575006a30 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/AnalyzeDataSourceRiskDetailsOrBuilder.java @@ -122,5 +122,18 @@ public interface AnalyzeDataSourceRiskDetailsOrBuilder extends */ com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResultOrBuilder getKMapEstimationResultOrBuilder(); + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + boolean hasDeltaPresenceEstimationResult(); + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult getDeltaPresenceEstimationResult(); + /** + * .google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + */ + com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResultOrBuilder getDeltaPresenceEstimationResultOrBuilder(); + public com.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ResultCase getResultCase(); } diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java index bb4015cd4b68..81f56eb1a5dc 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/BucketingConfig.java @@ -13,6 +13,7 @@ * If the bound `Value` type differs from the type of data being transformed, we * will first attempt converting the type of the data to be transformed to match * the type of the bound before comparing. + * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. * * * Protobuf type {@code google.privacy.dlp.v2.BucketingConfig} @@ -1503,6 +1504,7 @@ protected Builder newBuilderForType( * If the bound `Value` type differs from the type of data being transformed, we * will first attempt converting the type of the data to be transformed to match * the type of the bound before comparing. + * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. * * * Protobuf type {@code google.privacy.dlp.v2.BucketingConfig} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java index d4d0a43aa8c4..b5228976d778 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItem.java @@ -205,7 +205,9 @@ public java.lang.String getValue() { public static final int TABLE_FIELD_NUMBER = 4; /** *
-   * Structured content for inspection.
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
    * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -215,7 +217,9 @@ public boolean hasTable() { } /** *
-   * Structured content for inspection.
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
    * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -228,7 +232,9 @@ public com.google.privacy.dlp.v2.Table getTable() { } /** *
-   * Structured content for inspection.
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
    * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -761,7 +767,9 @@ public Builder setValueBytes( com.google.privacy.dlp.v2.Table, com.google.privacy.dlp.v2.Table.Builder, com.google.privacy.dlp.v2.TableOrBuilder> tableBuilder_; /** *
-     * Structured content for inspection.
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
      * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -771,7 +779,9 @@ public boolean hasTable() { } /** *
-     * Structured content for inspection.
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
      * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -791,7 +801,9 @@ public com.google.privacy.dlp.v2.Table getTable() { } /** *
-     * Structured content for inspection.
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
      * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -811,7 +823,9 @@ public Builder setTable(com.google.privacy.dlp.v2.Table value) { } /** *
-     * Structured content for inspection.
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
      * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -829,7 +843,9 @@ public Builder setTable( } /** *
-     * Structured content for inspection.
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
      * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -855,7 +871,9 @@ public Builder mergeTable(com.google.privacy.dlp.v2.Table value) { } /** *
-     * Structured content for inspection.
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
      * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -878,7 +896,9 @@ public Builder clearTable() { } /** *
-     * Structured content for inspection.
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
      * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -888,7 +908,9 @@ public com.google.privacy.dlp.v2.Table.Builder getTableBuilder() { } /** *
-     * Structured content for inspection.
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
      * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -905,7 +927,9 @@ public com.google.privacy.dlp.v2.TableOrBuilder getTableOrBuilder() { } /** *
-     * Structured content for inspection.
+     * Structured content for inspection. See
+     * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+     * learn more.
      * 
* * .google.privacy.dlp.v2.Table table = 4; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java index 2d0e3b353d2e..ca78d36f8b8a 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ContentItemOrBuilder.java @@ -27,7 +27,9 @@ public interface ContentItemOrBuilder extends /** *
-   * Structured content for inspection.
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
    * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -35,7 +37,9 @@ public interface ContentItemOrBuilder extends boolean hasTable(); /** *
-   * Structured content for inspection.
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
    * 
* * .google.privacy.dlp.v2.Table table = 4; @@ -43,7 +47,9 @@ public interface ContentItemOrBuilder extends com.google.privacy.dlp.v2.Table getTable(); /** *
-   * Structured content for inspection.
+   * Structured content for inspection. See
+   * https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
    * 
* * .google.privacy.dlp.v2.Table table = 4; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java index 392830d79eee..a8a33d6f54da 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CryptoReplaceFfxFpeConfig.java @@ -14,7 +14,7 @@ * replaced with the same surrogate. * Identifiers must be at least two characters long. * In the case that the identifier is the empty string, it will be skipped. - * See [Pseudonymization](/dlp/docs/pseudonymization) for example usage. + * See https://cloud.google.com/dlp/docs/pseudonymization to learn more. * * * Protobuf type {@code google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig} @@ -902,7 +902,7 @@ protected Builder newBuilderForType( * replaced with the same surrogate. * Identifiers must be at least two characters long. * In the case that the identifier is the empty string, it will be skipped. - * See [Pseudonymization](/dlp/docs/pseudonymization) for example usage. + * See https://cloud.google.com/dlp/docs/pseudonymization to learn more. * * * Protobuf type {@code google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java index 5f147de9885e..07fe5c63fd83 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoType.java @@ -2490,7 +2490,7 @@ public interface SurrogateTypeOrBuilder extends * These types of transformations are * those that perform pseudonymization, thereby producing a "surrogate" as * output. This should be used in conjunction with a field on the - * transformation such as `surrogate_info_type`. This custom info type does + * transformation such as `surrogate_info_type`. This CustomInfoType does * not support the use of `detection_rules`. * * @@ -2710,7 +2710,7 @@ protected Builder newBuilderForType( * These types of transformations are * those that perform pseudonymization, thereby producing a "surrogate" as * output. This should be used in conjunction with a field on the - * transformation such as `surrogate_info_type`. This custom info type does + * transformation such as `surrogate_info_type`. This CustomInfoType does * not support the use of `detection_rules`. * * @@ -2920,7 +2920,7 @@ public interface DetectionRuleOrBuilder extends } /** *
-   * Rule for modifying a custom info type to alter behavior under certain
+   * Rule for modifying a CustomInfoType to alter behavior under certain
    * circumstances, depending on the specific details of the rule. Not supported
    * for the `surrogate_type` custom info type.
    * 
@@ -4328,7 +4328,7 @@ public interface HotwordRuleOrBuilder extends /** *
-       * Regex pattern defining what qualifies as a hotword.
+       * Regular expression pattern defining what qualifies as a hotword.
        * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -4336,7 +4336,7 @@ public interface HotwordRuleOrBuilder extends boolean hasHotwordRegex(); /** *
-       * Regex pattern defining what qualifies as a hotword.
+       * Regular expression pattern defining what qualifies as a hotword.
        * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -4344,7 +4344,7 @@ public interface HotwordRuleOrBuilder extends com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex(); /** *
-       * Regex pattern defining what qualifies as a hotword.
+       * Regular expression pattern defining what qualifies as a hotword.
        * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -4424,7 +4424,7 @@ public interface HotwordRuleOrBuilder extends } /** *
-     * Detection rule that adjusts the likelihood of findings within a certain
+     * The rule that adjusts the likelihood of findings within a certain
      * proximity of hotwords.
      * 
* @@ -4540,7 +4540,7 @@ private HotwordRule( private com.google.privacy.dlp.v2.CustomInfoType.Regex hotwordRegex_; /** *
-       * Regex pattern defining what qualifies as a hotword.
+       * Regular expression pattern defining what qualifies as a hotword.
        * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -4550,7 +4550,7 @@ public boolean hasHotwordRegex() { } /** *
-       * Regex pattern defining what qualifies as a hotword.
+       * Regular expression pattern defining what qualifies as a hotword.
        * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -4560,7 +4560,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex() { } /** *
-       * Regex pattern defining what qualifies as a hotword.
+       * Regular expression pattern defining what qualifies as a hotword.
        * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -4846,7 +4846,7 @@ protected Builder newBuilderForType( } /** *
-       * Detection rule that adjusts the likelihood of findings within a certain
+       * The rule that adjusts the likelihood of findings within a certain
        * proximity of hotwords.
        * 
* @@ -5022,7 +5022,7 @@ public Builder mergeFrom( com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> hotwordRegexBuilder_; /** *
-         * Regex pattern defining what qualifies as a hotword.
+         * Regular expression pattern defining what qualifies as a hotword.
          * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -5032,7 +5032,7 @@ public boolean hasHotwordRegex() { } /** *
-         * Regex pattern defining what qualifies as a hotword.
+         * Regular expression pattern defining what qualifies as a hotword.
          * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -5046,7 +5046,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.Regex getHotwordRegex() { } /** *
-         * Regex pattern defining what qualifies as a hotword.
+         * Regular expression pattern defining what qualifies as a hotword.
          * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -5066,7 +5066,7 @@ public Builder setHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex va } /** *
-         * Regex pattern defining what qualifies as a hotword.
+         * Regular expression pattern defining what qualifies as a hotword.
          * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -5084,7 +5084,7 @@ public Builder setHotwordRegex( } /** *
-         * Regex pattern defining what qualifies as a hotword.
+         * Regular expression pattern defining what qualifies as a hotword.
          * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -5106,7 +5106,7 @@ public Builder mergeHotwordRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex } /** *
-         * Regex pattern defining what qualifies as a hotword.
+         * Regular expression pattern defining what qualifies as a hotword.
          * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -5124,7 +5124,7 @@ public Builder clearHotwordRegex() { } /** *
-         * Regex pattern defining what qualifies as a hotword.
+         * Regular expression pattern defining what qualifies as a hotword.
          * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -5136,7 +5136,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getHotwordRegexBui } /** *
-         * Regex pattern defining what qualifies as a hotword.
+         * Regular expression pattern defining what qualifies as a hotword.
          * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -5151,7 +5151,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getHotwordRegexOr } /** *
-         * Regex pattern defining what qualifies as a hotword.
+         * Regular expression pattern defining what qualifies as a hotword.
          * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex hotword_regex = 1; @@ -5829,7 +5829,7 @@ protected Builder newBuilderForType( } /** *
-     * Rule for modifying a custom info type to alter behavior under certain
+     * Rule for modifying a CustomInfoType to alter behavior under certain
      * circumstances, depending on the specific details of the rule. Not supported
      * for the `surrogate_type` custom info type.
      * 
@@ -6258,8 +6258,8 @@ public int getNumber() { private com.google.privacy.dlp.v2.InfoType infoType_; /** *
-   * Info type configuration. All custom info types must have configurations
-   * that do not conflict with built-in info types or other custom info types.
+   * All CustomInfoTypes must have a name
+   * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -6269,8 +6269,8 @@ public boolean hasInfoType() { } /** *
-   * Info type configuration. All custom info types must have configurations
-   * that do not conflict with built-in info types or other custom info types.
+   * All CustomInfoTypes must have a name
+   * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -6280,8 +6280,8 @@ public com.google.privacy.dlp.v2.InfoType getInfoType() { } /** *
-   * Info type configuration. All custom info types must have configurations
-   * that do not conflict with built-in info types or other custom info types.
+   * All CustomInfoTypes must have a name
+   * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -6294,7 +6294,7 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { private int likelihood_; /** *
-   * Likelihood to return for this custom info type. This base value can be
+   * Likelihood to return for this CustomInfoType. This base value can be
    * altered by a detection rule if the finding meets the criteria specified by
    * the rule. Defaults to `VERY_LIKELY` if not specified.
    * 
@@ -6306,7 +6306,7 @@ public int getLikelihoodValue() { } /** *
-   * Likelihood to return for this custom info type. This base value can be
+   * Likelihood to return for this CustomInfoType. This base value can be
    * altered by a detection rule if the finding meets the criteria specified by
    * the rule. Defaults to `VERY_LIKELY` if not specified.
    * 
@@ -6321,7 +6321,7 @@ public com.google.privacy.dlp.v2.Likelihood getLikelihood() { public static final int DICTIONARY_FIELD_NUMBER = 2; /** *
-   * Dictionary-based custom info type.
+   * A list of phrases to detect as a CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -6331,7 +6331,7 @@ public boolean hasDictionary() { } /** *
-   * Dictionary-based custom info type.
+   * A list of phrases to detect as a CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -6344,7 +6344,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { } /** *
-   * Dictionary-based custom info type.
+   * A list of phrases to detect as a CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -6359,7 +6359,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionar public static final int REGEX_FIELD_NUMBER = 3; /** *
-   * Regex-based custom info type.
+   * Regular expression based CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -6369,7 +6369,7 @@ public boolean hasRegex() { } /** *
-   * Regex-based custom info type.
+   * Regular expression based CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -6382,7 +6382,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { } /** *
-   * Regex-based custom info type.
+   * Regular expression based CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -6397,7 +6397,8 @@ public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder public static final int SURROGATE_TYPE_FIELD_NUMBER = 4; /** *
-   * Surrogate info type.
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -6407,7 +6408,8 @@ public boolean hasSurrogateType() { } /** *
-   * Surrogate info type.
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -6420,7 +6422,8 @@ public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType() } /** *
-   * Surrogate info type.
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -6436,9 +6439,9 @@ public com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder getSurrog private java.util.List detectionRules_; /** *
-   * Set of detection rules to apply to all findings of this custom info type.
+   * Set of detection rules to apply to all findings of this CustomInfoType.
    * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` custom info type.
+   * `surrogate_type` CustomInfoType.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -6448,9 +6451,9 @@ public java.util.List ge } /** *
-   * Set of detection rules to apply to all findings of this custom info type.
+   * Set of detection rules to apply to all findings of this CustomInfoType.
    * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` custom info type.
+   * `surrogate_type` CustomInfoType.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -6461,9 +6464,9 @@ public java.util.List ge } /** *
-   * Set of detection rules to apply to all findings of this custom info type.
+   * Set of detection rules to apply to all findings of this CustomInfoType.
    * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` custom info type.
+   * `surrogate_type` CustomInfoType.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -6473,9 +6476,9 @@ public int getDetectionRulesCount() { } /** *
-   * Set of detection rules to apply to all findings of this custom info type.
+   * Set of detection rules to apply to all findings of this CustomInfoType.
    * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` custom info type.
+   * `surrogate_type` CustomInfoType.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -6485,9 +6488,9 @@ public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules( } /** *
-   * Set of detection rules to apply to all findings of this custom info type.
+   * Set of detection rules to apply to all findings of this CustomInfoType.
    * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` custom info type.
+   * `surrogate_type` CustomInfoType.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -6990,8 +6993,8 @@ public Builder clearType() { com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; /** *
-     * Info type configuration. All custom info types must have configurations
-     * that do not conflict with built-in info types or other custom info types.
+     * All CustomInfoTypes must have a name
+     * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -7001,8 +7004,8 @@ public boolean hasInfoType() { } /** *
-     * Info type configuration. All custom info types must have configurations
-     * that do not conflict with built-in info types or other custom info types.
+     * All CustomInfoTypes must have a name
+     * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -7016,8 +7019,8 @@ public com.google.privacy.dlp.v2.InfoType getInfoType() { } /** *
-     * Info type configuration. All custom info types must have configurations
-     * that do not conflict with built-in info types or other custom info types.
+     * All CustomInfoTypes must have a name
+     * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -7037,8 +7040,8 @@ public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { } /** *
-     * Info type configuration. All custom info types must have configurations
-     * that do not conflict with built-in info types or other custom info types.
+     * All CustomInfoTypes must have a name
+     * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -7056,8 +7059,8 @@ public Builder setInfoType( } /** *
-     * Info type configuration. All custom info types must have configurations
-     * that do not conflict with built-in info types or other custom info types.
+     * All CustomInfoTypes must have a name
+     * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -7079,8 +7082,8 @@ public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { } /** *
-     * Info type configuration. All custom info types must have configurations
-     * that do not conflict with built-in info types or other custom info types.
+     * All CustomInfoTypes must have a name
+     * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -7098,8 +7101,8 @@ public Builder clearInfoType() { } /** *
-     * Info type configuration. All custom info types must have configurations
-     * that do not conflict with built-in info types or other custom info types.
+     * All CustomInfoTypes must have a name
+     * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -7111,8 +7114,8 @@ public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { } /** *
-     * Info type configuration. All custom info types must have configurations
-     * that do not conflict with built-in info types or other custom info types.
+     * All CustomInfoTypes must have a name
+     * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -7127,8 +7130,8 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { } /** *
-     * Info type configuration. All custom info types must have configurations
-     * that do not conflict with built-in info types or other custom info types.
+     * All CustomInfoTypes must have a name
+     * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -7150,7 +7153,7 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { private int likelihood_ = 0; /** *
-     * Likelihood to return for this custom info type. This base value can be
+     * Likelihood to return for this CustomInfoType. This base value can be
      * altered by a detection rule if the finding meets the criteria specified by
      * the rule. Defaults to `VERY_LIKELY` if not specified.
      * 
@@ -7162,7 +7165,7 @@ public int getLikelihoodValue() { } /** *
-     * Likelihood to return for this custom info type. This base value can be
+     * Likelihood to return for this CustomInfoType. This base value can be
      * altered by a detection rule if the finding meets the criteria specified by
      * the rule. Defaults to `VERY_LIKELY` if not specified.
      * 
@@ -7176,7 +7179,7 @@ public Builder setLikelihoodValue(int value) { } /** *
-     * Likelihood to return for this custom info type. This base value can be
+     * Likelihood to return for this CustomInfoType. This base value can be
      * altered by a detection rule if the finding meets the criteria specified by
      * the rule. Defaults to `VERY_LIKELY` if not specified.
      * 
@@ -7189,7 +7192,7 @@ public com.google.privacy.dlp.v2.Likelihood getLikelihood() { } /** *
-     * Likelihood to return for this custom info type. This base value can be
+     * Likelihood to return for this CustomInfoType. This base value can be
      * altered by a detection rule if the finding meets the criteria specified by
      * the rule. Defaults to `VERY_LIKELY` if not specified.
      * 
@@ -7207,7 +7210,7 @@ public Builder setLikelihood(com.google.privacy.dlp.v2.Likelihood value) { } /** *
-     * Likelihood to return for this custom info type. This base value can be
+     * Likelihood to return for this CustomInfoType. This base value can be
      * altered by a detection rule if the finding meets the criteria specified by
      * the rule. Defaults to `VERY_LIKELY` if not specified.
      * 
@@ -7225,7 +7228,7 @@ public Builder clearLikelihood() { com.google.privacy.dlp.v2.CustomInfoType.Dictionary, com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder, com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder> dictionaryBuilder_; /** *
-     * Dictionary-based custom info type.
+     * A list of phrases to detect as a CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -7235,7 +7238,7 @@ public boolean hasDictionary() { } /** *
-     * Dictionary-based custom info type.
+     * A list of phrases to detect as a CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -7255,7 +7258,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary() { } /** *
-     * Dictionary-based custom info type.
+     * A list of phrases to detect as a CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -7275,7 +7278,7 @@ public Builder setDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictionary } /** *
-     * Dictionary-based custom info type.
+     * A list of phrases to detect as a CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -7293,7 +7296,7 @@ public Builder setDictionary( } /** *
-     * Dictionary-based custom info type.
+     * A list of phrases to detect as a CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -7319,7 +7322,7 @@ public Builder mergeDictionary(com.google.privacy.dlp.v2.CustomInfoType.Dictiona } /** *
-     * Dictionary-based custom info type.
+     * A list of phrases to detect as a CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -7342,7 +7345,7 @@ public Builder clearDictionary() { } /** *
-     * Dictionary-based custom info type.
+     * A list of phrases to detect as a CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -7352,7 +7355,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.Dictionary.Builder getDictionary } /** *
-     * Dictionary-based custom info type.
+     * A list of phrases to detect as a CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -7369,7 +7372,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionar } /** *
-     * Dictionary-based custom info type.
+     * A list of phrases to detect as a CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -7397,7 +7400,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.DictionaryOrBuilder getDictionar com.google.privacy.dlp.v2.CustomInfoType.Regex, com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder, com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder> regexBuilder_; /** *
-     * Regex-based custom info type.
+     * Regular expression based CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -7407,7 +7410,7 @@ public boolean hasRegex() { } /** *
-     * Regex-based custom info type.
+     * Regular expression based CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -7427,7 +7430,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex() { } /** *
-     * Regex-based custom info type.
+     * Regular expression based CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -7447,7 +7450,7 @@ public Builder setRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) { } /** *
-     * Regex-based custom info type.
+     * Regular expression based CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -7465,7 +7468,7 @@ public Builder setRegex( } /** *
-     * Regex-based custom info type.
+     * Regular expression based CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -7491,7 +7494,7 @@ public Builder mergeRegex(com.google.privacy.dlp.v2.CustomInfoType.Regex value) } /** *
-     * Regex-based custom info type.
+     * Regular expression based CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -7514,7 +7517,7 @@ public Builder clearRegex() { } /** *
-     * Regex-based custom info type.
+     * Regular expression based CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -7524,7 +7527,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.Regex.Builder getRegexBuilder() } /** *
-     * Regex-based custom info type.
+     * Regular expression based CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -7541,7 +7544,7 @@ public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder } /** *
-     * Regex-based custom info type.
+     * Regular expression based CustomInfoType.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -7569,7 +7572,8 @@ public com.google.privacy.dlp.v2.CustomInfoType.RegexOrBuilder getRegexOrBuilder com.google.privacy.dlp.v2.CustomInfoType.SurrogateType, com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder, com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder> surrogateTypeBuilder_; /** *
-     * Surrogate info type.
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -7579,7 +7583,8 @@ public boolean hasSurrogateType() { } /** *
-     * Surrogate info type.
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -7599,7 +7604,8 @@ public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType() } /** *
-     * Surrogate info type.
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -7619,7 +7625,8 @@ public Builder setSurrogateType(com.google.privacy.dlp.v2.CustomInfoType.Surroga } /** *
-     * Surrogate info type.
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -7637,7 +7644,8 @@ public Builder setSurrogateType( } /** *
-     * Surrogate info type.
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -7663,7 +7671,8 @@ public Builder mergeSurrogateType(com.google.privacy.dlp.v2.CustomInfoType.Surro } /** *
-     * Surrogate info type.
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -7686,7 +7695,8 @@ public Builder clearSurrogateType() { } /** *
-     * Surrogate info type.
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -7696,7 +7706,8 @@ public com.google.privacy.dlp.v2.CustomInfoType.SurrogateType.Builder getSurroga } /** *
-     * Surrogate info type.
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -7713,7 +7724,8 @@ public com.google.privacy.dlp.v2.CustomInfoType.SurrogateTypeOrBuilder getSurrog } /** *
-     * Surrogate info type.
+     * Message for detecting output from deidentification transformations that
+     * support reversing.
      * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -7751,9 +7763,9 @@ private void ensureDetectionRulesIsMutable() { /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7767,9 +7779,9 @@ public java.util.List ge } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7783,9 +7795,9 @@ public int getDetectionRulesCount() { } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7799,9 +7811,9 @@ public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules( } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7822,9 +7834,9 @@ public Builder setDetectionRules( } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7842,9 +7854,9 @@ public Builder setDetectionRules( } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7864,9 +7876,9 @@ public Builder addDetectionRules(com.google.privacy.dlp.v2.CustomInfoType.Detect } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7887,9 +7899,9 @@ public Builder addDetectionRules( } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7907,9 +7919,9 @@ public Builder addDetectionRules( } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7927,9 +7939,9 @@ public Builder addDetectionRules( } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7948,9 +7960,9 @@ public Builder addAllDetectionRules( } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7967,9 +7979,9 @@ public Builder clearDetectionRules() { } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7986,9 +7998,9 @@ public Builder removeDetectionRules(int index) { } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -7999,9 +8011,9 @@ public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder getDetecti } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -8015,9 +8027,9 @@ public com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder getDetect } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -8032,9 +8044,9 @@ public com.google.privacy.dlp.v2.CustomInfoType.DetectionRuleOrBuilder getDetect } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -8045,9 +8057,9 @@ public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder addDetecti } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -8059,9 +8071,9 @@ public com.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Builder addDetecti } /** *
-     * Set of detection rules to apply to all findings of this custom info type.
+     * Set of detection rules to apply to all findings of this CustomInfoType.
      * Rules are applied in order that they are specified. Not supported for the
-     * `surrogate_type` custom info type.
+     * `surrogate_type` CustomInfoType.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java index 257a145819fa..501f194b7141 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/CustomInfoTypeOrBuilder.java @@ -9,8 +9,8 @@ public interface CustomInfoTypeOrBuilder extends /** *
-   * Info type configuration. All custom info types must have configurations
-   * that do not conflict with built-in info types or other custom info types.
+   * All CustomInfoTypes must have a name
+   * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -18,8 +18,8 @@ public interface CustomInfoTypeOrBuilder extends boolean hasInfoType(); /** *
-   * Info type configuration. All custom info types must have configurations
-   * that do not conflict with built-in info types or other custom info types.
+   * All CustomInfoTypes must have a name
+   * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -27,8 +27,8 @@ public interface CustomInfoTypeOrBuilder extends com.google.privacy.dlp.v2.InfoType getInfoType(); /** *
-   * Info type configuration. All custom info types must have configurations
-   * that do not conflict with built-in info types or other custom info types.
+   * All CustomInfoTypes must have a name
+   * that does not conflict with built-in InfoTypes or other CustomInfoTypes.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 1; @@ -37,7 +37,7 @@ public interface CustomInfoTypeOrBuilder extends /** *
-   * Likelihood to return for this custom info type. This base value can be
+   * Likelihood to return for this CustomInfoType. This base value can be
    * altered by a detection rule if the finding meets the criteria specified by
    * the rule. Defaults to `VERY_LIKELY` if not specified.
    * 
@@ -47,7 +47,7 @@ public interface CustomInfoTypeOrBuilder extends int getLikelihoodValue(); /** *
-   * Likelihood to return for this custom info type. This base value can be
+   * Likelihood to return for this CustomInfoType. This base value can be
    * altered by a detection rule if the finding meets the criteria specified by
    * the rule. Defaults to `VERY_LIKELY` if not specified.
    * 
@@ -58,7 +58,7 @@ public interface CustomInfoTypeOrBuilder extends /** *
-   * Dictionary-based custom info type.
+   * A list of phrases to detect as a CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -66,7 +66,7 @@ public interface CustomInfoTypeOrBuilder extends boolean hasDictionary(); /** *
-   * Dictionary-based custom info type.
+   * A list of phrases to detect as a CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -74,7 +74,7 @@ public interface CustomInfoTypeOrBuilder extends com.google.privacy.dlp.v2.CustomInfoType.Dictionary getDictionary(); /** *
-   * Dictionary-based custom info type.
+   * A list of phrases to detect as a CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Dictionary dictionary = 2; @@ -83,7 +83,7 @@ public interface CustomInfoTypeOrBuilder extends /** *
-   * Regex-based custom info type.
+   * Regular expression based CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -91,7 +91,7 @@ public interface CustomInfoTypeOrBuilder extends boolean hasRegex(); /** *
-   * Regex-based custom info type.
+   * Regular expression based CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -99,7 +99,7 @@ public interface CustomInfoTypeOrBuilder extends com.google.privacy.dlp.v2.CustomInfoType.Regex getRegex(); /** *
-   * Regex-based custom info type.
+   * Regular expression based CustomInfoType.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.Regex regex = 3; @@ -108,7 +108,8 @@ public interface CustomInfoTypeOrBuilder extends /** *
-   * Surrogate info type.
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -116,7 +117,8 @@ public interface CustomInfoTypeOrBuilder extends boolean hasSurrogateType(); /** *
-   * Surrogate info type.
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -124,7 +126,8 @@ public interface CustomInfoTypeOrBuilder extends com.google.privacy.dlp.v2.CustomInfoType.SurrogateType getSurrogateType(); /** *
-   * Surrogate info type.
+   * Message for detecting output from deidentification transformations that
+   * support reversing.
    * 
* * .google.privacy.dlp.v2.CustomInfoType.SurrogateType surrogate_type = 4; @@ -133,9 +136,9 @@ public interface CustomInfoTypeOrBuilder extends /** *
-   * Set of detection rules to apply to all findings of this custom info type.
+   * Set of detection rules to apply to all findings of this CustomInfoType.
    * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` custom info type.
+   * `surrogate_type` CustomInfoType.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -144,9 +147,9 @@ public interface CustomInfoTypeOrBuilder extends getDetectionRulesList(); /** *
-   * Set of detection rules to apply to all findings of this custom info type.
+   * Set of detection rules to apply to all findings of this CustomInfoType.
    * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` custom info type.
+   * `surrogate_type` CustomInfoType.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -154,9 +157,9 @@ public interface CustomInfoTypeOrBuilder extends com.google.privacy.dlp.v2.CustomInfoType.DetectionRule getDetectionRules(int index); /** *
-   * Set of detection rules to apply to all findings of this custom info type.
+   * Set of detection rules to apply to all findings of this CustomInfoType.
    * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` custom info type.
+   * `surrogate_type` CustomInfoType.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -164,9 +167,9 @@ public interface CustomInfoTypeOrBuilder extends int getDetectionRulesCount(); /** *
-   * Set of detection rules to apply to all findings of this custom info type.
+   * Set of detection rules to apply to all findings of this CustomInfoType.
    * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` custom info type.
+   * `surrogate_type` CustomInfoType.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; @@ -175,9 +178,9 @@ public interface CustomInfoTypeOrBuilder extends getDetectionRulesOrBuilderList(); /** *
-   * Set of detection rules to apply to all findings of this custom info type.
+   * Set of detection rules to apply to all findings of this CustomInfoType.
    * Rules are applied in order that they are specified. Not supported for the
-   * `surrogate_type` custom info type.
+   * `surrogate_type` CustomInfoType.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType.DetectionRule detection_rules = 7; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java index fc16b416fea7..d9d2bcfc0d22 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DateShiftConfig.java @@ -6,7 +6,8 @@ /** *
  * Shifts dates by random number of days, with option to be consistent for the
- * same context.
+ * same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting
+ * to learn more.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.DateShiftConfig} @@ -471,7 +472,8 @@ protected Builder newBuilderForType( /** *
    * Shifts dates by random number of days, with option to be consistent for the
-   * same context.
+   * same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting
+   * to learn more.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.DateShiftConfig} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java index 47d7bff6a12b..1586a0dd3475 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DeidentifyTemplate.java @@ -6,6 +6,7 @@ /** *
  * The DeidentifyTemplates contains instructions on how to deidentify content.
+ * See https://cloud.google.com/dlp/docs/concepts-templates to learn more.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.DeidentifyTemplate} @@ -589,6 +590,7 @@ protected Builder newBuilderForType( /** *
    * The DeidentifyTemplates contains instructions on how to deidentify content.
+   * See https://cloud.google.com/dlp/docs/concepts-templates to learn more.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.DeidentifyTemplate} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java index 230c5e95f850..7addf9ab6c97 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/DlpProto.java @@ -194,6 +194,21 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_QuasiId_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor; static final @@ -239,6 +254,11 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor; static final @@ -304,6 +324,21 @@ public static void registerAllExtensions( static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor; static final @@ -740,605 +775,645 @@ public static void registerAllExtensions( "K\n\rImageLocation\022:\n\016bounding_boxes\030\001 \003(\013" + "2\".google.privacy.dlp.v2.BoundingBox\"G\n\013" + "BoundingBox\022\013\n\003top\030\001 \001(\005\022\014\n\004left\030\002 \001(\005\022\r" + - "\n\005width\030\003 \001(\005\022\016\n\006height\030\004 \001(\005\"\251\003\n\022Redact" + + "\n\005width\030\003 \001(\005\022\016\n\006height\030\004 \001(\005\"\303\003\n\022Redact" + "ImageRequest\022\016\n\006parent\030\001 \001(\t\022<\n\016inspect_" + "config\030\002 \001(\0132$.google.privacy.dlp.v2.Ins" + "pectConfig\022_\n\027image_redaction_configs\030\005 " + "\003(\0132>.google.privacy.dlp.v2.RedactImageR" + - "equest.ImageRedactionConfig\0229\n\tbyte_item" + - "\030\007 \001(\0132&.google.privacy.dlp.v2.ByteConte" + - "ntItem\032\250\001\n\024ImageRedactionConfig\0224\n\tinfo_" + - "type\030\001 \001(\0132\037.google.privacy.dlp.v2.InfoT" + - "ypeH\000\022\031\n\017redact_all_text\030\002 \001(\010H\000\0225\n\017reda" + - "ction_color\030\003 \001(\0132\034.google.privacy.dlp.v" + - "2.ColorB\010\n\006target\"1\n\005Color\022\013\n\003red\030\001 \001(\002\022" + - "\r\n\005green\030\002 \001(\002\022\014\n\004blue\030\003 \001(\002\"E\n\023RedactIm" + - "ageResponse\022\026\n\016redacted_image\030\001 \001(\014\022\026\n\016e" + - "xtracted_text\030\002 \001(\t\"\237\002\n\030DeidentifyConten" + - "tRequest\022\016\n\006parent\030\001 \001(\t\022B\n\021deidentify_c" + - "onfig\030\002 \001(\0132\'.google.privacy.dlp.v2.Deid" + - "entifyConfig\022<\n\016inspect_config\030\003 \001(\0132$.g" + - "oogle.privacy.dlp.v2.InspectConfig\0220\n\004it" + - "em\030\004 \001(\0132\".google.privacy.dlp.v2.Content" + - "Item\022\035\n\025inspect_template_name\030\005 \001(\t\022 \n\030d" + - "eidentify_template_name\030\006 \001(\t\"\216\001\n\031Deiden" + - "tifyContentResponse\0220\n\004item\030\001 \001(\0132\".goog" + - "le.privacy.dlp.v2.ContentItem\022?\n\010overvie" + - "w\030\002 \001(\0132-.google.privacy.dlp.v2.Transfor" + - "mationOverview\"\237\002\n\030ReidentifyContentRequ" + - "est\022\016\n\006parent\030\001 \001(\t\022B\n\021reidentify_config" + - "\030\002 \001(\0132\'.google.privacy.dlp.v2.Deidentif" + - "yConfig\022<\n\016inspect_config\030\003 \001(\0132$.google" + - ".privacy.dlp.v2.InspectConfig\0220\n\004item\030\004 " + - "\001(\0132\".google.privacy.dlp.v2.ContentItem\022" + - "\035\n\025inspect_template_name\030\005 \001(\t\022 \n\030reiden" + - "tify_template_name\030\006 \001(\t\"\216\001\n\031ReidentifyC" + - "ontentResponse\0220\n\004item\030\001 \001(\0132\".google.pr" + - "ivacy.dlp.v2.ContentItem\022?\n\010overview\030\002 \001" + - "(\0132-.google.privacy.dlp.v2.Transformatio" + - "nOverview\"\266\001\n\025InspectContentRequest\022\016\n\006p" + - "arent\030\001 \001(\t\022<\n\016inspect_config\030\002 \001(\0132$.go" + - "ogle.privacy.dlp.v2.InspectConfig\0220\n\004ite" + - "m\030\003 \001(\0132\".google.privacy.dlp.v2.ContentI" + - "tem\022\035\n\025inspect_template_name\030\004 \001(\t\"N\n\026In" + - "spectContentResponse\0224\n\006result\030\001 \001(\0132$.g" + - "oogle.privacy.dlp.v2.InspectResult\"\267\002\n\023O" + - "utputStorageConfig\0225\n\005table\030\001 \001(\0132$.goog" + - "le.privacy.dlp.v2.BigQueryTableH\000\022N\n\rout" + - "put_schema\030\003 \001(\01627.google.privacy.dlp.v2" + - ".OutputStorageConfig.OutputSchema\"\220\001\n\014Ou" + - "tputSchema\022\035\n\031OUTPUT_SCHEMA_UNSPECIFIED\020" + - "\000\022\021\n\rBASIC_COLUMNS\020\001\022\017\n\013GCS_COLUMNS\020\002\022\025\n" + - "\021DATASTORE_COLUMNS\020\003\022\025\n\021BIG_QUERY_COLUMN" + - "S\020\004\022\017\n\013ALL_COLUMNS\020\005B\006\n\004type\"R\n\rInfoType" + - "Stats\0222\n\tinfo_type\030\001 \001(\0132\037.google.privac" + - "y.dlp.v2.InfoType\022\r\n\005count\030\002 \001(\003\"\335\003\n\030Ins" + - "pectDataSourceDetails\022[\n\021requested_optio" + - "ns\030\002 \001(\0132@.google.privacy.dlp.v2.Inspect" + - "DataSourceDetails.RequestedOptions\022F\n\006re" + - "sult\030\003 \001(\01326.google.privacy.dlp.v2.Inspe" + - "ctDataSourceDetails.Result\032\232\001\n\020Requested" + - "Options\022I\n\031snapshot_inspect_template\030\001 \001" + - "(\0132&.google.privacy.dlp.v2.InspectTempla" + - "te\022;\n\njob_config\030\003 \001(\0132\'.google.privacy." + - "dlp.v2.InspectJobConfig\032\177\n\006Result\022\027\n\017pro" + - "cessed_bytes\030\001 \001(\003\022\035\n\025total_estimated_by" + - "tes\030\002 \001(\003\022=\n\017info_type_stats\030\003 \003(\0132$.goo" + - "gle.privacy.dlp.v2.InfoTypeStats\"{\n\023Info" + - "TypeDescription\022\014\n\004name\030\001 \001(\t\022\024\n\014display" + - "_name\030\002 \001(\t\022@\n\014supported_by\030\003 \003(\0162*.goog" + - "le.privacy.dlp.v2.InfoTypeSupportedBy\"=\n" + - "\024ListInfoTypesRequest\022\025\n\rlanguage_code\030\001" + - " \001(\t\022\016\n\006filter\030\002 \001(\t\"W\n\025ListInfoTypesRes" + - "ponse\022>\n\ninfo_types\030\001 \003(\0132*.google.priva" + - "cy.dlp.v2.InfoTypeDescription\"\301\001\n\025RiskAn" + - "alysisJobConfig\022<\n\016privacy_metric\030\001 \001(\0132" + - "$.google.privacy.dlp.v2.PrivacyMetric\022:\n" + - "\014source_table\030\002 \001(\0132$.google.privacy.dlp" + - ".v2.BigQueryTable\022.\n\007actions\030\003 \003(\0132\035.goo" + - "gle.privacy.dlp.v2.Action\"\330\014\n\rPrivacyMet" + - "ric\022[\n\026numerical_stats_config\030\001 \001(\01329.go" + - "ogle.privacy.dlp.v2.PrivacyMetric.Numeri" + - "calStatsConfigH\000\022_\n\030categorical_stats_co" + - "nfig\030\002 \001(\0132;.google.privacy.dlp.v2.Priva" + - "cyMetric.CategoricalStatsConfigH\000\022S\n\022k_a" + - "nonymity_config\030\003 \001(\01325.google.privacy.d" + - "lp.v2.PrivacyMetric.KAnonymityConfigH\000\022S" + - "\n\022l_diversity_config\030\004 \001(\01325.google.priv" + - "acy.dlp.v2.PrivacyMetric.LDiversityConfi" + - "gH\000\022\\\n\027k_map_estimation_config\030\005 \001(\01329.g" + - "oogle.privacy.dlp.v2.PrivacyMetric.KMapE" + - "stimationConfigH\000\032E\n\024NumericalStatsConfi" + - "g\022-\n\005field\030\001 \001(\0132\036.google.privacy.dlp.v2" + - ".FieldId\032G\n\026CategoricalStatsConfig\022-\n\005fi" + - "eld\030\001 \001(\0132\036.google.privacy.dlp.v2.FieldI" + - "d\032y\n\020KAnonymityConfig\0221\n\tquasi_ids\030\001 \003(\013" + - "2\036.google.privacy.dlp.v2.FieldId\0222\n\tenti" + - "ty_id\030\002 \001(\0132\037.google.privacy.dlp.v2.Enti" + - "tyId\032\202\001\n\020LDiversityConfig\0221\n\tquasi_ids\030\001" + - " \003(\0132\036.google.privacy.dlp.v2.FieldId\022;\n\023" + - "sensitive_attribute\030\002 \001(\0132\036.google.priva" + - "cy.dlp.v2.FieldId\032\350\005\n\024KMapEstimationConf" + - "ig\022X\n\tquasi_ids\030\001 \003(\0132E.google.privacy.d" + - "lp.v2.PrivacyMetric.KMapEstimationConfig" + - ".TaggedField\022\023\n\013region_code\030\002 \001(\t\022b\n\020aux" + - "iliary_tables\030\003 \003(\0132H.google.privacy.dlp" + - ".v2.PrivacyMetric.KMapEstimationConfig.A" + - "uxiliaryTable\032\273\001\n\013TaggedField\022-\n\005field\030\001" + - " \001(\0132\036.google.privacy.dlp.v2.FieldId\0224\n\t" + - "info_type\030\002 \001(\0132\037.google.privacy.dlp.v2." + - "InfoTypeH\000\022\024\n\ncustom_tag\030\003 \001(\tH\000\022*\n\010infe" + - "rred\030\004 \001(\0132\026.google.protobuf.EmptyH\000B\005\n\003" + - "tag\032\276\002\n\016AuxiliaryTable\0223\n\005table\030\003 \001(\0132$." + - "google.privacy.dlp.v2.BigQueryTable\022h\n\tq" + - "uasi_ids\030\001 \003(\0132U.google.privacy.dlp.v2.P" + - "rivacyMetric.KMapEstimationConfig.Auxili" + - "aryTable.QuasiIdField\022:\n\022relative_freque" + - "ncy\030\002 \001(\0132\036.google.privacy.dlp.v2.FieldI" + - "d\032Q\n\014QuasiIdField\022-\n\005field\030\001 \001(\0132\036.googl" + - "e.privacy.dlp.v2.FieldId\022\022\n\ncustom_tag\030\002" + - " \001(\tB\006\n\004type\"\214\030\n\034AnalyzeDataSourceRiskDe" + - "tails\022F\n\030requested_privacy_metric\030\001 \001(\0132" + - "$.google.privacy.dlp.v2.PrivacyMetric\022D\n" + - "\026requested_source_table\030\002 \001(\0132$.google.p" + - "rivacy.dlp.v2.BigQueryTable\022j\n\026numerical" + - "_stats_result\030\003 \001(\0132H.google.privacy.dlp" + - ".v2.AnalyzeDataSourceRiskDetails.Numeric" + - "alStatsResultH\000\022n\n\030categorical_stats_res" + - "ult\030\004 \001(\0132J.google.privacy.dlp.v2.Analyz" + - "eDataSourceRiskDetails.CategoricalStatsR" + - "esultH\000\022b\n\022k_anonymity_result\030\005 \001(\0132D.go" + + "equest.ImageRedactionConfig\022\030\n\020include_f" + + "indings\030\006 \001(\010\0229\n\tbyte_item\030\007 \001(\0132&.googl" + + "e.privacy.dlp.v2.ByteContentItem\032\250\001\n\024Ima" + + "geRedactionConfig\0224\n\tinfo_type\030\001 \001(\0132\037.g" + + "oogle.privacy.dlp.v2.InfoTypeH\000\022\031\n\017redac" + + "t_all_text\030\002 \001(\010H\000\0225\n\017redaction_color\030\003 " + + "\001(\0132\034.google.privacy.dlp.v2.ColorB\010\n\006tar" + + "get\"1\n\005Color\022\013\n\003red\030\001 \001(\002\022\r\n\005green\030\002 \001(\002" + + "\022\014\n\004blue\030\003 \001(\002\"\203\001\n\023RedactImageResponse\022\026" + + "\n\016redacted_image\030\001 \001(\014\022\026\n\016extracted_text" + + "\030\002 \001(\t\022<\n\016inspect_result\030\003 \001(\0132$.google." + + "privacy.dlp.v2.InspectResult\"\237\002\n\030Deident" + + "ifyContentRequest\022\016\n\006parent\030\001 \001(\t\022B\n\021dei" + + "dentify_config\030\002 \001(\0132\'.google.privacy.dl" + + "p.v2.DeidentifyConfig\022<\n\016inspect_config\030" + + "\003 \001(\0132$.google.privacy.dlp.v2.InspectCon" + + "fig\0220\n\004item\030\004 \001(\0132\".google.privacy.dlp.v" + + "2.ContentItem\022\035\n\025inspect_template_name\030\005" + + " \001(\t\022 \n\030deidentify_template_name\030\006 \001(\t\"\216" + + "\001\n\031DeidentifyContentResponse\0220\n\004item\030\001 \001" + + "(\0132\".google.privacy.dlp.v2.ContentItem\022?" + + "\n\010overview\030\002 \001(\0132-.google.privacy.dlp.v2" + + ".TransformationOverview\"\237\002\n\030ReidentifyCo" + + "ntentRequest\022\016\n\006parent\030\001 \001(\t\022B\n\021reidenti" + + "fy_config\030\002 \001(\0132\'.google.privacy.dlp.v2." + + "DeidentifyConfig\022<\n\016inspect_config\030\003 \001(\013" + + "2$.google.privacy.dlp.v2.InspectConfig\0220" + + "\n\004item\030\004 \001(\0132\".google.privacy.dlp.v2.Con" + + "tentItem\022\035\n\025inspect_template_name\030\005 \001(\t\022" + + " \n\030reidentify_template_name\030\006 \001(\t\"\216\001\n\031Re" + + "identifyContentResponse\0220\n\004item\030\001 \001(\0132\"." + + "google.privacy.dlp.v2.ContentItem\022?\n\010ove" + + "rview\030\002 \001(\0132-.google.privacy.dlp.v2.Tran" + + "sformationOverview\"\266\001\n\025InspectContentReq" + + "uest\022\016\n\006parent\030\001 \001(\t\022<\n\016inspect_config\030\002" + + " \001(\0132$.google.privacy.dlp.v2.InspectConf" + + "ig\0220\n\004item\030\003 \001(\0132\".google.privacy.dlp.v2" + + ".ContentItem\022\035\n\025inspect_template_name\030\004 " + + "\001(\t\"N\n\026InspectContentResponse\0224\n\006result\030" + + "\001 \001(\0132$.google.privacy.dlp.v2.InspectRes" + + "ult\"\267\002\n\023OutputStorageConfig\0225\n\005table\030\001 \001" + + "(\0132$.google.privacy.dlp.v2.BigQueryTable" + + "H\000\022N\n\routput_schema\030\003 \001(\01627.google.priva" + + "cy.dlp.v2.OutputStorageConfig.OutputSche" + + "ma\"\220\001\n\014OutputSchema\022\035\n\031OUTPUT_SCHEMA_UNS" + + "PECIFIED\020\000\022\021\n\rBASIC_COLUMNS\020\001\022\017\n\013GCS_COL" + + "UMNS\020\002\022\025\n\021DATASTORE_COLUMNS\020\003\022\025\n\021BIG_QUE" + + "RY_COLUMNS\020\004\022\017\n\013ALL_COLUMNS\020\005B\006\n\004type\"R\n" + + "\rInfoTypeStats\0222\n\tinfo_type\030\001 \001(\0132\037.goog" + + "le.privacy.dlp.v2.InfoType\022\r\n\005count\030\002 \001(" + + "\003\"\335\003\n\030InspectDataSourceDetails\022[\n\021reques" + + "ted_options\030\002 \001(\0132@.google.privacy.dlp.v" + + "2.InspectDataSourceDetails.RequestedOpti" + + "ons\022F\n\006result\030\003 \001(\01326.google.privacy.dlp" + + ".v2.InspectDataSourceDetails.Result\032\232\001\n\020" + + "RequestedOptions\022I\n\031snapshot_inspect_tem" + + "plate\030\001 \001(\0132&.google.privacy.dlp.v2.Insp" + + "ectTemplate\022;\n\njob_config\030\003 \001(\0132\'.google" + + ".privacy.dlp.v2.InspectJobConfig\032\177\n\006Resu" + + "lt\022\027\n\017processed_bytes\030\001 \001(\003\022\035\n\025total_est" + + "imated_bytes\030\002 \001(\003\022=\n\017info_type_stats\030\003 " + + "\003(\0132$.google.privacy.dlp.v2.InfoTypeStat" + + "s\"{\n\023InfoTypeDescription\022\014\n\004name\030\001 \001(\t\022\024" + + "\n\014display_name\030\002 \001(\t\022@\n\014supported_by\030\003 \003" + + "(\0162*.google.privacy.dlp.v2.InfoTypeSuppo" + + "rtedBy\"=\n\024ListInfoTypesRequest\022\025\n\rlangua" + + "ge_code\030\001 \001(\t\022\016\n\006filter\030\002 \001(\t\"W\n\025ListInf" + + "oTypesResponse\022>\n\ninfo_types\030\001 \003(\0132*.goo" + + "gle.privacy.dlp.v2.InfoTypeDescription\"\301" + + "\001\n\025RiskAnalysisJobConfig\022<\n\016privacy_metr" + + "ic\030\001 \001(\0132$.google.privacy.dlp.v2.Privacy" + + "Metric\022:\n\014source_table\030\002 \001(\0132$.google.pr" + + "ivacy.dlp.v2.BigQueryTable\022.\n\007actions\030\003 " + + "\003(\0132\035.google.privacy.dlp.v2.Action\"\267\001\n\007Q" + + "uasiId\022-\n\005field\030\001 \001(\0132\036.google.privacy.d" + + "lp.v2.FieldId\0224\n\tinfo_type\030\002 \001(\0132\037.googl" + + "e.privacy.dlp.v2.InfoTypeH\000\022\024\n\ncustom_ta" + + "g\030\003 \001(\tH\000\022*\n\010inferred\030\004 \001(\0132\026.google.pro" + + "tobuf.EmptyH\000B\005\n\003tag\"\257\002\n\020StatisticalTabl" + + "e\0223\n\005table\030\003 \001(\0132$.google.privacy.dlp.v2" + + ".BigQueryTable\022O\n\tquasi_ids\030\001 \003(\0132<.goog" + + "le.privacy.dlp.v2.StatisticalTable.Quasi" + + "IdentifierField\022:\n\022relative_frequency\030\002 " + + "\001(\0132\036.google.privacy.dlp.v2.FieldId\032Y\n\024Q" + + "uasiIdentifierField\022-\n\005field\030\001 \001(\0132\036.goo" + + "gle.privacy.dlp.v2.FieldId\022\022\n\ncustom_tag" + + "\030\002 \001(\t\"\365\016\n\rPrivacyMetric\022[\n\026numerical_st" + + "ats_config\030\001 \001(\01329.google.privacy.dlp.v2" + + ".PrivacyMetric.NumericalStatsConfigH\000\022_\n" + + "\030categorical_stats_config\030\002 \001(\0132;.google" + + ".privacy.dlp.v2.PrivacyMetric.Categorica" + + "lStatsConfigH\000\022S\n\022k_anonymity_config\030\003 \001" + + "(\01325.google.privacy.dlp.v2.PrivacyMetric" + + ".KAnonymityConfigH\000\022S\n\022l_diversity_confi" + + "g\030\004 \001(\01325.google.privacy.dlp.v2.PrivacyM" + + "etric.LDiversityConfigH\000\022\\\n\027k_map_estima" + + "tion_config\030\005 \001(\01329.google.privacy.dlp.v" + + "2.PrivacyMetric.KMapEstimationConfigH\000\022n" + + "\n delta_presence_estimation_config\030\006 \001(\013" + + "2B.google.privacy.dlp.v2.PrivacyMetric.D" + + "eltaPresenceEstimationConfigH\000\032E\n\024Numeri" + + "calStatsConfig\022-\n\005field\030\001 \001(\0132\036.google.p" + + "rivacy.dlp.v2.FieldId\032G\n\026CategoricalStat" + + "sConfig\022-\n\005field\030\001 \001(\0132\036.google.privacy." + + "dlp.v2.FieldId\032y\n\020KAnonymityConfig\0221\n\tqu" + + "asi_ids\030\001 \003(\0132\036.google.privacy.dlp.v2.Fi" + + "eldId\0222\n\tentity_id\030\002 \001(\0132\037.google.privac" + + "y.dlp.v2.EntityId\032\202\001\n\020LDiversityConfig\0221" + + "\n\tquasi_ids\030\001 \003(\0132\036.google.privacy.dlp.v" + + "2.FieldId\022;\n\023sensitive_attribute\030\002 \001(\0132\036" + + ".google.privacy.dlp.v2.FieldId\032\350\005\n\024KMapE" + + "stimationConfig\022X\n\tquasi_ids\030\001 \003(\0132E.goo" + + "gle.privacy.dlp.v2.PrivacyMetric.KMapEst" + + "imationConfig.TaggedField\022\023\n\013region_code" + + "\030\002 \001(\t\022b\n\020auxiliary_tables\030\003 \003(\0132H.googl" + + "e.privacy.dlp.v2.PrivacyMetric.KMapEstim" + + "ationConfig.AuxiliaryTable\032\273\001\n\013TaggedFie" + + "ld\022-\n\005field\030\001 \001(\0132\036.google.privacy.dlp.v" + + "2.FieldId\0224\n\tinfo_type\030\002 \001(\0132\037.google.pr" + + "ivacy.dlp.v2.InfoTypeH\000\022\024\n\ncustom_tag\030\003 " + + "\001(\tH\000\022*\n\010inferred\030\004 \001(\0132\026.google.protobu" + + "f.EmptyH\000B\005\n\003tag\032\276\002\n\016AuxiliaryTable\0223\n\005t" + + "able\030\003 \001(\0132$.google.privacy.dlp.v2.BigQu" + + "eryTable\022h\n\tquasi_ids\030\001 \003(\0132U.google.pri" + + "vacy.dlp.v2.PrivacyMetric.KMapEstimation" + + "Config.AuxiliaryTable.QuasiIdField\022:\n\022re" + + "lative_frequency\030\002 \001(\0132\036.google.privacy." + + "dlp.v2.FieldId\032Q\n\014QuasiIdField\022-\n\005field\030" + + "\001 \001(\0132\036.google.privacy.dlp.v2.FieldId\022\022\n" + + "\ncustom_tag\030\002 \001(\t\032\252\001\n\035DeltaPresenceEstim" + + "ationConfig\0221\n\tquasi_ids\030\001 \003(\0132\036.google." + + "privacy.dlp.v2.QuasiId\022\023\n\013region_code\030\002 " + + "\001(\t\022A\n\020auxiliary_tables\030\003 \003(\0132\'.google.p" + + "rivacy.dlp.v2.StatisticalTableB\006\n\004type\"\362" + + "\035\n\034AnalyzeDataSourceRiskDetails\022F\n\030reque" + + "sted_privacy_metric\030\001 \001(\0132$.google.priva" + + "cy.dlp.v2.PrivacyMetric\022D\n\026requested_sou" + + "rce_table\030\002 \001(\0132$.google.privacy.dlp.v2." + + "BigQueryTable\022j\n\026numerical_stats_result\030" + + "\003 \001(\0132H.google.privacy.dlp.v2.AnalyzeDat" + + "aSourceRiskDetails.NumericalStatsResultH" + + "\000\022n\n\030categorical_stats_result\030\004 \001(\0132J.go" + "ogle.privacy.dlp.v2.AnalyzeDataSourceRis" + - "kDetails.KAnonymityResultH\000\022b\n\022l_diversi" + - "ty_result\030\006 \001(\0132D.google.privacy.dlp.v2." + - "AnalyzeDataSourceRiskDetails.LDiversityR" + - "esultH\000\022k\n\027k_map_estimation_result\030\007 \001(\013" + - "2H.google.privacy.dlp.v2.AnalyzeDataSour" + - "ceRiskDetails.KMapEstimationResultH\000\032\257\001\n" + - "\024NumericalStatsResult\022/\n\tmin_value\030\001 \001(\013" + - "2\034.google.privacy.dlp.v2.Value\022/\n\tmax_va" + - "lue\030\002 \001(\0132\034.google.privacy.dlp.v2.Value\022" + - "5\n\017quantile_values\030\004 \003(\0132\034.google.privac" + - "y.dlp.v2.Value\032\215\003\n\026CategoricalStatsResul" + - "t\022\225\001\n!value_frequency_histogram_buckets\030" + - "\005 \003(\0132j.google.privacy.dlp.v2.AnalyzeDat" + - "aSourceRiskDetails.CategoricalStatsResul" + - "t.CategoricalStatsHistogramBucket\032\332\001\n\037Ca" + - "tegoricalStatsHistogramBucket\022#\n\033value_f" + - "requency_lower_bound\030\001 \001(\003\022#\n\033value_freq" + - "uency_upper_bound\030\002 \001(\003\022\023\n\013bucket_size\030\003" + - " \001(\003\022<\n\rbucket_values\030\004 \003(\0132%.google.pri" + - "vacy.dlp.v2.ValueFrequency\022\032\n\022bucket_val" + - "ue_count\030\005 \001(\003\032\265\004\n\020KAnonymityResult\022\213\001\n#" + - "equivalence_class_histogram_buckets\030\005 \003(" + - "\0132^.google.privacy.dlp.v2.AnalyzeDataSou" + - "rceRiskDetails.KAnonymityResult.KAnonymi" + - "tyHistogramBucket\032t\n\032KAnonymityEquivalen" + - "ceClass\0226\n\020quasi_ids_values\030\001 \003(\0132\034.goog" + - "le.privacy.dlp.v2.Value\022\036\n\026equivalence_c" + - "lass_size\030\002 \001(\003\032\234\002\n\031KAnonymityHistogramB" + - "ucket\022*\n\"equivalence_class_size_lower_bo" + - "und\030\001 \001(\003\022*\n\"equivalence_class_size_uppe" + - "r_bound\030\002 \001(\003\022\023\n\013bucket_size\030\003 \001(\003\022v\n\rbu" + - "cket_values\030\004 \003(\0132_.google.privacy.dlp.v" + - "2.AnalyzeDataSourceRiskDetails.KAnonymit" + - "yResult.KAnonymityEquivalenceClass\022\032\n\022bu" + - "cket_value_count\030\005 \001(\003\032\260\005\n\020LDiversityRes" + - "ult\022\223\001\n+sensitive_value_frequency_histog" + - "ram_buckets\030\005 \003(\0132^.google.privacy.dlp.v" + - "2.AnalyzeDataSourceRiskDetails.LDiversit" + - "yResult.LDiversityHistogramBucket\032\340\001\n\032LD" + - "iversityEquivalenceClass\0226\n\020quasi_ids_va" + - "lues\030\001 \003(\0132\034.google.privacy.dlp.v2.Value" + - "\022\036\n\026equivalence_class_size\030\002 \001(\003\022%\n\035num_" + - "distinct_sensitive_values\030\003 \001(\003\022C\n\024top_s" + - "ensitive_values\030\004 \003(\0132%.google.privacy.d" + - "lp.v2.ValueFrequency\032\242\002\n\031LDiversityHisto" + - "gramBucket\022-\n%sensitive_value_frequency_" + - "lower_bound\030\001 \001(\003\022-\n%sensitive_value_fre" + - "quency_upper_bound\030\002 \001(\003\022\023\n\013bucket_size\030" + - "\003 \001(\003\022v\n\rbucket_values\030\004 \003(\0132_.google.pr" + - "ivacy.dlp.v2.AnalyzeDataSourceRiskDetail" + - "s.LDiversityResult.LDiversityEquivalence" + - "Class\022\032\n\022bucket_value_count\030\005 \001(\003\032\225\004\n\024KM" + - "apEstimationResult\022\212\001\n\032k_map_estimation_" + - "histogram\030\001 \003(\0132f.google.privacy.dlp.v2." + - "AnalyzeDataSourceRiskDetails.KMapEstimat" + - "ionResult.KMapEstimationHistogramBucket\032" + - "r\n\033KMapEstimationQuasiIdValues\0226\n\020quasi_" + - "ids_values\030\001 \003(\0132\034.google.privacy.dlp.v2" + - ".Value\022\033\n\023estimated_anonymity\030\002 \001(\003\032\373\001\n\035" + - "KMapEstimationHistogramBucket\022\025\n\rmin_ano" + - "nymity\030\001 \001(\003\022\025\n\rmax_anonymity\030\002 \001(\003\022\023\n\013b" + - "ucket_size\030\005 \001(\003\022{\n\rbucket_values\030\006 \003(\0132" + - "d.google.privacy.dlp.v2.AnalyzeDataSourc" + - "eRiskDetails.KMapEstimationResult.KMapEs" + - "timationQuasiIdValues\022\032\n\022bucket_value_co" + - "unt\030\007 \001(\003B\010\n\006result\"L\n\016ValueFrequency\022+\n" + - "\005value\030\001 \001(\0132\034.google.privacy.dlp.v2.Val" + - "ue\022\r\n\005count\030\002 \001(\003\"\263\002\n\005Value\022\027\n\rinteger_v" + - "alue\030\001 \001(\003H\000\022\025\n\013float_value\030\002 \001(\001H\000\022\026\n\014s" + - "tring_value\030\003 \001(\tH\000\022\027\n\rboolean_value\030\004 \001" + - "(\010H\000\0225\n\017timestamp_value\030\005 \001(\0132\032.google.p" + - "rotobuf.TimestampH\000\022,\n\ntime_value\030\006 \001(\0132" + - "\026.google.type.TimeOfDayH\000\022\'\n\ndate_value\030" + - "\007 \001(\0132\021.google.type.DateH\000\0223\n\021day_of_wee" + - "k_value\030\010 \001(\0162\026.google.type.DayOfWeekH\000B" + - "\006\n\004type\"Q\n\tQuoteInfo\0224\n\tdate_time\030\002 \001(\0132" + - "\037.google.privacy.dlp.v2.DateTimeH\000B\016\n\014pa" + - "rsed_quote\"\337\001\n\010DateTime\022\037\n\004date\030\001 \001(\0132\021." + - "google.type.Date\022+\n\013day_of_week\030\002 \001(\0162\026." + - "google.type.DayOfWeek\022$\n\004time\030\003 \001(\0132\026.go" + - "ogle.type.TimeOfDay\022;\n\ttime_zone\030\004 \001(\0132(" + - ".google.privacy.dlp.v2.DateTime.TimeZone" + - "\032\"\n\010TimeZone\022\026\n\016offset_minutes\030\001 \001(\005\"\311\001\n" + - "\020DeidentifyConfig\022S\n\031info_type_transform" + - "ations\030\001 \001(\0132..google.privacy.dlp.v2.Inf" + - "oTypeTransformationsH\000\022N\n\026record_transfo" + - "rmations\030\002 \001(\0132,.google.privacy.dlp.v2.R" + - "ecordTransformationsH\000B\020\n\016transformation" + - "\"\234\006\n\027PrimitiveTransformation\022C\n\016replace_" + - "config\030\001 \001(\0132).google.privacy.dlp.v2.Rep" + - "laceValueConfigH\000\022<\n\rredact_config\030\002 \001(\013" + - "2#.google.privacy.dlp.v2.RedactConfigH\000\022" + - "K\n\025character_mask_config\030\003 \001(\0132*.google." + - "privacy.dlp.v2.CharacterMaskConfigH\000\022Y\n\035" + - "crypto_replace_ffx_fpe_config\030\004 \001(\01320.go" + - "ogle.privacy.dlp.v2.CryptoReplaceFfxFpeC" + - "onfigH\000\022V\n\033fixed_size_bucketing_config\030\005" + - " \001(\0132/.google.privacy.dlp.v2.FixedSizeBu" + - "cketingConfigH\000\022B\n\020bucketing_config\030\006 \001(" + - "\0132&.google.privacy.dlp.v2.BucketingConfi" + - "gH\000\022Y\n\035replace_with_info_type_config\030\007 \001" + - "(\01320.google.privacy.dlp.v2.ReplaceWithIn" + - "foTypeConfigH\000\022A\n\020time_part_config\030\010 \001(\013" + - "2%.google.privacy.dlp.v2.TimePartConfigH" + - "\000\022E\n\022crypto_hash_config\030\t \001(\0132\'.google.p" + - "rivacy.dlp.v2.CryptoHashConfigH\000\022C\n\021date" + - "_shift_config\030\013 \001(\0132&.google.privacy.dlp" + - ".v2.DateShiftConfigH\000B\020\n\016transformation\"" + - "\334\001\n\016TimePartConfig\022G\n\017part_to_extract\030\001 " + - "\001(\0162..google.privacy.dlp.v2.TimePartConf" + - "ig.TimePart\"\200\001\n\010TimePart\022\031\n\025TIME_PART_UN" + - "SPECIFIED\020\000\022\010\n\004YEAR\020\001\022\t\n\005MONTH\020\002\022\020\n\014DAY_" + - "OF_MONTH\020\003\022\017\n\013DAY_OF_WEEK\020\004\022\020\n\014WEEK_OF_Y" + - "EAR\020\005\022\017\n\013HOUR_OF_DAY\020\006\"H\n\020CryptoHashConf" + - "ig\0224\n\ncrypto_key\030\001 \001(\0132 .google.privacy." + - "dlp.v2.CryptoKey\"E\n\022ReplaceValueConfig\022/" + - "\n\tnew_value\030\001 \001(\0132\034.google.privacy.dlp.v" + - "2.Value\"\033\n\031ReplaceWithInfoTypeConfig\"\016\n\014" + - "RedactConfig\"\266\002\n\rCharsToIgnore\022\034\n\022charac" + - "ters_to_skip\030\001 \001(\tH\000\022_\n\033common_character" + - "s_to_ignore\030\002 \001(\01628.google.privacy.dlp.v" + - "2.CharsToIgnore.CommonCharsToIgnoreH\000\"\227\001" + - "\n\023CommonCharsToIgnore\022&\n\"COMMON_CHARS_TO" + - "_IGNORE_UNSPECIFIED\020\000\022\013\n\007NUMERIC\020\001\022\024\n\020AL" + - "PHA_UPPER_CASE\020\002\022\024\n\020ALPHA_LOWER_CASE\020\003\022\017" + - "\n\013PUNCTUATION\020\004\022\016\n\nWHITESPACE\020\005B\014\n\nchara" + - "cters\"\243\001\n\023CharacterMaskConfig\022\031\n\021masking" + - "_character\030\001 \001(\t\022\026\n\016number_to_mask\030\002 \001(\005" + - "\022\025\n\rreverse_order\030\003 \001(\010\022B\n\024characters_to" + - "_ignore\030\004 \003(\0132$.google.privacy.dlp.v2.Ch" + - "arsToIgnore\"\225\001\n\030FixedSizeBucketingConfig" + - "\0221\n\013lower_bound\030\001 \001(\0132\034.google.privacy.d" + - "lp.v2.Value\0221\n\013upper_bound\030\002 \001(\0132\034.googl" + - "e.privacy.dlp.v2.Value\022\023\n\013bucket_size\030\003 " + - "\001(\001\"\353\001\n\017BucketingConfig\022>\n\007buckets\030\001 \003(\013" + - "2-.google.privacy.dlp.v2.BucketingConfig" + - ".Bucket\032\227\001\n\006Bucket\022)\n\003min\030\001 \001(\0132\034.google" + - ".privacy.dlp.v2.Value\022)\n\003max\030\002 \001(\0132\034.goo" + - "gle.privacy.dlp.v2.Value\0227\n\021replacement_" + - "value\030\003 \001(\0132\034.google.privacy.dlp.v2.Valu" + - "e\"\364\003\n\031CryptoReplaceFfxFpeConfig\0224\n\ncrypt" + - "o_key\030\001 \001(\0132 .google.privacy.dlp.v2.Cryp" + - "toKey\022/\n\007context\030\002 \001(\0132\036.google.privacy." + - "dlp.v2.FieldId\022c\n\017common_alphabet\030\004 \001(\0162" + - "H.google.privacy.dlp.v2.CryptoReplaceFfx" + - "FpeConfig.FfxCommonNativeAlphabetH\000\022\031\n\017c" + - "ustom_alphabet\030\005 \001(\tH\000\022\017\n\005radix\030\006 \001(\005H\000\022" + - "<\n\023surrogate_info_type\030\010 \001(\0132\037.google.pr" + - "ivacy.dlp.v2.InfoType\"\224\001\n\027FfxCommonNativ" + - "eAlphabet\022*\n&FFX_COMMON_NATIVE_ALPHABET_" + - "UNSPECIFIED\020\000\022\013\n\007NUMERIC\020\001\022\017\n\013HEXADECIMA" + - "L\020\002\022\034\n\030UPPER_CASE_ALPHA_NUMERIC\020\003\022\021\n\rALP" + - "HA_NUMERIC\020\004B\n\n\010alphabet\"\330\001\n\tCryptoKey\022>" + - "\n\ttransient\030\001 \001(\0132).google.privacy.dlp.v" + - "2.TransientCryptoKeyH\000\022>\n\tunwrapped\030\002 \001(" + - "\0132).google.privacy.dlp.v2.UnwrappedCrypt" + - "oKeyH\000\022A\n\013kms_wrapped\030\003 \001(\0132*.google.pri" + - "vacy.dlp.v2.KmsWrappedCryptoKeyH\000B\010\n\006sou" + - "rce\"\"\n\022TransientCryptoKey\022\014\n\004name\030\001 \001(\t\"" + - "!\n\022UnwrappedCryptoKey\022\013\n\003key\030\001 \001(\014\"C\n\023Km" + - "sWrappedCryptoKey\022\023\n\013wrapped_key\030\001 \001(\014\022\027" + - "\n\017crypto_key_name\030\002 \001(\t\"\270\001\n\017DateShiftCon" + - "fig\022\030\n\020upper_bound_days\030\001 \001(\005\022\030\n\020lower_b" + - "ound_days\030\002 \001(\005\022/\n\007context\030\003 \001(\0132\036.googl" + - "e.privacy.dlp.v2.FieldId\0226\n\ncrypto_key\030\004" + - " \001(\0132 .google.privacy.dlp.v2.CryptoKeyH\000" + - "B\010\n\006method\"\233\002\n\027InfoTypeTransformations\022^" + - "\n\017transformations\030\001 \003(\0132E.google.privacy" + - ".dlp.v2.InfoTypeTransformations.InfoType" + - "Transformation\032\237\001\n\026InfoTypeTransformatio" + - "n\0223\n\ninfo_types\030\001 \003(\0132\037.google.privacy.d" + - "lp.v2.InfoType\022P\n\030primitive_transformati" + - "on\030\002 \001(\0132..google.privacy.dlp.v2.Primiti" + - "veTransformation\"\273\002\n\023FieldTransformation" + - "\022.\n\006fields\030\001 \003(\0132\036.google.privacy.dlp.v2" + - ".FieldId\0229\n\tcondition\030\003 \001(\0132&.google.pri" + - "vacy.dlp.v2.RecordCondition\022R\n\030primitive" + - "_transformation\030\004 \001(\0132..google.privacy.d" + - "lp.v2.PrimitiveTransformationH\000\022S\n\031info_" + - "type_transformations\030\005 \001(\0132..google.priv" + - "acy.dlp.v2.InfoTypeTransformationsH\000B\020\n\016" + - "transformation\"\251\001\n\025RecordTransformations" + - "\022I\n\025field_transformations\030\001 \003(\0132*.google" + - ".privacy.dlp.v2.FieldTransformation\022E\n\023r" + - "ecord_suppressions\030\002 \003(\0132(.google.privac" + - "y.dlp.v2.RecordSuppression\"N\n\021RecordSupp" + - "ression\0229\n\tcondition\030\001 \001(\0132&.google.priv" + - "acy.dlp.v2.RecordCondition\"\322\004\n\017RecordCon" + - "dition\022G\n\013expressions\030\003 \001(\01322.google.pri" + - "vacy.dlp.v2.RecordCondition.Expressions\032" + - "\244\001\n\tCondition\022-\n\005field\030\001 \001(\0132\036.google.pr" + - "ivacy.dlp.v2.FieldId\022;\n\010operator\030\003 \001(\0162)" + - ".google.privacy.dlp.v2.RelationalOperato" + - "r\022+\n\005value\030\004 \001(\0132\034.google.privacy.dlp.v2" + - ".Value\032R\n\nConditions\022D\n\nconditions\030\001 \003(\013" + - "20.google.privacy.dlp.v2.RecordCondition" + - ".Condition\032\372\001\n\013Expressions\022\\\n\020logical_op" + - "erator\030\001 \001(\0162B.google.privacy.dlp.v2.Rec" + - "ordCondition.Expressions.LogicalOperator", - "\022G\n\nconditions\030\003 \001(\01321.google.privacy.dl" + - "p.v2.RecordCondition.ConditionsH\000\"<\n\017Log" + - "icalOperator\022 \n\034LOGICAL_OPERATOR_UNSPECI" + - "FIED\020\000\022\007\n\003AND\020\001B\006\n\004type\"\203\001\n\026Transformati" + - "onOverview\022\031\n\021transformed_bytes\030\002 \001(\003\022N\n" + - "\030transformation_summaries\030\003 \003(\0132,.google" + - ".privacy.dlp.v2.TransformationSummary\"\237\005" + - "\n\025TransformationSummary\0222\n\tinfo_type\030\001 \001" + - "(\0132\037.google.privacy.dlp.v2.InfoType\022-\n\005f" + - "ield\030\002 \001(\0132\036.google.privacy.dlp.v2.Field" + - "Id\022F\n\016transformation\030\003 \001(\0132..google.priv" + - "acy.dlp.v2.PrimitiveTransformation\022I\n\025fi" + - "eld_transformations\030\005 \003(\0132*.google.priva" + - "cy.dlp.v2.FieldTransformation\022A\n\017record_" + - "suppress\030\006 \001(\0132(.google.privacy.dlp.v2.R" + - "ecordSuppression\022K\n\007results\030\004 \003(\0132:.goog" + - "le.privacy.dlp.v2.TransformationSummary." + - "SummaryResult\022\031\n\021transformed_bytes\030\007 \001(\003" + - "\032\204\001\n\rSummaryResult\022\r\n\005count\030\001 \001(\003\022S\n\004cod" + - "e\030\002 \001(\0162E.google.privacy.dlp.v2.Transfor" + - "mationSummary.TransformationResultCode\022\017" + - "\n\007details\030\003 \001(\t\"^\n\030TransformationResultC" + - "ode\022*\n&TRANSFORMATION_RESULT_CODE_UNSPEC" + - "IFIED\020\000\022\013\n\007SUCCESS\020\001\022\t\n\005ERROR\020\002\"U\n\010Sched" + - "ule\022?\n\032recurrence_period_duration\030\001 \001(\0132" + - "\031.google.protobuf.DurationH\000B\010\n\006option\"\352" + - "\001\n\017InspectTemplate\022\014\n\004name\030\001 \001(\t\022\024\n\014disp" + - "lay_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022/\n\013c" + - "reate_time\030\004 \001(\0132\032.google.protobuf.Times" + - "tamp\022/\n\013update_time\030\005 \001(\0132\032.google.proto" + - "buf.Timestamp\022<\n\016inspect_config\030\006 \001(\0132$." + - "google.privacy.dlp.v2.InspectConfig\"\363\001\n\022" + - "DeidentifyTemplate\022\014\n\004name\030\001 \001(\t\022\024\n\014disp" + - "lay_name\030\002 \001(\t\022\023\n\013description\030\003 \001(\t\022/\n\013c" + - "reate_time\030\004 \001(\0132\032.google.protobuf.Times" + - "tamp\022/\n\013update_time\030\005 \001(\0132\032.google.proto" + - "buf.Timestamp\022B\n\021deidentify_config\030\006 \001(\013" + - "2\'.google.privacy.dlp.v2.DeidentifyConfi" + - "g\"\\\n\005Error\022#\n\007details\030\001 \001(\0132\022.google.rpc" + - ".Status\022.\n\ntimestamps\030\002 \003(\0132\032.google.pro" + - "tobuf.Timestamp\"\333\004\n\nJobTrigger\022\014\n\004name\030\001" + - " \001(\t\022\024\n\014display_name\030\002 \001(\t\022\023\n\013descriptio" + - "n\030\003 \001(\t\022>\n\013inspect_job\030\004 \001(\0132\'.google.pr" + - "ivacy.dlp.v2.InspectJobConfigH\000\022;\n\010trigg" + - "ers\030\005 \003(\0132).google.privacy.dlp.v2.JobTri" + - "gger.Trigger\022,\n\006errors\030\006 \003(\0132\034.google.pr" + - "ivacy.dlp.v2.Error\022/\n\013create_time\030\007 \001(\0132" + - "\032.google.protobuf.Timestamp\022/\n\013update_ti" + - "me\030\010 \001(\0132\032.google.protobuf.Timestamp\0221\n\r" + - "last_run_time\030\t \001(\0132\032.google.protobuf.Ti" + - "mestamp\0228\n\006status\030\n \001(\0162(.google.privacy" + - ".dlp.v2.JobTrigger.Status\032I\n\007Trigger\0223\n\010" + - "schedule\030\001 \001(\0132\037.google.privacy.dlp.v2.S" + - "cheduleH\000B\t\n\007trigger\"H\n\006Status\022\026\n\022STATUS" + - "_UNSPECIFIED\020\000\022\013\n\007HEALTHY\020\001\022\n\n\006PAUSED\020\002\022" + - "\r\n\tCANCELLED\020\003B\005\n\003job\"\375\002\n\006Action\022C\n\rsave" + - "_findings\030\001 \001(\0132*.google.privacy.dlp.v2." + - "Action.SaveFindingsH\000\022@\n\007pub_sub\030\002 \001(\0132-" + - ".google.privacy.dlp.v2.Action.PublishToP" + - "ubSubH\000\022U\n\027publish_summary_to_cscc\030\003 \001(\013" + - "22.google.privacy.dlp.v2.Action.PublishS" + - "ummaryToCsccH\000\032Q\n\014SaveFindings\022A\n\routput" + - "_config\030\001 \001(\0132*.google.privacy.dlp.v2.Ou" + - "tputStorageConfig\032 \n\017PublishToPubSub\022\r\n\005" + - "topic\030\001 \001(\t\032\026\n\024PublishSummaryToCsccB\010\n\006a" + - "ction\"\205\001\n\034CreateInspectTemplateRequest\022\016" + - "\n\006parent\030\001 \001(\t\022@\n\020inspect_template\030\002 \001(\013" + - "2&.google.privacy.dlp.v2.InspectTemplate" + - "\022\023\n\013template_id\030\003 \001(\t\"\237\001\n\034UpdateInspectT" + - "emplateRequest\022\014\n\004name\030\001 \001(\t\022@\n\020inspect_" + - "template\030\002 \001(\0132&.google.privacy.dlp.v2.I" + - "nspectTemplate\022/\n\013update_mask\030\003 \001(\0132\032.go" + - "ogle.protobuf.FieldMask\")\n\031GetInspectTem" + - "plateRequest\022\014\n\004name\030\001 \001(\t\"T\n\033ListInspec" + - "tTemplatesRequest\022\016\n\006parent\030\001 \001(\t\022\022\n\npag" + - "e_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\"z\n\034List" + - "InspectTemplatesResponse\022A\n\021inspect_temp" + - "lates\030\001 \003(\0132&.google.privacy.dlp.v2.Insp" + - "ectTemplate\022\027\n\017next_page_token\030\002 \001(\t\",\n\034" + - "DeleteInspectTemplateRequest\022\014\n\004name\030\001 \001" + - "(\t\"u\n\027CreateJobTriggerRequest\022\016\n\006parent\030" + - "\001 \001(\t\0226\n\013job_trigger\030\002 \001(\0132!.google.priv" + - "acy.dlp.v2.JobTrigger\022\022\n\ntrigger_id\030\003 \001(" + - "\t\"\220\001\n\027UpdateJobTriggerRequest\022\014\n\004name\030\001 " + - "\001(\t\0226\n\013job_trigger\030\002 \001(\0132!.google.privac" + - "y.dlp.v2.JobTrigger\022/\n\013update_mask\030\003 \001(\013" + - "2\032.google.protobuf.FieldMask\"$\n\024GetJobTr" + - "iggerRequest\022\014\n\004name\030\001 \001(\t\"\276\001\n\023CreateDlp" + - "JobRequest\022\016\n\006parent\030\001 \001(\t\022>\n\013inspect_jo" + - "b\030\002 \001(\0132\'.google.privacy.dlp.v2.InspectJ" + - "obConfigH\000\022@\n\010risk_job\030\003 \001(\0132,.google.pr" + - "ivacy.dlp.v2.RiskAnalysisJobConfigH\000\022\016\n\006" + - "job_id\030\004 \001(\tB\005\n\003job\"a\n\026ListJobTriggersRe" + - "quest\022\016\n\006parent\030\001 \001(\t\022\022\n\npage_token\030\002 \001(" + - "\t\022\021\n\tpage_size\030\003 \001(\005\022\020\n\010order_by\030\004 \001(\t\"k" + - "\n\027ListJobTriggersResponse\0227\n\014job_trigger" + - "s\030\001 \003(\0132!.google.privacy.dlp.v2.JobTrigg" + - "er\022\027\n\017next_page_token\030\002 \001(\t\"\'\n\027DeleteJob" + - "TriggerRequest\022\014\n\004name\030\001 \001(\t\"\335\001\n\020Inspect" + - "JobConfig\022<\n\016storage_config\030\001 \001(\0132$.goog" + - "le.privacy.dlp.v2.StorageConfig\022<\n\016inspe" + - "ct_config\030\002 \001(\0132$.google.privacy.dlp.v2." + - "InspectConfig\022\035\n\025inspect_template_name\030\003" + - " \001(\t\022.\n\007actions\030\004 \003(\0132\035.google.privacy.d" + - "lp.v2.Action\"\336\004\n\006DlpJob\022\014\n\004name\030\001 \001(\t\022/\n" + - "\004type\030\002 \001(\0162!.google.privacy.dlp.v2.DlpJ" + - "obType\0225\n\005state\030\003 \001(\0162&.google.privacy.d" + - "lp.v2.DlpJob.JobState\022K\n\014risk_details\030\004 " + - "\001(\01323.google.privacy.dlp.v2.AnalyzeDataS" + - "ourceRiskDetailsH\000\022J\n\017inspect_details\030\005 " + - "\001(\0132/.google.privacy.dlp.v2.InspectDataS" + - "ourceDetailsH\000\022/\n\013create_time\030\006 \001(\0132\032.go" + - "ogle.protobuf.Timestamp\022.\n\nstart_time\030\007 " + - "\001(\0132\032.google.protobuf.Timestamp\022,\n\010end_t" + - "ime\030\010 \001(\0132\032.google.protobuf.Timestamp\022\030\n" + - "\020job_trigger_name\030\n \001(\t\022,\n\006errors\030\013 \003(\0132" + - "\034.google.privacy.dlp.v2.Error\"c\n\010JobStat" + - "e\022\031\n\025JOB_STATE_UNSPECIFIED\020\000\022\013\n\007PENDING\020" + - "\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003\022\014\n\010CANCELED\020\004\022\n" + - "\n\006FAILED\020\005B\t\n\007details\" \n\020GetDlpJobReques" + - "t\022\014\n\004name\030\001 \001(\t\"\214\001\n\022ListDlpJobsRequest\022\016" + - "\n\006parent\030\004 \001(\t\022\016\n\006filter\030\001 \001(\t\022\021\n\tpage_s" + - "ize\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022/\n\004type\030\005 " + - "\001(\0162!.google.privacy.dlp.v2.DlpJobType\"[" + - "\n\023ListDlpJobsResponse\022+\n\004jobs\030\001 \003(\0132\035.go" + - "ogle.privacy.dlp.v2.DlpJob\022\027\n\017next_page_" + - "token\030\002 \001(\t\"#\n\023CancelDlpJobRequest\022\014\n\004na" + - "me\030\001 \001(\t\"#\n\023DeleteDlpJobRequest\022\014\n\004name\030" + - "\001 \001(\t\"\216\001\n\037CreateDeidentifyTemplateReques" + - "t\022\016\n\006parent\030\001 \001(\t\022F\n\023deidentify_template" + - "\030\002 \001(\0132).google.privacy.dlp.v2.Deidentif" + - "yTemplate\022\023\n\013template_id\030\003 \001(\t\"\250\001\n\037Updat" + - "eDeidentifyTemplateRequest\022\014\n\004name\030\001 \001(\t" + - "\022F\n\023deidentify_template\030\002 \001(\0132).google.p" + - "rivacy.dlp.v2.DeidentifyTemplate\022/\n\013upda" + - "te_mask\030\003 \001(\0132\032.google.protobuf.FieldMas" + - "k\",\n\034GetDeidentifyTemplateRequest\022\014\n\004nam" + - "e\030\001 \001(\t\"W\n\036ListDeidentifyTemplatesReques" + - "t\022\016\n\006parent\030\001 \001(\t\022\022\n\npage_token\030\002 \001(\t\022\021\n" + - "\tpage_size\030\003 \001(\005\"\203\001\n\037ListDeidentifyTempl" + - "atesResponse\022G\n\024deidentify_templates\030\001 \003" + - "(\0132).google.privacy.dlp.v2.DeidentifyTem" + - "plate\022\027\n\017next_page_token\030\002 \001(\t\"/\n\037Delete" + - "DeidentifyTemplateRequest\022\014\n\004name\030\001 \001(\t*" + - "M\n\rContentOption\022\027\n\023CONTENT_UNSPECIFIED\020" + - "\000\022\020\n\014CONTENT_TEXT\020\001\022\021\n\rCONTENT_IMAGE\020\002*P" + - "\n\023InfoTypeSupportedBy\022\031\n\025ENUM_TYPE_UNSPE" + - "CIFIED\020\000\022\013\n\007INSPECT\020\001\022\021\n\rRISK_ANALYSIS\020\002" + - "*\273\001\n\022RelationalOperator\022#\n\037RELATIONAL_OP" + - "ERATOR_UNSPECIFIED\020\000\022\014\n\010EQUAL_TO\020\001\022\020\n\014NO" + - "T_EQUAL_TO\020\002\022\020\n\014GREATER_THAN\020\003\022\r\n\tLESS_T" + - "HAN\020\004\022\032\n\026GREATER_THAN_OR_EQUALS\020\005\022\027\n\023LES" + - "S_THAN_OR_EQUALS\020\006\022\n\n\006EXISTS\020\007*R\n\nDlpJob" + - "Type\022\034\n\030DLP_JOB_TYPE_UNSPECIFIED\020\000\022\017\n\013IN" + - "SPECT_JOB\020\001\022\025\n\021RISK_ANALYSIS_JOB\020\0022\376\"\n\nD" + - "lpService\022\241\001\n\016InspectContent\022,.google.pr" + - "ivacy.dlp.v2.InspectContentRequest\032-.goo" + - "gle.privacy.dlp.v2.InspectContentRespons" + - "e\"2\202\323\344\223\002,\"\'/v2/{parent=projects/*}/conte" + - "nt:inspect:\001*\022\225\001\n\013RedactImage\022).google.p" + - "rivacy.dlp.v2.RedactImageRequest\032*.googl" + - "e.privacy.dlp.v2.RedactImageResponse\"/\202\323" + - "\344\223\002)\"$/v2/{parent=projects/*}/image:reda" + - "ct:\001*\022\255\001\n\021DeidentifyContent\022/.google.pri" + - "vacy.dlp.v2.DeidentifyContentRequest\0320.g" + - "oogle.privacy.dlp.v2.DeidentifyContentRe" + - "sponse\"5\202\323\344\223\002/\"*/v2/{parent=projects/*}/" + - "content:deidentify:\001*\022\255\001\n\021ReidentifyCont" + - "ent\022/.google.privacy.dlp.v2.ReidentifyCo" + - "ntentRequest\0320.google.privacy.dlp.v2.Rei" + - "dentifyContentResponse\"5\202\323\344\223\002/\"*/v2/{par" + - "ent=projects/*}/content:reidentify:\001*\022\201\001" + - "\n\rListInfoTypes\022+.google.privacy.dlp.v2." + - "ListInfoTypesRequest\032,.google.privacy.dl" + - "p.v2.ListInfoTypesResponse\"\025\202\323\344\223\002\017\022\r/v2/" + - "infoTypes\022\335\001\n\025CreateInspectTemplate\0223.go" + - "ogle.privacy.dlp.v2.CreateInspectTemplat" + - "eRequest\032&.google.privacy.dlp.v2.Inspect" + - "Template\"g\202\323\344\223\002a\"-/v2/{parent=organizati" + - "ons/*}/inspectTemplates:\001*Z-\"(/v2/{paren" + - "t=projects/*}/inspectTemplates:\001*\022\335\001\n\025Up" + - "dateInspectTemplate\0223.google.privacy.dlp" + - ".v2.UpdateInspectTemplateRequest\032&.googl" + - "e.privacy.dlp.v2.InspectTemplate\"g\202\323\344\223\002a" + - "2-/v2/{name=organizations/*/inspectTempl" + - "ates/*}:\001*Z-2(/v2/{name=projects/*/inspe" + - "ctTemplates/*}:\001*\022\321\001\n\022GetInspectTemplate" + - "\0220.google.privacy.dlp.v2.GetInspectTempl" + - "ateRequest\032&.google.privacy.dlp.v2.Inspe" + - "ctTemplate\"a\202\323\344\223\002[\022-/v2/{name=organizati" + - "ons/*/inspectTemplates/*}Z*\022(/v2/{name=p" + - "rojects/*/inspectTemplates/*}\022\342\001\n\024ListIn" + - "spectTemplates\0222.google.privacy.dlp.v2.L" + - "istInspectTemplatesRequest\0323.google.priv" + - "acy.dlp.v2.ListInspectTemplatesResponse\"" + - "a\202\323\344\223\002[\022-/v2/{parent=organizations/*}/in" + - "spectTemplatesZ*\022(/v2/{parent=projects/*" + - "}/inspectTemplates\022\307\001\n\025DeleteInspectTemp" + - "late\0223.google.privacy.dlp.v2.DeleteInspe" + - "ctTemplateRequest\032\026.google.protobuf.Empt" + - "y\"a\202\323\344\223\002[*-/v2/{name=organizations/*/ins" + - "pectTemplates/*}Z**(/v2/{name=projects/*" + - "/inspectTemplates/*}\022\354\001\n\030CreateDeidentif" + - "yTemplate\0226.google.privacy.dlp.v2.Create" + + "kDetails.CategoricalStatsResultH\000\022b\n\022k_a" + + "nonymity_result\030\005 \001(\0132D.google.privacy.d" + + "lp.v2.AnalyzeDataSourceRiskDetails.KAnon" + + "ymityResultH\000\022b\n\022l_diversity_result\030\006 \001(" + + "\0132D.google.privacy.dlp.v2.AnalyzeDataSou" + + "rceRiskDetails.LDiversityResultH\000\022k\n\027k_m" + + "ap_estimation_result\030\007 \001(\0132H.google.priv" + + "acy.dlp.v2.AnalyzeDataSourceRiskDetails." + + "KMapEstimationResultH\000\022}\n delta_presence" + + "_estimation_result\030\t \001(\0132Q.google.privac" + + "y.dlp.v2.AnalyzeDataSourceRiskDetails.De" + + "ltaPresenceEstimationResultH\000\032\257\001\n\024Numeri" + + "calStatsResult\022/\n\tmin_value\030\001 \001(\0132\034.goog" + + "le.privacy.dlp.v2.Value\022/\n\tmax_value\030\002 \001" + + "(\0132\034.google.privacy.dlp.v2.Value\0225\n\017quan" + + "tile_values\030\004 \003(\0132\034.google.privacy.dlp.v" + + "2.Value\032\215\003\n\026CategoricalStatsResult\022\225\001\n!v" + + "alue_frequency_histogram_buckets\030\005 \003(\0132j" + + ".google.privacy.dlp.v2.AnalyzeDataSource" + + "RiskDetails.CategoricalStatsResult.Categ" + + "oricalStatsHistogramBucket\032\332\001\n\037Categoric" + + "alStatsHistogramBucket\022#\n\033value_frequenc" + + "y_lower_bound\030\001 \001(\003\022#\n\033value_frequency_u" + + "pper_bound\030\002 \001(\003\022\023\n\013bucket_size\030\003 \001(\003\022<\n" + + "\rbucket_values\030\004 \003(\0132%.google.privacy.dl" + + "p.v2.ValueFrequency\022\032\n\022bucket_value_coun" + + "t\030\005 \001(\003\032\265\004\n\020KAnonymityResult\022\213\001\n#equival" + + "ence_class_histogram_buckets\030\005 \003(\0132^.goo" + + "gle.privacy.dlp.v2.AnalyzeDataSourceRisk" + + "Details.KAnonymityResult.KAnonymityHisto" + + "gramBucket\032t\n\032KAnonymityEquivalenceClass" + + "\0226\n\020quasi_ids_values\030\001 \003(\0132\034.google.priv" + + "acy.dlp.v2.Value\022\036\n\026equivalence_class_si" + + "ze\030\002 \001(\003\032\234\002\n\031KAnonymityHistogramBucket\022*" + + "\n\"equivalence_class_size_lower_bound\030\001 \001" + + "(\003\022*\n\"equivalence_class_size_upper_bound" + + "\030\002 \001(\003\022\023\n\013bucket_size\030\003 \001(\003\022v\n\rbucket_va" + + "lues\030\004 \003(\0132_.google.privacy.dlp.v2.Analy" + + "zeDataSourceRiskDetails.KAnonymityResult" + + ".KAnonymityEquivalenceClass\022\032\n\022bucket_va" + + "lue_count\030\005 \001(\003\032\260\005\n\020LDiversityResult\022\223\001\n" + + "+sensitive_value_frequency_histogram_buc" + + "kets\030\005 \003(\0132^.google.privacy.dlp.v2.Analy" + + "zeDataSourceRiskDetails.LDiversityResult" + + ".LDiversityHistogramBucket\032\340\001\n\032LDiversit" + + "yEquivalenceClass\0226\n\020quasi_ids_values\030\001 " + + "\003(\0132\034.google.privacy.dlp.v2.Value\022\036\n\026equ" + + "ivalence_class_size\030\002 \001(\003\022%\n\035num_distinc" + + "t_sensitive_values\030\003 \001(\003\022C\n\024top_sensitiv" + + "e_values\030\004 \003(\0132%.google.privacy.dlp.v2.V" + + "alueFrequency\032\242\002\n\031LDiversityHistogramBuc" + + "ket\022-\n%sensitive_value_frequency_lower_b" + + "ound\030\001 \001(\003\022-\n%sensitive_value_frequency_" + + "upper_bound\030\002 \001(\003\022\023\n\013bucket_size\030\003 \001(\003\022v" + + "\n\rbucket_values\030\004 \003(\0132_.google.privacy.d" + + "lp.v2.AnalyzeDataSourceRiskDetails.LDive" + + "rsityResult.LDiversityEquivalenceClass\022\032" + + "\n\022bucket_value_count\030\005 \001(\003\032\225\004\n\024KMapEstim" + + "ationResult\022\212\001\n\032k_map_estimation_histogr" + + "am\030\001 \003(\0132f.google.privacy.dlp.v2.Analyze" + + "DataSourceRiskDetails.KMapEstimationResu" + + "lt.KMapEstimationHistogramBucket\032r\n\033KMap" + + "EstimationQuasiIdValues\0226\n\020quasi_ids_val" + + "ues\030\001 \003(\0132\034.google.privacy.dlp.v2.Value\022" + + "\033\n\023estimated_anonymity\030\002 \001(\003\032\373\001\n\035KMapEst" + + "imationHistogramBucket\022\025\n\rmin_anonymity\030" + + "\001 \001(\003\022\025\n\rmax_anonymity\030\002 \001(\003\022\023\n\013bucket_s" + + "ize\030\005 \001(\003\022{\n\rbucket_values\030\006 \003(\0132d.googl" + + "e.privacy.dlp.v2.AnalyzeDataSourceRiskDe" + + "tails.KMapEstimationResult.KMapEstimatio" + + "nQuasiIdValues\022\032\n\022bucket_value_count\030\007 \001" + + "(\003\032\344\004\n\035DeltaPresenceEstimationResult\022\245\001\n" + + "#delta_presence_estimation_histogram\030\001 \003" + + "(\0132x.google.privacy.dlp.v2.AnalyzeDataSo" + + "urceRiskDetails.DeltaPresenceEstimationR" + + "esult.DeltaPresenceEstimationHistogramBu" + + "cket\032}\n$DeltaPresenceEstimationQuasiIdVa" + + "lues\0226\n\020quasi_ids_values\030\001 \003(\0132\034.google." + + "privacy.dlp.v2.Value\022\035\n\025estimated_probab" + + "ility\030\002 \001(\001\032\233\002\n&DeltaPresenceEstimationH" + + "istogramBucket\022\027\n\017min_probability\030\001 \001(\001\022" + + "\027\n\017max_probability\030\002 \001(\001\022\023\n\013bucket_size\030" + + "\005 \001(\003\022\215\001\n\rbucket_values\030\006 \003(\0132v.google.p" + + "rivacy.dlp.v2.AnalyzeDataSourceRiskDetai" + + "ls.DeltaPresenceEstimationResult.DeltaPr" + + "esenceEstimationQuasiIdValues\022\032\n\022bucket_" + + "value_count\030\007 \001(\003B\010\n\006result\"L\n\016ValueFreq" + + "uency\022+\n\005value\030\001 \001(\0132\034.google.privacy.dl" + + "p.v2.Value\022\r\n\005count\030\002 \001(\003\"\263\002\n\005Value\022\027\n\ri" + + "nteger_value\030\001 \001(\003H\000\022\025\n\013float_value\030\002 \001(" + + "\001H\000\022\026\n\014string_value\030\003 \001(\tH\000\022\027\n\rboolean_v" + + "alue\030\004 \001(\010H\000\0225\n\017timestamp_value\030\005 \001(\0132\032." + + "google.protobuf.TimestampH\000\022,\n\ntime_valu" + + "e\030\006 \001(\0132\026.google.type.TimeOfDayH\000\022\'\n\ndat" + + "e_value\030\007 \001(\0132\021.google.type.DateH\000\0223\n\021da" + + "y_of_week_value\030\010 \001(\0162\026.google.type.DayO" + + "fWeekH\000B\006\n\004type\"Q\n\tQuoteInfo\0224\n\tdate_tim" + + "e\030\002 \001(\0132\037.google.privacy.dlp.v2.DateTime" + + "H\000B\016\n\014parsed_quote\"\337\001\n\010DateTime\022\037\n\004date\030" + + "\001 \001(\0132\021.google.type.Date\022+\n\013day_of_week\030" + + "\002 \001(\0162\026.google.type.DayOfWeek\022$\n\004time\030\003 " + + "\001(\0132\026.google.type.TimeOfDay\022;\n\ttime_zone" + + "\030\004 \001(\0132(.google.privacy.dlp.v2.DateTime." + + "TimeZone\032\"\n\010TimeZone\022\026\n\016offset_minutes\030\001" + + " \001(\005\"\311\001\n\020DeidentifyConfig\022S\n\031info_type_t" + + "ransformations\030\001 \001(\0132..google.privacy.dl" + + "p.v2.InfoTypeTransformationsH\000\022N\n\026record" + + "_transformations\030\002 \001(\0132,.google.privacy." + + "dlp.v2.RecordTransformationsH\000B\020\n\016transf" + + "ormation\"\234\006\n\027PrimitiveTransformation\022C\n\016" + + "replace_config\030\001 \001(\0132).google.privacy.dl" + + "p.v2.ReplaceValueConfigH\000\022<\n\rredact_conf" + + "ig\030\002 \001(\0132#.google.privacy.dlp.v2.RedactC" + + "onfigH\000\022K\n\025character_mask_config\030\003 \001(\0132*" + + ".google.privacy.dlp.v2.CharacterMaskConf" + + "igH\000\022Y\n\035crypto_replace_ffx_fpe_config\030\004 " + + "\001(\01320.google.privacy.dlp.v2.CryptoReplac" + + "eFfxFpeConfigH\000\022V\n\033fixed_size_bucketing_" + + "config\030\005 \001(\0132/.google.privacy.dlp.v2.Fix" + + "edSizeBucketingConfigH\000\022B\n\020bucketing_con" + + "fig\030\006 \001(\0132&.google.privacy.dlp.v2.Bucket" + + "ingConfigH\000\022Y\n\035replace_with_info_type_co" + + "nfig\030\007 \001(\01320.google.privacy.dlp.v2.Repla" + + "ceWithInfoTypeConfigH\000\022A\n\020time_part_conf" + + "ig\030\010 \001(\0132%.google.privacy.dlp.v2.TimePar" + + "tConfigH\000\022E\n\022crypto_hash_config\030\t \001(\0132\'." + + "google.privacy.dlp.v2.CryptoHashConfigH\000" + + "\022C\n\021date_shift_config\030\013 \001(\0132&.google.pri" + + "vacy.dlp.v2.DateShiftConfigH\000B\020\n\016transfo" + + "rmation\"\334\001\n\016TimePartConfig\022G\n\017part_to_ex" + + "tract\030\001 \001(\0162..google.privacy.dlp.v2.Time" + + "PartConfig.TimePart\"\200\001\n\010TimePart\022\031\n\025TIME" + + "_PART_UNSPECIFIED\020\000\022\010\n\004YEAR\020\001\022\t\n\005MONTH\020\002" + + "\022\020\n\014DAY_OF_MONTH\020\003\022\017\n\013DAY_OF_WEEK\020\004\022\020\n\014W" + + "EEK_OF_YEAR\020\005\022\017\n\013HOUR_OF_DAY\020\006\"H\n\020Crypto" + + "HashConfig\0224\n\ncrypto_key\030\001 \001(\0132 .google." + + "privacy.dlp.v2.CryptoKey\"E\n\022ReplaceValue" + + "Config\022/\n\tnew_value\030\001 \001(\0132\034.google.priva" + + "cy.dlp.v2.Value\"\033\n\031ReplaceWithInfoTypeCo" + + "nfig\"\016\n\014RedactConfig\"\266\002\n\rCharsToIgnore\022\034" + + "\n\022characters_to_skip\030\001 \001(\tH\000\022_\n\033common_c" + + "haracters_to_ignore\030\002 \001(\01628.google.priva" + + "cy.dlp.v2.CharsToIgnore.CommonCharsToIgn" + + "oreH\000\"\227\001\n\023CommonCharsToIgnore\022&\n\"COMMON_" + + "CHARS_TO_IGNORE_UNSPECIFIED\020\000\022\013\n\007NUMERIC" + + "\020\001\022\024\n\020ALPHA_UPPER_CASE\020\002\022\024\n\020ALPHA_LOWER_" + + "CASE\020\003\022\017\n\013PUNCTUATION\020\004\022\016\n\nWHITESPACE\020\005B" + + "\014\n\ncharacters\"\243\001\n\023CharacterMaskConfig\022\031\n" + + "\021masking_character\030\001 \001(\t\022\026\n\016number_to_ma" + + "sk\030\002 \001(\005\022\025\n\rreverse_order\030\003 \001(\010\022B\n\024chara" + + "cters_to_ignore\030\004 \003(\0132$.google.privacy.d" + + "lp.v2.CharsToIgnore\"\225\001\n\030FixedSizeBucketi" + + "ngConfig\0221\n\013lower_bound\030\001 \001(\0132\034.google.p" + + "rivacy.dlp.v2.Value\0221\n\013upper_bound\030\002 \001(\013" + + "2\034.google.privacy.dlp.v2.Value\022\023\n\013bucket" + + "_size\030\003 \001(\001\"\353\001\n\017BucketingConfig\022>\n\007bucke" + + "ts\030\001 \003(\0132-.google.privacy.dlp.v2.Bucketi" + + "ngConfig.Bucket\032\227\001\n\006Bucket\022)\n\003min\030\001 \001(\0132" + + "\034.google.privacy.dlp.v2.Value\022)\n\003max\030\002 \001" + + "(\0132\034.google.privacy.dlp.v2.Value\0227\n\021repl" + + "acement_value\030\003 \001(\0132\034.google.privacy.dlp" + + ".v2.Value\"\364\003\n\031CryptoReplaceFfxFpeConfig\022" + + "4\n\ncrypto_key\030\001 \001(\0132 .google.privacy.dlp" + + ".v2.CryptoKey\022/\n\007context\030\002 \001(\0132\036.google." + + "privacy.dlp.v2.FieldId\022c\n\017common_alphabe" + + "t\030\004 \001(\0162H.google.privacy.dlp.v2.CryptoRe" + + "placeFfxFpeConfig.FfxCommonNativeAlphabe" + + "tH\000\022\031\n\017custom_alphabet\030\005 \001(\tH\000\022\017\n\005radix\030" + + "\006 \001(\005H\000\022<\n\023surrogate_info_type\030\010 \001(\0132\037.g" + + "oogle.privacy.dlp.v2.InfoType\"\224\001\n\027FfxCom" + + "monNativeAlphabet\022*\n&FFX_COMMON_NATIVE_A" + + "LPHABET_UNSPECIFIED\020\000\022\013\n\007NUMERIC\020\001\022\017\n\013HE" + + "XADECIMAL\020\002\022\034\n\030UPPER_CASE_ALPHA_NUMERIC\020" + + "\003\022\021\n\rALPHA_NUMERIC\020\004B\n\n\010alphabet\"\330\001\n\tCry" + + "ptoKey\022>\n\ttransient\030\001 \001(\0132).google.priva" + + "cy.dlp.v2.TransientCryptoKeyH\000\022>\n\tunwrap" + + "ped\030\002 \001(\0132).google.privacy.dlp.v2.Unwrap" + + "pedCryptoKeyH\000\022A\n\013kms_wrapped\030\003 \001(\0132*.go" + + "ogle.privacy.dlp.v2.KmsWrappedCryptoKeyH" + + "\000B\010\n\006source\"\"\n\022TransientCryptoKey\022\014\n\004nam", + "e\030\001 \001(\t\"!\n\022UnwrappedCryptoKey\022\013\n\003key\030\001 \001" + + "(\014\"C\n\023KmsWrappedCryptoKey\022\023\n\013wrapped_key" + + "\030\001 \001(\014\022\027\n\017crypto_key_name\030\002 \001(\t\"\270\001\n\017Date" + + "ShiftConfig\022\030\n\020upper_bound_days\030\001 \001(\005\022\030\n" + + "\020lower_bound_days\030\002 \001(\005\022/\n\007context\030\003 \001(\013" + + "2\036.google.privacy.dlp.v2.FieldId\0226\n\ncryp" + + "to_key\030\004 \001(\0132 .google.privacy.dlp.v2.Cry" + + "ptoKeyH\000B\010\n\006method\"\233\002\n\027InfoTypeTransform" + + "ations\022^\n\017transformations\030\001 \003(\0132E.google" + + ".privacy.dlp.v2.InfoTypeTransformations." + + "InfoTypeTransformation\032\237\001\n\026InfoTypeTrans" + + "formation\0223\n\ninfo_types\030\001 \003(\0132\037.google.p" + + "rivacy.dlp.v2.InfoType\022P\n\030primitive_tran" + + "sformation\030\002 \001(\0132..google.privacy.dlp.v2" + + ".PrimitiveTransformation\"\273\002\n\023FieldTransf" + + "ormation\022.\n\006fields\030\001 \003(\0132\036.google.privac" + + "y.dlp.v2.FieldId\0229\n\tcondition\030\003 \001(\0132&.go" + + "ogle.privacy.dlp.v2.RecordCondition\022R\n\030p" + + "rimitive_transformation\030\004 \001(\0132..google.p" + + "rivacy.dlp.v2.PrimitiveTransformationH\000\022" + + "S\n\031info_type_transformations\030\005 \001(\0132..goo" + + "gle.privacy.dlp.v2.InfoTypeTransformatio" + + "nsH\000B\020\n\016transformation\"\251\001\n\025RecordTransfo" + + "rmations\022I\n\025field_transformations\030\001 \003(\0132" + + "*.google.privacy.dlp.v2.FieldTransformat" + + "ion\022E\n\023record_suppressions\030\002 \003(\0132(.googl" + + "e.privacy.dlp.v2.RecordSuppression\"N\n\021Re" + + "cordSuppression\0229\n\tcondition\030\001 \001(\0132&.goo" + + "gle.privacy.dlp.v2.RecordCondition\"\322\004\n\017R" + + "ecordCondition\022G\n\013expressions\030\003 \001(\01322.go" + + "ogle.privacy.dlp.v2.RecordCondition.Expr" + + "essions\032\244\001\n\tCondition\022-\n\005field\030\001 \001(\0132\036.g" + + "oogle.privacy.dlp.v2.FieldId\022;\n\010operator" + + "\030\003 \001(\0162).google.privacy.dlp.v2.Relationa" + + "lOperator\022+\n\005value\030\004 \001(\0132\034.google.privac" + + "y.dlp.v2.Value\032R\n\nConditions\022D\n\nconditio" + + "ns\030\001 \003(\01320.google.privacy.dlp.v2.RecordC" + + "ondition.Condition\032\372\001\n\013Expressions\022\\\n\020lo" + + "gical_operator\030\001 \001(\0162B.google.privacy.dl" + + "p.v2.RecordCondition.Expressions.Logical" + + "Operator\022G\n\nconditions\030\003 \001(\01321.google.pr" + + "ivacy.dlp.v2.RecordCondition.ConditionsH" + + "\000\"<\n\017LogicalOperator\022 \n\034LOGICAL_OPERATOR" + + "_UNSPECIFIED\020\000\022\007\n\003AND\020\001B\006\n\004type\"\203\001\n\026Tran" + + "sformationOverview\022\031\n\021transformed_bytes\030" + + "\002 \001(\003\022N\n\030transformation_summaries\030\003 \003(\0132" + + ",.google.privacy.dlp.v2.TransformationSu" + + "mmary\"\237\005\n\025TransformationSummary\0222\n\tinfo_" + + "type\030\001 \001(\0132\037.google.privacy.dlp.v2.InfoT" + + "ype\022-\n\005field\030\002 \001(\0132\036.google.privacy.dlp." + + "v2.FieldId\022F\n\016transformation\030\003 \001(\0132..goo" + + "gle.privacy.dlp.v2.PrimitiveTransformati" + + "on\022I\n\025field_transformations\030\005 \003(\0132*.goog" + + "le.privacy.dlp.v2.FieldTransformation\022A\n" + + "\017record_suppress\030\006 \001(\0132(.google.privacy." + + "dlp.v2.RecordSuppression\022K\n\007results\030\004 \003(" + + "\0132:.google.privacy.dlp.v2.Transformation" + + "Summary.SummaryResult\022\031\n\021transformed_byt" + + "es\030\007 \001(\003\032\204\001\n\rSummaryResult\022\r\n\005count\030\001 \001(" + + "\003\022S\n\004code\030\002 \001(\0162E.google.privacy.dlp.v2." + + "TransformationSummary.TransformationResu" + + "ltCode\022\017\n\007details\030\003 \001(\t\"^\n\030Transformatio" + + "nResultCode\022*\n&TRANSFORMATION_RESULT_COD" + + "E_UNSPECIFIED\020\000\022\013\n\007SUCCESS\020\001\022\t\n\005ERROR\020\002\"" + + "U\n\010Schedule\022?\n\032recurrence_period_duratio" + + "n\030\001 \001(\0132\031.google.protobuf.DurationH\000B\010\n\006" + + "option\"\352\001\n\017InspectTemplate\022\014\n\004name\030\001 \001(\t" + + "\022\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030\003 " + + "\001(\t\022/\n\013create_time\030\004 \001(\0132\032.google.protob" + + "uf.Timestamp\022/\n\013update_time\030\005 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022<\n\016inspect_config\030" + + "\006 \001(\0132$.google.privacy.dlp.v2.InspectCon" + + "fig\"\363\001\n\022DeidentifyTemplate\022\014\n\004name\030\001 \001(\t" + + "\022\024\n\014display_name\030\002 \001(\t\022\023\n\013description\030\003 " + + "\001(\t\022/\n\013create_time\030\004 \001(\0132\032.google.protob" + + "uf.Timestamp\022/\n\013update_time\030\005 \001(\0132\032.goog" + + "le.protobuf.Timestamp\022B\n\021deidentify_conf" + + "ig\030\006 \001(\0132\'.google.privacy.dlp.v2.Deident" + + "ifyConfig\"\\\n\005Error\022#\n\007details\030\001 \001(\0132\022.go" + + "ogle.rpc.Status\022.\n\ntimestamps\030\002 \003(\0132\032.go" + + "ogle.protobuf.Timestamp\"\333\004\n\nJobTrigger\022\014" + + "\n\004name\030\001 \001(\t\022\024\n\014display_name\030\002 \001(\t\022\023\n\013de" + + "scription\030\003 \001(\t\022>\n\013inspect_job\030\004 \001(\0132\'.g" + + "oogle.privacy.dlp.v2.InspectJobConfigH\000\022" + + ";\n\010triggers\030\005 \003(\0132).google.privacy.dlp.v" + + "2.JobTrigger.Trigger\022,\n\006errors\030\006 \003(\0132\034.g" + + "oogle.privacy.dlp.v2.Error\022/\n\013create_tim" + + "e\030\007 \001(\0132\032.google.protobuf.Timestamp\022/\n\013u" + + "pdate_time\030\010 \001(\0132\032.google.protobuf.Times" + + "tamp\0221\n\rlast_run_time\030\t \001(\0132\032.google.pro" + + "tobuf.Timestamp\0228\n\006status\030\n \001(\0162(.google" + + ".privacy.dlp.v2.JobTrigger.Status\032I\n\007Tri" + + "gger\0223\n\010schedule\030\001 \001(\0132\037.google.privacy." + + "dlp.v2.ScheduleH\000B\t\n\007trigger\"H\n\006Status\022\026" + + "\n\022STATUS_UNSPECIFIED\020\000\022\013\n\007HEALTHY\020\001\022\n\n\006P" + + "AUSED\020\002\022\r\n\tCANCELLED\020\003B\005\n\003job\"\375\002\n\006Action" + + "\022C\n\rsave_findings\030\001 \001(\0132*.google.privacy" + + ".dlp.v2.Action.SaveFindingsH\000\022@\n\007pub_sub" + + "\030\002 \001(\0132-.google.privacy.dlp.v2.Action.Pu" + + "blishToPubSubH\000\022U\n\027publish_summary_to_cs" + + "cc\030\003 \001(\01322.google.privacy.dlp.v2.Action." + + "PublishSummaryToCsccH\000\032Q\n\014SaveFindings\022A" + + "\n\routput_config\030\001 \001(\0132*.google.privacy.d" + + "lp.v2.OutputStorageConfig\032 \n\017PublishToPu" + + "bSub\022\r\n\005topic\030\001 \001(\t\032\026\n\024PublishSummaryToC" + + "sccB\010\n\006action\"\205\001\n\034CreateInspectTemplateR" + + "equest\022\016\n\006parent\030\001 \001(\t\022@\n\020inspect_templa" + + "te\030\002 \001(\0132&.google.privacy.dlp.v2.Inspect" + + "Template\022\023\n\013template_id\030\003 \001(\t\"\237\001\n\034Update" + + "InspectTemplateRequest\022\014\n\004name\030\001 \001(\t\022@\n\020" + + "inspect_template\030\002 \001(\0132&.google.privacy." + + "dlp.v2.InspectTemplate\022/\n\013update_mask\030\003 " + + "\001(\0132\032.google.protobuf.FieldMask\")\n\031GetIn" + + "spectTemplateRequest\022\014\n\004name\030\001 \001(\t\"T\n\033Li" + + "stInspectTemplatesRequest\022\016\n\006parent\030\001 \001(" + + "\t\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005" + + "\"z\n\034ListInspectTemplatesResponse\022A\n\021insp" + + "ect_templates\030\001 \003(\0132&.google.privacy.dlp" + + ".v2.InspectTemplate\022\027\n\017next_page_token\030\002" + + " \001(\t\",\n\034DeleteInspectTemplateRequest\022\014\n\004" + + "name\030\001 \001(\t\"u\n\027CreateJobTriggerRequest\022\016\n" + + "\006parent\030\001 \001(\t\0226\n\013job_trigger\030\002 \001(\0132!.goo" + + "gle.privacy.dlp.v2.JobTrigger\022\022\n\ntrigger" + + "_id\030\003 \001(\t\"\220\001\n\027UpdateJobTriggerRequest\022\014\n" + + "\004name\030\001 \001(\t\0226\n\013job_trigger\030\002 \001(\0132!.googl" + + "e.privacy.dlp.v2.JobTrigger\022/\n\013update_ma" + + "sk\030\003 \001(\0132\032.google.protobuf.FieldMask\"$\n\024" + + "GetJobTriggerRequest\022\014\n\004name\030\001 \001(\t\"\276\001\n\023C" + + "reateDlpJobRequest\022\016\n\006parent\030\001 \001(\t\022>\n\013in" + + "spect_job\030\002 \001(\0132\'.google.privacy.dlp.v2." + + "InspectJobConfigH\000\022@\n\010risk_job\030\003 \001(\0132,.g" + + "oogle.privacy.dlp.v2.RiskAnalysisJobConf" + + "igH\000\022\016\n\006job_id\030\004 \001(\tB\005\n\003job\"a\n\026ListJobTr" + + "iggersRequest\022\016\n\006parent\030\001 \001(\t\022\022\n\npage_to" + + "ken\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\020\n\010order_by" + + "\030\004 \001(\t\"k\n\027ListJobTriggersResponse\0227\n\014job" + + "_triggers\030\001 \003(\0132!.google.privacy.dlp.v2." + + "JobTrigger\022\027\n\017next_page_token\030\002 \001(\t\"\'\n\027D" + + "eleteJobTriggerRequest\022\014\n\004name\030\001 \001(\t\"\335\001\n" + + "\020InspectJobConfig\022<\n\016storage_config\030\001 \001(" + + "\0132$.google.privacy.dlp.v2.StorageConfig\022" + + "<\n\016inspect_config\030\002 \001(\0132$.google.privacy" + + ".dlp.v2.InspectConfig\022\035\n\025inspect_templat" + + "e_name\030\003 \001(\t\022.\n\007actions\030\004 \003(\0132\035.google.p" + + "rivacy.dlp.v2.Action\"\336\004\n\006DlpJob\022\014\n\004name\030" + + "\001 \001(\t\022/\n\004type\030\002 \001(\0162!.google.privacy.dlp" + + ".v2.DlpJobType\0225\n\005state\030\003 \001(\0162&.google.p" + + "rivacy.dlp.v2.DlpJob.JobState\022K\n\014risk_de" + + "tails\030\004 \001(\01323.google.privacy.dlp.v2.Anal" + + "yzeDataSourceRiskDetailsH\000\022J\n\017inspect_de" + + "tails\030\005 \001(\0132/.google.privacy.dlp.v2.Insp" + + "ectDataSourceDetailsH\000\022/\n\013create_time\030\006 " + + "\001(\0132\032.google.protobuf.Timestamp\022.\n\nstart" + + "_time\030\007 \001(\0132\032.google.protobuf.Timestamp\022" + + ",\n\010end_time\030\010 \001(\0132\032.google.protobuf.Time" + + "stamp\022\030\n\020job_trigger_name\030\n \001(\t\022,\n\006error" + + "s\030\013 \003(\0132\034.google.privacy.dlp.v2.Error\"c\n" + + "\010JobState\022\031\n\025JOB_STATE_UNSPECIFIED\020\000\022\013\n\007" + + "PENDING\020\001\022\013\n\007RUNNING\020\002\022\010\n\004DONE\020\003\022\014\n\010CANC" + + "ELED\020\004\022\n\n\006FAILED\020\005B\t\n\007details\" \n\020GetDlpJ" + + "obRequest\022\014\n\004name\030\001 \001(\t\"\214\001\n\022ListDlpJobsR" + + "equest\022\016\n\006parent\030\004 \001(\t\022\016\n\006filter\030\001 \001(\t\022\021" + + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022/\n" + + "\004type\030\005 \001(\0162!.google.privacy.dlp.v2.DlpJ" + + "obType\"[\n\023ListDlpJobsResponse\022+\n\004jobs\030\001 " + + "\003(\0132\035.google.privacy.dlp.v2.DlpJob\022\027\n\017ne" + + "xt_page_token\030\002 \001(\t\"#\n\023CancelDlpJobReque" + + "st\022\014\n\004name\030\001 \001(\t\"#\n\023DeleteDlpJobRequest\022" + + "\014\n\004name\030\001 \001(\t\"\216\001\n\037CreateDeidentifyTempla" + + "teRequest\022\016\n\006parent\030\001 \001(\t\022F\n\023deidentify_" + + "template\030\002 \001(\0132).google.privacy.dlp.v2.D" + + "eidentifyTemplate\022\023\n\013template_id\030\003 \001(\t\"\250" + + "\001\n\037UpdateDeidentifyTemplateRequest\022\014\n\004na" + + "me\030\001 \001(\t\022F\n\023deidentify_template\030\002 \001(\0132)." + + "google.privacy.dlp.v2.DeidentifyTemplate" + + "\022/\n\013update_mask\030\003 \001(\0132\032.google.protobuf." + + "FieldMask\",\n\034GetDeidentifyTemplateReques" + + "t\022\014\n\004name\030\001 \001(\t\"W\n\036ListDeidentifyTemplat" + + "esRequest\022\016\n\006parent\030\001 \001(\t\022\022\n\npage_token\030" + + "\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\"\203\001\n\037ListDeident" + + "ifyTemplatesResponse\022G\n\024deidentify_templ" + + "ates\030\001 \003(\0132).google.privacy.dlp.v2.Deide" + + "ntifyTemplate\022\027\n\017next_page_token\030\002 \001(\t\"/" + + "\n\037DeleteDeidentifyTemplateRequest\022\014\n\004nam" + + "e\030\001 \001(\t*M\n\rContentOption\022\027\n\023CONTENT_UNSP" + + "ECIFIED\020\000\022\020\n\014CONTENT_TEXT\020\001\022\021\n\rCONTENT_I" + + "MAGE\020\002*P\n\023InfoTypeSupportedBy\022\031\n\025ENUM_TY" + + "PE_UNSPECIFIED\020\000\022\013\n\007INSPECT\020\001\022\021\n\rRISK_AN" + + "ALYSIS\020\002*\273\001\n\022RelationalOperator\022#\n\037RELAT" + + "IONAL_OPERATOR_UNSPECIFIED\020\000\022\014\n\010EQUAL_TO" + + "\020\001\022\020\n\014NOT_EQUAL_TO\020\002\022\020\n\014GREATER_THAN\020\003\022\r" + + "\n\tLESS_THAN\020\004\022\032\n\026GREATER_THAN_OR_EQUALS\020" + + "\005\022\027\n\023LESS_THAN_OR_EQUALS\020\006\022\n\n\006EXISTS\020\007*R" + + "\n\nDlpJobType\022\034\n\030DLP_JOB_TYPE_UNSPECIFIED" + + "\020\000\022\017\n\013INSPECT_JOB\020\001\022\025\n\021RISK_ANALYSIS_JOB" + + "\020\0022\376\"\n\nDlpService\022\241\001\n\016InspectContent\022,.g" + + "oogle.privacy.dlp.v2.InspectContentReque" + + "st\032-.google.privacy.dlp.v2.InspectConten" + + "tResponse\"2\202\323\344\223\002,\"\'/v2/{parent=projects/" + + "*}/content:inspect:\001*\022\225\001\n\013RedactImage\022)." + + "google.privacy.dlp.v2.RedactImageRequest" + + "\032*.google.privacy.dlp.v2.RedactImageResp" + + "onse\"/\202\323\344\223\002)\"$/v2/{parent=projects/*}/im" + + "age:redact:\001*\022\255\001\n\021DeidentifyContent\022/.go" + + "ogle.privacy.dlp.v2.DeidentifyContentReq" + + "uest\0320.google.privacy.dlp.v2.DeidentifyC" + + "ontentResponse\"5\202\323\344\223\002/\"*/v2/{parent=proj" + + "ects/*}/content:deidentify:\001*\022\255\001\n\021Reiden" + + "tifyContent\022/.google.privacy.dlp.v2.Reid" + + "entifyContentRequest\0320.google.privacy.dl" + + "p.v2.ReidentifyContentResponse\"5\202\323\344\223\002/\"*" + + "/v2/{parent=projects/*}/content:reidenti" + + "fy:\001*\022\201\001\n\rListInfoTypes\022+.google.privacy" + + ".dlp.v2.ListInfoTypesRequest\032,.google.pr" + + "ivacy.dlp.v2.ListInfoTypesResponse\"\025\202\323\344\223" + + "\002\017\022\r/v2/infoTypes\022\335\001\n\025CreateInspectTempl" + + "ate\0223.google.privacy.dlp.v2.CreateInspec" + + "tTemplateRequest\032&.google.privacy.dlp.v2" + + ".InspectTemplate\"g\202\323\344\223\002a\"-/v2/{parent=or" + + "ganizations/*}/inspectTemplates:\001*Z-\"(/v" + + "2/{parent=projects/*}/inspectTemplates:\001" + + "*\022\335\001\n\025UpdateInspectTemplate\0223.google.pri" + + "vacy.dlp.v2.UpdateInspectTemplateRequest" + + "\032&.google.privacy.dlp.v2.InspectTemplate" + + "\"g\202\323\344\223\002a2-/v2/{name=organizations/*/insp" + + "ectTemplates/*}:\001*Z-2(/v2/{name=projects" + + "/*/inspectTemplates/*}:\001*\022\321\001\n\022GetInspect" + + "Template\0220.google.privacy.dlp.v2.GetInsp" + + "ectTemplateRequest\032&.google.privacy.dlp." + + "v2.InspectTemplate\"a\202\323\344\223\002[\022-/v2/{name=or" + + "ganizations/*/inspectTemplates/*}Z*\022(/v2" + + "/{name=projects/*/inspectTemplates/*}\022\342\001" + + "\n\024ListInspectTemplates\0222.google.privacy." + + "dlp.v2.ListInspectTemplatesRequest\0323.goo" + + "gle.privacy.dlp.v2.ListInspectTemplatesR" + + "esponse\"a\202\323\344\223\002[\022-/v2/{parent=organizatio" + + "ns/*}/inspectTemplatesZ*\022(/v2/{parent=pr" + + "ojects/*}/inspectTemplates\022\307\001\n\025DeleteIns" + + "pectTemplate\0223.google.privacy.dlp.v2.Del" + + "eteInspectTemplateRequest\032\026.google.proto" + + "buf.Empty\"a\202\323\344\223\002[*-/v2/{name=organizatio" + + "ns/*/inspectTemplates/*}Z**(/v2/{name=pr" + + "ojects/*/inspectTemplates/*}\022\354\001\n\030CreateD" + + "eidentifyTemplate\0226.google.privacy.dlp.v" + + "2.CreateDeidentifyTemplateRequest\032).goog" + + "le.privacy.dlp.v2.DeidentifyTemplate\"m\202\323" + + "\344\223\002g\"0/v2/{parent=organizations/*}/deide" + + "ntifyTemplates:\001*Z0\"+/v2/{parent=project" + + "s/*}/deidentifyTemplates:\001*\022\354\001\n\030UpdateDe" + + "identifyTemplate\0226.google.privacy.dlp.v2" + + ".UpdateDeidentifyTemplateRequest\032).googl" + + "e.privacy.dlp.v2.DeidentifyTemplate\"m\202\323\344" + + "\223\002g20/v2/{name=organizations/*/deidentif" + + "yTemplates/*}:\001*Z02+/v2/{name=projects/*" + + "/deidentifyTemplates/*}:\001*\022\340\001\n\025GetDeiden" + + "tifyTemplate\0223.google.privacy.dlp.v2.Get" + "DeidentifyTemplateRequest\032).google.priva" + - "cy.dlp.v2.DeidentifyTemplate\"m\202\323\344\223\002g\"0/v" + - "2/{parent=organizations/*}/deidentifyTem" + - "plates:\001*Z0\"+/v2/{parent=projects/*}/dei" + - "dentifyTemplates:\001*\022\354\001\n\030UpdateDeidentify" + - "Template\0226.google.privacy.dlp.v2.UpdateD" + - "eidentifyTemplateRequest\032).google.privac" + - "y.dlp.v2.DeidentifyTemplate\"m\202\323\344\223\002g20/v2" + - "/{name=organizations/*/deidentifyTemplat" + - "es/*}:\001*Z02+/v2/{name=projects/*/deident" + - "ifyTemplates/*}:\001*\022\340\001\n\025GetDeidentifyTemp" + - "late\0223.google.privacy.dlp.v2.GetDeidenti" + - "fyTemplateRequest\032).google.privacy.dlp.v" + - "2.DeidentifyTemplate\"g\202\323\344\223\002a\0220/v2/{name=" + - "organizations/*/deidentifyTemplates/*}Z-" + - "\022+/v2/{name=projects/*/deidentifyTemplat" + - "es/*}\022\361\001\n\027ListDeidentifyTemplates\0225.goog" + - "le.privacy.dlp.v2.ListDeidentifyTemplate" + - "sRequest\0326.google.privacy.dlp.v2.ListDei" + - "dentifyTemplatesResponse\"g\202\323\344\223\002a\0220/v2/{p" + - "arent=organizations/*}/deidentifyTemplat" + - "esZ-\022+/v2/{parent=projects/*}/deidentify" + - "Templates\022\323\001\n\030DeleteDeidentifyTemplate\0226" + - ".google.privacy.dlp.v2.DeleteDeidentifyT" + - "emplateRequest\032\026.google.protobuf.Empty\"g" + - "\202\323\344\223\002a*0/v2/{name=organizations/*/deiden" + - "tifyTemplates/*}Z-*+/v2/{name=projects/*" + - "/deidentifyTemplates/*}\022\225\001\n\020CreateJobTri" + - "gger\022..google.privacy.dlp.v2.CreateJobTr" + + "cy.dlp.v2.DeidentifyTemplate\"g\202\323\344\223\002a\0220/v" + + "2/{name=organizations/*/deidentifyTempla" + + "tes/*}Z-\022+/v2/{name=projects/*/deidentif" + + "yTemplates/*}\022\361\001\n\027ListDeidentifyTemplate" + + "s\0225.google.privacy.dlp.v2.ListDeidentify" + + "TemplatesRequest\0326.google.privacy.dlp.v2" + + ".ListDeidentifyTemplatesResponse\"g\202\323\344\223\002a" + + "\0220/v2/{parent=organizations/*}/deidentif" + + "yTemplatesZ-\022+/v2/{parent=projects/*}/de" + + "identifyTemplates\022\323\001\n\030DeleteDeidentifyTe" + + "mplate\0226.google.privacy.dlp.v2.DeleteDei" + + "dentifyTemplateRequest\032\026.google.protobuf" + + ".Empty\"g\202\323\344\223\002a*0/v2/{name=organizations/" + + "*/deidentifyTemplates/*}Z-*+/v2/{name=pr" + + "ojects/*/deidentifyTemplates/*}\022\225\001\n\020Crea" + + "teJobTrigger\022..google.privacy.dlp.v2.Cre" + + "ateJobTriggerRequest\032!.google.privacy.dl" + + "p.v2.JobTrigger\".\202\323\344\223\002(\"#/v2/{parent=pro" + + "jects/*}/jobTriggers:\001*\022\225\001\n\020UpdateJobTri" + + "gger\022..google.privacy.dlp.v2.UpdateJobTr" + "iggerRequest\032!.google.privacy.dlp.v2.Job" + - "Trigger\".\202\323\344\223\002(\"#/v2/{parent=projects/*}" + - "/jobTriggers:\001*\022\225\001\n\020UpdateJobTrigger\022..g" + - "oogle.privacy.dlp.v2.UpdateJobTriggerReq" + - "uest\032!.google.privacy.dlp.v2.JobTrigger\"" + - ".\202\323\344\223\002(2#/v2/{name=projects/*/jobTrigger" + - "s/*}:\001*\022\214\001\n\rGetJobTrigger\022+.google.priva" + - "cy.dlp.v2.GetJobTriggerRequest\032!.google." + - "privacy.dlp.v2.JobTrigger\"+\202\323\344\223\002%\022#/v2/{" + - "name=projects/*/jobTriggers/*}\022\235\001\n\017ListJ" + - "obTriggers\022-.google.privacy.dlp.v2.ListJ" + - "obTriggersRequest\032..google.privacy.dlp.v" + - "2.ListJobTriggersResponse\"+\202\323\344\223\002%\022#/v2/{" + - "parent=projects/*}/jobTriggers\022\207\001\n\020Delet" + - "eJobTrigger\022..google.privacy.dlp.v2.Dele" + - "teJobTriggerRequest\032\026.google.protobuf.Em" + - "pty\"+\202\323\344\223\002%*#/v2/{name=projects/*/jobTri" + - "ggers/*}\022\205\001\n\014CreateDlpJob\022*.google.priva" + - "cy.dlp.v2.CreateDlpJobRequest\032\035.google.p" + - "rivacy.dlp.v2.DlpJob\"*\202\323\344\223\002$\"\037/v2/{paren" + - "t=projects/*}/dlpJobs:\001*\022\215\001\n\013ListDlpJobs" + - "\022).google.privacy.dlp.v2.ListDlpJobsRequ" + - "est\032*.google.privacy.dlp.v2.ListDlpJobsR" + - "esponse\"\'\202\323\344\223\002!\022\037/v2/{parent=projects/*}" + - "/dlpJobs\022|\n\tGetDlpJob\022\'.google.privacy.d" + - "lp.v2.GetDlpJobRequest\032\035.google.privacy." + - "dlp.v2.DlpJob\"\'\202\323\344\223\002!\022\037/v2/{name=project" + - "s/*/dlpJobs/*}\022{\n\014DeleteDlpJob\022*.google." + - "privacy.dlp.v2.DeleteDlpJobRequest\032\026.goo" + - "gle.protobuf.Empty\"\'\202\323\344\223\002!*\037/v2/{name=pr" + - "ojects/*/dlpJobs/*}\022\205\001\n\014CancelDlpJob\022*.g" + - "oogle.privacy.dlp.v2.CancelDlpJobRequest" + - "\032\026.google.protobuf.Empty\"1\202\323\344\223\002+\"&/v2/{n" + - "ame=projects/*/dlpJobs/*}:cancel:\001*B\215\001\n\031" + - "com.google.privacy.dlp.v2B\010DlpProtoP\001Z8g" + - "oogle.golang.org/genproto/googleapis/pri" + - "vacy/dlp/v2;dlp\252\002\023Google.Cloud.Dlp.V2\312\002\023" + - "Google\\Cloud\\Dlp\\V2b\006proto3" + "Trigger\".\202\323\344\223\002(2#/v2/{name=projects/*/jo" + + "bTriggers/*}:\001*\022\214\001\n\rGetJobTrigger\022+.goog" + + "le.privacy.dlp.v2.GetJobTriggerRequest\032!" + + ".google.privacy.dlp.v2.JobTrigger\"+\202\323\344\223\002" + + "%\022#/v2/{name=projects/*/jobTriggers/*}\022\235" + + "\001\n\017ListJobTriggers\022-.google.privacy.dlp." + + "v2.ListJobTriggersRequest\032..google.priva" + + "cy.dlp.v2.ListJobTriggersResponse\"+\202\323\344\223\002" + + "%\022#/v2/{parent=projects/*}/jobTriggers\022\207" + + "\001\n\020DeleteJobTrigger\022..google.privacy.dlp" + + ".v2.DeleteJobTriggerRequest\032\026.google.pro" + + "tobuf.Empty\"+\202\323\344\223\002%*#/v2/{name=projects/" + + "*/jobTriggers/*}\022\205\001\n\014CreateDlpJob\022*.goog" + + "le.privacy.dlp.v2.CreateDlpJobRequest\032\035." + + "google.privacy.dlp.v2.DlpJob\"*\202\323\344\223\002$\"\037/v" + + "2/{parent=projects/*}/dlpJobs:\001*\022\215\001\n\013Lis" + + "tDlpJobs\022).google.privacy.dlp.v2.ListDlp" + + "JobsRequest\032*.google.privacy.dlp.v2.List" + + "DlpJobsResponse\"\'\202\323\344\223\002!\022\037/v2/{parent=pro" + + "jects/*}/dlpJobs\022|\n\tGetDlpJob\022\'.google.p" + + "rivacy.dlp.v2.GetDlpJobRequest\032\035.google." + + "privacy.dlp.v2.DlpJob\"\'\202\323\344\223\002!\022\037/v2/{name" + + "=projects/*/dlpJobs/*}\022{\n\014DeleteDlpJob\022*" + + ".google.privacy.dlp.v2.DeleteDlpJobReque" + + "st\032\026.google.protobuf.Empty\"\'\202\323\344\223\002!*\037/v2/" + + "{name=projects/*/dlpJobs/*}\022\205\001\n\014CancelDl" + + "pJob\022*.google.privacy.dlp.v2.CancelDlpJo" + + "bRequest\032\026.google.protobuf.Empty\"1\202\323\344\223\002+" + + "\"&/v2/{name=projects/*/dlpJobs/*}:cancel" + + ":\001*B\215\001\n\031com.google.privacy.dlp.v2B\010DlpPr" + + "otoP\001Z8google.golang.org/genproto/google" + + "apis/privacy/dlp/v2;dlp\252\002\023Google.Cloud.D" + + "lp.V2\312\002\023Google\\Cloud\\Dlp\\V2b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -1469,7 +1544,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_privacy_dlp_v2_RedactImageRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor, - new java.lang.String[] { "Parent", "InspectConfig", "ImageRedactionConfigs", "ByteItem", }); + new java.lang.String[] { "Parent", "InspectConfig", "ImageRedactionConfigs", "IncludeFindings", "ByteItem", }); internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_descriptor = internal_static_google_privacy_dlp_v2_RedactImageRequest_descriptor.getNestedTypes().get(0); internal_static_google_privacy_dlp_v2_RedactImageRequest_ImageRedactionConfig_fieldAccessorTable = new @@ -1487,7 +1562,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_privacy_dlp_v2_RedactImageResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RedactImageResponse_descriptor, - new java.lang.String[] { "RedactedImage", "ExtractedText", }); + new java.lang.String[] { "RedactedImage", "ExtractedText", "InspectResult", }); internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_descriptor = getDescriptor().getMessageTypes().get(17); internal_static_google_privacy_dlp_v2_DeidentifyContentRequest_fieldAccessorTable = new @@ -1578,12 +1653,30 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RiskAnalysisJobConfig_descriptor, new java.lang.String[] { "PrivacyMetric", "SourceTable", "Actions", }); - internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor = + internal_static_google_privacy_dlp_v2_QuasiId_descriptor = getDescriptor().getMessageTypes().get(30); + internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_QuasiId_descriptor, + new java.lang.String[] { "Field", "InfoType", "CustomTag", "Inferred", "Tag", }); + internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor, + new java.lang.String[] { "Table", "QuasiIds", "RelativeFrequency", }); + internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor = + internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor, + new java.lang.String[] { "Field", "CustomTag", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor = + getDescriptor().getMessageTypes().get(32); internal_static_google_privacy_dlp_v2_PrivacyMetric_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor, - new java.lang.String[] { "NumericalStatsConfig", "CategoricalStatsConfig", "KAnonymityConfig", "LDiversityConfig", "KMapEstimationConfig", "Type", }); + new java.lang.String[] { "NumericalStatsConfig", "CategoricalStatsConfig", "KAnonymityConfig", "LDiversityConfig", "KMapEstimationConfig", "DeltaPresenceEstimationConfig", "Type", }); internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_descriptor = internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(0); internal_static_google_privacy_dlp_v2_PrivacyMetric_NumericalStatsConfig_fieldAccessorTable = new @@ -1632,12 +1725,18 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_PrivacyMetric_KMapEstimationConfig_AuxiliaryTable_QuasiIdField_descriptor, new java.lang.String[] { "Field", "CustomTag", }); + internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor = + internal_static_google_privacy_dlp_v2_PrivacyMetric_descriptor.getNestedTypes().get(5); + internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor, + new java.lang.String[] { "QuasiIds", "RegionCode", "AuxiliaryTables", }); internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor = - getDescriptor().getMessageTypes().get(31); + getDescriptor().getMessageTypes().get(33); internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor, - new java.lang.String[] { "RequestedPrivacyMetric", "RequestedSourceTable", "NumericalStatsResult", "CategoricalStatsResult", "KAnonymityResult", "LDiversityResult", "KMapEstimationResult", "Result", }); + new java.lang.String[] { "RequestedPrivacyMetric", "RequestedSourceTable", "NumericalStatsResult", "CategoricalStatsResult", "KAnonymityResult", "LDiversityResult", "KMapEstimationResult", "DeltaPresenceEstimationResult", "Result", }); internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_descriptor = internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(0); internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_NumericalStatsResult_fieldAccessorTable = new @@ -1710,26 +1809,44 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_KMapEstimationResult_KMapEstimationHistogramBucket_descriptor, new java.lang.String[] { "MinAnonymity", "MaxAnonymity", "BucketSize", "BucketValues", "BucketValueCount", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_descriptor.getNestedTypes().get(5); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor, + new java.lang.String[] { "DeltaPresenceEstimationHistogram", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor.getNestedTypes().get(0); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationQuasiIdValues_descriptor, + new java.lang.String[] { "QuasiIdsValues", "EstimatedProbability", }); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor = + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_descriptor.getNestedTypes().get(1); + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_privacy_dlp_v2_AnalyzeDataSourceRiskDetails_DeltaPresenceEstimationResult_DeltaPresenceEstimationHistogramBucket_descriptor, + new java.lang.String[] { "MinProbability", "MaxProbability", "BucketSize", "BucketValues", "BucketValueCount", }); internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor = - getDescriptor().getMessageTypes().get(32); + getDescriptor().getMessageTypes().get(34); internal_static_google_privacy_dlp_v2_ValueFrequency_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ValueFrequency_descriptor, new java.lang.String[] { "Value", "Count", }); internal_static_google_privacy_dlp_v2_Value_descriptor = - getDescriptor().getMessageTypes().get(33); + getDescriptor().getMessageTypes().get(35); internal_static_google_privacy_dlp_v2_Value_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Value_descriptor, new java.lang.String[] { "IntegerValue", "FloatValue", "StringValue", "BooleanValue", "TimestampValue", "TimeValue", "DateValue", "DayOfWeekValue", "Type", }); internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor = - getDescriptor().getMessageTypes().get(34); + getDescriptor().getMessageTypes().get(36); internal_static_google_privacy_dlp_v2_QuoteInfo_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_QuoteInfo_descriptor, new java.lang.String[] { "DateTime", "ParsedQuote", }); internal_static_google_privacy_dlp_v2_DateTime_descriptor = - getDescriptor().getMessageTypes().get(35); + getDescriptor().getMessageTypes().get(37); internal_static_google_privacy_dlp_v2_DateTime_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DateTime_descriptor, @@ -1741,67 +1858,67 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_privacy_dlp_v2_DateTime_TimeZone_descriptor, new java.lang.String[] { "OffsetMinutes", }); internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor = - getDescriptor().getMessageTypes().get(36); + getDescriptor().getMessageTypes().get(38); internal_static_google_privacy_dlp_v2_DeidentifyConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeidentifyConfig_descriptor, new java.lang.String[] { "InfoTypeTransformations", "RecordTransformations", "Transformation", }); internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor = - getDescriptor().getMessageTypes().get(37); + getDescriptor().getMessageTypes().get(39); internal_static_google_privacy_dlp_v2_PrimitiveTransformation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_PrimitiveTransformation_descriptor, new java.lang.String[] { "ReplaceConfig", "RedactConfig", "CharacterMaskConfig", "CryptoReplaceFfxFpeConfig", "FixedSizeBucketingConfig", "BucketingConfig", "ReplaceWithInfoTypeConfig", "TimePartConfig", "CryptoHashConfig", "DateShiftConfig", "Transformation", }); internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor = - getDescriptor().getMessageTypes().get(38); + getDescriptor().getMessageTypes().get(40); internal_static_google_privacy_dlp_v2_TimePartConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_TimePartConfig_descriptor, new java.lang.String[] { "PartToExtract", }); internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor = - getDescriptor().getMessageTypes().get(39); + getDescriptor().getMessageTypes().get(41); internal_static_google_privacy_dlp_v2_CryptoHashConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CryptoHashConfig_descriptor, new java.lang.String[] { "CryptoKey", }); internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor = - getDescriptor().getMessageTypes().get(40); + getDescriptor().getMessageTypes().get(42); internal_static_google_privacy_dlp_v2_ReplaceValueConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ReplaceValueConfig_descriptor, new java.lang.String[] { "NewValue", }); internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor = - getDescriptor().getMessageTypes().get(41); + getDescriptor().getMessageTypes().get(43); internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ReplaceWithInfoTypeConfig_descriptor, new java.lang.String[] { }); internal_static_google_privacy_dlp_v2_RedactConfig_descriptor = - getDescriptor().getMessageTypes().get(42); + getDescriptor().getMessageTypes().get(44); internal_static_google_privacy_dlp_v2_RedactConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RedactConfig_descriptor, new java.lang.String[] { }); internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor = - getDescriptor().getMessageTypes().get(43); + getDescriptor().getMessageTypes().get(45); internal_static_google_privacy_dlp_v2_CharsToIgnore_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CharsToIgnore_descriptor, new java.lang.String[] { "CharactersToSkip", "CommonCharactersToIgnore", "Characters", }); internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor = - getDescriptor().getMessageTypes().get(44); + getDescriptor().getMessageTypes().get(46); internal_static_google_privacy_dlp_v2_CharacterMaskConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CharacterMaskConfig_descriptor, new java.lang.String[] { "MaskingCharacter", "NumberToMask", "ReverseOrder", "CharactersToIgnore", }); internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor = - getDescriptor().getMessageTypes().get(45); + getDescriptor().getMessageTypes().get(47); internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_FixedSizeBucketingConfig_descriptor, new java.lang.String[] { "LowerBound", "UpperBound", "BucketSize", }); internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor = - getDescriptor().getMessageTypes().get(46); + getDescriptor().getMessageTypes().get(48); internal_static_google_privacy_dlp_v2_BucketingConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_BucketingConfig_descriptor, @@ -1813,43 +1930,43 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_privacy_dlp_v2_BucketingConfig_Bucket_descriptor, new java.lang.String[] { "Min", "Max", "ReplacementValue", }); internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor = - getDescriptor().getMessageTypes().get(47); + getDescriptor().getMessageTypes().get(49); internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CryptoReplaceFfxFpeConfig_descriptor, new java.lang.String[] { "CryptoKey", "Context", "CommonAlphabet", "CustomAlphabet", "Radix", "SurrogateInfoType", "Alphabet", }); internal_static_google_privacy_dlp_v2_CryptoKey_descriptor = - getDescriptor().getMessageTypes().get(48); + getDescriptor().getMessageTypes().get(50); internal_static_google_privacy_dlp_v2_CryptoKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CryptoKey_descriptor, new java.lang.String[] { "Transient", "Unwrapped", "KmsWrapped", "Source", }); internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor = - getDescriptor().getMessageTypes().get(49); + getDescriptor().getMessageTypes().get(51); internal_static_google_privacy_dlp_v2_TransientCryptoKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_TransientCryptoKey_descriptor, new java.lang.String[] { "Name", }); internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor = - getDescriptor().getMessageTypes().get(50); + getDescriptor().getMessageTypes().get(52); internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_UnwrappedCryptoKey_descriptor, new java.lang.String[] { "Key", }); internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor = - getDescriptor().getMessageTypes().get(51); + getDescriptor().getMessageTypes().get(53); internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_KmsWrappedCryptoKey_descriptor, new java.lang.String[] { "WrappedKey", "CryptoKeyName", }); internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor = - getDescriptor().getMessageTypes().get(52); + getDescriptor().getMessageTypes().get(54); internal_static_google_privacy_dlp_v2_DateShiftConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DateShiftConfig_descriptor, new java.lang.String[] { "UpperBoundDays", "LowerBoundDays", "Context", "CryptoKey", "Method", }); internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor = - getDescriptor().getMessageTypes().get(53); + getDescriptor().getMessageTypes().get(55); internal_static_google_privacy_dlp_v2_InfoTypeTransformations_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_InfoTypeTransformations_descriptor, @@ -1861,25 +1978,25 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_privacy_dlp_v2_InfoTypeTransformations_InfoTypeTransformation_descriptor, new java.lang.String[] { "InfoTypes", "PrimitiveTransformation", }); internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor = - getDescriptor().getMessageTypes().get(54); + getDescriptor().getMessageTypes().get(56); internal_static_google_privacy_dlp_v2_FieldTransformation_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_FieldTransformation_descriptor, new java.lang.String[] { "Fields", "Condition", "PrimitiveTransformation", "InfoTypeTransformations", "Transformation", }); internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor = - getDescriptor().getMessageTypes().get(55); + getDescriptor().getMessageTypes().get(57); internal_static_google_privacy_dlp_v2_RecordTransformations_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RecordTransformations_descriptor, new java.lang.String[] { "FieldTransformations", "RecordSuppressions", }); internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor = - getDescriptor().getMessageTypes().get(56); + getDescriptor().getMessageTypes().get(58); internal_static_google_privacy_dlp_v2_RecordSuppression_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RecordSuppression_descriptor, new java.lang.String[] { "Condition", }); internal_static_google_privacy_dlp_v2_RecordCondition_descriptor = - getDescriptor().getMessageTypes().get(57); + getDescriptor().getMessageTypes().get(59); internal_static_google_privacy_dlp_v2_RecordCondition_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_RecordCondition_descriptor, @@ -1903,13 +2020,13 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_privacy_dlp_v2_RecordCondition_Expressions_descriptor, new java.lang.String[] { "LogicalOperator", "Conditions", "Type", }); internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor = - getDescriptor().getMessageTypes().get(58); + getDescriptor().getMessageTypes().get(60); internal_static_google_privacy_dlp_v2_TransformationOverview_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_TransformationOverview_descriptor, new java.lang.String[] { "TransformedBytes", "TransformationSummaries", }); internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor = - getDescriptor().getMessageTypes().get(59); + getDescriptor().getMessageTypes().get(61); internal_static_google_privacy_dlp_v2_TransformationSummary_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_TransformationSummary_descriptor, @@ -1921,31 +2038,31 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_privacy_dlp_v2_TransformationSummary_SummaryResult_descriptor, new java.lang.String[] { "Count", "Code", "Details", }); internal_static_google_privacy_dlp_v2_Schedule_descriptor = - getDescriptor().getMessageTypes().get(60); + getDescriptor().getMessageTypes().get(62); internal_static_google_privacy_dlp_v2_Schedule_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Schedule_descriptor, new java.lang.String[] { "RecurrencePeriodDuration", "Option", }); internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor = - getDescriptor().getMessageTypes().get(61); + getDescriptor().getMessageTypes().get(63); internal_static_google_privacy_dlp_v2_InspectTemplate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_InspectTemplate_descriptor, new java.lang.String[] { "Name", "DisplayName", "Description", "CreateTime", "UpdateTime", "InspectConfig", }); internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor = - getDescriptor().getMessageTypes().get(62); + getDescriptor().getMessageTypes().get(64); internal_static_google_privacy_dlp_v2_DeidentifyTemplate_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeidentifyTemplate_descriptor, new java.lang.String[] { "Name", "DisplayName", "Description", "CreateTime", "UpdateTime", "DeidentifyConfig", }); internal_static_google_privacy_dlp_v2_Error_descriptor = - getDescriptor().getMessageTypes().get(63); + getDescriptor().getMessageTypes().get(65); internal_static_google_privacy_dlp_v2_Error_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Error_descriptor, new java.lang.String[] { "Details", "Timestamps", }); internal_static_google_privacy_dlp_v2_JobTrigger_descriptor = - getDescriptor().getMessageTypes().get(64); + getDescriptor().getMessageTypes().get(66); internal_static_google_privacy_dlp_v2_JobTrigger_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_JobTrigger_descriptor, @@ -1957,7 +2074,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_privacy_dlp_v2_JobTrigger_Trigger_descriptor, new java.lang.String[] { "Schedule", "Trigger", }); internal_static_google_privacy_dlp_v2_Action_descriptor = - getDescriptor().getMessageTypes().get(65); + getDescriptor().getMessageTypes().get(67); internal_static_google_privacy_dlp_v2_Action_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_Action_descriptor, @@ -1981,157 +2098,157 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_privacy_dlp_v2_Action_PublishSummaryToCscc_descriptor, new java.lang.String[] { }); internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(66); + getDescriptor().getMessageTypes().get(68); internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CreateInspectTemplateRequest_descriptor, new java.lang.String[] { "Parent", "InspectTemplate", "TemplateId", }); internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(67); + getDescriptor().getMessageTypes().get(69); internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_UpdateInspectTemplateRequest_descriptor, new java.lang.String[] { "Name", "InspectTemplate", "UpdateMask", }); internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(68); + getDescriptor().getMessageTypes().get(70); internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_GetInspectTemplateRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor = - getDescriptor().getMessageTypes().get(69); + getDescriptor().getMessageTypes().get(71); internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListInspectTemplatesRequest_descriptor, new java.lang.String[] { "Parent", "PageToken", "PageSize", }); internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor = - getDescriptor().getMessageTypes().get(70); + getDescriptor().getMessageTypes().get(72); internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListInspectTemplatesResponse_descriptor, new java.lang.String[] { "InspectTemplates", "NextPageToken", }); internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(71); + getDescriptor().getMessageTypes().get(73); internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeleteInspectTemplateRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(72); + getDescriptor().getMessageTypes().get(74); internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CreateJobTriggerRequest_descriptor, new java.lang.String[] { "Parent", "JobTrigger", "TriggerId", }); internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(73); + getDescriptor().getMessageTypes().get(75); internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_UpdateJobTriggerRequest_descriptor, new java.lang.String[] { "Name", "JobTrigger", "UpdateMask", }); internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(74); + getDescriptor().getMessageTypes().get(76); internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_GetJobTriggerRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(75); + getDescriptor().getMessageTypes().get(77); internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CreateDlpJobRequest_descriptor, new java.lang.String[] { "Parent", "InspectJob", "RiskJob", "JobId", "Job", }); internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor = - getDescriptor().getMessageTypes().get(76); + getDescriptor().getMessageTypes().get(78); internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListJobTriggersRequest_descriptor, new java.lang.String[] { "Parent", "PageToken", "PageSize", "OrderBy", }); internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor = - getDescriptor().getMessageTypes().get(77); + getDescriptor().getMessageTypes().get(79); internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListJobTriggersResponse_descriptor, new java.lang.String[] { "JobTriggers", "NextPageToken", }); internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor = - getDescriptor().getMessageTypes().get(78); + getDescriptor().getMessageTypes().get(80); internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeleteJobTriggerRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor = - getDescriptor().getMessageTypes().get(79); + getDescriptor().getMessageTypes().get(81); internal_static_google_privacy_dlp_v2_InspectJobConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_InspectJobConfig_descriptor, new java.lang.String[] { "StorageConfig", "InspectConfig", "InspectTemplateName", "Actions", }); internal_static_google_privacy_dlp_v2_DlpJob_descriptor = - getDescriptor().getMessageTypes().get(80); + getDescriptor().getMessageTypes().get(82); internal_static_google_privacy_dlp_v2_DlpJob_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DlpJob_descriptor, new java.lang.String[] { "Name", "Type", "State", "RiskDetails", "InspectDetails", "CreateTime", "StartTime", "EndTime", "JobTriggerName", "Errors", "Details", }); internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(81); + getDescriptor().getMessageTypes().get(83); internal_static_google_privacy_dlp_v2_GetDlpJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_GetDlpJobRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor = - getDescriptor().getMessageTypes().get(82); + getDescriptor().getMessageTypes().get(84); internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListDlpJobsRequest_descriptor, new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", "Type", }); internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor = - getDescriptor().getMessageTypes().get(83); + getDescriptor().getMessageTypes().get(85); internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListDlpJobsResponse_descriptor, new java.lang.String[] { "Jobs", "NextPageToken", }); internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(84); + getDescriptor().getMessageTypes().get(86); internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CancelDlpJobRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor = - getDescriptor().getMessageTypes().get(85); + getDescriptor().getMessageTypes().get(87); internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeleteDlpJobRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(86); + getDescriptor().getMessageTypes().get(88); internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_CreateDeidentifyTemplateRequest_descriptor, new java.lang.String[] { "Parent", "DeidentifyTemplate", "TemplateId", }); internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(87); + getDescriptor().getMessageTypes().get(89); internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_UpdateDeidentifyTemplateRequest_descriptor, new java.lang.String[] { "Name", "DeidentifyTemplate", "UpdateMask", }); internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(88); + getDescriptor().getMessageTypes().get(90); internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_GetDeidentifyTemplateRequest_descriptor, new java.lang.String[] { "Name", }); internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor = - getDescriptor().getMessageTypes().get(89); + getDescriptor().getMessageTypes().get(91); internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesRequest_descriptor, new java.lang.String[] { "Parent", "PageToken", "PageSize", }); internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor = - getDescriptor().getMessageTypes().get(90); + getDescriptor().getMessageTypes().get(92); internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_ListDeidentifyTemplatesResponse_descriptor, new java.lang.String[] { "DeidentifyTemplates", "NextPageToken", }); internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor = - getDescriptor().getMessageTypes().get(91); + getDescriptor().getMessageTypes().get(93); internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_privacy_dlp_v2_DeleteDeidentifyTemplateRequest_descriptor, diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java index 8f8d651ada22..34f0f77f0998 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Finding.java @@ -149,7 +149,7 @@ private Finding( *
    * The content that was found. Even if the content is not textual, it
    * may be converted to a textual representation here.
-   * Provided if requested by the `InspectConfig` and the finding is
+   * Provided if `include_quote` is true and the finding is
    * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
    * in length, the quote may be omitted.
    * 
@@ -172,7 +172,7 @@ public java.lang.String getQuote() { *
    * The content that was found. Even if the content is not textual, it
    * may be converted to a textual representation here.
-   * Provided if requested by the `InspectConfig` and the finding is
+   * Provided if `include_quote` is true and the finding is
    * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
    * in length, the quote may be omitted.
    * 
@@ -198,7 +198,7 @@ public java.lang.String getQuote() { /** *
    * The type of content that might have been found.
-   * Provided if requested by the `InspectConfig`.
+   * Provided if `excluded_types` is false.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -209,7 +209,7 @@ public boolean hasInfoType() { /** *
    * The type of content that might have been found.
-   * Provided if requested by the `InspectConfig`.
+   * Provided if `excluded_types` is false.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -220,7 +220,7 @@ public com.google.privacy.dlp.v2.InfoType getInfoType() { /** *
    * The type of content that might have been found.
-   * Provided if requested by the `InspectConfig`.
+   * Provided if `excluded_types` is false.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -233,7 +233,7 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { private int likelihood_; /** *
-   * Estimate of how likely it is that the `info_type` is correct.
+   * Confidence of how likely it is that the `info_type` is correct.
    * 
* * .google.privacy.dlp.v2.Likelihood likelihood = 3; @@ -243,7 +243,7 @@ public int getLikelihoodValue() { } /** *
-   * Estimate of how likely it is that the `info_type` is correct.
+   * Confidence of how likely it is that the `info_type` is correct.
    * 
* * .google.privacy.dlp.v2.Likelihood likelihood = 3; @@ -786,7 +786,7 @@ public Builder mergeFrom( *
      * The content that was found. Even if the content is not textual, it
      * may be converted to a textual representation here.
-     * Provided if requested by the `InspectConfig` and the finding is
+     * Provided if `include_quote` is true and the finding is
      * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
      * in length, the quote may be omitted.
      * 
@@ -809,7 +809,7 @@ public java.lang.String getQuote() { *
      * The content that was found. Even if the content is not textual, it
      * may be converted to a textual representation here.
-     * Provided if requested by the `InspectConfig` and the finding is
+     * Provided if `include_quote` is true and the finding is
      * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
      * in length, the quote may be omitted.
      * 
@@ -833,7 +833,7 @@ public java.lang.String getQuote() { *
      * The content that was found. Even if the content is not textual, it
      * may be converted to a textual representation here.
-     * Provided if requested by the `InspectConfig` and the finding is
+     * Provided if `include_quote` is true and the finding is
      * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
      * in length, the quote may be omitted.
      * 
@@ -854,7 +854,7 @@ public Builder setQuote( *
      * The content that was found. Even if the content is not textual, it
      * may be converted to a textual representation here.
-     * Provided if requested by the `InspectConfig` and the finding is
+     * Provided if `include_quote` is true and the finding is
      * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
      * in length, the quote may be omitted.
      * 
@@ -871,7 +871,7 @@ public Builder clearQuote() { *
      * The content that was found. Even if the content is not textual, it
      * may be converted to a textual representation here.
-     * Provided if requested by the `InspectConfig` and the finding is
+     * Provided if `include_quote` is true and the finding is
      * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
      * in length, the quote may be omitted.
      * 
@@ -896,7 +896,7 @@ public Builder setQuoteBytes( /** *
      * The type of content that might have been found.
-     * Provided if requested by the `InspectConfig`.
+     * Provided if `excluded_types` is false.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -907,7 +907,7 @@ public boolean hasInfoType() { /** *
      * The type of content that might have been found.
-     * Provided if requested by the `InspectConfig`.
+     * Provided if `excluded_types` is false.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -922,7 +922,7 @@ public com.google.privacy.dlp.v2.InfoType getInfoType() { /** *
      * The type of content that might have been found.
-     * Provided if requested by the `InspectConfig`.
+     * Provided if `excluded_types` is false.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -943,7 +943,7 @@ public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { /** *
      * The type of content that might have been found.
-     * Provided if requested by the `InspectConfig`.
+     * Provided if `excluded_types` is false.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -962,7 +962,7 @@ public Builder setInfoType( /** *
      * The type of content that might have been found.
-     * Provided if requested by the `InspectConfig`.
+     * Provided if `excluded_types` is false.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -985,7 +985,7 @@ public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { /** *
      * The type of content that might have been found.
-     * Provided if requested by the `InspectConfig`.
+     * Provided if `excluded_types` is false.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -1004,7 +1004,7 @@ public Builder clearInfoType() { /** *
      * The type of content that might have been found.
-     * Provided if requested by the `InspectConfig`.
+     * Provided if `excluded_types` is false.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -1017,7 +1017,7 @@ public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { /** *
      * The type of content that might have been found.
-     * Provided if requested by the `InspectConfig`.
+     * Provided if `excluded_types` is false.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -1033,7 +1033,7 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { /** *
      * The type of content that might have been found.
-     * Provided if requested by the `InspectConfig`.
+     * Provided if `excluded_types` is false.
      * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -1055,7 +1055,7 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { private int likelihood_ = 0; /** *
-     * Estimate of how likely it is that the `info_type` is correct.
+     * Confidence of how likely it is that the `info_type` is correct.
      * 
* * .google.privacy.dlp.v2.Likelihood likelihood = 3; @@ -1065,7 +1065,7 @@ public int getLikelihoodValue() { } /** *
-     * Estimate of how likely it is that the `info_type` is correct.
+     * Confidence of how likely it is that the `info_type` is correct.
      * 
* * .google.privacy.dlp.v2.Likelihood likelihood = 3; @@ -1077,7 +1077,7 @@ public Builder setLikelihoodValue(int value) { } /** *
-     * Estimate of how likely it is that the `info_type` is correct.
+     * Confidence of how likely it is that the `info_type` is correct.
      * 
* * .google.privacy.dlp.v2.Likelihood likelihood = 3; @@ -1088,7 +1088,7 @@ public com.google.privacy.dlp.v2.Likelihood getLikelihood() { } /** *
-     * Estimate of how likely it is that the `info_type` is correct.
+     * Confidence of how likely it is that the `info_type` is correct.
      * 
* * .google.privacy.dlp.v2.Likelihood likelihood = 3; @@ -1104,7 +1104,7 @@ public Builder setLikelihood(com.google.privacy.dlp.v2.Likelihood value) { } /** *
-     * Estimate of how likely it is that the `info_type` is correct.
+     * Confidence of how likely it is that the `info_type` is correct.
      * 
* * .google.privacy.dlp.v2.Likelihood likelihood = 3; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java index 4162fd08175d..a1171e204ce7 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FindingOrBuilder.java @@ -11,7 +11,7 @@ public interface FindingOrBuilder extends *
    * The content that was found. Even if the content is not textual, it
    * may be converted to a textual representation here.
-   * Provided if requested by the `InspectConfig` and the finding is
+   * Provided if `include_quote` is true and the finding is
    * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
    * in length, the quote may be omitted.
    * 
@@ -23,7 +23,7 @@ public interface FindingOrBuilder extends *
    * The content that was found. Even if the content is not textual, it
    * may be converted to a textual representation here.
-   * Provided if requested by the `InspectConfig` and the finding is
+   * Provided if `include_quote` is true and the finding is
    * less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes
    * in length, the quote may be omitted.
    * 
@@ -36,7 +36,7 @@ public interface FindingOrBuilder extends /** *
    * The type of content that might have been found.
-   * Provided if requested by the `InspectConfig`.
+   * Provided if `excluded_types` is false.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -45,7 +45,7 @@ public interface FindingOrBuilder extends /** *
    * The type of content that might have been found.
-   * Provided if requested by the `InspectConfig`.
+   * Provided if `excluded_types` is false.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -54,7 +54,7 @@ public interface FindingOrBuilder extends /** *
    * The type of content that might have been found.
-   * Provided if requested by the `InspectConfig`.
+   * Provided if `excluded_types` is false.
    * 
* * .google.privacy.dlp.v2.InfoType info_type = 2; @@ -63,7 +63,7 @@ public interface FindingOrBuilder extends /** *
-   * Estimate of how likely it is that the `info_type` is correct.
+   * Confidence of how likely it is that the `info_type` is correct.
    * 
* * .google.privacy.dlp.v2.Likelihood likelihood = 3; @@ -71,7 +71,7 @@ public interface FindingOrBuilder extends int getLikelihoodValue(); /** *
-   * Estimate of how likely it is that the `info_type` is correct.
+   * Confidence of how likely it is that the `info_type` is correct.
    * 
* * .google.privacy.dlp.v2.Likelihood likelihood = 3; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java index 89ff1a70109f..4aa774ffe7f2 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/FixedSizeBucketingConfig.java @@ -16,6 +16,7 @@ * If the bound Value type differs from the type of data * being transformed, we will first attempt converting the type of the data to * be transformed to match the type of the bound before comparing. + * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. * * * Protobuf type {@code google.privacy.dlp.v2.FixedSizeBucketingConfig} @@ -415,6 +416,7 @@ protected Builder newBuilderForType( * If the bound Value type differs from the type of data * being transformed, we will first attempt converting the type of the data to * be transformed to match the type of the bound before comparing. + * See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. * * * Protobuf type {@code google.privacy.dlp.v2.FixedSizeBucketingConfig} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java index 9be4992d43e3..2f4f6e2f7fa6 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoType.java @@ -88,7 +88,10 @@ private InfoType( private volatile java.lang.Object name_; /** *
-   * Name of the information type.
+   * Name of the information type. Either a name of your choosing when
+   * creating a CustomInfoType, or one of the names listed
+   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+   * a built-in type.
    * 
* * string name = 1; @@ -107,7 +110,10 @@ public java.lang.String getName() { } /** *
-   * Name of the information type.
+   * Name of the information type. Either a name of your choosing when
+   * creating a CustomInfoType, or one of the names listed
+   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+   * a built-in type.
    * 
* * string name = 1; @@ -416,7 +422,10 @@ public Builder mergeFrom( private java.lang.Object name_ = ""; /** *
-     * Name of the information type.
+     * Name of the information type. Either a name of your choosing when
+     * creating a CustomInfoType, or one of the names listed
+     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+     * a built-in type.
      * 
* * string name = 1; @@ -435,7 +444,10 @@ public java.lang.String getName() { } /** *
-     * Name of the information type.
+     * Name of the information type. Either a name of your choosing when
+     * creating a CustomInfoType, or one of the names listed
+     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+     * a built-in type.
      * 
* * string name = 1; @@ -455,7 +467,10 @@ public java.lang.String getName() { } /** *
-     * Name of the information type.
+     * Name of the information type. Either a name of your choosing when
+     * creating a CustomInfoType, or one of the names listed
+     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+     * a built-in type.
      * 
* * string name = 1; @@ -472,7 +487,10 @@ public Builder setName( } /** *
-     * Name of the information type.
+     * Name of the information type. Either a name of your choosing when
+     * creating a CustomInfoType, or one of the names listed
+     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+     * a built-in type.
      * 
* * string name = 1; @@ -485,7 +503,10 @@ public Builder clearName() { } /** *
-     * Name of the information type.
+     * Name of the information type. Either a name of your choosing when
+     * creating a CustomInfoType, or one of the names listed
+     * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+     * a built-in type.
      * 
* * string name = 1; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java index df78052a74ec..ae46cc7f23bc 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeOrBuilder.java @@ -9,7 +9,10 @@ public interface InfoTypeOrBuilder extends /** *
-   * Name of the information type.
+   * Name of the information type. Either a name of your choosing when
+   * creating a CustomInfoType, or one of the names listed
+   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+   * a built-in type.
    * 
* * string name = 1; @@ -17,7 +20,10 @@ public interface InfoTypeOrBuilder extends java.lang.String getName(); /** *
-   * Name of the information type.
+   * Name of the information type. Either a name of your choosing when
+   * creating a CustomInfoType, or one of the names listed
+   * at https://cloud.google.com/dlp/docs/infotypes-reference when specifying
+   * a built-in type.
    * 
* * string name = 1; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java index a1976078267f..5d0530d8e9f2 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InfoTypeTransformations.java @@ -99,8 +99,9 @@ public interface InfoTypeTransformationOrBuilder extends /** *
-     * InfoTypes to apply the transformation to. Empty list will match all
-     * available infoTypes for this transformation.
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -109,8 +110,9 @@ public interface InfoTypeTransformationOrBuilder extends getInfoTypesList(); /** *
-     * InfoTypes to apply the transformation to. Empty list will match all
-     * available infoTypes for this transformation.
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -118,8 +120,9 @@ public interface InfoTypeTransformationOrBuilder extends com.google.privacy.dlp.v2.InfoType getInfoTypes(int index); /** *
-     * InfoTypes to apply the transformation to. Empty list will match all
-     * available infoTypes for this transformation.
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -127,8 +130,9 @@ public interface InfoTypeTransformationOrBuilder extends int getInfoTypesCount(); /** *
-     * InfoTypes to apply the transformation to. Empty list will match all
-     * available infoTypes for this transformation.
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -137,8 +141,9 @@ public interface InfoTypeTransformationOrBuilder extends getInfoTypesOrBuilderList(); /** *
-     * InfoTypes to apply the transformation to. Empty list will match all
-     * available infoTypes for this transformation.
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -277,8 +282,9 @@ private InfoTypeTransformation( private java.util.List infoTypes_; /** *
-     * InfoTypes to apply the transformation to. Empty list will match all
-     * available infoTypes for this transformation.
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -288,8 +294,9 @@ public java.util.List getInfoTypesList() { } /** *
-     * InfoTypes to apply the transformation to. Empty list will match all
-     * available infoTypes for this transformation.
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -300,8 +307,9 @@ public java.util.List getInfoTypesList() { } /** *
-     * InfoTypes to apply the transformation to. Empty list will match all
-     * available infoTypes for this transformation.
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -311,8 +319,9 @@ public int getInfoTypesCount() { } /** *
-     * InfoTypes to apply the transformation to. Empty list will match all
-     * available infoTypes for this transformation.
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -322,8 +331,9 @@ public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { } /** *
-     * InfoTypes to apply the transformation to. Empty list will match all
-     * available infoTypes for this transformation.
+     * InfoTypes to apply the transformation to. An empty list will cause
+     * this transformation to apply to all findings that correspond to
+     * infoTypes that were requested in `InspectConfig`.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -740,8 +750,9 @@ private void ensureInfoTypesIsMutable() { /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -755,8 +766,9 @@ public java.util.List getInfoTypesList() { } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -770,8 +782,9 @@ public int getInfoTypesCount() { } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -785,8 +798,9 @@ public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -807,8 +821,9 @@ public Builder setInfoTypes( } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -826,8 +841,9 @@ public Builder setInfoTypes( } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -847,8 +863,9 @@ public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -869,8 +886,9 @@ public Builder addInfoTypes( } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -888,8 +906,9 @@ public Builder addInfoTypes( } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -907,8 +926,9 @@ public Builder addInfoTypes( } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -927,8 +947,9 @@ public Builder addAllInfoTypes( } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -945,8 +966,9 @@ public Builder clearInfoTypes() { } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -963,8 +985,9 @@ public Builder removeInfoTypes(int index) { } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -975,8 +998,9 @@ public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -990,8 +1014,9 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -1006,8 +1031,9 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -1018,8 +1044,9 @@ public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -1031,8 +1058,9 @@ public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( } /** *
-       * InfoTypes to apply the transformation to. Empty list will match all
-       * available infoTypes for this transformation.
+       * InfoTypes to apply the transformation to. An empty list will cause
+       * this transformation to apply to all findings that correspond to
+       * infoTypes that were requested in `InspectConfig`.
        * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java index 443424bc7366..03dc28f3aa76 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfig.java @@ -2013,7 +2013,11 @@ public com.google.privacy.dlp.v2.InspectConfig.FindingLimits getDefaultInstanceF /** *
    * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or found in documentation.
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
    * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2024,7 +2028,11 @@ public java.util.List getInfoTypesList() { /** *
    * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or found in documentation.
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
    * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2036,7 +2044,11 @@ public java.util.List getInfoTypesList() { /** *
    * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or found in documentation.
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
    * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2047,7 +2059,11 @@ public int getInfoTypesCount() { /** *
    * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or found in documentation.
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
    * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2058,7 +2074,11 @@ public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { /** *
    * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or found in documentation.
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
    * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2074,6 +2094,7 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( *
    * Only returns findings equal or above this threshold. The default is
    * POSSIBLE.
+   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
    * 
* * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; @@ -2085,6 +2106,7 @@ public int getMinLikelihoodValue() { *
    * Only returns findings equal or above this threshold. The default is
    * POSSIBLE.
+   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
    * 
* * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; @@ -2146,7 +2168,8 @@ public boolean getExcludeInfoTypes() { private java.util.List customInfoTypes_; /** *
-   * Custom infoTypes provided by the user.
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -2156,7 +2179,8 @@ public java.util.List getCustomInfoTyp } /** *
-   * Custom infoTypes provided by the user.
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -2167,7 +2191,8 @@ public java.util.List getCustomInfoTyp } /** *
-   * Custom infoTypes provided by the user.
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -2177,7 +2202,8 @@ public int getCustomInfoTypesCount() { } /** *
-   * Custom infoTypes provided by the user.
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -2187,7 +2213,8 @@ public com.google.privacy.dlp.v2.CustomInfoType getCustomInfoTypes(int index) { } /** *
-   * Custom infoTypes provided by the user.
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -2792,7 +2819,11 @@ private void ensureInfoTypesIsMutable() { /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2807,7 +2838,11 @@ public java.util.List getInfoTypesList() { /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2822,7 +2857,11 @@ public int getInfoTypesCount() { /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2837,7 +2876,11 @@ public com.google.privacy.dlp.v2.InfoType getInfoTypes(int index) { /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2859,7 +2902,11 @@ public Builder setInfoTypes( /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2878,7 +2925,11 @@ public Builder setInfoTypes( /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2899,7 +2950,11 @@ public Builder addInfoTypes(com.google.privacy.dlp.v2.InfoType value) { /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2921,7 +2976,11 @@ public Builder addInfoTypes( /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2940,7 +2999,11 @@ public Builder addInfoTypes( /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2959,7 +3022,11 @@ public Builder addInfoTypes( /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2979,7 +3046,11 @@ public Builder addAllInfoTypes( /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -2997,7 +3068,11 @@ public Builder clearInfoTypes() { /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -3015,7 +3090,11 @@ public Builder removeInfoTypes(int index) { /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -3027,7 +3106,11 @@ public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypesBuilder( /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -3042,7 +3125,11 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -3058,7 +3145,11 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -3070,7 +3161,11 @@ public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder() { /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -3083,7 +3178,11 @@ public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( /** *
      * Restricts what info_types to look for. The values must correspond to
-     * InfoType values returned by ListInfoTypes or found in documentation.
+     * InfoType values returned by ListInfoTypes or listed at
+     * https://cloud.google.com/dlp/docs/infotypes-reference.
+     * When no InfoTypes or CustomInfoTypes are specified in a request, the
+     * system may automatically choose what detectors to run. By default this may
+     * be all types, but may change over time as detectors are updated.
      * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -3112,6 +3211,7 @@ public com.google.privacy.dlp.v2.InfoType.Builder addInfoTypesBuilder( *
      * Only returns findings equal or above this threshold. The default is
      * POSSIBLE.
+     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
      * 
* * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; @@ -3123,6 +3223,7 @@ public int getMinLikelihoodValue() { *
      * Only returns findings equal or above this threshold. The default is
      * POSSIBLE.
+     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
      * 
* * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; @@ -3136,6 +3237,7 @@ public Builder setMinLikelihoodValue(int value) { *
      * Only returns findings equal or above this threshold. The default is
      * POSSIBLE.
+     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
      * 
* * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; @@ -3148,6 +3250,7 @@ public com.google.privacy.dlp.v2.Likelihood getMinLikelihood() { *
      * Only returns findings equal or above this threshold. The default is
      * POSSIBLE.
+     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
      * 
* * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; @@ -3165,6 +3268,7 @@ public Builder setMinLikelihood(com.google.privacy.dlp.v2.Likelihood value) { *
      * Only returns findings equal or above this threshold. The default is
      * POSSIBLE.
+     * See https://cloud.google.com/dlp/docs/likelihood to learn more.
      * 
* * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; @@ -3386,7 +3490,8 @@ private void ensureCustomInfoTypesIsMutable() { /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3400,7 +3505,8 @@ public java.util.List getCustomInfoTyp } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3414,7 +3520,8 @@ public int getCustomInfoTypesCount() { } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3428,7 +3535,8 @@ public com.google.privacy.dlp.v2.CustomInfoType getCustomInfoTypes(int index) { } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3449,7 +3557,8 @@ public Builder setCustomInfoTypes( } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3467,7 +3576,8 @@ public Builder setCustomInfoTypes( } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3487,7 +3597,8 @@ public Builder addCustomInfoTypes(com.google.privacy.dlp.v2.CustomInfoType value } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3508,7 +3619,8 @@ public Builder addCustomInfoTypes( } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3526,7 +3638,8 @@ public Builder addCustomInfoTypes( } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3544,7 +3657,8 @@ public Builder addCustomInfoTypes( } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3563,7 +3677,8 @@ public Builder addAllCustomInfoTypes( } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3580,7 +3695,8 @@ public Builder clearCustomInfoTypes() { } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3597,7 +3713,8 @@ public Builder removeCustomInfoTypes(int index) { } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3608,7 +3725,8 @@ public com.google.privacy.dlp.v2.CustomInfoType.Builder getCustomInfoTypesBuilde } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3622,7 +3740,8 @@ public com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder getCustomInfoTypesOrBui } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3637,7 +3756,8 @@ public com.google.privacy.dlp.v2.CustomInfoTypeOrBuilder getCustomInfoTypesOrBui } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3648,7 +3768,8 @@ public com.google.privacy.dlp.v2.CustomInfoType.Builder addCustomInfoTypesBuilde } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -3660,7 +3781,8 @@ public com.google.privacy.dlp.v2.CustomInfoType.Builder addCustomInfoTypesBuilde } /** *
-     * Custom infoTypes provided by the user.
+     * CustomInfoTypes provided by the user. See
+     * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
      * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java index eae1cf363b79..4cbfdd76de1b 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectConfigOrBuilder.java @@ -10,7 +10,11 @@ public interface InspectConfigOrBuilder extends /** *
    * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or found in documentation.
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
    * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -20,7 +24,11 @@ public interface InspectConfigOrBuilder extends /** *
    * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or found in documentation.
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
    * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -29,7 +37,11 @@ public interface InspectConfigOrBuilder extends /** *
    * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or found in documentation.
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
    * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -38,7 +50,11 @@ public interface InspectConfigOrBuilder extends /** *
    * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or found in documentation.
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
    * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -48,7 +64,11 @@ public interface InspectConfigOrBuilder extends /** *
    * Restricts what info_types to look for. The values must correspond to
-   * InfoType values returned by ListInfoTypes or found in documentation.
+   * InfoType values returned by ListInfoTypes or listed at
+   * https://cloud.google.com/dlp/docs/infotypes-reference.
+   * When no InfoTypes or CustomInfoTypes are specified in a request, the
+   * system may automatically choose what detectors to run. By default this may
+   * be all types, but may change over time as detectors are updated.
    * 
* * repeated .google.privacy.dlp.v2.InfoType info_types = 1; @@ -60,6 +80,7 @@ com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( *
    * Only returns findings equal or above this threshold. The default is
    * POSSIBLE.
+   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
    * 
* * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; @@ -69,6 +90,7 @@ com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( *
    * Only returns findings equal or above this threshold. The default is
    * POSSIBLE.
+   * See https://cloud.google.com/dlp/docs/likelihood to learn more.
    * 
* * .google.privacy.dlp.v2.Likelihood min_likelihood = 2; @@ -109,7 +131,8 @@ com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( /** *
-   * Custom infoTypes provided by the user.
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -118,7 +141,8 @@ com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( getCustomInfoTypesList(); /** *
-   * Custom infoTypes provided by the user.
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -126,7 +150,8 @@ com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( com.google.privacy.dlp.v2.CustomInfoType getCustomInfoTypes(int index); /** *
-   * Custom infoTypes provided by the user.
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -134,7 +159,8 @@ com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( int getCustomInfoTypesCount(); /** *
-   * Custom infoTypes provided by the user.
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; @@ -143,7 +169,8 @@ com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypesOrBuilder( getCustomInfoTypesOrBuilderList(); /** *
-   * Custom infoTypes provided by the user.
+   * CustomInfoTypes provided by the user. See
+   * https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more.
    * 
* * repeated .google.privacy.dlp.v2.CustomInfoType custom_info_types = 6; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java index 1b3885e8119a..7fdcb6ced79d 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/InspectTemplate.java @@ -7,7 +7,8 @@ *
  * The inspectTemplate contains a configuration (set of types of sensitive data
  * to be detected) to be used anywhere you otherwise would normally specify
- * InspectConfig.
+ * InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
+ * to learn more.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.InspectTemplate} @@ -592,7 +593,8 @@ protected Builder newBuilderForType( *
    * The inspectTemplate contains a configuration (set of types of sensitive data
    * to be detected) to be used anywhere you otherwise would normally specify
-   * InspectConfig.
+   * InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates
+   * to learn more.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.InspectTemplate} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java index e14c575d77ec..ca83b72a4066 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/JobTrigger.java @@ -6,6 +6,7 @@ /** *
  * Contains a configuration to make dlp api calls on a repeating basis.
+ * See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.JobTrigger} @@ -1808,6 +1809,7 @@ protected Builder newBuilderForType( /** *
    * Contains a configuration to make dlp api calls on a repeating basis.
+   * See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.JobTrigger} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java index 425a78ae517c..f527e31a6d2a 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Likelihood.java @@ -15,7 +15,7 @@ public enum Likelihood implements com.google.protobuf.ProtocolMessageEnum { /** *
-   * Default value; information with all likelihoods is included.
+   * Default value; same as POSSIBLE.
    * 
* * LIKELIHOOD_UNSPECIFIED = 0; @@ -58,7 +58,7 @@ public enum Likelihood /** *
-   * Default value; information with all likelihoods is included.
+   * Default value; same as POSSIBLE.
    * 
* * LIKELIHOOD_UNSPECIFIED = 0; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java index 35360460013a..1d79940fc2a1 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequest.java @@ -108,7 +108,7 @@ private ListJobTriggersRequest( private volatile java.lang.Object parent_; /** *
-   * The parent resource name, for example projects/my-project-id.
+   * The parent resource name, for example `projects/my-project-id`.
    * 
* * string parent = 1; @@ -127,7 +127,7 @@ public java.lang.String getParent() { } /** *
-   * The parent resource name, for example projects/my-project-id.
+   * The parent resource name, for example `projects/my-project-id`.
    * 
* * string parent = 1; @@ -151,8 +151,8 @@ public java.lang.String getParent() { /** *
    * Optional page token to continue retrieval. Comes from previous call
-   * to ListJobTriggers. `order_by` and `filter` should not change for
-   * subsequent calls, but can be omitted if token is specified.
+   * to ListJobTriggers. `order_by` field must not
+   * change for subsequent calls.
    * 
* * string page_token = 2; @@ -172,8 +172,8 @@ public java.lang.String getPageToken() { /** *
    * Optional page token to continue retrieval. Comes from previous call
-   * to ListJobTriggers. `order_by` and `filter` should not change for
-   * subsequent calls, but can be omitted if token is specified.
+   * to ListJobTriggers. `order_by` field must not
+   * change for subsequent calls.
    * 
* * string page_token = 2; @@ -210,15 +210,14 @@ public int getPageSize() { /** *
    * Optional comma separated list of triggeredJob fields to order by,
-   * followed by 'asc/desc' postfix, i.e.
-   * `"create_time asc,name desc,schedule_mode asc"`. This list is
-   * case-insensitive.
-   * Example: `"name asc,schedule_mode desc, status desc"`
-   * Supported filters keys and values are:
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
    * - `create_time`: corresponds to time the triggeredJob was created.
    * - `update_time`: corresponds to time the triggeredJob was last updated.
-   * - `name`: corresponds to JobTrigger's display name.
-   * - `status`: corresponds to the triggeredJob status.
+   * - `name`: corresponds to JobTrigger's name.
    * 
* * string order_by = 4; @@ -238,15 +237,14 @@ public java.lang.String getOrderBy() { /** *
    * Optional comma separated list of triggeredJob fields to order by,
-   * followed by 'asc/desc' postfix, i.e.
-   * `"create_time asc,name desc,schedule_mode asc"`. This list is
-   * case-insensitive.
-   * Example: `"name asc,schedule_mode desc, status desc"`
-   * Supported filters keys and values are:
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
    * - `create_time`: corresponds to time the triggeredJob was created.
    * - `update_time`: corresponds to time the triggeredJob was last updated.
-   * - `name`: corresponds to JobTrigger's display name.
-   * - `status`: corresponds to the triggeredJob status.
+   * - `name`: corresponds to JobTrigger's name.
    * 
* * string order_by = 4; @@ -606,7 +604,7 @@ public Builder mergeFrom( private java.lang.Object parent_ = ""; /** *
-     * The parent resource name, for example projects/my-project-id.
+     * The parent resource name, for example `projects/my-project-id`.
      * 
* * string parent = 1; @@ -625,7 +623,7 @@ public java.lang.String getParent() { } /** *
-     * The parent resource name, for example projects/my-project-id.
+     * The parent resource name, for example `projects/my-project-id`.
      * 
* * string parent = 1; @@ -645,7 +643,7 @@ public java.lang.String getParent() { } /** *
-     * The parent resource name, for example projects/my-project-id.
+     * The parent resource name, for example `projects/my-project-id`.
      * 
* * string parent = 1; @@ -662,7 +660,7 @@ public Builder setParent( } /** *
-     * The parent resource name, for example projects/my-project-id.
+     * The parent resource name, for example `projects/my-project-id`.
      * 
* * string parent = 1; @@ -675,7 +673,7 @@ public Builder clearParent() { } /** *
-     * The parent resource name, for example projects/my-project-id.
+     * The parent resource name, for example `projects/my-project-id`.
      * 
* * string parent = 1; @@ -696,8 +694,8 @@ public Builder setParentBytes( /** *
      * Optional page token to continue retrieval. Comes from previous call
-     * to ListJobTriggers. `order_by` and `filter` should not change for
-     * subsequent calls, but can be omitted if token is specified.
+     * to ListJobTriggers. `order_by` field must not
+     * change for subsequent calls.
      * 
* * string page_token = 2; @@ -717,8 +715,8 @@ public java.lang.String getPageToken() { /** *
      * Optional page token to continue retrieval. Comes from previous call
-     * to ListJobTriggers. `order_by` and `filter` should not change for
-     * subsequent calls, but can be omitted if token is specified.
+     * to ListJobTriggers. `order_by` field must not
+     * change for subsequent calls.
      * 
* * string page_token = 2; @@ -739,8 +737,8 @@ public java.lang.String getPageToken() { /** *
      * Optional page token to continue retrieval. Comes from previous call
-     * to ListJobTriggers. `order_by` and `filter` should not change for
-     * subsequent calls, but can be omitted if token is specified.
+     * to ListJobTriggers. `order_by` field must not
+     * change for subsequent calls.
      * 
* * string page_token = 2; @@ -758,8 +756,8 @@ public Builder setPageToken( /** *
      * Optional page token to continue retrieval. Comes from previous call
-     * to ListJobTriggers. `order_by` and `filter` should not change for
-     * subsequent calls, but can be omitted if token is specified.
+     * to ListJobTriggers. `order_by` field must not
+     * change for subsequent calls.
      * 
* * string page_token = 2; @@ -773,8 +771,8 @@ public Builder clearPageToken() { /** *
      * Optional page token to continue retrieval. Comes from previous call
-     * to ListJobTriggers. `order_by` and `filter` should not change for
-     * subsequent calls, but can be omitted if token is specified.
+     * to ListJobTriggers. `order_by` field must not
+     * change for subsequent calls.
      * 
* * string page_token = 2; @@ -833,15 +831,14 @@ public Builder clearPageSize() { /** *
      * Optional comma separated list of triggeredJob fields to order by,
-     * followed by 'asc/desc' postfix, i.e.
-     * `"create_time asc,name desc,schedule_mode asc"`. This list is
-     * case-insensitive.
-     * Example: `"name asc,schedule_mode desc, status desc"`
-     * Supported filters keys and values are:
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
      * - `create_time`: corresponds to time the triggeredJob was created.
      * - `update_time`: corresponds to time the triggeredJob was last updated.
-     * - `name`: corresponds to JobTrigger's display name.
-     * - `status`: corresponds to the triggeredJob status.
+     * - `name`: corresponds to JobTrigger's name.
      * 
* * string order_by = 4; @@ -861,15 +858,14 @@ public java.lang.String getOrderBy() { /** *
      * Optional comma separated list of triggeredJob fields to order by,
-     * followed by 'asc/desc' postfix, i.e.
-     * `"create_time asc,name desc,schedule_mode asc"`. This list is
-     * case-insensitive.
-     * Example: `"name asc,schedule_mode desc, status desc"`
-     * Supported filters keys and values are:
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
      * - `create_time`: corresponds to time the triggeredJob was created.
      * - `update_time`: corresponds to time the triggeredJob was last updated.
-     * - `name`: corresponds to JobTrigger's display name.
-     * - `status`: corresponds to the triggeredJob status.
+     * - `name`: corresponds to JobTrigger's name.
      * 
* * string order_by = 4; @@ -890,15 +886,14 @@ public java.lang.String getOrderBy() { /** *
      * Optional comma separated list of triggeredJob fields to order by,
-     * followed by 'asc/desc' postfix, i.e.
-     * `"create_time asc,name desc,schedule_mode asc"`. This list is
-     * case-insensitive.
-     * Example: `"name asc,schedule_mode desc, status desc"`
-     * Supported filters keys and values are:
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
      * - `create_time`: corresponds to time the triggeredJob was created.
      * - `update_time`: corresponds to time the triggeredJob was last updated.
-     * - `name`: corresponds to JobTrigger's display name.
-     * - `status`: corresponds to the triggeredJob status.
+     * - `name`: corresponds to JobTrigger's name.
      * 
* * string order_by = 4; @@ -916,15 +911,14 @@ public Builder setOrderBy( /** *
      * Optional comma separated list of triggeredJob fields to order by,
-     * followed by 'asc/desc' postfix, i.e.
-     * `"create_time asc,name desc,schedule_mode asc"`. This list is
-     * case-insensitive.
-     * Example: `"name asc,schedule_mode desc, status desc"`
-     * Supported filters keys and values are:
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
      * - `create_time`: corresponds to time the triggeredJob was created.
      * - `update_time`: corresponds to time the triggeredJob was last updated.
-     * - `name`: corresponds to JobTrigger's display name.
-     * - `status`: corresponds to the triggeredJob status.
+     * - `name`: corresponds to JobTrigger's name.
      * 
* * string order_by = 4; @@ -938,15 +932,14 @@ public Builder clearOrderBy() { /** *
      * Optional comma separated list of triggeredJob fields to order by,
-     * followed by 'asc/desc' postfix, i.e.
-     * `"create_time asc,name desc,schedule_mode asc"`. This list is
-     * case-insensitive.
-     * Example: `"name asc,schedule_mode desc, status desc"`
-     * Supported filters keys and values are:
+     * followed by `asc` or `desc` postfix. This list is case-insensitive,
+     * default sorting order is ascending, redundant space characters are
+     * insignificant.
+     * Example: `name asc,update_time, create_time desc`
+     * Supported fields are:
      * - `create_time`: corresponds to time the triggeredJob was created.
      * - `update_time`: corresponds to time the triggeredJob was last updated.
-     * - `name`: corresponds to JobTrigger's display name.
-     * - `status`: corresponds to the triggeredJob status.
+     * - `name`: corresponds to JobTrigger's name.
      * 
* * string order_by = 4; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java index a14f2cc491a6..259f9f863eb4 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ListJobTriggersRequestOrBuilder.java @@ -9,7 +9,7 @@ public interface ListJobTriggersRequestOrBuilder extends /** *
-   * The parent resource name, for example projects/my-project-id.
+   * The parent resource name, for example `projects/my-project-id`.
    * 
* * string parent = 1; @@ -17,7 +17,7 @@ public interface ListJobTriggersRequestOrBuilder extends java.lang.String getParent(); /** *
-   * The parent resource name, for example projects/my-project-id.
+   * The parent resource name, for example `projects/my-project-id`.
    * 
* * string parent = 1; @@ -28,8 +28,8 @@ public interface ListJobTriggersRequestOrBuilder extends /** *
    * Optional page token to continue retrieval. Comes from previous call
-   * to ListJobTriggers. `order_by` and `filter` should not change for
-   * subsequent calls, but can be omitted if token is specified.
+   * to ListJobTriggers. `order_by` field must not
+   * change for subsequent calls.
    * 
* * string page_token = 2; @@ -38,8 +38,8 @@ public interface ListJobTriggersRequestOrBuilder extends /** *
    * Optional page token to continue retrieval. Comes from previous call
-   * to ListJobTriggers. `order_by` and `filter` should not change for
-   * subsequent calls, but can be omitted if token is specified.
+   * to ListJobTriggers. `order_by` field must not
+   * change for subsequent calls.
    * 
* * string page_token = 2; @@ -59,15 +59,14 @@ public interface ListJobTriggersRequestOrBuilder extends /** *
    * Optional comma separated list of triggeredJob fields to order by,
-   * followed by 'asc/desc' postfix, i.e.
-   * `"create_time asc,name desc,schedule_mode asc"`. This list is
-   * case-insensitive.
-   * Example: `"name asc,schedule_mode desc, status desc"`
-   * Supported filters keys and values are:
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
    * - `create_time`: corresponds to time the triggeredJob was created.
    * - `update_time`: corresponds to time the triggeredJob was last updated.
-   * - `name`: corresponds to JobTrigger's display name.
-   * - `status`: corresponds to the triggeredJob status.
+   * - `name`: corresponds to JobTrigger's name.
    * 
* * string order_by = 4; @@ -76,15 +75,14 @@ public interface ListJobTriggersRequestOrBuilder extends /** *
    * Optional comma separated list of triggeredJob fields to order by,
-   * followed by 'asc/desc' postfix, i.e.
-   * `"create_time asc,name desc,schedule_mode asc"`. This list is
-   * case-insensitive.
-   * Example: `"name asc,schedule_mode desc, status desc"`
-   * Supported filters keys and values are:
+   * followed by `asc` or `desc` postfix. This list is case-insensitive,
+   * default sorting order is ascending, redundant space characters are
+   * insignificant.
+   * Example: `name asc,update_time, create_time desc`
+   * Supported fields are:
    * - `create_time`: corresponds to time the triggeredJob was created.
    * - `update_time`: corresponds to time the triggeredJob was last updated.
-   * - `name`: corresponds to JobTrigger's display name.
-   * - `status`: corresponds to the triggeredJob status.
+   * - `name`: corresponds to JobTrigger's name.
    * 
* * string order_by = 4; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java index 28757a9488d4..2048c3fbd079 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfig.java @@ -318,11 +318,17 @@ public int getNumber() { /** *
    * Store findings in an existing table or a new table in an existing
-   * dataset. Each column in an existing table must have the same name, type,
-   * and mode of a field in the `Finding` object. If table_id is not set a new
-   * one will be generated for you with the following format:
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
    * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
    * generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
    * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -333,11 +339,17 @@ public boolean hasTable() { /** *
    * Store findings in an existing table or a new table in an existing
-   * dataset. Each column in an existing table must have the same name, type,
-   * and mode of a field in the `Finding` object. If table_id is not set a new
-   * one will be generated for you with the following format:
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
    * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
    * generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
    * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -351,11 +363,17 @@ public com.google.privacy.dlp.v2.BigQueryTable getTable() { /** *
    * Store findings in an existing table or a new table in an existing
-   * dataset. Each column in an existing table must have the same name, type,
-   * and mode of a field in the `Finding` object. If table_id is not set a new
-   * one will be generated for you with the following format:
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
    * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
    * generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
    * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -371,10 +389,11 @@ public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { private int outputSchema_; /** *
-   * Schema used for writing the findings. Columns are derived from the
-   * `Finding` object. If appending to an existing table, any columns from the
-   * predefined schema that are missing will be added. No columns in the
-   * existing table will be deleted.
+   * Schema used for writing the findings for Inspect jobs. This field is only
+   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+   * from the `Finding` object. If appending to an existing table, any columns
+   * from the predefined schema that are missing will be added. No columns in
+   * the existing table will be deleted.
    * If unspecified, then all available columns will be used for a new table,
    * and no changes will be made to an existing table.
    * 
@@ -386,10 +405,11 @@ public int getOutputSchemaValue() { } /** *
-   * Schema used for writing the findings. Columns are derived from the
-   * `Finding` object. If appending to an existing table, any columns from the
-   * predefined schema that are missing will be added. No columns in the
-   * existing table will be deleted.
+   * Schema used for writing the findings for Inspect jobs. This field is only
+   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+   * from the `Finding` object. If appending to an existing table, any columns
+   * from the predefined schema that are missing will be added. No columns in
+   * the existing table will be deleted.
    * If unspecified, then all available columns will be used for a new table,
    * and no changes will be made to an existing table.
    * 
@@ -752,11 +772,17 @@ public Builder clearType() { /** *
      * Store findings in an existing table or a new table in an existing
-     * dataset. Each column in an existing table must have the same name, type,
-     * and mode of a field in the `Finding` object. If table_id is not set a new
-     * one will be generated for you with the following format:
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
      * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
      * generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
      * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -767,11 +793,17 @@ public boolean hasTable() { /** *
      * Store findings in an existing table or a new table in an existing
-     * dataset. Each column in an existing table must have the same name, type,
-     * and mode of a field in the `Finding` object. If table_id is not set a new
-     * one will be generated for you with the following format:
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
      * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
      * generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
      * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -792,11 +824,17 @@ public com.google.privacy.dlp.v2.BigQueryTable getTable() { /** *
      * Store findings in an existing table or a new table in an existing
-     * dataset. Each column in an existing table must have the same name, type,
-     * and mode of a field in the `Finding` object. If table_id is not set a new
-     * one will be generated for you with the following format:
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
      * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
      * generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
      * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -817,11 +855,17 @@ public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { /** *
      * Store findings in an existing table or a new table in an existing
-     * dataset. Each column in an existing table must have the same name, type,
-     * and mode of a field in the `Finding` object. If table_id is not set a new
-     * one will be generated for you with the following format:
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
      * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
      * generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
      * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -840,11 +884,17 @@ public Builder setTable( /** *
      * Store findings in an existing table or a new table in an existing
-     * dataset. Each column in an existing table must have the same name, type,
-     * and mode of a field in the `Finding` object. If table_id is not set a new
-     * one will be generated for you with the following format:
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
      * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
      * generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
      * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -871,11 +921,17 @@ public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { /** *
      * Store findings in an existing table or a new table in an existing
-     * dataset. Each column in an existing table must have the same name, type,
-     * and mode of a field in the `Finding` object. If table_id is not set a new
-     * one will be generated for you with the following format:
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
      * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
      * generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
      * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -899,11 +955,17 @@ public Builder clearTable() { /** *
      * Store findings in an existing table or a new table in an existing
-     * dataset. Each column in an existing table must have the same name, type,
-     * and mode of a field in the `Finding` object. If table_id is not set a new
-     * one will be generated for you with the following format:
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
      * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
      * generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
      * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -914,11 +976,17 @@ public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { /** *
      * Store findings in an existing table or a new table in an existing
-     * dataset. Each column in an existing table must have the same name, type,
-     * and mode of a field in the `Finding` object. If table_id is not set a new
-     * one will be generated for you with the following format:
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
      * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
      * generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
      * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -936,11 +1004,17 @@ public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { /** *
      * Store findings in an existing table or a new table in an existing
-     * dataset. Each column in an existing table must have the same name, type,
-     * and mode of a field in the `Finding` object. If table_id is not set a new
-     * one will be generated for you with the following format:
+     * dataset. If table_id is not set a new one will be generated
+     * for you with the following format:
      * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
      * generating the date details.
+     * For Inspect, each column in an existing output table must have the same
+     * name, type, and mode of a field in the `Finding` object.
+     * For Risk, an existing output table should be the output of a previous
+     * Risk analysis job run on the same source table, with the same privacy
+     * metric and quasi-identifiers. Risk jobs that analyze the same table but
+     * compute a different privacy metric, or use different sets of
+     * quasi-identifiers, cannot store their results in the same table.
      * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -967,10 +1041,11 @@ public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { private int outputSchema_ = 0; /** *
-     * Schema used for writing the findings. Columns are derived from the
-     * `Finding` object. If appending to an existing table, any columns from the
-     * predefined schema that are missing will be added. No columns in the
-     * existing table will be deleted.
+     * Schema used for writing the findings for Inspect jobs. This field is only
+     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+     * from the `Finding` object. If appending to an existing table, any columns
+     * from the predefined schema that are missing will be added. No columns in
+     * the existing table will be deleted.
      * If unspecified, then all available columns will be used for a new table,
      * and no changes will be made to an existing table.
      * 
@@ -982,10 +1057,11 @@ public int getOutputSchemaValue() { } /** *
-     * Schema used for writing the findings. Columns are derived from the
-     * `Finding` object. If appending to an existing table, any columns from the
-     * predefined schema that are missing will be added. No columns in the
-     * existing table will be deleted.
+     * Schema used for writing the findings for Inspect jobs. This field is only
+     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+     * from the `Finding` object. If appending to an existing table, any columns
+     * from the predefined schema that are missing will be added. No columns in
+     * the existing table will be deleted.
      * If unspecified, then all available columns will be used for a new table,
      * and no changes will be made to an existing table.
      * 
@@ -999,10 +1075,11 @@ public Builder setOutputSchemaValue(int value) { } /** *
-     * Schema used for writing the findings. Columns are derived from the
-     * `Finding` object. If appending to an existing table, any columns from the
-     * predefined schema that are missing will be added. No columns in the
-     * existing table will be deleted.
+     * Schema used for writing the findings for Inspect jobs. This field is only
+     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+     * from the `Finding` object. If appending to an existing table, any columns
+     * from the predefined schema that are missing will be added. No columns in
+     * the existing table will be deleted.
      * If unspecified, then all available columns will be used for a new table,
      * and no changes will be made to an existing table.
      * 
@@ -1015,10 +1092,11 @@ public com.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema getOutputSchem } /** *
-     * Schema used for writing the findings. Columns are derived from the
-     * `Finding` object. If appending to an existing table, any columns from the
-     * predefined schema that are missing will be added. No columns in the
-     * existing table will be deleted.
+     * Schema used for writing the findings for Inspect jobs. This field is only
+     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+     * from the `Finding` object. If appending to an existing table, any columns
+     * from the predefined schema that are missing will be added. No columns in
+     * the existing table will be deleted.
      * If unspecified, then all available columns will be used for a new table,
      * and no changes will be made to an existing table.
      * 
@@ -1036,10 +1114,11 @@ public Builder setOutputSchema(com.google.privacy.dlp.v2.OutputStorageConfig.Out } /** *
-     * Schema used for writing the findings. Columns are derived from the
-     * `Finding` object. If appending to an existing table, any columns from the
-     * predefined schema that are missing will be added. No columns in the
-     * existing table will be deleted.
+     * Schema used for writing the findings for Inspect jobs. This field is only
+     * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+     * from the `Finding` object. If appending to an existing table, any columns
+     * from the predefined schema that are missing will be added. No columns in
+     * the existing table will be deleted.
      * If unspecified, then all available columns will be used for a new table,
      * and no changes will be made to an existing table.
      * 
diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java index 81e3784b32d8..e2a3d29c4d65 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/OutputStorageConfigOrBuilder.java @@ -10,11 +10,17 @@ public interface OutputStorageConfigOrBuilder extends /** *
    * Store findings in an existing table or a new table in an existing
-   * dataset. Each column in an existing table must have the same name, type,
-   * and mode of a field in the `Finding` object. If table_id is not set a new
-   * one will be generated for you with the following format:
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
    * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
    * generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
    * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -23,11 +29,17 @@ public interface OutputStorageConfigOrBuilder extends /** *
    * Store findings in an existing table or a new table in an existing
-   * dataset. Each column in an existing table must have the same name, type,
-   * and mode of a field in the `Finding` object. If table_id is not set a new
-   * one will be generated for you with the following format:
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
    * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
    * generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
    * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -36,11 +48,17 @@ public interface OutputStorageConfigOrBuilder extends /** *
    * Store findings in an existing table or a new table in an existing
-   * dataset. Each column in an existing table must have the same name, type,
-   * and mode of a field in the `Finding` object. If table_id is not set a new
-   * one will be generated for you with the following format:
+   * dataset. If table_id is not set a new one will be generated
+   * for you with the following format:
    * dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for
    * generating the date details.
+   * For Inspect, each column in an existing output table must have the same
+   * name, type, and mode of a field in the `Finding` object.
+   * For Risk, an existing output table should be the output of a previous
+   * Risk analysis job run on the same source table, with the same privacy
+   * metric and quasi-identifiers. Risk jobs that analyze the same table but
+   * compute a different privacy metric, or use different sets of
+   * quasi-identifiers, cannot store their results in the same table.
    * 
* * .google.privacy.dlp.v2.BigQueryTable table = 1; @@ -49,10 +67,11 @@ public interface OutputStorageConfigOrBuilder extends /** *
-   * Schema used for writing the findings. Columns are derived from the
-   * `Finding` object. If appending to an existing table, any columns from the
-   * predefined schema that are missing will be added. No columns in the
-   * existing table will be deleted.
+   * Schema used for writing the findings for Inspect jobs. This field is only
+   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+   * from the `Finding` object. If appending to an existing table, any columns
+   * from the predefined schema that are missing will be added. No columns in
+   * the existing table will be deleted.
    * If unspecified, then all available columns will be used for a new table,
    * and no changes will be made to an existing table.
    * 
@@ -62,10 +81,11 @@ public interface OutputStorageConfigOrBuilder extends int getOutputSchemaValue(); /** *
-   * Schema used for writing the findings. Columns are derived from the
-   * `Finding` object. If appending to an existing table, any columns from the
-   * predefined schema that are missing will be added. No columns in the
-   * existing table will be deleted.
+   * Schema used for writing the findings for Inspect jobs. This field is only
+   * used for Inspect and must be unspecified for Risk jobs. Columns are derived
+   * from the `Finding` object. If appending to an existing table, any columns
+   * from the predefined schema that are missing will be added. No columns in
+   * the existing table will be deleted.
    * If unspecified, then all available columns will be used for a new table,
    * and no changes will be made to an existing table.
    * 
diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java index 891f3ac385fc..b55ac6ffc518 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetric.java @@ -123,6 +123,20 @@ private PrivacyMetric( typeCase_ = 5; break; } + case 50: { + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder subBuilder = null; + if (typeCase_ == 6) { + subBuilder = ((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_).toBuilder(); + } + type_ = + input.readMessage(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_); + type_ = subBuilder.buildPartial(); + } + typeCase_ = 6; + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -9431,131 +9445,1773 @@ public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig getDefaultIn } - private int typeCase_ = 0; - private java.lang.Object type_; - public enum TypeCase - implements com.google.protobuf.Internal.EnumLite { - NUMERICAL_STATS_CONFIG(1), - CATEGORICAL_STATS_CONFIG(2), - K_ANONYMITY_CONFIG(3), - L_DIVERSITY_CONFIG(4), - K_MAP_ESTIMATION_CONFIG(5), - TYPE_NOT_SET(0); - private final int value; - private TypeCase(int value) { - this.value = value; - } + public interface DeltaPresenceEstimationConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) + com.google.protobuf.MessageOrBuilder { + /** - * @deprecated Use {@link #forNumber(int)} instead. + *
+     * Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; */ - @java.lang.Deprecated - public static TypeCase valueOf(int value) { - return forNumber(value); - } - - public static TypeCase forNumber(int value) { - switch (value) { - case 1: return NUMERICAL_STATS_CONFIG; - case 2: return CATEGORICAL_STATS_CONFIG; - case 3: return K_ANONYMITY_CONFIG; - case 4: return L_DIVERSITY_CONFIG; - case 5: return K_MAP_ESTIMATION_CONFIG; - case 0: return TYPE_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public TypeCase - getTypeCase() { - return TypeCase.forNumber( - typeCase_); - } + java.util.List + getQuasiIdsList(); + /** + *
+     * Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + com.google.privacy.dlp.v2.QuasiId getQuasiIds(int index); + /** + *
+     * Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + int getQuasiIdsCount(); + /** + *
+     * Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + java.util.List + getQuasiIdsOrBuilderList(); + /** + *
+     * Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + com.google.privacy.dlp.v2.QuasiIdOrBuilder getQuasiIdsOrBuilder( + int index); - public static final int NUMERICAL_STATS_CONFIG_FIELD_NUMBER = 1; - /** - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - public boolean hasNumericalStatsConfig() { - return typeCase_ == 1; - } - /** - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getNumericalStatsConfig() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); - } - /** - * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder getNumericalStatsConfigOrBuilder() { - if (typeCase_ == 1) { - return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); - } + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Required if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + */ + java.lang.String getRegionCode(); + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Required if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + */ + com.google.protobuf.ByteString + getRegionCodeBytes(); - public static final int CATEGORICAL_STATS_CONFIG_FIELD_NUMBER = 2; - /** - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - */ - public boolean hasCategoricalStatsConfig() { - return typeCase_ == 2; + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + java.util.List + getAuxiliaryTablesList(); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + com.google.privacy.dlp.v2.StatisticalTable getAuxiliaryTables(int index); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + int getAuxiliaryTablesCount(); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + java.util.List + getAuxiliaryTablesOrBuilderList(); + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + com.google.privacy.dlp.v2.StatisticalTableOrBuilder getAuxiliaryTablesOrBuilder( + int index); } /** - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + *
+   * δ-presence metric, used to estimate how likely it is for an attacker to
+   * figure out that one given individual appears in a de-identified dataset.
+   * Similarly to the k-map metric, we cannot compute δ-presence exactly without
+   * knowing the attack dataset, so we use a statistical model instead.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig} */ - public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getCategoricalStatsConfig() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; + public static final class DeltaPresenceEstimationConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) + DeltaPresenceEstimationConfigOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeltaPresenceEstimationConfig.newBuilder() to construct. + private DeltaPresenceEstimationConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); } - return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); - } - /** - * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder getCategoricalStatsConfigOrBuilder() { - if (typeCase_ == 2) { - return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; + private DeltaPresenceEstimationConfig() { + quasiIds_ = java.util.Collections.emptyList(); + regionCode_ = ""; + auxiliaryTables_ = java.util.Collections.emptyList(); } - return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); - } - public static final int K_ANONYMITY_CONFIG_FIELD_NUMBER = 3; - /** - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - public boolean hasKAnonymityConfig() { - return typeCase_ == 3; - } - /** - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getKAnonymityConfig() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; - } - return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); - } - /** - * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; - */ - public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder getKAnonymityConfigOrBuilder() { - if (typeCase_ == 3) { - return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; } - return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); - } + private DeltaPresenceEstimationConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + quasiIds_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + quasiIds_.add( + input.readMessage(com.google.privacy.dlp.v2.QuasiId.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); - public static final int L_DIVERSITY_CONFIG_FIELD_NUMBER = 4; - /** - * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; + regionCode_ = s; + break; + } + case 26: { + if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + auxiliaryTables_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + auxiliaryTables_.add( + input.readMessage(com.google.privacy.dlp.v2.StatisticalTable.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + } + if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + auxiliaryTables_ = java.util.Collections.unmodifiableList(auxiliaryTables_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder.class); + } + + private int bitField0_; + public static final int QUASI_IDS_FIELD_NUMBER = 1; + private java.util.List quasiIds_; + /** + *
+     * Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public java.util.List getQuasiIdsList() { + return quasiIds_; + } + /** + *
+     * Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public java.util.List + getQuasiIdsOrBuilderList() { + return quasiIds_; + } + /** + *
+     * Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public int getQuasiIdsCount() { + return quasiIds_.size(); + } + /** + *
+     * Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.QuasiId getQuasiIds(int index) { + return quasiIds_.get(index); + } + /** + *
+     * Fields considered to be quasi-identifiers. No two fields can have the
+     * same tag. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.QuasiIdOrBuilder getQuasiIdsOrBuilder( + int index) { + return quasiIds_.get(index); + } + + public static final int REGION_CODE_FIELD_NUMBER = 2; + private volatile java.lang.Object regionCode_; + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Required if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + 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(); + regionCode_ = s; + return s; + } + } + /** + *
+     * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+     * Required if no column is tagged with a region-specific InfoType (like
+     * US_ZIP_5) or a region code.
+     * 
+ * + * string region_code = 2; + */ + public com.google.protobuf.ByteString + getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUXILIARY_TABLES_FIELD_NUMBER = 3; + private java.util.List auxiliaryTables_; + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public java.util.List getAuxiliaryTablesList() { + return auxiliaryTables_; + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public java.util.List + getAuxiliaryTablesOrBuilderList() { + return auxiliaryTables_; + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public int getAuxiliaryTablesCount() { + return auxiliaryTables_.size(); + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTable getAuxiliaryTables(int index) { + return auxiliaryTables_.get(index); + } + /** + *
+     * Several auxiliary tables can be used in the analysis. Each custom_tag
+     * used to tag a quasi-identifiers field must appear in exactly one
+     * field of one auxiliary table.
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTableOrBuilder getAuxiliaryTablesOrBuilder( + int index) { + return auxiliaryTables_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIds_.size(); i++) { + output.writeMessage(1, quasiIds_.get(i)); + } + if (!getRegionCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, regionCode_); + } + for (int i = 0; i < auxiliaryTables_.size(); i++) { + output.writeMessage(3, auxiliaryTables_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIds_.get(i)); + } + if (!getRegionCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, regionCode_); + } + for (int i = 0; i < auxiliaryTables_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, auxiliaryTables_.get(i)); + } + size += unknownFields.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.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig other = (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) obj; + + boolean result = true; + result = result && getQuasiIdsList() + .equals(other.getQuasiIdsList()); + result = result && getRegionCode() + .equals(other.getRegionCode()); + result = result && getAuxiliaryTablesList() + .equals(other.getAuxiliaryTablesList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQuasiIdsCount() > 0) { + hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsList().hashCode(); + } + hash = (37 * hash) + REGION_CODE_FIELD_NUMBER; + hash = (53 * hash) + getRegionCode().hashCode(); + if (getAuxiliaryTablesCount() > 0) { + hash = (37 * hash) + AUXILIARY_TABLES_FIELD_NUMBER; + hash = (53 * hash) + getAuxiliaryTablesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig 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.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig 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.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig 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.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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; + } + /** + *
+     * δ-presence metric, used to estimate how likely it is for an attacker to
+     * figure out that one given individual appears in a de-identified dataset.
+     * Similarly to the k-map metric, we cannot compute δ-presence exactly without
+     * knowing the attack dataset, so we use a statistical model instead.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.class, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsFieldBuilder(); + getAuxiliaryTablesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + quasiIdsBuilder_.clear(); + } + regionCode_ = ""; + + if (auxiliaryTablesBuilder_ == null) { + auxiliaryTables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + auxiliaryTablesBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_PrivacyMetric_DeltaPresenceEstimationConfig_descriptor; + } + + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig build() { + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig buildPartial() { + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig result = new com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (quasiIdsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.quasiIds_ = quasiIds_; + } else { + result.quasiIds_ = quasiIdsBuilder_.build(); + } + result.regionCode_ = regionCode_; + if (auxiliaryTablesBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004)) { + auxiliaryTables_ = java.util.Collections.unmodifiableList(auxiliaryTables_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.auxiliaryTables_ = auxiliaryTables_; + } else { + result.auxiliaryTables_ = auxiliaryTablesBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) { + return mergeFrom((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig other) { + if (other == com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance()) return this; + if (quasiIdsBuilder_ == null) { + if (!other.quasiIds_.isEmpty()) { + if (quasiIds_.isEmpty()) { + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQuasiIdsIsMutable(); + quasiIds_.addAll(other.quasiIds_); + } + onChanged(); + } + } else { + if (!other.quasiIds_.isEmpty()) { + if (quasiIdsBuilder_.isEmpty()) { + quasiIdsBuilder_.dispose(); + quasiIdsBuilder_ = null; + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000001); + quasiIdsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsFieldBuilder() : null; + } else { + quasiIdsBuilder_.addAllMessages(other.quasiIds_); + } + } + } + if (!other.getRegionCode().isEmpty()) { + regionCode_ = other.regionCode_; + onChanged(); + } + if (auxiliaryTablesBuilder_ == null) { + if (!other.auxiliaryTables_.isEmpty()) { + if (auxiliaryTables_.isEmpty()) { + auxiliaryTables_ = other.auxiliaryTables_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.addAll(other.auxiliaryTables_); + } + onChanged(); + } + } else { + if (!other.auxiliaryTables_.isEmpty()) { + if (auxiliaryTablesBuilder_.isEmpty()) { + auxiliaryTablesBuilder_.dispose(); + auxiliaryTablesBuilder_ = null; + auxiliaryTables_ = other.auxiliaryTables_; + bitField0_ = (bitField0_ & ~0x00000004); + auxiliaryTablesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAuxiliaryTablesFieldBuilder() : null; + } else { + auxiliaryTablesBuilder_.addAllMessages(other.auxiliaryTables_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List quasiIds_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + quasiIds_ = new java.util.ArrayList(quasiIds_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.QuasiId, com.google.privacy.dlp.v2.QuasiId.Builder, com.google.privacy.dlp.v2.QuasiIdOrBuilder> quasiIdsBuilder_; + + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public java.util.List getQuasiIdsList() { + if (quasiIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIds_); + } else { + return quasiIdsBuilder_.getMessageList(); + } + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public int getQuasiIdsCount() { + if (quasiIdsBuilder_ == null) { + return quasiIds_.size(); + } else { + return quasiIdsBuilder_.getCount(); + } + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.QuasiId getQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); + } else { + return quasiIdsBuilder_.getMessage(index); + } + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.QuasiId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, value); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.QuasiId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public Builder addQuasiIds(com.google.privacy.dlp.v2.QuasiId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.QuasiId value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public Builder addQuasiIds( + com.google.privacy.dlp.v2.QuasiId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.QuasiId.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public Builder addAllQuasiIds( + java.lang.Iterable values) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIds_); + onChanged(); + } else { + quasiIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public Builder clearQuasiIds() { + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + quasiIdsBuilder_.clear(); + } + return this; + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public Builder removeQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.remove(index); + onChanged(); + } else { + quasiIdsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.QuasiId.Builder getQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().getBuilder(index); + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.QuasiIdOrBuilder getQuasiIdsOrBuilder( + int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); } else { + return quasiIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public java.util.List + getQuasiIdsOrBuilderList() { + if (quasiIdsBuilder_ != null) { + return quasiIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIds_); + } + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.QuasiId.Builder addQuasiIdsBuilder() { + return getQuasiIdsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.QuasiId.getDefaultInstance()); + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.QuasiId.Builder addQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.QuasiId.getDefaultInstance()); + } + /** + *
+       * Fields considered to be quasi-identifiers. No two fields can have the
+       * same tag. [required]
+       * 
+ * + * repeated .google.privacy.dlp.v2.QuasiId quasi_ids = 1; + */ + public java.util.List + getQuasiIdsBuilderList() { + return getQuasiIdsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.QuasiId, com.google.privacy.dlp.v2.QuasiId.Builder, com.google.privacy.dlp.v2.QuasiIdOrBuilder> + getQuasiIdsFieldBuilder() { + if (quasiIdsBuilder_ == null) { + quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.QuasiId, com.google.privacy.dlp.v2.QuasiId.Builder, com.google.privacy.dlp.v2.QuasiIdOrBuilder>( + quasiIds_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + quasiIds_ = null; + } + return quasiIdsBuilder_; + } + + private java.lang.Object regionCode_ = ""; + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Required if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + */ + public java.lang.String getRegionCode() { + java.lang.Object ref = regionCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + regionCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Required if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + */ + public com.google.protobuf.ByteString + getRegionCodeBytes() { + java.lang.Object ref = regionCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + regionCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Required if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + */ + public Builder setRegionCode( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + regionCode_ = value; + onChanged(); + return this; + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Required if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + */ + public Builder clearRegionCode() { + + regionCode_ = getDefaultInstance().getRegionCode(); + onChanged(); + return this; + } + /** + *
+       * ISO 3166-1 alpha-2 region code to use in the statistical modeling.
+       * Required if no column is tagged with a region-specific InfoType (like
+       * US_ZIP_5) or a region code.
+       * 
+ * + * string region_code = 2; + */ + public Builder setRegionCodeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + regionCode_ = value; + onChanged(); + return this; + } + + private java.util.List auxiliaryTables_ = + java.util.Collections.emptyList(); + private void ensureAuxiliaryTablesIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + auxiliaryTables_ = new java.util.ArrayList(auxiliaryTables_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable, com.google.privacy.dlp.v2.StatisticalTable.Builder, com.google.privacy.dlp.v2.StatisticalTableOrBuilder> auxiliaryTablesBuilder_; + + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public java.util.List getAuxiliaryTablesList() { + if (auxiliaryTablesBuilder_ == null) { + return java.util.Collections.unmodifiableList(auxiliaryTables_); + } else { + return auxiliaryTablesBuilder_.getMessageList(); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public int getAuxiliaryTablesCount() { + if (auxiliaryTablesBuilder_ == null) { + return auxiliaryTables_.size(); + } else { + return auxiliaryTablesBuilder_.getCount(); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTable getAuxiliaryTables(int index) { + if (auxiliaryTablesBuilder_ == null) { + return auxiliaryTables_.get(index); + } else { + return auxiliaryTablesBuilder_.getMessage(index); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder setAuxiliaryTables( + int index, com.google.privacy.dlp.v2.StatisticalTable value) { + if (auxiliaryTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.set(index, value); + onChanged(); + } else { + auxiliaryTablesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder setAuxiliaryTables( + int index, com.google.privacy.dlp.v2.StatisticalTable.Builder builderForValue) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.set(index, builderForValue.build()); + onChanged(); + } else { + auxiliaryTablesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables(com.google.privacy.dlp.v2.StatisticalTable value) { + if (auxiliaryTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(value); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(value); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables( + int index, com.google.privacy.dlp.v2.StatisticalTable value) { + if (auxiliaryTablesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(index, value); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables( + com.google.privacy.dlp.v2.StatisticalTable.Builder builderForValue) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(builderForValue.build()); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder addAuxiliaryTables( + int index, com.google.privacy.dlp.v2.StatisticalTable.Builder builderForValue) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.add(index, builderForValue.build()); + onChanged(); + } else { + auxiliaryTablesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder addAllAuxiliaryTables( + java.lang.Iterable values) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, auxiliaryTables_); + onChanged(); + } else { + auxiliaryTablesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder clearAuxiliaryTables() { + if (auxiliaryTablesBuilder_ == null) { + auxiliaryTables_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + auxiliaryTablesBuilder_.clear(); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public Builder removeAuxiliaryTables(int index) { + if (auxiliaryTablesBuilder_ == null) { + ensureAuxiliaryTablesIsMutable(); + auxiliaryTables_.remove(index); + onChanged(); + } else { + auxiliaryTablesBuilder_.remove(index); + } + return this; + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTable.Builder getAuxiliaryTablesBuilder( + int index) { + return getAuxiliaryTablesFieldBuilder().getBuilder(index); + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTableOrBuilder getAuxiliaryTablesOrBuilder( + int index) { + if (auxiliaryTablesBuilder_ == null) { + return auxiliaryTables_.get(index); } else { + return auxiliaryTablesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public java.util.List + getAuxiliaryTablesOrBuilderList() { + if (auxiliaryTablesBuilder_ != null) { + return auxiliaryTablesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(auxiliaryTables_); + } + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTable.Builder addAuxiliaryTablesBuilder() { + return getAuxiliaryTablesFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance()); + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public com.google.privacy.dlp.v2.StatisticalTable.Builder addAuxiliaryTablesBuilder( + int index) { + return getAuxiliaryTablesFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance()); + } + /** + *
+       * Several auxiliary tables can be used in the analysis. Each custom_tag
+       * used to tag a quasi-identifiers field must appear in exactly one
+       * field of one auxiliary table.
+       * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable auxiliary_tables = 3; + */ + public java.util.List + getAuxiliaryTablesBuilderList() { + return getAuxiliaryTablesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable, com.google.privacy.dlp.v2.StatisticalTable.Builder, com.google.privacy.dlp.v2.StatisticalTableOrBuilder> + getAuxiliaryTablesFieldBuilder() { + if (auxiliaryTablesBuilder_ == null) { + auxiliaryTablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable, com.google.privacy.dlp.v2.StatisticalTable.Builder, com.google.privacy.dlp.v2.StatisticalTableOrBuilder>( + auxiliaryTables_, + ((bitField0_ & 0x00000004) == 0x00000004), + getParentForChildren(), + isClean()); + auxiliaryTables_ = null; + } + return auxiliaryTablesBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) + private static final com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig(); + } + + public static com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeltaPresenceEstimationConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeltaPresenceEstimationConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int typeCase_ = 0; + private java.lang.Object type_; + public enum TypeCase + implements com.google.protobuf.Internal.EnumLite { + NUMERICAL_STATS_CONFIG(1), + CATEGORICAL_STATS_CONFIG(2), + K_ANONYMITY_CONFIG(3), + L_DIVERSITY_CONFIG(4), + K_MAP_ESTIMATION_CONFIG(5), + DELTA_PRESENCE_ESTIMATION_CONFIG(6), + TYPE_NOT_SET(0); + private final int value; + private TypeCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TypeCase valueOf(int value) { + return forNumber(value); + } + + public static TypeCase forNumber(int value) { + switch (value) { + case 1: return NUMERICAL_STATS_CONFIG; + case 2: return CATEGORICAL_STATS_CONFIG; + case 3: return K_ANONYMITY_CONFIG; + case 4: return L_DIVERSITY_CONFIG; + case 5: return K_MAP_ESTIMATION_CONFIG; + case 6: return DELTA_PRESENCE_ESTIMATION_CONFIG; + case 0: return TYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TypeCase + getTypeCase() { + return TypeCase.forNumber( + typeCase_); + } + + public static final int NUMERICAL_STATS_CONFIG_FIELD_NUMBER = 1; + /** + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + public boolean hasNumericalStatsConfig() { + return typeCase_ == 1; + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig getNumericalStatsConfig() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig numerical_stats_config = 1; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfigOrBuilder getNumericalStatsConfigOrBuilder() { + if (typeCase_ == 1) { + return (com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.getDefaultInstance(); + } + + public static final int CATEGORICAL_STATS_CONFIG_FIELD_NUMBER = 2; + /** + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + public boolean hasCategoricalStatsConfig() { + return typeCase_ == 2; + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig getCategoricalStatsConfig() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig categorical_stats_config = 2; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfigOrBuilder getCategoricalStatsConfigOrBuilder() { + if (typeCase_ == 2) { + return (com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.getDefaultInstance(); + } + + public static final int K_ANONYMITY_CONFIG_FIELD_NUMBER = 3; + /** + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + public boolean hasKAnonymityConfig() { + return typeCase_ == 3; + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig getKAnonymityConfig() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig k_anonymity_config = 3; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfigOrBuilder getKAnonymityConfigOrBuilder() { + if (typeCase_ == 3) { + return (com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.getDefaultInstance(); + } + + public static final int L_DIVERSITY_CONFIG_FIELD_NUMBER = 4; + /** + * .google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig l_diversity_config = 4; */ public boolean hasLDiversityConfig() { return typeCase_ == 4; @@ -9605,6 +11261,32 @@ public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder get return com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.getDefaultInstance(); } + public static final int DELTA_PRESENCE_ESTIMATION_CONFIG_FIELD_NUMBER = 6; + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public boolean hasDeltaPresenceEstimationConfig() { + return typeCase_ == 6; + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDeltaPresenceEstimationConfig() { + if (typeCase_ == 6) { + return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder getDeltaPresenceEstimationConfigOrBuilder() { + if (typeCase_ == 6) { + return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -9632,6 +11314,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (typeCase_ == 5) { output.writeMessage(5, (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_); } + if (typeCase_ == 6) { + output.writeMessage(6, (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_); + } unknownFields.writeTo(output); } @@ -9660,6 +11345,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) type_); } + if (typeCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -9700,6 +11389,10 @@ public boolean equals(final java.lang.Object obj) { result = result && getKMapEstimationConfig() .equals(other.getKMapEstimationConfig()); break; + case 6: + result = result && getDeltaPresenceEstimationConfig() + .equals(other.getDeltaPresenceEstimationConfig()); + break; case 0: default: } @@ -9735,6 +11428,10 @@ public int hashCode() { hash = (37 * hash) + K_MAP_ESTIMATION_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getKMapEstimationConfig().hashCode(); break; + case 6: + hash = (37 * hash) + DELTA_PRESENCE_ESTIMATION_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getDeltaPresenceEstimationConfig().hashCode(); + break; case 0: default: } @@ -9930,6 +11627,13 @@ public com.google.privacy.dlp.v2.PrivacyMetric buildPartial() { result.type_ = kMapEstimationConfigBuilder_.build(); } } + if (typeCase_ == 6) { + if (deltaPresenceEstimationConfigBuilder_ == null) { + result.type_ = type_; + } else { + result.type_ = deltaPresenceEstimationConfigBuilder_.build(); + } + } result.typeCase_ = typeCase_; onBuilt(); return result; @@ -9993,6 +11697,10 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.PrivacyMetric other) { mergeKMapEstimationConfig(other.getKMapEstimationConfig()); break; } + case DELTA_PRESENCE_ESTIMATION_CONFIG: { + mergeDeltaPresenceEstimationConfig(other.getDeltaPresenceEstimationConfig()); + break; + } case TYPE_NOT_SET: { break; } @@ -10718,6 +12426,142 @@ public com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder get onChanged();; return kMapEstimationConfigBuilder_; } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder> deltaPresenceEstimationConfigBuilder_; + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public boolean hasDeltaPresenceEstimationConfig() { + return typeCase_ == 6; + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDeltaPresenceEstimationConfig() { + if (deltaPresenceEstimationConfigBuilder_ == null) { + if (typeCase_ == 6) { + return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } else { + if (typeCase_ == 6) { + return deltaPresenceEstimationConfigBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public Builder setDeltaPresenceEstimationConfig(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig value) { + if (deltaPresenceEstimationConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + type_ = value; + onChanged(); + } else { + deltaPresenceEstimationConfigBuilder_.setMessage(value); + } + typeCase_ = 6; + return this; + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public Builder setDeltaPresenceEstimationConfig( + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder builderForValue) { + if (deltaPresenceEstimationConfigBuilder_ == null) { + type_ = builderForValue.build(); + onChanged(); + } else { + deltaPresenceEstimationConfigBuilder_.setMessage(builderForValue.build()); + } + typeCase_ = 6; + return this; + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public Builder mergeDeltaPresenceEstimationConfig(com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig value) { + if (deltaPresenceEstimationConfigBuilder_ == null) { + if (typeCase_ == 6 && + type_ != com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance()) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.newBuilder((com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_) + .mergeFrom(value).buildPartial(); + } else { + type_ = value; + } + onChanged(); + } else { + if (typeCase_ == 6) { + deltaPresenceEstimationConfigBuilder_.mergeFrom(value); + } + deltaPresenceEstimationConfigBuilder_.setMessage(value); + } + typeCase_ = 6; + return this; + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public Builder clearDeltaPresenceEstimationConfig() { + if (deltaPresenceEstimationConfigBuilder_ == null) { + if (typeCase_ == 6) { + typeCase_ = 0; + type_ = null; + onChanged(); + } + } else { + if (typeCase_ == 6) { + typeCase_ = 0; + type_ = null; + } + deltaPresenceEstimationConfigBuilder_.clear(); + } + return this; + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder getDeltaPresenceEstimationConfigBuilder() { + return getDeltaPresenceEstimationConfigFieldBuilder().getBuilder(); + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + public com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder getDeltaPresenceEstimationConfigOrBuilder() { + if ((typeCase_ == 6) && (deltaPresenceEstimationConfigBuilder_ != null)) { + return deltaPresenceEstimationConfigBuilder_.getMessageOrBuilder(); + } else { + if (typeCase_ == 6) { + return (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_; + } + return com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + } + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder> + getDeltaPresenceEstimationConfigFieldBuilder() { + if (deltaPresenceEstimationConfigBuilder_ == null) { + if (!(typeCase_ == 6)) { + type_ = com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.getDefaultInstance(); + } + deltaPresenceEstimationConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.Builder, com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder>( + (com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) type_, + getParentForChildren(), + isClean()); + type_ = null; + } + typeCase_ = 6; + onChanged();; + return deltaPresenceEstimationConfigBuilder_; + } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java index 8d66a6c3e118..d2343ae5e3a4 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/PrivacyMetricOrBuilder.java @@ -72,5 +72,18 @@ public interface PrivacyMetricOrBuilder extends */ com.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfigOrBuilder getKMapEstimationConfigOrBuilder(); + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + boolean hasDeltaPresenceEstimationConfig(); + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig getDeltaPresenceEstimationConfig(); + /** + * .google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + */ + com.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfigOrBuilder getDeltaPresenceEstimationConfigOrBuilder(); + public com.google.privacy.dlp.v2.PrivacyMetric.TypeCase getTypeCase(); } diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java new file mode 100644 index 000000000000..05ca74a0faf4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiId.java @@ -0,0 +1,1454 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * A column with a semantic tag attached.
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.QuasiId} + */ +public final class QuasiId extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.QuasiId) + QuasiIdOrBuilder { +private static final long serialVersionUID = 0L; + // Use QuasiId.newBuilder() to construct. + private QuasiId(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QuasiId() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QuasiId( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.privacy.dlp.v2.InfoType.Builder subBuilder = null; + if (tagCase_ == 2) { + subBuilder = ((com.google.privacy.dlp.v2.InfoType) tag_).toBuilder(); + } + tag_ = + input.readMessage(com.google.privacy.dlp.v2.InfoType.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.privacy.dlp.v2.InfoType) tag_); + tag_ = subBuilder.buildPartial(); + } + tagCase_ = 2; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + tagCase_ = 3; + tag_ = s; + break; + } + case 34: { + com.google.protobuf.Empty.Builder subBuilder = null; + if (tagCase_ == 4) { + subBuilder = ((com.google.protobuf.Empty) tag_).toBuilder(); + } + tag_ = + input.readMessage(com.google.protobuf.Empty.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Empty) tag_); + tag_ = subBuilder.buildPartial(); + } + tagCase_ = 4; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.QuasiId.class, com.google.privacy.dlp.v2.QuasiId.Builder.class); + } + + private int tagCase_ = 0; + private java.lang.Object tag_; + public enum TagCase + implements com.google.protobuf.Internal.EnumLite { + INFO_TYPE(2), + CUSTOM_TAG(3), + INFERRED(4), + TAG_NOT_SET(0); + private final int value; + private TagCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TagCase valueOf(int value) { + return forNumber(value); + } + + public static TagCase forNumber(int value) { + switch (value) { + case 2: return INFO_TYPE; + case 3: return CUSTOM_TAG; + case 4: return INFERRED; + case 0: return TAG_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TagCase + getTagCase() { + return TagCase.forNumber( + tagCase_); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.FieldId field_; + /** + *
+   * Identifies the column. [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public boolean hasField() { + return field_ != null; + } + /** + *
+   * Identifies the column. [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + *
+   * Identifies the column. [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + public static final int INFO_TYPE_FIELD_NUMBER = 2; + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public boolean hasInfoType() { + return tagCase_ == 2; + } + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + + public static final int CUSTOM_TAG_FIELD_NUMBER = 3; + /** + *
+   * A column can be tagged with a custom tag. In this case, the user must
+   * indicate an auxiliary table that contains statistical information on
+   * the possible values of this column (below).
+   * 
+ * + * string custom_tag = 3; + */ + public java.lang.String getCustomTag() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + 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(); + if (tagCase_ == 3) { + tag_ = s; + } + return s; + } + } + /** + *
+   * A column can be tagged with a custom tag. In this case, the user must
+   * indicate an auxiliary table that contains statistical information on
+   * the possible values of this column (below).
+   * 
+ * + * string custom_tag = 3; + */ + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (tagCase_ == 3) { + tag_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INFERRED_FIELD_NUMBER = 4; + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public boolean hasInferred() { + return tagCase_ == 4; + } + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public com.google.protobuf.Empty getInferred() { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public com.google.protobuf.EmptyOrBuilder getInferredOrBuilder() { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + if (tagCase_ == 2) { + output.writeMessage(2, (com.google.privacy.dlp.v2.InfoType) tag_); + } + if (tagCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tag_); + } + if (tagCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Empty) tag_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + if (tagCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (com.google.privacy.dlp.v2.InfoType) tag_); + } + if (tagCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, tag_); + } + if (tagCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.protobuf.Empty) tag_); + } + size += unknownFields.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.privacy.dlp.v2.QuasiId)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.QuasiId other = (com.google.privacy.dlp.v2.QuasiId) obj; + + boolean result = true; + result = result && (hasField() == other.hasField()); + if (hasField()) { + result = result && getField() + .equals(other.getField()); + } + result = result && getTagCase().equals( + other.getTagCase()); + if (!result) return false; + switch (tagCase_) { + case 2: + result = result && getInfoType() + .equals(other.getInfoType()); + break; + case 3: + result = result && getCustomTag() + .equals(other.getCustomTag()); + break; + case 4: + result = result && getInferred() + .equals(other.getInferred()); + break; + case 0: + default: + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + switch (tagCase_) { + case 2: + hash = (37 * hash) + INFO_TYPE_FIELD_NUMBER; + hash = (53 * hash) + getInfoType().hashCode(); + break; + case 3: + hash = (37 * hash) + CUSTOM_TAG_FIELD_NUMBER; + hash = (53 * hash) + getCustomTag().hashCode(); + break; + case 4: + hash = (37 * hash) + INFERRED_FIELD_NUMBER; + hash = (53 * hash) + getInferred().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.QuasiId 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.privacy.dlp.v2.QuasiId parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.QuasiId 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.privacy.dlp.v2.QuasiId parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.QuasiId 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.privacy.dlp.v2.QuasiId parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.QuasiId parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.QuasiId prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 column with a semantic tag attached.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.QuasiId} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.QuasiId) + com.google.privacy.dlp.v2.QuasiIdOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.QuasiId.class, com.google.privacy.dlp.v2.QuasiId.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.QuasiId.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + tagCase_ = 0; + tag_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_QuasiId_descriptor; + } + + public com.google.privacy.dlp.v2.QuasiId getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.QuasiId.getDefaultInstance(); + } + + public com.google.privacy.dlp.v2.QuasiId build() { + com.google.privacy.dlp.v2.QuasiId result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.privacy.dlp.v2.QuasiId buildPartial() { + com.google.privacy.dlp.v2.QuasiId result = new com.google.privacy.dlp.v2.QuasiId(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + if (tagCase_ == 2) { + if (infoTypeBuilder_ == null) { + result.tag_ = tag_; + } else { + result.tag_ = infoTypeBuilder_.build(); + } + } + if (tagCase_ == 3) { + result.tag_ = tag_; + } + if (tagCase_ == 4) { + if (inferredBuilder_ == null) { + result.tag_ = tag_; + } else { + result.tag_ = inferredBuilder_.build(); + } + } + result.tagCase_ = tagCase_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.QuasiId) { + return mergeFrom((com.google.privacy.dlp.v2.QuasiId)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.QuasiId other) { + if (other == com.google.privacy.dlp.v2.QuasiId.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + switch (other.getTagCase()) { + case INFO_TYPE: { + mergeInfoType(other.getInfoType()); + break; + } + case CUSTOM_TAG: { + tagCase_ = 3; + tag_ = other.tag_; + onChanged(); + break; + } + case INFERRED: { + mergeInferred(other.getInferred()); + break; + } + case TAG_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.QuasiId parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.QuasiId) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int tagCase_ = 0; + private java.lang.Object tag_; + public TagCase + getTagCase() { + return TagCase.forNumber( + tagCase_); + } + + public Builder clearTag() { + tagCase_ = 0; + tag_ = null; + onChanged(); + return this; + } + + + private com.google.privacy.dlp.v2.FieldId field_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + *
+     * Identifies the column. [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + *
+     * Identifies the column. [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + *
+     * Identifies the column. [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Identifies the column. [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Identifies the column. [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Identifies the column. [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + *
+     * Identifies the column. [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + *
+     * Identifies the column. [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + *
+     * Identifies the column. [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> infoTypeBuilder_; + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public boolean hasInfoType() { + return tagCase_ == 2; + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public com.google.privacy.dlp.v2.InfoType getInfoType() { + if (infoTypeBuilder_ == null) { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } else { + if (tagCase_ == 2) { + return infoTypeBuilder_.getMessage(); + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder setInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + onChanged(); + } else { + infoTypeBuilder_.setMessage(value); + } + tagCase_ = 2; + return this; + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder setInfoType( + com.google.privacy.dlp.v2.InfoType.Builder builderForValue) { + if (infoTypeBuilder_ == null) { + tag_ = builderForValue.build(); + onChanged(); + } else { + infoTypeBuilder_.setMessage(builderForValue.build()); + } + tagCase_ = 2; + return this; + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder mergeInfoType(com.google.privacy.dlp.v2.InfoType value) { + if (infoTypeBuilder_ == null) { + if (tagCase_ == 2 && + tag_ != com.google.privacy.dlp.v2.InfoType.getDefaultInstance()) { + tag_ = com.google.privacy.dlp.v2.InfoType.newBuilder((com.google.privacy.dlp.v2.InfoType) tag_) + .mergeFrom(value).buildPartial(); + } else { + tag_ = value; + } + onChanged(); + } else { + if (tagCase_ == 2) { + infoTypeBuilder_.mergeFrom(value); + } + infoTypeBuilder_.setMessage(value); + } + tagCase_ = 2; + return this; + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public Builder clearInfoType() { + if (infoTypeBuilder_ == null) { + if (tagCase_ == 2) { + tagCase_ = 0; + tag_ = null; + onChanged(); + } + } else { + if (tagCase_ == 2) { + tagCase_ = 0; + tag_ = null; + } + infoTypeBuilder_.clear(); + } + return this; + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public com.google.privacy.dlp.v2.InfoType.Builder getInfoTypeBuilder() { + return getInfoTypeFieldBuilder().getBuilder(); + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { + if ((tagCase_ == 2) && (infoTypeBuilder_ != null)) { + return infoTypeBuilder_.getMessageOrBuilder(); + } else { + if (tagCase_ == 2) { + return (com.google.privacy.dlp.v2.InfoType) tag_; + } + return com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + } + /** + *
+     * A column can be tagged with a InfoType to use the relevant public
+     * dataset as a statistical model of population, if available. We
+     * currently support US ZIP codes, region codes, ages and genders.
+     * To programmatically obtain the list of supported InfoTypes, use
+     * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+     * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder> + getInfoTypeFieldBuilder() { + if (infoTypeBuilder_ == null) { + if (!(tagCase_ == 2)) { + tag_ = com.google.privacy.dlp.v2.InfoType.getDefaultInstance(); + } + infoTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InfoType, com.google.privacy.dlp.v2.InfoType.Builder, com.google.privacy.dlp.v2.InfoTypeOrBuilder>( + (com.google.privacy.dlp.v2.InfoType) tag_, + getParentForChildren(), + isClean()); + tag_ = null; + } + tagCase_ = 2; + onChanged();; + return infoTypeBuilder_; + } + + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 3; + */ + public java.lang.String getCustomTag() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (tagCase_ == 3) { + tag_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 3; + */ + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = ""; + if (tagCase_ == 3) { + ref = tag_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + if (tagCase_ == 3) { + tag_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 3; + */ + public Builder setCustomTag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + tagCase_ = 3; + tag_ = value; + onChanged(); + return this; + } + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 3; + */ + public Builder clearCustomTag() { + if (tagCase_ == 3) { + tagCase_ = 0; + tag_ = null; + onChanged(); + } + return this; + } + /** + *
+     * A column can be tagged with a custom tag. In this case, the user must
+     * indicate an auxiliary table that contains statistical information on
+     * the possible values of this column (below).
+     * 
+ * + * string custom_tag = 3; + */ + public Builder setCustomTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + tagCase_ = 3; + tag_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder> inferredBuilder_; + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public boolean hasInferred() { + return tagCase_ == 4; + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public com.google.protobuf.Empty getInferred() { + if (inferredBuilder_ == null) { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } else { + if (tagCase_ == 4) { + return inferredBuilder_.getMessage(); + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder setInferred(com.google.protobuf.Empty value) { + if (inferredBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + tag_ = value; + onChanged(); + } else { + inferredBuilder_.setMessage(value); + } + tagCase_ = 4; + return this; + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder setInferred( + com.google.protobuf.Empty.Builder builderForValue) { + if (inferredBuilder_ == null) { + tag_ = builderForValue.build(); + onChanged(); + } else { + inferredBuilder_.setMessage(builderForValue.build()); + } + tagCase_ = 4; + return this; + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder mergeInferred(com.google.protobuf.Empty value) { + if (inferredBuilder_ == null) { + if (tagCase_ == 4 && + tag_ != com.google.protobuf.Empty.getDefaultInstance()) { + tag_ = com.google.protobuf.Empty.newBuilder((com.google.protobuf.Empty) tag_) + .mergeFrom(value).buildPartial(); + } else { + tag_ = value; + } + onChanged(); + } else { + if (tagCase_ == 4) { + inferredBuilder_.mergeFrom(value); + } + inferredBuilder_.setMessage(value); + } + tagCase_ = 4; + return this; + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public Builder clearInferred() { + if (inferredBuilder_ == null) { + if (tagCase_ == 4) { + tagCase_ = 0; + tag_ = null; + onChanged(); + } + } else { + if (tagCase_ == 4) { + tagCase_ = 0; + tag_ = null; + } + inferredBuilder_.clear(); + } + return this; + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public com.google.protobuf.Empty.Builder getInferredBuilder() { + return getInferredFieldBuilder().getBuilder(); + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + public com.google.protobuf.EmptyOrBuilder getInferredOrBuilder() { + if ((tagCase_ == 4) && (inferredBuilder_ != null)) { + return inferredBuilder_.getMessageOrBuilder(); + } else { + if (tagCase_ == 4) { + return (com.google.protobuf.Empty) tag_; + } + return com.google.protobuf.Empty.getDefaultInstance(); + } + } + /** + *
+     * If no semantic tag is indicated, we infer the statistical model from
+     * the distribution of values in the input data
+     * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder> + getInferredFieldBuilder() { + if (inferredBuilder_ == null) { + if (!(tagCase_ == 4)) { + tag_ = com.google.protobuf.Empty.getDefaultInstance(); + } + inferredBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Empty, com.google.protobuf.Empty.Builder, com.google.protobuf.EmptyOrBuilder>( + (com.google.protobuf.Empty) tag_, + getParentForChildren(), + isClean()); + tag_ = null; + } + tagCase_ = 4; + onChanged();; + return inferredBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.QuasiId) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.QuasiId) + private static final com.google.privacy.dlp.v2.QuasiId DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.QuasiId(); + } + + public static com.google.privacy.dlp.v2.QuasiId getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public QuasiId parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QuasiId(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.privacy.dlp.v2.QuasiId getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java new file mode 100644 index 000000000000..d0f945e8cefa --- /dev/null +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/QuasiIdOrBuilder.java @@ -0,0 +1,123 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface QuasiIdOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.QuasiId) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Identifies the column. [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + boolean hasField(); + /** + *
+   * Identifies the column. [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + *
+   * Identifies the column. [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId field = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); + + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + boolean hasInfoType(); + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + com.google.privacy.dlp.v2.InfoType getInfoType(); + /** + *
+   * A column can be tagged with a InfoType to use the relevant public
+   * dataset as a statistical model of population, if available. We
+   * currently support US ZIP codes, region codes, ages and genders.
+   * To programmatically obtain the list of supported InfoTypes, use
+   * ListInfoTypes with the supported_by=RISK_ANALYSIS filter.
+   * 
+ * + * .google.privacy.dlp.v2.InfoType info_type = 2; + */ + com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder(); + + /** + *
+   * A column can be tagged with a custom tag. In this case, the user must
+   * indicate an auxiliary table that contains statistical information on
+   * the possible values of this column (below).
+   * 
+ * + * string custom_tag = 3; + */ + java.lang.String getCustomTag(); + /** + *
+   * A column can be tagged with a custom tag. In this case, the user must
+   * indicate an auxiliary table that contains statistical information on
+   * the possible values of this column (below).
+   * 
+ * + * string custom_tag = 3; + */ + com.google.protobuf.ByteString + getCustomTagBytes(); + + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + boolean hasInferred(); + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + com.google.protobuf.Empty getInferred(); + /** + *
+   * If no semantic tag is indicated, we infer the statistical model from
+   * the distribution of values in the input data
+   * 
+ * + * .google.protobuf.Empty inferred = 4; + */ + com.google.protobuf.EmptyOrBuilder getInferredOrBuilder(); + + public com.google.privacy.dlp.v2.QuasiId.TagCase getTagCase(); +} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java index dd63eae45295..a3f593353450 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequest.java @@ -5,8 +5,8 @@ /** *
- * Request to search for potentially sensitive info in a list of items
- * and replace it with a default or provided content.
+ * Request to search for potentially sensitive info in an image and redact it
+ * by covering it with a colored rectangle.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest} @@ -23,6 +23,7 @@ private RedactImageRequest(com.google.protobuf.GeneratedMessageV3.Builder bui private RedactImageRequest() { parent_ = ""; imageRedactionConfigs_ = java.util.Collections.emptyList(); + includeFindings_ = false; } @java.lang.Override @@ -84,6 +85,11 @@ private RedactImageRequest( input.readMessage(com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.parser(), extensionRegistry)); break; } + case 48: { + + includeFindings_ = input.readBool(); + break; + } case 58: { com.google.privacy.dlp.v2.ByteContentItem.Builder subBuilder = null; if (byteItem_ != null) { @@ -165,7 +171,7 @@ public interface ImageRedactionConfigOrBuilder extends /** *
      * If true, all text found in the image, regardless whether it matches an
-     * info_type, is redacted.
+     * info_type, is redacted. Only one should be provided.
      * 
* * bool redact_all_text = 2; @@ -397,7 +403,7 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { /** *
      * If true, all text found in the image, regardless whether it matches an
-     * info_type, is redacted.
+     * info_type, is redacted. Only one should be provided.
      * 
* * bool redact_all_text = 2; @@ -1032,7 +1038,7 @@ public com.google.privacy.dlp.v2.InfoTypeOrBuilder getInfoTypeOrBuilder() { /** *
        * If true, all text found in the image, regardless whether it matches an
-       * info_type, is redacted.
+       * info_type, is redacted. Only one should be provided.
        * 
* * bool redact_all_text = 2; @@ -1046,7 +1052,7 @@ public boolean getRedactAllText() { /** *
        * If true, all text found in the image, regardless whether it matches an
-       * info_type, is redacted.
+       * info_type, is redacted. Only one should be provided.
        * 
* * bool redact_all_text = 2; @@ -1060,7 +1066,7 @@ public Builder setRedactAllText(boolean value) { /** *
        * If true, all text found in the image, regardless whether it matches an
-       * info_type, is redacted.
+       * info_type, is redacted. Only one should be provided.
        * 
* * bool redact_all_text = 2; @@ -1415,6 +1421,20 @@ public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilde return imageRedactionConfigs_.get(index); } + public static final int INCLUDE_FINDINGS_FIELD_NUMBER = 6; + private boolean includeFindings_; + /** + *
+   * Whether the response should include findings along with the redacted
+   * image.
+   * 
+ * + * bool include_findings = 6; + */ + public boolean getIncludeFindings() { + return includeFindings_; + } + public static final int BYTE_ITEM_FIELD_NUMBER = 7; private com.google.privacy.dlp.v2.ByteContentItem byteItem_; /** @@ -1469,6 +1489,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < imageRedactionConfigs_.size(); i++) { output.writeMessage(5, imageRedactionConfigs_.get(i)); } + if (includeFindings_ != false) { + output.writeBool(6, includeFindings_); + } if (byteItem_ != null) { output.writeMessage(7, getByteItem()); } @@ -1491,6 +1514,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, imageRedactionConfigs_.get(i)); } + if (includeFindings_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, includeFindings_); + } if (byteItem_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, getByteItem()); @@ -1520,6 +1547,8 @@ public boolean equals(final java.lang.Object obj) { } result = result && getImageRedactionConfigsList() .equals(other.getImageRedactionConfigsList()); + result = result && (getIncludeFindings() + == other.getIncludeFindings()); result = result && (hasByteItem() == other.hasByteItem()); if (hasByteItem()) { result = result && getByteItem() @@ -1546,6 +1575,9 @@ public int hashCode() { hash = (37 * hash) + IMAGE_REDACTION_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + getImageRedactionConfigsList().hashCode(); } + hash = (37 * hash) + INCLUDE_FINDINGS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIncludeFindings()); if (hasByteItem()) { hash = (37 * hash) + BYTE_ITEM_FIELD_NUMBER; hash = (53 * hash) + getByteItem().hashCode(); @@ -1645,8 +1677,8 @@ protected Builder newBuilderForType( } /** *
-   * Request to search for potentially sensitive info in a list of items
-   * and replace it with a default or provided content.
+   * Request to search for potentially sensitive info in an image and redact it
+   * by covering it with a colored rectangle.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.RedactImageRequest} @@ -1699,6 +1731,8 @@ public Builder clear() { } else { imageRedactionConfigsBuilder_.clear(); } + includeFindings_ = false; + if (byteItemBuilder_ == null) { byteItem_ = null; } else { @@ -1744,6 +1778,7 @@ public com.google.privacy.dlp.v2.RedactImageRequest buildPartial() { } else { result.imageRedactionConfigs_ = imageRedactionConfigsBuilder_.build(); } + result.includeFindings_ = includeFindings_; if (byteItemBuilder_ == null) { result.byteItem_ = byteItem_; } else { @@ -1824,6 +1859,9 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.RedactImageRequest other) { } } } + if (other.getIncludeFindings() != false) { + setIncludeFindings(other.getIncludeFindings()); + } if (other.hasByteItem()) { mergeByteItem(other.getByteItem()); } @@ -2409,6 +2447,47 @@ public com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.Builder return imageRedactionConfigsBuilder_; } + private boolean includeFindings_ ; + /** + *
+     * Whether the response should include findings along with the redacted
+     * image.
+     * 
+ * + * bool include_findings = 6; + */ + public boolean getIncludeFindings() { + return includeFindings_; + } + /** + *
+     * Whether the response should include findings along with the redacted
+     * image.
+     * 
+ * + * bool include_findings = 6; + */ + public Builder setIncludeFindings(boolean value) { + + includeFindings_ = value; + onChanged(); + return this; + } + /** + *
+     * Whether the response should include findings along with the redacted
+     * image.
+     * 
+ * + * bool include_findings = 6; + */ + public Builder clearIncludeFindings() { + + includeFindings_ = false; + onChanged(); + return this; + } + private com.google.privacy.dlp.v2.ByteContentItem byteItem_ = null; private com.google.protobuf.SingleFieldBuilderV3< com.google.privacy.dlp.v2.ByteContentItem, com.google.privacy.dlp.v2.ByteContentItem.Builder, com.google.privacy.dlp.v2.ByteContentItemOrBuilder> byteItemBuilder_; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java index 43e8a1266531..a22277ee0d9f 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageRequestOrBuilder.java @@ -94,6 +94,16 @@ public interface RedactImageRequestOrBuilder extends com.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfigOrBuilder getImageRedactionConfigsOrBuilder( int index); + /** + *
+   * Whether the response should include findings along with the redacted
+   * image.
+   * 
+ * + * bool include_findings = 6; + */ + boolean getIncludeFindings(); + /** *
    * The content must be PNG, JPEG, SVG or BMP.
diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java
index 33eae428f3a3..4f991ee10e02 100644
--- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java
+++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponse.java
@@ -66,6 +66,19 @@ private RedactImageResponse(
             extractedText_ = s;
             break;
           }
+          case 26: {
+            com.google.privacy.dlp.v2.InspectResult.Builder subBuilder = null;
+            if (inspectResult_ != null) {
+              subBuilder = inspectResult_.toBuilder();
+            }
+            inspectResult_ = input.readMessage(com.google.privacy.dlp.v2.InspectResult.parser(), extensionRegistry);
+            if (subBuilder != null) {
+              subBuilder.mergeFrom(inspectResult_);
+              inspectResult_ = subBuilder.buildPartial();
+            }
+
+            break;
+          }
         }
       }
     } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -149,6 +162,39 @@ public java.lang.String getExtractedText() {
     }
   }
 
+  public static final int INSPECT_RESULT_FIELD_NUMBER = 3;
+  private com.google.privacy.dlp.v2.InspectResult inspectResult_;
+  /**
+   * 
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public boolean hasInspectResult() { + return inspectResult_ != null; + } + /** + *
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public com.google.privacy.dlp.v2.InspectResult getInspectResult() { + return inspectResult_ == null ? com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : inspectResult_; + } + /** + *
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public com.google.privacy.dlp.v2.InspectResultOrBuilder getInspectResultOrBuilder() { + return getInspectResult(); + } + private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; @@ -167,6 +213,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!getExtractedTextBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, extractedText_); } + if (inspectResult_ != null) { + output.writeMessage(3, getInspectResult()); + } unknownFields.writeTo(output); } @@ -182,6 +231,10 @@ public int getSerializedSize() { if (!getExtractedTextBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, extractedText_); } + if (inspectResult_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getInspectResult()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -202,6 +255,11 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getRedactedImage()); result = result && getExtractedText() .equals(other.getExtractedText()); + result = result && (hasInspectResult() == other.hasInspectResult()); + if (hasInspectResult()) { + result = result && getInspectResult() + .equals(other.getInspectResult()); + } result = result && unknownFields.equals(other.unknownFields); return result; } @@ -217,6 +275,10 @@ public int hashCode() { hash = (53 * hash) + getRedactedImage().hashCode(); hash = (37 * hash) + EXTRACTED_TEXT_FIELD_NUMBER; hash = (53 * hash) + getExtractedText().hashCode(); + if (hasInspectResult()) { + hash = (37 * hash) + INSPECT_RESULT_FIELD_NUMBER; + hash = (53 * hash) + getInspectResult().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -354,6 +416,12 @@ public Builder clear() { extractedText_ = ""; + if (inspectResultBuilder_ == null) { + inspectResult_ = null; + } else { + inspectResult_ = null; + inspectResultBuilder_ = null; + } return this; } @@ -378,6 +446,11 @@ public com.google.privacy.dlp.v2.RedactImageResponse buildPartial() { com.google.privacy.dlp.v2.RedactImageResponse result = new com.google.privacy.dlp.v2.RedactImageResponse(this); result.redactedImage_ = redactedImage_; result.extractedText_ = extractedText_; + if (inspectResultBuilder_ == null) { + result.inspectResult_ = inspectResult_; + } else { + result.inspectResult_ = inspectResultBuilder_.build(); + } onBuilt(); return result; } @@ -426,6 +499,9 @@ public Builder mergeFrom(com.google.privacy.dlp.v2.RedactImageResponse other) { extractedText_ = other.extractedText_; onChanged(); } + if (other.hasInspectResult()) { + mergeInspectResult(other.getInspectResult()); + } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; @@ -592,6 +668,159 @@ public Builder setExtractedTextBytes( onChanged(); return this; } + + private com.google.privacy.dlp.v2.InspectResult inspectResult_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder> inspectResultBuilder_; + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public boolean hasInspectResult() { + return inspectResultBuilder_ != null || inspectResult_ != null; + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public com.google.privacy.dlp.v2.InspectResult getInspectResult() { + if (inspectResultBuilder_ == null) { + return inspectResult_ == null ? com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : inspectResult_; + } else { + return inspectResultBuilder_.getMessage(); + } + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public Builder setInspectResult(com.google.privacy.dlp.v2.InspectResult value) { + if (inspectResultBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + inspectResult_ = value; + onChanged(); + } else { + inspectResultBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public Builder setInspectResult( + com.google.privacy.dlp.v2.InspectResult.Builder builderForValue) { + if (inspectResultBuilder_ == null) { + inspectResult_ = builderForValue.build(); + onChanged(); + } else { + inspectResultBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public Builder mergeInspectResult(com.google.privacy.dlp.v2.InspectResult value) { + if (inspectResultBuilder_ == null) { + if (inspectResult_ != null) { + inspectResult_ = + com.google.privacy.dlp.v2.InspectResult.newBuilder(inspectResult_).mergeFrom(value).buildPartial(); + } else { + inspectResult_ = value; + } + onChanged(); + } else { + inspectResultBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public Builder clearInspectResult() { + if (inspectResultBuilder_ == null) { + inspectResult_ = null; + onChanged(); + } else { + inspectResult_ = null; + inspectResultBuilder_ = null; + } + + return this; + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public com.google.privacy.dlp.v2.InspectResult.Builder getInspectResultBuilder() { + + onChanged(); + return getInspectResultFieldBuilder().getBuilder(); + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + public com.google.privacy.dlp.v2.InspectResultOrBuilder getInspectResultOrBuilder() { + if (inspectResultBuilder_ != null) { + return inspectResultBuilder_.getMessageOrBuilder(); + } else { + return inspectResult_ == null ? + com.google.privacy.dlp.v2.InspectResult.getDefaultInstance() : inspectResult_; + } + } + /** + *
+     * The findings. Populated when include_findings in the request is true.
+     * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder> + getInspectResultFieldBuilder() { + if (inspectResultBuilder_ == null) { + inspectResultBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.InspectResult, com.google.privacy.dlp.v2.InspectResult.Builder, com.google.privacy.dlp.v2.InspectResultOrBuilder>( + getInspectResult(), + getParentForChildren(), + isClean()); + inspectResult_ = null; + } + return inspectResultBuilder_; + } public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java index 205a729a563e..681d21c70d08 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RedactImageResponseOrBuilder.java @@ -37,4 +37,29 @@ public interface RedactImageResponseOrBuilder extends */ com.google.protobuf.ByteString getExtractedTextBytes(); + + /** + *
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + boolean hasInspectResult(); + /** + *
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + com.google.privacy.dlp.v2.InspectResult getInspectResult(); + /** + *
+   * The findings. Populated when include_findings in the request is true.
+   * 
+ * + * .google.privacy.dlp.v2.InspectResult inspect_result = 3; + */ + com.google.privacy.dlp.v2.InspectResultOrBuilder getInspectResultOrBuilder(); } diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java index 0d32140f66f6..52b099ebdadc 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/RiskAnalysisJobConfig.java @@ -5,7 +5,8 @@ /** *
- * Configuration for a risk analysis job.
+ * Configuration for a risk analysis job. See
+ * https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.RiskAnalysisJobConfig} @@ -430,7 +431,8 @@ protected Builder newBuilderForType( } /** *
-   * Configuration for a risk analysis job.
+   * Configuration for a risk analysis job. See
+   * https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.RiskAnalysisJobConfig} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java index 9c7303c305b3..67e40e015695 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Schedule.java @@ -131,11 +131,11 @@ public int getNumber() { /** *
    * With this option a job is started a regular periodic basis. For
-   * example: every 10 minutes.
+   * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
    * This value must be set to a time duration greater than or equal
-   * to 60 minutes and can be no longer than 60 days.
+   * to 1 day and can be no longer than 60 days.
    * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -146,11 +146,11 @@ public boolean hasRecurrencePeriodDuration() { /** *
    * With this option a job is started a regular periodic basis. For
-   * example: every 10 minutes.
+   * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
    * This value must be set to a time duration greater than or equal
-   * to 60 minutes and can be no longer than 60 days.
+   * to 1 day and can be no longer than 60 days.
    * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -164,11 +164,11 @@ public com.google.protobuf.Duration getRecurrencePeriodDuration() { /** *
    * With this option a job is started a regular periodic basis. For
-   * example: every 10 minutes.
+   * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
    * This value must be set to a time duration greater than or equal
-   * to 60 minutes and can be no longer than 60 days.
+   * to 1 day and can be no longer than 60 days.
    * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -515,11 +515,11 @@ public Builder clearOption() { /** *
      * With this option a job is started a regular periodic basis. For
-     * example: every 10 minutes.
+     * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
      * This value must be set to a time duration greater than or equal
-     * to 60 minutes and can be no longer than 60 days.
+     * to 1 day and can be no longer than 60 days.
      * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -530,11 +530,11 @@ public boolean hasRecurrencePeriodDuration() { /** *
      * With this option a job is started a regular periodic basis. For
-     * example: every 10 minutes.
+     * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
      * This value must be set to a time duration greater than or equal
-     * to 60 minutes and can be no longer than 60 days.
+     * to 1 day and can be no longer than 60 days.
      * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -555,11 +555,11 @@ public com.google.protobuf.Duration getRecurrencePeriodDuration() { /** *
      * With this option a job is started a regular periodic basis. For
-     * example: every 10 minutes.
+     * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
      * This value must be set to a time duration greater than or equal
-     * to 60 minutes and can be no longer than 60 days.
+     * to 1 day and can be no longer than 60 days.
      * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -580,11 +580,11 @@ public Builder setRecurrencePeriodDuration(com.google.protobuf.Duration value) { /** *
      * With this option a job is started a regular periodic basis. For
-     * example: every 10 minutes.
+     * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
      * This value must be set to a time duration greater than or equal
-     * to 60 minutes and can be no longer than 60 days.
+     * to 1 day and can be no longer than 60 days.
      * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -603,11 +603,11 @@ public Builder setRecurrencePeriodDuration( /** *
      * With this option a job is started a regular periodic basis. For
-     * example: every 10 minutes.
+     * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
      * This value must be set to a time duration greater than or equal
-     * to 60 minutes and can be no longer than 60 days.
+     * to 1 day and can be no longer than 60 days.
      * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -634,11 +634,11 @@ public Builder mergeRecurrencePeriodDuration(com.google.protobuf.Duration value) /** *
      * With this option a job is started a regular periodic basis. For
-     * example: every 10 minutes.
+     * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
      * This value must be set to a time duration greater than or equal
-     * to 60 minutes and can be no longer than 60 days.
+     * to 1 day and can be no longer than 60 days.
      * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -662,11 +662,11 @@ public Builder clearRecurrencePeriodDuration() { /** *
      * With this option a job is started a regular periodic basis. For
-     * example: every 10 minutes.
+     * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
      * This value must be set to a time duration greater than or equal
-     * to 60 minutes and can be no longer than 60 days.
+     * to 1 day and can be no longer than 60 days.
      * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -677,11 +677,11 @@ public com.google.protobuf.Duration.Builder getRecurrencePeriodDurationBuilder() /** *
      * With this option a job is started a regular periodic basis. For
-     * example: every 10 minutes.
+     * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
      * This value must be set to a time duration greater than or equal
-     * to 60 minutes and can be no longer than 60 days.
+     * to 1 day and can be no longer than 60 days.
      * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -699,11 +699,11 @@ public com.google.protobuf.DurationOrBuilder getRecurrencePeriodDurationOrBuilde /** *
      * With this option a job is started a regular periodic basis. For
-     * example: every 10 minutes.
+     * example: every day (86400 seconds).
      * A scheduled start time will be skipped if the previous
      * execution has not ended when its scheduled time occurs.
      * This value must be set to a time duration greater than or equal
-     * to 60 minutes and can be no longer than 60 days.
+     * to 1 day and can be no longer than 60 days.
      * 
* * .google.protobuf.Duration recurrence_period_duration = 1; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java index 8ddcd2b1add3..94991fbaa231 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/ScheduleOrBuilder.java @@ -10,11 +10,11 @@ public interface ScheduleOrBuilder extends /** *
    * With this option a job is started a regular periodic basis. For
-   * example: every 10 minutes.
+   * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
    * This value must be set to a time duration greater than or equal
-   * to 60 minutes and can be no longer than 60 days.
+   * to 1 day and can be no longer than 60 days.
    * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -23,11 +23,11 @@ public interface ScheduleOrBuilder extends /** *
    * With this option a job is started a regular periodic basis. For
-   * example: every 10 minutes.
+   * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
    * This value must be set to a time duration greater than or equal
-   * to 60 minutes and can be no longer than 60 days.
+   * to 1 day and can be no longer than 60 days.
    * 
* * .google.protobuf.Duration recurrence_period_duration = 1; @@ -36,11 +36,11 @@ public interface ScheduleOrBuilder extends /** *
    * With this option a job is started a regular periodic basis. For
-   * example: every 10 minutes.
+   * example: every day (86400 seconds).
    * A scheduled start time will be skipped if the previous
    * execution has not ended when its scheduled time occurs.
    * This value must be set to a time duration greater than or equal
-   * to 60 minutes and can be no longer than 60 days.
+   * to 1 day and can be no longer than 60 days.
    * 
* * .google.protobuf.Duration recurrence_period_duration = 1; diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java new file mode 100644 index 000000000000..1231facdf658 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTable.java @@ -0,0 +1,2060 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +/** + *
+ * An auxiliary table containing statistical information on the relative
+ * frequency of different quasi-identifiers values. It has one or several
+ * quasi-identifiers columns, and one column that indicates the relative
+ * frequency of each quasi-identifier tuple.
+ * If a tuple is present in the data but not in the auxiliary table, the
+ * corresponding relative frequency is assumed to be zero (and thus, the
+ * tuple is highly reidentifiable).
+ * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable} + */ +public final class StatisticalTable extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StatisticalTable) + StatisticalTableOrBuilder { +private static final long serialVersionUID = 0L; + // Use StatisticalTable.newBuilder() to construct. + private StatisticalTable(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StatisticalTable() { + quasiIds_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StatisticalTable( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + quasiIds_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + quasiIds_.add( + input.readMessage(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.parser(), extensionRegistry)); + break; + } + case 18: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (relativeFrequency_ != null) { + subBuilder = relativeFrequency_.toBuilder(); + } + relativeFrequency_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(relativeFrequency_); + relativeFrequency_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.privacy.dlp.v2.BigQueryTable.Builder subBuilder = null; + if (table_ != null) { + subBuilder = table_.toBuilder(); + } + table_ = input.readMessage(com.google.privacy.dlp.v2.BigQueryTable.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(table_); + table_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StatisticalTable.class, com.google.privacy.dlp.v2.StatisticalTable.Builder.class); + } + + public interface QuasiIdentifierFieldOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + boolean hasField(); + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + com.google.privacy.dlp.v2.FieldId getField(); + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder(); + + /** + * string custom_tag = 2; + */ + java.lang.String getCustomTag(); + /** + * string custom_tag = 2; + */ + com.google.protobuf.ByteString + getCustomTagBytes(); + } + /** + *
+   * A quasi-identifier column has a custom_tag, used to know which column
+   * in the data corresponds to which column in the statistical model.
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField} + */ + public static final class QuasiIdentifierField extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) + QuasiIdentifierFieldOrBuilder { + private static final long serialVersionUID = 0L; + // Use QuasiIdentifierField.newBuilder() to construct. + private QuasiIdentifierField(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QuasiIdentifierField() { + customTag_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private QuasiIdentifierField( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.google.privacy.dlp.v2.FieldId.Builder subBuilder = null; + if (field_ != null) { + subBuilder = field_.toBuilder(); + } + field_ = input.readMessage(com.google.privacy.dlp.v2.FieldId.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(field_); + field_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + customTag_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.class, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.privacy.dlp.v2.FieldId field_; + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public boolean hasField() { + return field_ != null; + } + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldId getField() { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + return getField(); + } + + public static final int CUSTOM_TAG_FIELD_NUMBER = 2; + private volatile java.lang.Object customTag_; + /** + * string custom_tag = 2; + */ + public java.lang.String getCustomTag() { + java.lang.Object ref = customTag_; + 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(); + customTag_ = s; + return s; + } + } + /** + * string custom_tag = 2; + */ + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = customTag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + customTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (field_ != null) { + output.writeMessage(1, getField()); + } + if (!getCustomTagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, customTag_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (field_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getField()); + } + if (!getCustomTagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, customTag_); + } + size += unknownFields.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.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField other = (com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) obj; + + boolean result = true; + result = result && (hasField() == other.hasField()); + if (hasField()) { + result = result && getField() + .equals(other.getField()); + } + result = result && getCustomTag() + .equals(other.getCustomTag()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasField()) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getField().hashCode(); + } + hash = (37 * hash) + CUSTOM_TAG_FIELD_NUMBER; + hash = (53 * hash) + getCustomTag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField 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.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField 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.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField 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.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 quasi-identifier column has a custom_tag, used to know which column
+     * in the data corresponds to which column in the statistical model.
+     * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.class, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (fieldBuilder_ == null) { + field_ = null; + } else { + field_ = null; + fieldBuilder_ = null; + } + customTag_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_QuasiIdentifierField_descriptor; + } + + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance(); + } + + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField build() { + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField buildPartial() { + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField result = new com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField(this); + if (fieldBuilder_ == null) { + result.field_ = field_; + } else { + result.field_ = fieldBuilder_.build(); + } + result.customTag_ = customTag_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) { + return mergeFrom((com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField other) { + if (other == com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance()) return this; + if (other.hasField()) { + mergeField(other.getField()); + } + if (!other.getCustomTag().isEmpty()) { + customTag_ = other.customTag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.privacy.dlp.v2.FieldId field_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> fieldBuilder_; + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public boolean hasField() { + return fieldBuilder_ != null || field_ != null; + } + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldId getField() { + if (fieldBuilder_ == null) { + return field_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } else { + return fieldBuilder_.getMessage(); + } + } + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + field_ = value; + onChanged(); + } else { + fieldBuilder_.setMessage(value); + } + + return this; + } + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder setField( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (fieldBuilder_ == null) { + field_ = builderForValue.build(); + onChanged(); + } else { + fieldBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder mergeField(com.google.privacy.dlp.v2.FieldId value) { + if (fieldBuilder_ == null) { + if (field_ != null) { + field_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(field_).mergeFrom(value).buildPartial(); + } else { + field_ = value; + } + onChanged(); + } else { + fieldBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public Builder clearField() { + if (fieldBuilder_ == null) { + field_ = null; + onChanged(); + } else { + field_ = null; + fieldBuilder_ = null; + } + + return this; + } + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getFieldBuilder() { + + onChanged(); + return getFieldFieldBuilder().getBuilder(); + } + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getFieldOrBuilder() { + if (fieldBuilder_ != null) { + return fieldBuilder_.getMessageOrBuilder(); + } else { + return field_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : field_; + } + } + /** + * .google.privacy.dlp.v2.FieldId field = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getFieldFieldBuilder() { + if (fieldBuilder_ == null) { + fieldBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getField(), + getParentForChildren(), + isClean()); + field_ = null; + } + return fieldBuilder_; + } + + private java.lang.Object customTag_ = ""; + /** + * string custom_tag = 2; + */ + public java.lang.String getCustomTag() { + java.lang.Object ref = customTag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customTag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string custom_tag = 2; + */ + public com.google.protobuf.ByteString + getCustomTagBytes() { + java.lang.Object ref = customTag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + customTag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string custom_tag = 2; + */ + public Builder setCustomTag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customTag_ = value; + onChanged(); + return this; + } + /** + * string custom_tag = 2; + */ + public Builder clearCustomTag() { + + customTag_ = getDefaultInstance().getCustomTag(); + onChanged(); + return this; + } + /** + * string custom_tag = 2; + */ + public Builder setCustomTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customTag_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) + private static final com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField(); + } + + public static com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public QuasiIdentifierField parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QuasiIdentifierField(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int bitField0_; + public static final int TABLE_FIELD_NUMBER = 3; + private com.google.privacy.dlp.v2.BigQueryTable table_; + /** + *
+   * Auxiliary table location. [required]
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + public boolean hasTable() { + return table_ != null; + } + /** + *
+   * Auxiliary table location. [required]
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } + /** + *
+   * Auxiliary table location. [required]
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + return getTable(); + } + + public static final int QUASI_IDS_FIELD_NUMBER = 1; + private java.util.List quasiIds_; + /** + *
+   * Quasi-identifier columns. [required]
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public java.util.List getQuasiIdsList() { + return quasiIds_; + } + /** + *
+   * Quasi-identifier columns. [required]
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public java.util.List + getQuasiIdsOrBuilderList() { + return quasiIds_; + } + /** + *
+   * Quasi-identifier columns. [required]
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public int getQuasiIdsCount() { + return quasiIds_.size(); + } + /** + *
+   * Quasi-identifier columns. [required]
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getQuasiIds(int index) { + return quasiIds_.get(index); + } + /** + *
+   * Quasi-identifier columns. [required]
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder getQuasiIdsOrBuilder( + int index) { + return quasiIds_.get(index); + } + + public static final int RELATIVE_FREQUENCY_FIELD_NUMBER = 2; + private com.google.privacy.dlp.v2.FieldId relativeFrequency_; + /** + *
+   * The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + public boolean hasRelativeFrequency() { + return relativeFrequency_ != null; + } + /** + *
+   * The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + public com.google.privacy.dlp.v2.FieldId getRelativeFrequency() { + return relativeFrequency_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; + } + /** + *
+   * The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder() { + return getRelativeFrequency(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < quasiIds_.size(); i++) { + output.writeMessage(1, quasiIds_.get(i)); + } + if (relativeFrequency_ != null) { + output.writeMessage(2, getRelativeFrequency()); + } + if (table_ != null) { + output.writeMessage(3, getTable()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < quasiIds_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, quasiIds_.get(i)); + } + if (relativeFrequency_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRelativeFrequency()); + } + if (table_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getTable()); + } + size += unknownFields.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.privacy.dlp.v2.StatisticalTable)) { + return super.equals(obj); + } + com.google.privacy.dlp.v2.StatisticalTable other = (com.google.privacy.dlp.v2.StatisticalTable) obj; + + boolean result = true; + result = result && (hasTable() == other.hasTable()); + if (hasTable()) { + result = result && getTable() + .equals(other.getTable()); + } + result = result && getQuasiIdsList() + .equals(other.getQuasiIdsList()); + result = result && (hasRelativeFrequency() == other.hasRelativeFrequency()); + if (hasRelativeFrequency()) { + result = result && getRelativeFrequency() + .equals(other.getRelativeFrequency()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasTable()) { + hash = (37 * hash) + TABLE_FIELD_NUMBER; + hash = (53 * hash) + getTable().hashCode(); + } + if (getQuasiIdsCount() > 0) { + hash = (37 * hash) + QUASI_IDS_FIELD_NUMBER; + hash = (53 * hash) + getQuasiIdsList().hashCode(); + } + if (hasRelativeFrequency()) { + hash = (37 * hash) + RELATIVE_FREQUENCY_FIELD_NUMBER; + hash = (53 * hash) + getRelativeFrequency().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable 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.privacy.dlp.v2.StatisticalTable parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable 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.privacy.dlp.v2.StatisticalTable parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable 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.privacy.dlp.v2.StatisticalTable parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.privacy.dlp.v2.StatisticalTable parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.privacy.dlp.v2.StatisticalTable prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 auxiliary table containing statistical information on the relative
+   * frequency of different quasi-identifiers values. It has one or several
+   * quasi-identifiers columns, and one column that indicates the relative
+   * frequency of each quasi-identifier tuple.
+   * If a tuple is present in the data but not in the auxiliary table, the
+   * corresponding relative frequency is assumed to be zero (and thus, the
+   * tuple is highly reidentifiable).
+   * 
+ * + * Protobuf type {@code google.privacy.dlp.v2.StatisticalTable} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.privacy.dlp.v2.StatisticalTable) + com.google.privacy.dlp.v2.StatisticalTableOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.privacy.dlp.v2.StatisticalTable.class, com.google.privacy.dlp.v2.StatisticalTable.Builder.class); + } + + // Construct using com.google.privacy.dlp.v2.StatisticalTable.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQuasiIdsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (tableBuilder_ == null) { + table_ = null; + } else { + table_ = null; + tableBuilder_ = null; + } + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + quasiIdsBuilder_.clear(); + } + if (relativeFrequencyBuilder_ == null) { + relativeFrequency_ = null; + } else { + relativeFrequency_ = null; + relativeFrequencyBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.privacy.dlp.v2.DlpProto.internal_static_google_privacy_dlp_v2_StatisticalTable_descriptor; + } + + public com.google.privacy.dlp.v2.StatisticalTable getDefaultInstanceForType() { + return com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance(); + } + + public com.google.privacy.dlp.v2.StatisticalTable build() { + com.google.privacy.dlp.v2.StatisticalTable result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.privacy.dlp.v2.StatisticalTable buildPartial() { + com.google.privacy.dlp.v2.StatisticalTable result = new com.google.privacy.dlp.v2.StatisticalTable(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (tableBuilder_ == null) { + result.table_ = table_; + } else { + result.table_ = tableBuilder_.build(); + } + if (quasiIdsBuilder_ == null) { + if (((bitField0_ & 0x00000002) == 0x00000002)) { + quasiIds_ = java.util.Collections.unmodifiableList(quasiIds_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.quasiIds_ = quasiIds_; + } else { + result.quasiIds_ = quasiIdsBuilder_.build(); + } + if (relativeFrequencyBuilder_ == null) { + result.relativeFrequency_ = relativeFrequency_; + } else { + result.relativeFrequency_ = relativeFrequencyBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.privacy.dlp.v2.StatisticalTable) { + return mergeFrom((com.google.privacy.dlp.v2.StatisticalTable)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.privacy.dlp.v2.StatisticalTable other) { + if (other == com.google.privacy.dlp.v2.StatisticalTable.getDefaultInstance()) return this; + if (other.hasTable()) { + mergeTable(other.getTable()); + } + if (quasiIdsBuilder_ == null) { + if (!other.quasiIds_.isEmpty()) { + if (quasiIds_.isEmpty()) { + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureQuasiIdsIsMutable(); + quasiIds_.addAll(other.quasiIds_); + } + onChanged(); + } + } else { + if (!other.quasiIds_.isEmpty()) { + if (quasiIdsBuilder_.isEmpty()) { + quasiIdsBuilder_.dispose(); + quasiIdsBuilder_ = null; + quasiIds_ = other.quasiIds_; + bitField0_ = (bitField0_ & ~0x00000002); + quasiIdsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQuasiIdsFieldBuilder() : null; + } else { + quasiIdsBuilder_.addAllMessages(other.quasiIds_); + } + } + } + if (other.hasRelativeFrequency()) { + mergeRelativeFrequency(other.getRelativeFrequency()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.privacy.dlp.v2.StatisticalTable parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.privacy.dlp.v2.StatisticalTable) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.privacy.dlp.v2.BigQueryTable table_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> tableBuilder_; + /** + *
+     * Auxiliary table location. [required]
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + public boolean hasTable() { + return tableBuilder_ != null || table_ != null; + } + /** + *
+     * Auxiliary table location. [required]
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + public com.google.privacy.dlp.v2.BigQueryTable getTable() { + if (tableBuilder_ == null) { + return table_ == null ? com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } else { + return tableBuilder_.getMessage(); + } + } + /** + *
+     * Auxiliary table location. [required]
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + public Builder setTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + table_ = value; + onChanged(); + } else { + tableBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Auxiliary table location. [required]
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + public Builder setTable( + com.google.privacy.dlp.v2.BigQueryTable.Builder builderForValue) { + if (tableBuilder_ == null) { + table_ = builderForValue.build(); + onChanged(); + } else { + tableBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Auxiliary table location. [required]
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + public Builder mergeTable(com.google.privacy.dlp.v2.BigQueryTable value) { + if (tableBuilder_ == null) { + if (table_ != null) { + table_ = + com.google.privacy.dlp.v2.BigQueryTable.newBuilder(table_).mergeFrom(value).buildPartial(); + } else { + table_ = value; + } + onChanged(); + } else { + tableBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Auxiliary table location. [required]
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + public Builder clearTable() { + if (tableBuilder_ == null) { + table_ = null; + onChanged(); + } else { + table_ = null; + tableBuilder_ = null; + } + + return this; + } + /** + *
+     * Auxiliary table location. [required]
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + public com.google.privacy.dlp.v2.BigQueryTable.Builder getTableBuilder() { + + onChanged(); + return getTableFieldBuilder().getBuilder(); + } + /** + *
+     * Auxiliary table location. [required]
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + public com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder() { + if (tableBuilder_ != null) { + return tableBuilder_.getMessageOrBuilder(); + } else { + return table_ == null ? + com.google.privacy.dlp.v2.BigQueryTable.getDefaultInstance() : table_; + } + } + /** + *
+     * Auxiliary table location. [required]
+     * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder> + getTableFieldBuilder() { + if (tableBuilder_ == null) { + tableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.BigQueryTable, com.google.privacy.dlp.v2.BigQueryTable.Builder, com.google.privacy.dlp.v2.BigQueryTableOrBuilder>( + getTable(), + getParentForChildren(), + isClean()); + table_ = null; + } + return tableBuilder_; + } + + private java.util.List quasiIds_ = + java.util.Collections.emptyList(); + private void ensureQuasiIdsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + quasiIds_ = new java.util.ArrayList(quasiIds_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder> quasiIdsBuilder_; + + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public java.util.List getQuasiIdsList() { + if (quasiIdsBuilder_ == null) { + return java.util.Collections.unmodifiableList(quasiIds_); + } else { + return quasiIdsBuilder_.getMessageList(); + } + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public int getQuasiIdsCount() { + if (quasiIdsBuilder_ == null) { + return quasiIds_.size(); + } else { + return quasiIdsBuilder_.getCount(); + } + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); + } else { + return quasiIdsBuilder_.getMessage(index); + } + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, value); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public Builder setQuasiIds( + int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.set(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public Builder addQuasiIds(com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField value) { + if (quasiIdsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, value); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public Builder addQuasiIds( + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public Builder addQuasiIds( + int index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder builderForValue) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.add(index, builderForValue.build()); + onChanged(); + } else { + quasiIdsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public Builder addAllQuasiIds( + java.lang.Iterable values) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, quasiIds_); + onChanged(); + } else { + quasiIdsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public Builder clearQuasiIds() { + if (quasiIdsBuilder_ == null) { + quasiIds_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + quasiIdsBuilder_.clear(); + } + return this; + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public Builder removeQuasiIds(int index) { + if (quasiIdsBuilder_ == null) { + ensureQuasiIdsIsMutable(); + quasiIds_.remove(index); + onChanged(); + } else { + quasiIdsBuilder_.remove(index); + } + return this; + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder getQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().getBuilder(index); + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder getQuasiIdsOrBuilder( + int index) { + if (quasiIdsBuilder_ == null) { + return quasiIds_.get(index); } else { + return quasiIdsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public java.util.List + getQuasiIdsOrBuilderList() { + if (quasiIdsBuilder_ != null) { + return quasiIdsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(quasiIds_); + } + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder addQuasiIdsBuilder() { + return getQuasiIdsFieldBuilder().addBuilder( + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance()); + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder addQuasiIdsBuilder( + int index) { + return getQuasiIdsFieldBuilder().addBuilder( + index, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.getDefaultInstance()); + } + /** + *
+     * Quasi-identifier columns. [required]
+     * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + public java.util.List + getQuasiIdsBuilderList() { + return getQuasiIdsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder> + getQuasiIdsFieldBuilder() { + if (quasiIdsBuilder_ == null) { + quasiIdsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.Builder, com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder>( + quasiIds_, + ((bitField0_ & 0x00000002) == 0x00000002), + getParentForChildren(), + isClean()); + quasiIds_ = null; + } + return quasiIdsBuilder_; + } + + private com.google.privacy.dlp.v2.FieldId relativeFrequency_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> relativeFrequencyBuilder_; + /** + *
+     * The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + public boolean hasRelativeFrequency() { + return relativeFrequencyBuilder_ != null || relativeFrequency_ != null; + } + /** + *
+     * The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + public com.google.privacy.dlp.v2.FieldId getRelativeFrequency() { + if (relativeFrequencyBuilder_ == null) { + return relativeFrequency_ == null ? com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; + } else { + return relativeFrequencyBuilder_.getMessage(); + } + } + /** + *
+     * The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + public Builder setRelativeFrequency(com.google.privacy.dlp.v2.FieldId value) { + if (relativeFrequencyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + relativeFrequency_ = value; + onChanged(); + } else { + relativeFrequencyBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + public Builder setRelativeFrequency( + com.google.privacy.dlp.v2.FieldId.Builder builderForValue) { + if (relativeFrequencyBuilder_ == null) { + relativeFrequency_ = builderForValue.build(); + onChanged(); + } else { + relativeFrequencyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + public Builder mergeRelativeFrequency(com.google.privacy.dlp.v2.FieldId value) { + if (relativeFrequencyBuilder_ == null) { + if (relativeFrequency_ != null) { + relativeFrequency_ = + com.google.privacy.dlp.v2.FieldId.newBuilder(relativeFrequency_).mergeFrom(value).buildPartial(); + } else { + relativeFrequency_ = value; + } + onChanged(); + } else { + relativeFrequencyBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + public Builder clearRelativeFrequency() { + if (relativeFrequencyBuilder_ == null) { + relativeFrequency_ = null; + onChanged(); + } else { + relativeFrequency_ = null; + relativeFrequencyBuilder_ = null; + } + + return this; + } + /** + *
+     * The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + public com.google.privacy.dlp.v2.FieldId.Builder getRelativeFrequencyBuilder() { + + onChanged(); + return getRelativeFrequencyFieldBuilder().getBuilder(); + } + /** + *
+     * The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + public com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder() { + if (relativeFrequencyBuilder_ != null) { + return relativeFrequencyBuilder_.getMessageOrBuilder(); + } else { + return relativeFrequency_ == null ? + com.google.privacy.dlp.v2.FieldId.getDefaultInstance() : relativeFrequency_; + } + } + /** + *
+     * The relative frequency column must contain a floating-point number
+     * between 0 and 1 (inclusive). Null values are assumed to be zero.
+     * [required]
+     * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder> + getRelativeFrequencyFieldBuilder() { + if (relativeFrequencyBuilder_ == null) { + relativeFrequencyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.privacy.dlp.v2.FieldId, com.google.privacy.dlp.v2.FieldId.Builder, com.google.privacy.dlp.v2.FieldIdOrBuilder>( + getRelativeFrequency(), + getParentForChildren(), + isClean()); + relativeFrequency_ = null; + } + return relativeFrequencyBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.privacy.dlp.v2.StatisticalTable) + } + + // @@protoc_insertion_point(class_scope:google.privacy.dlp.v2.StatisticalTable) + private static final com.google.privacy.dlp.v2.StatisticalTable DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.privacy.dlp.v2.StatisticalTable(); + } + + public static com.google.privacy.dlp.v2.StatisticalTable getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StatisticalTable parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StatisticalTable(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.privacy.dlp.v2.StatisticalTable getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java new file mode 100644 index 000000000000..7c14ad56f6ce --- /dev/null +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/StatisticalTableOrBuilder.java @@ -0,0 +1,109 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/privacy/dlp/v2/dlp.proto + +package com.google.privacy.dlp.v2; + +public interface StatisticalTableOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.privacy.dlp.v2.StatisticalTable) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Auxiliary table location. [required]
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + boolean hasTable(); + /** + *
+   * Auxiliary table location. [required]
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + com.google.privacy.dlp.v2.BigQueryTable getTable(); + /** + *
+   * Auxiliary table location. [required]
+   * 
+ * + * .google.privacy.dlp.v2.BigQueryTable table = 3; + */ + com.google.privacy.dlp.v2.BigQueryTableOrBuilder getTableOrBuilder(); + + /** + *
+   * Quasi-identifier columns. [required]
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + java.util.List + getQuasiIdsList(); + /** + *
+   * Quasi-identifier columns. [required]
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField getQuasiIds(int index); + /** + *
+   * Quasi-identifier columns. [required]
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + int getQuasiIdsCount(); + /** + *
+   * Quasi-identifier columns. [required]
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + java.util.List + getQuasiIdsOrBuilderList(); + /** + *
+   * Quasi-identifier columns. [required]
+   * 
+ * + * repeated .google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField quasi_ids = 1; + */ + com.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierFieldOrBuilder getQuasiIdsOrBuilder( + int index); + + /** + *
+   * The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + boolean hasRelativeFrequency(); + /** + *
+   * The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + com.google.privacy.dlp.v2.FieldId getRelativeFrequency(); + /** + *
+   * The relative frequency column must contain a floating-point number
+   * between 0 and 1 (inclusive). Null values are assumed to be zero.
+   * [required]
+   * 
+ * + * .google.privacy.dlp.v2.FieldId relative_frequency = 2; + */ + com.google.privacy.dlp.v2.FieldIdOrBuilder getRelativeFrequencyOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java index aa4c01bc2f66..7626022df5db 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/java/com/google/privacy/dlp/v2/Table.java @@ -6,6 +6,8 @@ /** *
  * Structured content to inspect. Up to 50,000 `Value`s per request allowed.
+ * See https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+ * learn more.
  * 
* * Protobuf type {@code google.privacy.dlp.v2.Table} @@ -1099,6 +1101,8 @@ protected Builder newBuilderForType( /** *
    * Structured content to inspect. Up to 50,000 `Value`s per request allowed.
+   * See https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to
+   * learn more.
    * 
* * Protobuf type {@code google.privacy.dlp.v2.Table} diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto index d590a82c48e6..4b151b3ed685 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/dlp.proto @@ -41,11 +41,19 @@ option php_namespace = "Google\\Cloud\\Dlp\\V2"; // blocks or images. // The service also includes methods for sensitive data redaction and // scheduling of data scans on Google Cloud Platform based data sets. +// +// To learn more about concepts and find how-to guides see +// https://cloud.google.com/dlp/docs/. service DlpService { // Finds potentially sensitive info in content. // This method has limits on input size, processing time, and output size. - // [How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for - // images](/dlp/docs/inspecting-images) + // + // When no InfoTypes or CustomInfoTypes are specified in this request, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. + // + // For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images + // and https://cloud.google.com/dlp/docs/inspecting-text, rpc InspectContent(InspectContentRequest) returns (InspectContentResponse) { option (google.api.http) = { post: "/v2/{parent=projects/*}/content:inspect" @@ -55,7 +63,12 @@ service DlpService { // Redacts potentially sensitive info from an image. // This method has limits on input size, processing time, and output size. - // [How-to guide](/dlp/docs/redacting-sensitive-data-images) + // See https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to + // learn more. + // + // When no InfoTypes or CustomInfoTypes are specified in this request, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. rpc RedactImage(RedactImageRequest) returns (RedactImageResponse) { option (google.api.http) = { post: "/v2/{parent=projects/*}/image:redact" @@ -65,7 +78,12 @@ service DlpService { // De-identifies potentially sensitive info from a ContentItem. // This method has limits on input size and output size. - // [How-to guide](/dlp/docs/deidentify-sensitive-data) + // See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to + // learn more. + // + // When no InfoTypes or CustomInfoTypes are specified in this request, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. rpc DeidentifyContent(DeidentifyContentRequest) returns (DeidentifyContentResponse) { option (google.api.http) = { post: "/v2/{parent=projects/*}/content:deidentify" @@ -74,6 +92,9 @@ service DlpService { } // Re-identifies content that has been de-identified. + // See + // https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example + // to learn more. rpc ReidentifyContent(ReidentifyContentRequest) returns (ReidentifyContentResponse) { option (google.api.http) = { post: "/v2/{parent=projects/*}/content:reidentify" @@ -82,8 +103,8 @@ service DlpService { } // Returns a list of the sensitive information types that the DLP API - // supports. For more information, see [Listing supported predefined - // infoTypes](/dlp/docs/listing-infotypes). + // supports. See https://cloud.google.com/dlp/docs/infotypes-reference to + // learn more. rpc ListInfoTypes(ListInfoTypesRequest) returns (ListInfoTypesResponse) { option (google.api.http) = { get: "/v2/infoTypes" @@ -92,6 +113,7 @@ service DlpService { // Creates an InspectTemplate for re-using frequently used configuration // for inspecting content, images, and storage. + // See https://cloud.google.com/dlp/docs/creating-templates to learn more. rpc CreateInspectTemplate(CreateInspectTemplateRequest) returns (InspectTemplate) { option (google.api.http) = { post: "/v2/{parent=organizations/*}/inspectTemplates" @@ -104,6 +126,7 @@ service DlpService { } // Updates the InspectTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates to learn more. rpc UpdateInspectTemplate(UpdateInspectTemplateRequest) returns (InspectTemplate) { option (google.api.http) = { patch: "/v2/{name=organizations/*/inspectTemplates/*}" @@ -116,6 +139,7 @@ service DlpService { } // Gets an InspectTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates to learn more. rpc GetInspectTemplate(GetInspectTemplateRequest) returns (InspectTemplate) { option (google.api.http) = { get: "/v2/{name=organizations/*/inspectTemplates/*}" @@ -126,6 +150,7 @@ service DlpService { } // Lists InspectTemplates. + // See https://cloud.google.com/dlp/docs/creating-templates to learn more. rpc ListInspectTemplates(ListInspectTemplatesRequest) returns (ListInspectTemplatesResponse) { option (google.api.http) = { get: "/v2/{parent=organizations/*}/inspectTemplates" @@ -136,6 +161,7 @@ service DlpService { } // Deletes an InspectTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates to learn more. rpc DeleteInspectTemplate(DeleteInspectTemplateRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=organizations/*/inspectTemplates/*}" @@ -147,6 +173,8 @@ service DlpService { // Creates a DeidentifyTemplate for re-using frequently used configuration // for de-identifying content, images, and storage. + // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + // more. rpc CreateDeidentifyTemplate(CreateDeidentifyTemplateRequest) returns (DeidentifyTemplate) { option (google.api.http) = { post: "/v2/{parent=organizations/*}/deidentifyTemplates" @@ -159,6 +187,8 @@ service DlpService { } // Updates the DeidentifyTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + // more. rpc UpdateDeidentifyTemplate(UpdateDeidentifyTemplateRequest) returns (DeidentifyTemplate) { option (google.api.http) = { patch: "/v2/{name=organizations/*/deidentifyTemplates/*}" @@ -171,6 +201,8 @@ service DlpService { } // Gets a DeidentifyTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + // more. rpc GetDeidentifyTemplate(GetDeidentifyTemplateRequest) returns (DeidentifyTemplate) { option (google.api.http) = { get: "/v2/{name=organizations/*/deidentifyTemplates/*}" @@ -181,6 +213,8 @@ service DlpService { } // Lists DeidentifyTemplates. + // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + // more. rpc ListDeidentifyTemplates(ListDeidentifyTemplatesRequest) returns (ListDeidentifyTemplatesResponse) { option (google.api.http) = { get: "/v2/{parent=organizations/*}/deidentifyTemplates" @@ -191,6 +225,8 @@ service DlpService { } // Deletes a DeidentifyTemplate. + // See https://cloud.google.com/dlp/docs/creating-templates-deid to learn + // more. rpc DeleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=organizations/*/deidentifyTemplates/*}" @@ -202,6 +238,7 @@ service DlpService { // Creates a job trigger to run DLP actions such as scanning storage for // sensitive information on a set schedule. + // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. rpc CreateJobTrigger(CreateJobTriggerRequest) returns (JobTrigger) { option (google.api.http) = { post: "/v2/{parent=projects/*}/jobTriggers" @@ -210,6 +247,7 @@ service DlpService { } // Updates a job trigger. + // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. rpc UpdateJobTrigger(UpdateJobTriggerRequest) returns (JobTrigger) { option (google.api.http) = { patch: "/v2/{name=projects/*/jobTriggers/*}" @@ -218,6 +256,7 @@ service DlpService { } // Gets a job trigger. + // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. rpc GetJobTrigger(GetJobTriggerRequest) returns (JobTrigger) { option (google.api.http) = { get: "/v2/{name=projects/*/jobTriggers/*}" @@ -225,6 +264,7 @@ service DlpService { } // Lists job triggers. + // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. rpc ListJobTriggers(ListJobTriggersRequest) returns (ListJobTriggersResponse) { option (google.api.http) = { get: "/v2/{parent=projects/*}/jobTriggers" @@ -232,6 +272,7 @@ service DlpService { } // Deletes a job trigger. + // See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. rpc DeleteJobTrigger(DeleteJobTriggerRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=projects/*/jobTriggers/*}" @@ -239,7 +280,12 @@ service DlpService { } // Creates a new job to inspect storage or calculate risk metrics. - // [How-to guide](/dlp/docs/compute-risk-analysis). + // See https://cloud.google.com/dlp/docs/inspecting-storage and + // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + // + // When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. rpc CreateDlpJob(CreateDlpJobRequest) returns (DlpJob) { option (google.api.http) = { post: "/v2/{parent=projects/*}/dlpJobs" @@ -248,6 +294,8 @@ service DlpService { } // Lists DlpJobs that match the specified filter in the request. + // See https://cloud.google.com/dlp/docs/inspecting-storage and + // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. rpc ListDlpJobs(ListDlpJobsRequest) returns (ListDlpJobsResponse) { option (google.api.http) = { get: "/v2/{parent=projects/*}/dlpJobs" @@ -255,6 +303,8 @@ service DlpService { } // Gets the latest state of a long-running DlpJob. + // See https://cloud.google.com/dlp/docs/inspecting-storage and + // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. rpc GetDlpJob(GetDlpJobRequest) returns (DlpJob) { option (google.api.http) = { get: "/v2/{name=projects/*/dlpJobs/*}" @@ -264,6 +314,8 @@ service DlpService { // Deletes a long-running DlpJob. This method indicates that the client is // no longer interested in the DlpJob result. The job will be cancelled if // possible. + // See https://cloud.google.com/dlp/docs/inspecting-storage and + // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. rpc DeleteDlpJob(DeleteDlpJobRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v2/{name=projects/*/dlpJobs/*}" @@ -273,6 +325,8 @@ service DlpService { // Starts asynchronous cancellation on a long-running DlpJob. The server // makes a best effort to cancel the DlpJob, but success is not // guaranteed. + // See https://cloud.google.com/dlp/docs/inspecting-storage and + // https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. rpc CancelDlpJob(CancelDlpJobRequest) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v2/{name=projects/*/dlpJobs/*}:cancel" @@ -315,11 +369,17 @@ message InspectConfig { } // Restricts what info_types to look for. The values must correspond to - // InfoType values returned by ListInfoTypes or found in documentation. + // InfoType values returned by ListInfoTypes or listed at + // https://cloud.google.com/dlp/docs/infotypes-reference. + // + // When no InfoTypes or CustomInfoTypes are specified in a request, the + // system may automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. repeated InfoType info_types = 1; // Only returns findings equal or above this threshold. The default is // POSSIBLE. + // See https://cloud.google.com/dlp/docs/likelihood to learn more. Likelihood min_likelihood = 2; FindingLimits limits = 3; @@ -331,7 +391,8 @@ message InspectConfig { // When true, excludes type information of the findings. bool exclude_info_types = 5; - // Custom infoTypes provided by the user. + // CustomInfoTypes provided by the user. See + // https://cloud.google.com/dlp/docs/creating-custom-infotypes to learn more. repeated CustomInfoType custom_info_types = 6; // List of options defining data content to scan. @@ -371,7 +432,9 @@ message ContentItem { // String data to inspect or redact. string value = 3; - // Structured content for inspection. + // Structured content for inspection. See + // https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to + // learn more. Table table = 4; // Content data to inspect or redact. Replaces `type` and `data`. @@ -380,6 +443,8 @@ message ContentItem { } // Structured content to inspect. Up to 50,000 `Value`s per request allowed. +// See https://cloud.google.com/dlp/docs/inspecting-text#inspecting_a_table to +// learn more. message Table { message Row { repeated Value values = 1; @@ -408,16 +473,16 @@ message InspectResult { message Finding { // The content that was found. Even if the content is not textual, it // may be converted to a textual representation here. - // Provided if requested by the `InspectConfig` and the finding is + // Provided if `include_quote` is true and the finding is // less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes // in length, the quote may be omitted. string quote = 1; // The type of content that might have been found. - // Provided if requested by the `InspectConfig`. + // Provided if `excluded_types` is false. InfoType info_type = 2; - // Estimate of how likely it is that the `info_type` is correct. + // Confidence of how likely it is that the `info_type` is correct. Likelihood likelihood = 3; // Where the content was found. @@ -537,8 +602,8 @@ message BoundingBox { int32 height = 4; } -// Request to search for potentially sensitive info in a list of items -// and replace it with a default or provided content. +// Request to search for potentially sensitive info in an image and redact it +// by covering it with a colored rectangle. message RedactImageRequest { // Configuration for determining how redaction of images should occur. message ImageRedactionConfig { @@ -551,7 +616,7 @@ message RedactImageRequest { InfoType info_type = 1; // If true, all text found in the image, regardless whether it matches an - // info_type, is redacted. + // info_type, is redacted. Only one should be provided. bool redact_all_text = 2; } @@ -569,6 +634,10 @@ message RedactImageRequest { // The configuration for specifying what content to redact from images. repeated ImageRedactionConfig image_redaction_configs = 5; + // Whether the response should include findings along with the redacted + // image. + bool include_findings = 6; + // The content must be PNG, JPEG, SVG or BMP. ByteContentItem byte_item = 7; } @@ -594,6 +663,9 @@ message RedactImageResponse { // set to true, then this field will include all text, if any, that was found // in the image. string extracted_text = 2; + + // The findings. Populated when include_findings in the request is true. + InspectResult inspect_result = 3; } // Request to de-identify a list of items. @@ -736,18 +808,27 @@ message OutputStorageConfig { oneof type { // Store findings in an existing table or a new table in an existing - // dataset. Each column in an existing table must have the same name, type, - // and mode of a field in the `Finding` object. If table_id is not set a new - // one will be generated for you with the following format: + // dataset. If table_id is not set a new one will be generated + // for you with the following format: // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific timezone will be used for // generating the date details. + // + // For Inspect, each column in an existing output table must have the same + // name, type, and mode of a field in the `Finding` object. + // + // For Risk, an existing output table should be the output of a previous + // Risk analysis job run on the same source table, with the same privacy + // metric and quasi-identifiers. Risk jobs that analyze the same table but + // compute a different privacy metric, or use different sets of + // quasi-identifiers, cannot store their results in the same table. BigQueryTable table = 1; } - // Schema used for writing the findings. Columns are derived from the - // `Finding` object. If appending to an existing table, any columns from the - // predefined schema that are missing will be added. No columns in the - // existing table will be deleted. + // Schema used for writing the findings for Inspect jobs. This field is only + // used for Inspect and must be unspecified for Risk jobs. Columns are derived + // from the `Finding` object. If appending to an existing table, any columns + // from the predefined schema that are missing will be added. No columns in + // the existing table will be deleted. // // If unspecified, then all available columns will be used for a new table, // and no changes will be made to an existing table. @@ -822,7 +903,8 @@ message ListInfoTypesResponse { repeated InfoTypeDescription info_types = 1; } -// Configuration for a risk analysis job. +// Configuration for a risk analysis job. See +// https://cloud.google.com/dlp/docs/concepts-risk-analysis to learn more. message RiskAnalysisJobConfig { // Privacy metric to compute. PrivacyMetric privacy_metric = 1; @@ -835,6 +917,61 @@ message RiskAnalysisJobConfig { repeated Action actions = 3; } +// A column with a semantic tag attached. +message QuasiId { + // Identifies the column. [required] + FieldId field = 1; + + // Semantic tag that identifies what a column contains, to determine which + // statistical model to use to estimate the reidentifiability of each + // value. [required] + oneof tag { + // A column can be tagged with a InfoType to use the relevant public + // dataset as a statistical model of population, if available. We + // currently support US ZIP codes, region codes, ages and genders. + // To programmatically obtain the list of supported InfoTypes, use + // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. + InfoType info_type = 2; + + // A column can be tagged with a custom tag. In this case, the user must + // indicate an auxiliary table that contains statistical information on + // the possible values of this column (below). + string custom_tag = 3; + + // If no semantic tag is indicated, we infer the statistical model from + // the distribution of values in the input data + google.protobuf.Empty inferred = 4; + } +} + +// An auxiliary table containing statistical information on the relative +// frequency of different quasi-identifiers values. It has one or several +// quasi-identifiers columns, and one column that indicates the relative +// frequency of each quasi-identifier tuple. +// If a tuple is present in the data but not in the auxiliary table, the +// corresponding relative frequency is assumed to be zero (and thus, the +// tuple is highly reidentifiable). +message StatisticalTable { + // A quasi-identifier column has a custom_tag, used to know which column + // in the data corresponds to which column in the statistical model. + message QuasiIdentifierField { + FieldId field = 1; + + string custom_tag = 2; + } + + // Auxiliary table location. [required] + BigQueryTable table = 3; + + // Quasi-identifier columns. [required] + repeated QuasiIdentifierField quasi_ids = 1; + + // The relative frequency column must contain a floating-point number + // between 0 and 1 (inclusive). Null values are assumed to be zero. + // [required] + FieldId relative_frequency = 2; +} + // Privacy metric to compute for reidentification risk analysis. message PrivacyMetric { // Compute numerical stats over an individual column, including @@ -965,6 +1102,26 @@ message PrivacyMetric { repeated AuxiliaryTable auxiliary_tables = 3; } + // δ-presence metric, used to estimate how likely it is for an attacker to + // figure out that one given individual appears in a de-identified dataset. + // Similarly to the k-map metric, we cannot compute δ-presence exactly without + // knowing the attack dataset, so we use a statistical model instead. + message DeltaPresenceEstimationConfig { + // Fields considered to be quasi-identifiers. No two fields can have the + // same tag. [required] + repeated QuasiId quasi_ids = 1; + + // ISO 3166-1 alpha-2 region code to use in the statistical modeling. + // Required if no column is tagged with a region-specific InfoType (like + // US_ZIP_5) or a region code. + string region_code = 2; + + // Several auxiliary tables can be used in the analysis. Each custom_tag + // used to tag a quasi-identifiers field must appear in exactly one + // field of one auxiliary table. + repeated StatisticalTable auxiliary_tables = 3; + } + oneof type { NumericalStatsConfig numerical_stats_config = 1; @@ -975,6 +1132,8 @@ message PrivacyMetric { LDiversityConfig l_diversity_config = 4; KMapEstimationConfig k_map_estimation_config = 5; + + DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; } } @@ -1144,6 +1303,63 @@ message AnalyzeDataSourceRiskDetails { repeated KMapEstimationHistogramBucket k_map_estimation_histogram = 1; } + // Result of the δ-presence computation. Note that these results are an + // estimation, not exact values. + message DeltaPresenceEstimationResult { + // A tuple of values for the quasi-identifier columns. + message DeltaPresenceEstimationQuasiIdValues { + // The quasi-identifier values. + repeated Value quasi_ids_values = 1; + + // The estimated probability that a given individual sharing these + // quasi-identifier values is in the dataset. This value, typically called + // δ, is the ratio between the number of records in the dataset with these + // quasi-identifier values, and the total number of individuals (inside + // *and* outside the dataset) with these quasi-identifier values. + // For example, if there are 15 individuals in the dataset who share the + // same quasi-identifier values, and an estimated 100 people in the entire + // population with these values, then δ is 0.15. + double estimated_probability = 2; + } + + // A DeltaPresenceEstimationHistogramBucket message with the following + // values: + // min_probability: 0.1 + // max_probability: 0.2 + // frequency: 42 + // means that there are 42 records for which δ is in [0.1, 0.2). An + // important particular case is when min_probability = max_probability = 1: + // then, every individual who shares this quasi-identifier combination is in + // the dataset. + message DeltaPresenceEstimationHistogramBucket { + // Between 0 and 1. + double min_probability = 1; + + // Always greater than or equal to min_probability. + double max_probability = 2; + + // Number of records within these probability bounds. + int64 bucket_size = 5; + + // Sample of quasi-identifier tuple values in this bucket. The total + // number of classes returned per bucket is capped at 20. + repeated DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + + // Total number of distinct quasi-identifier tuple values in this bucket. + int64 bucket_value_count = 7; + } + + // The intervals [min_probability, max_probability) do not overlap. If a + // value doesn't correspond to any such interval, the associated frequency + // is zero. For example, the following records: + // {min_probability: 0, max_probability: 0.1, frequency: 17} + // {min_probability: 0.2, max_probability: 0.3, frequency: 42} + // {min_probability: 0.3, max_probability: 0.4, frequency: 99} + // mean that there are no record with an estimated probability in [0.1, 0.2) + // nor larger or equal to 0.4. + repeated DeltaPresenceEstimationHistogramBucket delta_presence_estimation_histogram = 1; + } + // Privacy metric to compute. PrivacyMetric requested_privacy_metric = 1; @@ -1161,6 +1377,8 @@ message AnalyzeDataSourceRiskDetails { LDiversityResult l_diversity_result = 6; KMapEstimationResult k_map_estimation_result = 7; + + DeltaPresenceEstimationResult delta_presence_estimation_result = 9; } } @@ -1395,6 +1613,8 @@ message CharacterMaskConfig { // If the bound Value type differs from the type of data // being transformed, we will first attempt converting the type of the data to // be transformed to match the type of the bound before comparing. +// +// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. message FixedSizeBucketingConfig { // Lower bound value of buckets. All values less than `lower_bound` are // grouped together into a single bucket; for example if `lower_bound` = 10, @@ -1422,6 +1642,7 @@ message FixedSizeBucketingConfig { // If the bound `Value` type differs from the type of data being transformed, we // will first attempt converting the type of the data to be transformed to match // the type of the bound before comparing. +// See https://cloud.google.com/dlp/docs/concepts-bucketing to learn more. message BucketingConfig { // Bucket is represented as a range, along with replacement values. message Bucket { @@ -1450,7 +1671,7 @@ message BucketingConfig { // replaced with the same surrogate. // Identifiers must be at least two characters long. // In the case that the identifier is the empty string, it will be skipped. -// See [Pseudonymization](/dlp/docs/pseudonymization) for example usage. +// See https://cloud.google.com/dlp/docs/pseudonymization to learn more. message CryptoReplaceFfxFpeConfig { // These are commonly used subsets of the alphabet that the FFX mode // natively supports. In the algorithm, the alphabet is selected using @@ -1587,7 +1808,8 @@ message KmsWrappedCryptoKey { } // Shifts dates by random number of days, with option to be consistent for the -// same context. +// same context. See https://cloud.google.com/dlp/docs/concepts-date-shifting +// to learn more. message DateShiftConfig { // Range of shift in days. Actual shift will be selected at random within this // range (inclusive ends). Negative means shift to earlier in time. Must not @@ -1623,8 +1845,9 @@ message InfoTypeTransformations { // A transformation to apply to text that is identified as a specific // info_type. message InfoTypeTransformation { - // InfoTypes to apply the transformation to. Empty list will match all - // available infoTypes for this transformation. + // InfoTypes to apply the transformation to. An empty list will cause + // this transformation to apply to all findings that correspond to + // infoTypes that were requested in `InspectConfig`. repeated InfoType info_types = 1; // Primitive transformation to apply to the infoType. [required] @@ -1801,20 +2024,21 @@ message TransformationSummary { message Schedule { oneof option { // With this option a job is started a regular periodic basis. For - // example: every 10 minutes. + // example: every day (86400 seconds). // // A scheduled start time will be skipped if the previous // execution has not ended when its scheduled time occurs. // // This value must be set to a time duration greater than or equal - // to 60 minutes and can be no longer than 60 days. + // to 1 day and can be no longer than 60 days. google.protobuf.Duration recurrence_period_duration = 1; } } // The inspectTemplate contains a configuration (set of types of sensitive data // to be detected) to be used anywhere you otherwise would normally specify -// InspectConfig. +// InspectConfig. See https://cloud.google.com/dlp/docs/concepts-templates +// to learn more. message InspectTemplate { // The template name. Output only. // @@ -1840,6 +2064,7 @@ message InspectTemplate { } // The DeidentifyTemplates contains instructions on how to deidentify content. +// See https://cloud.google.com/dlp/docs/concepts-templates to learn more. message DeidentifyTemplate { // The template name. Output only. // @@ -1875,6 +2100,7 @@ message Error { } // Contains a configuration to make dlp api calls on a repeating basis. +// See https://cloud.google.com/dlp/docs/concepts-job-triggers to learn more. message JobTrigger { // What event needs to occur for a new job to be started. message Trigger { @@ -1942,11 +2168,12 @@ message JobTrigger { } // A task to execute on the completion of a job. +// See https://cloud.google.com/dlp/docs/concepts-actions to learn more. message Action { // If set, the detailed findings will be persisted to the specified // OutputStorageConfig. Only a single instance of this action can be // specified. - // Compatible with: Inspect + // Compatible with: Inspect, Risk message SaveFindings { OutputStorageConfig output_config = 1; } @@ -2116,30 +2343,29 @@ message CreateDlpJobRequest { // Request message for ListJobTriggers. message ListJobTriggersRequest { - // The parent resource name, for example projects/my-project-id. + // The parent resource name, for example `projects/my-project-id`. string parent = 1; // Optional page token to continue retrieval. Comes from previous call - // to ListJobTriggers. `order_by` and `filter` should not change for - // subsequent calls, but can be omitted if token is specified. + // to ListJobTriggers. `order_by` field must not + // change for subsequent calls. string page_token = 2; // Optional size of the page, can be limited by a server. int32 page_size = 3; // Optional comma separated list of triggeredJob fields to order by, - // followed by 'asc/desc' postfix, i.e. - // `"create_time asc,name desc,schedule_mode asc"`. This list is - // case-insensitive. + // followed by `asc` or `desc` postfix. This list is case-insensitive, + // default sorting order is ascending, redundant space characters are + // insignificant. // - // Example: `"name asc,schedule_mode desc, status desc"` + // Example: `name asc,update_time, create_time desc` // - // Supported filters keys and values are: + // Supported fields are: // // - `create_time`: corresponds to time the triggeredJob was created. // - `update_time`: corresponds to time the triggeredJob was last updated. - // - `name`: corresponds to JobTrigger's display name. - // - `status`: corresponds to the triggeredJob status. + // - `name`: corresponds to JobTrigger's name. string order_by = 4; } diff --git a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto index cb8e9c973cac..5c2ca5031a49 100644 --- a/google-api-grpc/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto +++ b/google-api-grpc/proto-google-cloud-dlp-v2/src/main/proto/google/privacy/dlp/v2/storage.proto @@ -29,7 +29,10 @@ option php_namespace = "Google\\Cloud\\Dlp\\V2"; // Type of information detected by the API. message InfoType { - // Name of the information type. + // Name of the information type. Either a name of your choosing when + // creating a CustomInfoType, or one of the names listed + // at https://cloud.google.com/dlp/docs/infotypes-reference when specifying + // a built-in type. string name = 1; } @@ -86,13 +89,13 @@ message CustomInfoType { // These types of transformations are // those that perform pseudonymization, thereby producing a "surrogate" as // output. This should be used in conjunction with a field on the - // transformation such as `surrogate_info_type`. This custom info type does + // transformation such as `surrogate_info_type`. This CustomInfoType does // not support the use of `detection_rules`. message SurrogateType { } - // Rule for modifying a custom info type to alter behavior under certain + // Rule for modifying a CustomInfoType to alter behavior under certain // circumstances, depending on the specific details of the rule. Not supported // for the `surrogate_type` custom info type. message DetectionRule { @@ -125,10 +128,10 @@ message CustomInfoType { } } - // Detection rule that adjusts the likelihood of findings within a certain + // The rule that adjusts the likelihood of findings within a certain // proximity of hotwords. message HotwordRule { - // Regex pattern defining what qualifies as a hotword. + // Regular expression pattern defining what qualifies as a hotword. Regex hotword_regex = 1; // Proximity of the finding within which the entire hotword must reside. @@ -151,29 +154,30 @@ message CustomInfoType { } } - // Info type configuration. All custom info types must have configurations - // that do not conflict with built-in info types or other custom info types. + // All CustomInfoTypes must have a name + // that does not conflict with built-in InfoTypes or other CustomInfoTypes. InfoType info_type = 1; - // Likelihood to return for this custom info type. This base value can be + // Likelihood to return for this CustomInfoType. This base value can be // altered by a detection rule if the finding meets the criteria specified by // the rule. Defaults to `VERY_LIKELY` if not specified. Likelihood likelihood = 6; oneof type { - // Dictionary-based custom info type. + // A list of phrases to detect as a CustomInfoType. Dictionary dictionary = 2; - // Regex-based custom info type. + // Regular expression based CustomInfoType. Regex regex = 3; - // Surrogate info type. + // Message for detecting output from deidentification transformations that + // support reversing. SurrogateType surrogate_type = 4; } - // Set of detection rules to apply to all findings of this custom info type. + // Set of detection rules to apply to all findings of this CustomInfoType. // Rules are applied in order that they are specified. Not supported for the - // `surrogate_type` custom info type. + // `surrogate_type` CustomInfoType. repeated DetectionRule detection_rules = 7; } @@ -438,7 +442,7 @@ message EntityId { // Categorization of results based on how likely they are to represent a match, // based on the number of elements they contain which imply a match. enum Likelihood { - // Default value; information with all likelihoods is included. + // Default value; same as POSSIBLE. LIKELIHOOD_UNSPECIFIED = 0; // Few matching elements. diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java index 9f61bec7c249..77dfd9117fbc 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateExclusionRequest.java @@ -47,13 +47,6 @@ private CreateExclusionRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -73,6 +66,13 @@ private CreateExclusionRequest( break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private CreateExclusionRequest( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_CreateExclusionRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_CreateExclusionRequest_fieldAccessorTable @@ -186,6 +187,7 @@ public com.google.logging.v2.LogExclusionOrBuilder getExclusionOrBuilder() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -195,6 +197,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { @@ -206,6 +209,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -333,6 +337,7 @@ public static com.google.logging.v2.CreateExclusionRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -340,6 +345,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.CreateExclusionRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -367,6 +373,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_CreateExclusionRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_CreateExclusionRequest_fieldAccessorTable @@ -389,6 +396,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); parent_ = ""; @@ -402,15 +410,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_CreateExclusionRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.CreateExclusionRequest getDefaultInstanceForType() { return com.google.logging.v2.CreateExclusionRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.CreateExclusionRequest build() { com.google.logging.v2.CreateExclusionRequest result = buildPartial(); if (!result.isInitialized()) { @@ -419,6 +430,7 @@ public com.google.logging.v2.CreateExclusionRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.CreateExclusionRequest buildPartial() { com.google.logging.v2.CreateExclusionRequest result = new com.google.logging.v2.CreateExclusionRequest(this); result.parent_ = parent_; @@ -431,32 +443,39 @@ public com.google.logging.v2.CreateExclusionRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.CreateExclusionRequest) { return mergeFrom((com.google.logging.v2.CreateExclusionRequest)other); @@ -480,10 +499,12 @@ public Builder mergeFrom(com.google.logging.v2.CreateExclusionRequest other) { 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) @@ -777,11 +798,13 @@ public com.google.logging.v2.LogExclusionOrBuilder getExclusionOrBuilder() { } return exclusionBuilder_; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -803,6 +826,7 @@ public static com.google.logging.v2.CreateExclusionRequest getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public CreateExclusionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -820,6 +844,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.CreateExclusionRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java index cc5a6e06a05b..836d17451734 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateLogMetricRequest.java @@ -47,13 +47,6 @@ private CreateLogMetricRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -73,6 +66,13 @@ private CreateLogMetricRequest( break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private CreateLogMetricRequest( return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_CreateLogMetricRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_CreateLogMetricRequest_fieldAccessorTable @@ -180,6 +181,7 @@ public com.google.logging.v2.LogMetricOrBuilder getMetricOrBuilder() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -189,6 +191,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { @@ -200,6 +203,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -327,6 +331,7 @@ public static com.google.logging.v2.CreateLogMetricRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -334,6 +339,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.CreateLogMetricRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -361,6 +367,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_CreateLogMetricRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_CreateLogMetricRequest_fieldAccessorTable @@ -383,6 +390,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); parent_ = ""; @@ -396,15 +404,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_CreateLogMetricRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.CreateLogMetricRequest getDefaultInstanceForType() { return com.google.logging.v2.CreateLogMetricRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.CreateLogMetricRequest build() { com.google.logging.v2.CreateLogMetricRequest result = buildPartial(); if (!result.isInitialized()) { @@ -413,6 +424,7 @@ public com.google.logging.v2.CreateLogMetricRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.CreateLogMetricRequest buildPartial() { com.google.logging.v2.CreateLogMetricRequest result = new com.google.logging.v2.CreateLogMetricRequest(this); result.parent_ = parent_; @@ -425,32 +437,39 @@ public com.google.logging.v2.CreateLogMetricRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.CreateLogMetricRequest) { return mergeFrom((com.google.logging.v2.CreateLogMetricRequest)other); @@ -474,10 +493,12 @@ public Builder mergeFrom(com.google.logging.v2.CreateLogMetricRequest other) { 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) @@ -756,11 +777,13 @@ public com.google.logging.v2.LogMetricOrBuilder getMetricOrBuilder() { } return metricBuilder_; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -782,6 +805,7 @@ public static com.google.logging.v2.CreateLogMetricRequest getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public CreateLogMetricRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -799,6 +823,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.CreateLogMetricRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java index d2b76a787b3e..9dd5482aaf26 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/CreateSinkRequest.java @@ -48,13 +48,6 @@ private CreateSinkRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -79,6 +72,13 @@ private CreateSinkRequest( uniqueWriterIdentity_ = input.readBool(); break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -96,6 +96,7 @@ private CreateSinkRequest( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_CreateSinkRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_CreateSinkRequest_fieldAccessorTable @@ -214,6 +215,7 @@ public boolean getUniqueWriterIdentity() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -223,6 +225,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { @@ -237,6 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -373,6 +377,7 @@ public static com.google.logging.v2.CreateSinkRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -380,6 +385,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.CreateSinkRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -407,6 +413,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_CreateSinkRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_CreateSinkRequest_fieldAccessorTable @@ -429,6 +436,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); parent_ = ""; @@ -444,15 +452,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_CreateSinkRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.CreateSinkRequest getDefaultInstanceForType() { return com.google.logging.v2.CreateSinkRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.CreateSinkRequest build() { com.google.logging.v2.CreateSinkRequest result = buildPartial(); if (!result.isInitialized()) { @@ -461,6 +472,7 @@ public com.google.logging.v2.CreateSinkRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.CreateSinkRequest buildPartial() { com.google.logging.v2.CreateSinkRequest result = new com.google.logging.v2.CreateSinkRequest(this); result.parent_ = parent_; @@ -474,32 +486,39 @@ public com.google.logging.v2.CreateSinkRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.CreateSinkRequest) { return mergeFrom((com.google.logging.v2.CreateSinkRequest)other); @@ -526,10 +545,12 @@ public Builder mergeFrom(com.google.logging.v2.CreateSinkRequest other) { 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) @@ -888,11 +909,13 @@ public Builder clearUniqueWriterIdentity() { onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -914,6 +937,7 @@ public static com.google.logging.v2.CreateSinkRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public CreateSinkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -931,6 +955,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.CreateSinkRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java index 401fa96a2a9b..3bda797775c7 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteExclusionRequest.java @@ -47,6 +47,12 @@ private DeleteExclusionRequest( case 0: done = true; break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { @@ -54,12 +60,6 @@ private DeleteExclusionRequest( } break; } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -77,6 +77,7 @@ private DeleteExclusionRequest( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_DeleteExclusionRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_DeleteExclusionRequest_fieldAccessorTable @@ -137,6 +138,7 @@ public java.lang.String getName() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -146,6 +148,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { @@ -154,6 +157,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -268,6 +272,7 @@ public static com.google.logging.v2.DeleteExclusionRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -275,6 +280,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.DeleteExclusionRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -302,6 +308,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_DeleteExclusionRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_DeleteExclusionRequest_fieldAccessorTable @@ -324,6 +331,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); name_ = ""; @@ -331,15 +339,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_DeleteExclusionRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.DeleteExclusionRequest getDefaultInstanceForType() { return com.google.logging.v2.DeleteExclusionRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.DeleteExclusionRequest build() { com.google.logging.v2.DeleteExclusionRequest result = buildPartial(); if (!result.isInitialized()) { @@ -348,6 +359,7 @@ public com.google.logging.v2.DeleteExclusionRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.DeleteExclusionRequest buildPartial() { com.google.logging.v2.DeleteExclusionRequest result = new com.google.logging.v2.DeleteExclusionRequest(this); result.name_ = name_; @@ -355,32 +367,39 @@ public com.google.logging.v2.DeleteExclusionRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.DeleteExclusionRequest) { return mergeFrom((com.google.logging.v2.DeleteExclusionRequest)other); @@ -401,10 +420,12 @@ public Builder mergeFrom(com.google.logging.v2.DeleteExclusionRequest other) { 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) @@ -536,11 +557,13 @@ public Builder setNameBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -562,6 +585,7 @@ public static com.google.logging.v2.DeleteExclusionRequest getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public DeleteExclusionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -579,6 +603,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.DeleteExclusionRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java index 1bc434af0cb5..efc313242363 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogMetricRequest.java @@ -47,6 +47,12 @@ private DeleteLogMetricRequest( case 0: done = true; break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + metricName_ = s; + break; + } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { @@ -54,12 +60,6 @@ private DeleteLogMetricRequest( } break; } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - metricName_ = s; - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -77,6 +77,7 @@ private DeleteLogMetricRequest( return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_DeleteLogMetricRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_DeleteLogMetricRequest_fieldAccessorTable @@ -129,6 +130,7 @@ public java.lang.String getMetricName() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -138,6 +140,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getMetricNameBytes().isEmpty()) { @@ -146,6 +149,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -260,6 +264,7 @@ public static com.google.logging.v2.DeleteLogMetricRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -267,6 +272,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.DeleteLogMetricRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -294,6 +300,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_DeleteLogMetricRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_DeleteLogMetricRequest_fieldAccessorTable @@ -316,6 +323,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); metricName_ = ""; @@ -323,15 +331,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_DeleteLogMetricRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.DeleteLogMetricRequest getDefaultInstanceForType() { return com.google.logging.v2.DeleteLogMetricRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.DeleteLogMetricRequest build() { com.google.logging.v2.DeleteLogMetricRequest result = buildPartial(); if (!result.isInitialized()) { @@ -340,6 +351,7 @@ public com.google.logging.v2.DeleteLogMetricRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.DeleteLogMetricRequest buildPartial() { com.google.logging.v2.DeleteLogMetricRequest result = new com.google.logging.v2.DeleteLogMetricRequest(this); result.metricName_ = metricName_; @@ -347,32 +359,39 @@ public com.google.logging.v2.DeleteLogMetricRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.DeleteLogMetricRequest) { return mergeFrom((com.google.logging.v2.DeleteLogMetricRequest)other); @@ -393,10 +412,12 @@ public Builder mergeFrom(com.google.logging.v2.DeleteLogMetricRequest other) { 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) @@ -508,11 +529,13 @@ public Builder setMetricNameBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -534,6 +557,7 @@ public static com.google.logging.v2.DeleteLogMetricRequest getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public DeleteLogMetricRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -551,6 +575,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.DeleteLogMetricRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java index 2f7d243c0688..df99d2ba7247 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteLogRequest.java @@ -47,6 +47,12 @@ private DeleteLogRequest( case 0: done = true; break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + logName_ = s; + break; + } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { @@ -54,12 +60,6 @@ private DeleteLogRequest( } break; } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - logName_ = s; - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -77,6 +77,7 @@ private DeleteLogRequest( return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_DeleteLogRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_DeleteLogRequest_fieldAccessorTable @@ -145,6 +146,7 @@ public java.lang.String getLogName() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -154,6 +156,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getLogNameBytes().isEmpty()) { @@ -162,6 +165,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -276,6 +280,7 @@ public static com.google.logging.v2.DeleteLogRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -283,6 +288,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.DeleteLogRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -310,6 +316,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_DeleteLogRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_DeleteLogRequest_fieldAccessorTable @@ -332,6 +339,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); logName_ = ""; @@ -339,15 +347,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_DeleteLogRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.DeleteLogRequest getDefaultInstanceForType() { return com.google.logging.v2.DeleteLogRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.DeleteLogRequest build() { com.google.logging.v2.DeleteLogRequest result = buildPartial(); if (!result.isInitialized()) { @@ -356,6 +367,7 @@ public com.google.logging.v2.DeleteLogRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.DeleteLogRequest buildPartial() { com.google.logging.v2.DeleteLogRequest result = new com.google.logging.v2.DeleteLogRequest(this); result.logName_ = logName_; @@ -363,32 +375,39 @@ public com.google.logging.v2.DeleteLogRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.DeleteLogRequest) { return mergeFrom((com.google.logging.v2.DeleteLogRequest)other); @@ -409,10 +428,12 @@ public Builder mergeFrom(com.google.logging.v2.DeleteLogRequest other) { 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) @@ -564,11 +585,13 @@ public Builder setLogNameBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -590,6 +613,7 @@ public static com.google.logging.v2.DeleteLogRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public DeleteLogRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -607,6 +631,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.DeleteLogRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java index 44bf390eab11..4e272fd1eee7 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/DeleteSinkRequest.java @@ -47,6 +47,12 @@ private DeleteSinkRequest( case 0: done = true; break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + sinkName_ = s; + break; + } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { @@ -54,12 +60,6 @@ private DeleteSinkRequest( } break; } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - sinkName_ = s; - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -77,6 +77,7 @@ private DeleteSinkRequest( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_DeleteSinkRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_DeleteSinkRequest_fieldAccessorTable @@ -139,6 +140,7 @@ public java.lang.String getSinkName() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -148,6 +150,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getSinkNameBytes().isEmpty()) { @@ -156,6 +159,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -270,6 +274,7 @@ public static com.google.logging.v2.DeleteSinkRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -277,6 +282,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.DeleteSinkRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -304,6 +310,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_DeleteSinkRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_DeleteSinkRequest_fieldAccessorTable @@ -326,6 +333,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); sinkName_ = ""; @@ -333,15 +341,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_DeleteSinkRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.DeleteSinkRequest getDefaultInstanceForType() { return com.google.logging.v2.DeleteSinkRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.DeleteSinkRequest build() { com.google.logging.v2.DeleteSinkRequest result = buildPartial(); if (!result.isInitialized()) { @@ -350,6 +361,7 @@ public com.google.logging.v2.DeleteSinkRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.DeleteSinkRequest buildPartial() { com.google.logging.v2.DeleteSinkRequest result = new com.google.logging.v2.DeleteSinkRequest(this); result.sinkName_ = sinkName_; @@ -357,32 +369,39 @@ public com.google.logging.v2.DeleteSinkRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.DeleteSinkRequest) { return mergeFrom((com.google.logging.v2.DeleteSinkRequest)other); @@ -403,10 +422,12 @@ public Builder mergeFrom(com.google.logging.v2.DeleteSinkRequest other) { 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) @@ -543,11 +564,13 @@ public Builder setSinkNameBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -569,6 +592,7 @@ public static com.google.logging.v2.DeleteSinkRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public DeleteSinkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -586,6 +610,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.DeleteSinkRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java index 07a28453c822..26b7bc78d6be 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetExclusionRequest.java @@ -47,6 +47,12 @@ private GetExclusionRequest( case 0: done = true; break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { @@ -54,12 +60,6 @@ private GetExclusionRequest( } break; } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -77,6 +77,7 @@ private GetExclusionRequest( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_GetExclusionRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_GetExclusionRequest_fieldAccessorTable @@ -137,6 +138,7 @@ public java.lang.String getName() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -146,6 +148,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { @@ -154,6 +157,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -268,6 +272,7 @@ public static com.google.logging.v2.GetExclusionRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -275,6 +280,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.GetExclusionRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -302,6 +308,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_GetExclusionRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_GetExclusionRequest_fieldAccessorTable @@ -324,6 +331,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); name_ = ""; @@ -331,15 +339,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_GetExclusionRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.GetExclusionRequest getDefaultInstanceForType() { return com.google.logging.v2.GetExclusionRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.GetExclusionRequest build() { com.google.logging.v2.GetExclusionRequest result = buildPartial(); if (!result.isInitialized()) { @@ -348,6 +359,7 @@ public com.google.logging.v2.GetExclusionRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.GetExclusionRequest buildPartial() { com.google.logging.v2.GetExclusionRequest result = new com.google.logging.v2.GetExclusionRequest(this); result.name_ = name_; @@ -355,32 +367,39 @@ public com.google.logging.v2.GetExclusionRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.GetExclusionRequest) { return mergeFrom((com.google.logging.v2.GetExclusionRequest)other); @@ -401,10 +420,12 @@ public Builder mergeFrom(com.google.logging.v2.GetExclusionRequest other) { 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) @@ -536,11 +557,13 @@ public Builder setNameBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -562,6 +585,7 @@ public static com.google.logging.v2.GetExclusionRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public GetExclusionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -579,6 +603,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.GetExclusionRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java index dfe219851d2f..0d750e73a754 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetLogMetricRequest.java @@ -47,6 +47,12 @@ private GetLogMetricRequest( case 0: done = true; break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + metricName_ = s; + break; + } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { @@ -54,12 +60,6 @@ private GetLogMetricRequest( } break; } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - metricName_ = s; - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -77,6 +77,7 @@ private GetLogMetricRequest( return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_GetLogMetricRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_GetLogMetricRequest_fieldAccessorTable @@ -129,6 +130,7 @@ public java.lang.String getMetricName() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -138,6 +140,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getMetricNameBytes().isEmpty()) { @@ -146,6 +149,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -260,6 +264,7 @@ public static com.google.logging.v2.GetLogMetricRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -267,6 +272,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.GetLogMetricRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -294,6 +300,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_GetLogMetricRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_GetLogMetricRequest_fieldAccessorTable @@ -316,6 +323,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); metricName_ = ""; @@ -323,15 +331,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_GetLogMetricRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.GetLogMetricRequest getDefaultInstanceForType() { return com.google.logging.v2.GetLogMetricRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.GetLogMetricRequest build() { com.google.logging.v2.GetLogMetricRequest result = buildPartial(); if (!result.isInitialized()) { @@ -340,6 +351,7 @@ public com.google.logging.v2.GetLogMetricRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.GetLogMetricRequest buildPartial() { com.google.logging.v2.GetLogMetricRequest result = new com.google.logging.v2.GetLogMetricRequest(this); result.metricName_ = metricName_; @@ -347,32 +359,39 @@ public com.google.logging.v2.GetLogMetricRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.GetLogMetricRequest) { return mergeFrom((com.google.logging.v2.GetLogMetricRequest)other); @@ -393,10 +412,12 @@ public Builder mergeFrom(com.google.logging.v2.GetLogMetricRequest other) { 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) @@ -508,11 +529,13 @@ public Builder setMetricNameBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -534,6 +557,7 @@ public static com.google.logging.v2.GetLogMetricRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public GetLogMetricRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -551,6 +575,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.GetLogMetricRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java index 46903bae84a7..d7b0c10b53a6 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/GetSinkRequest.java @@ -47,6 +47,12 @@ private GetSinkRequest( case 0: done = true; break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + sinkName_ = s; + break; + } default: { if (!parseUnknownFieldProto3( input, unknownFields, extensionRegistry, tag)) { @@ -54,12 +60,6 @@ private GetSinkRequest( } break; } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - sinkName_ = s; - break; - } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -77,6 +77,7 @@ private GetSinkRequest( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_GetSinkRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_GetSinkRequest_fieldAccessorTable @@ -137,6 +138,7 @@ public java.lang.String getSinkName() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -146,6 +148,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getSinkNameBytes().isEmpty()) { @@ -154,6 +157,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -268,6 +272,7 @@ public static com.google.logging.v2.GetSinkRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -275,6 +280,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.GetSinkRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -302,6 +308,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_GetSinkRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_GetSinkRequest_fieldAccessorTable @@ -324,6 +331,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); sinkName_ = ""; @@ -331,15 +339,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_GetSinkRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.GetSinkRequest getDefaultInstanceForType() { return com.google.logging.v2.GetSinkRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.GetSinkRequest build() { com.google.logging.v2.GetSinkRequest result = buildPartial(); if (!result.isInitialized()) { @@ -348,6 +359,7 @@ public com.google.logging.v2.GetSinkRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.GetSinkRequest buildPartial() { com.google.logging.v2.GetSinkRequest result = new com.google.logging.v2.GetSinkRequest(this); result.sinkName_ = sinkName_; @@ -355,32 +367,39 @@ public com.google.logging.v2.GetSinkRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.GetSinkRequest) { return mergeFrom((com.google.logging.v2.GetSinkRequest)other); @@ -401,10 +420,12 @@ public Builder mergeFrom(com.google.logging.v2.GetSinkRequest other) { 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) @@ -536,11 +557,13 @@ public Builder setSinkNameBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -562,6 +585,7 @@ public static com.google.logging.v2.GetSinkRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public GetSinkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -579,6 +603,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.GetSinkRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java index 052bd618f0f7..16cfd7602c47 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsRequest.java @@ -49,13 +49,6 @@ private ListExclusionsRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -73,6 +66,13 @@ private ListExclusionsRequest( pageSize_ = input.readInt32(); break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private ListExclusionsRequest( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListExclusionsRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListExclusionsRequest_fieldAccessorTable @@ -211,6 +212,7 @@ public int getPageSize() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -220,6 +222,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { @@ -234,6 +237,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -363,6 +367,7 @@ public static com.google.logging.v2.ListExclusionsRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -370,6 +375,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListExclusionsRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -397,6 +403,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListExclusionsRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListExclusionsRequest_fieldAccessorTable @@ -419,6 +426,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); parent_ = ""; @@ -430,15 +438,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListExclusionsRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.ListExclusionsRequest getDefaultInstanceForType() { return com.google.logging.v2.ListExclusionsRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListExclusionsRequest build() { com.google.logging.v2.ListExclusionsRequest result = buildPartial(); if (!result.isInitialized()) { @@ -447,6 +458,7 @@ public com.google.logging.v2.ListExclusionsRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.ListExclusionsRequest buildPartial() { com.google.logging.v2.ListExclusionsRequest result = new com.google.logging.v2.ListExclusionsRequest(this); result.parent_ = parent_; @@ -456,32 +468,39 @@ public com.google.logging.v2.ListExclusionsRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListExclusionsRequest) { return mergeFrom((com.google.logging.v2.ListExclusionsRequest)other); @@ -509,10 +528,12 @@ public Builder mergeFrom(com.google.logging.v2.ListExclusionsRequest other) { 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) @@ -787,11 +808,13 @@ public Builder clearPageSize() { onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -813,6 +836,7 @@ public static com.google.logging.v2.ListExclusionsRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListExclusionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -830,6 +854,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.ListExclusionsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java index 8ec5ebccadad..9ed3778aa72c 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListExclusionsResponse.java @@ -48,13 +48,6 @@ private ListExclusionsResponse( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { exclusions_ = new java.util.ArrayList(); @@ -70,6 +63,13 @@ private ListExclusionsResponse( nextPageToken_ = s; break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private ListExclusionsResponse( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListExclusionsResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListExclusionsResponse_fieldAccessorTable @@ -200,6 +201,7 @@ public java.lang.String getNextPageToken() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -209,6 +211,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < exclusions_.size(); i++) { @@ -220,6 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -344,6 +348,7 @@ public static com.google.logging.v2.ListExclusionsResponse parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -351,6 +356,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListExclusionsResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -378,6 +384,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListExclusionsResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListExclusionsResponse_fieldAccessorTable @@ -401,6 +408,7 @@ private void maybeForceBuilderInitialization() { getExclusionsFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); if (exclusionsBuilder_ == null) { @@ -414,15 +422,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListExclusionsResponse_descriptor; } + @java.lang.Override public com.google.logging.v2.ListExclusionsResponse getDefaultInstanceForType() { return com.google.logging.v2.ListExclusionsResponse.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListExclusionsResponse build() { com.google.logging.v2.ListExclusionsResponse result = buildPartial(); if (!result.isInitialized()) { @@ -431,6 +442,7 @@ public com.google.logging.v2.ListExclusionsResponse build() { return result; } + @java.lang.Override public com.google.logging.v2.ListExclusionsResponse buildPartial() { com.google.logging.v2.ListExclusionsResponse result = new com.google.logging.v2.ListExclusionsResponse(this); int from_bitField0_ = bitField0_; @@ -450,32 +462,39 @@ public com.google.logging.v2.ListExclusionsResponse buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListExclusionsResponse) { return mergeFrom((com.google.logging.v2.ListExclusionsResponse)other); @@ -522,10 +541,12 @@ public Builder mergeFrom(com.google.logging.v2.ListExclusionsResponse other) { 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) @@ -955,11 +976,13 @@ public Builder setNextPageTokenBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -981,6 +1004,7 @@ public static com.google.logging.v2.ListExclusionsResponse getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListExclusionsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -998,6 +1022,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.ListExclusionsResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java index 103bf7c4d1c1..3ad50866f4f4 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequest.java @@ -52,13 +52,6 @@ private ListLogEntriesRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { @@ -100,6 +93,13 @@ private ListLogEntriesRequest( resourceNames_.add(s); break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -123,6 +123,7 @@ private ListLogEntriesRequest( return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogEntriesRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogEntriesRequest_fieldAccessorTable @@ -142,9 +143,9 @@ private ListLogEntriesRequest( * `resource_names`. *
* - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public com.google.protobuf.ProtocolStringList + @java.lang.Deprecated public com.google.protobuf.ProtocolStringList getProjectIdsList() { return projectIds_; } @@ -157,9 +158,9 @@ private ListLogEntriesRequest( * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public int getProjectIdsCount() { + @java.lang.Deprecated public int getProjectIdsCount() { return projectIds_.size(); } /** @@ -171,9 +172,9 @@ public int getProjectIdsCount() { * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public java.lang.String getProjectIds(int index) { + @java.lang.Deprecated public java.lang.String getProjectIds(int index) { return projectIds_.get(index); } /** @@ -185,9 +186,9 @@ public java.lang.String getProjectIds(int index) { * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public com.google.protobuf.ByteString + @java.lang.Deprecated public com.google.protobuf.ByteString getProjectIdsBytes(int index) { return projectIds_.getByteString(index); } @@ -431,6 +432,7 @@ public java.lang.String getPageToken() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -440,6 +442,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < projectIds_.size(); i++) { @@ -463,6 +466,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -627,6 +631,7 @@ public static com.google.logging.v2.ListLogEntriesRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -634,6 +639,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListLogEntriesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -661,6 +667,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogEntriesRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogEntriesRequest_fieldAccessorTable @@ -683,6 +690,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); projectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -700,15 +708,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogEntriesRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.ListLogEntriesRequest getDefaultInstanceForType() { return com.google.logging.v2.ListLogEntriesRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListLogEntriesRequest build() { com.google.logging.v2.ListLogEntriesRequest result = buildPartial(); if (!result.isInitialized()) { @@ -717,6 +728,7 @@ public com.google.logging.v2.ListLogEntriesRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.ListLogEntriesRequest buildPartial() { com.google.logging.v2.ListLogEntriesRequest result = new com.google.logging.v2.ListLogEntriesRequest(this); int from_bitField0_ = bitField0_; @@ -740,32 +752,39 @@ public com.google.logging.v2.ListLogEntriesRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListLogEntriesRequest) { return mergeFrom((com.google.logging.v2.ListLogEntriesRequest)other); @@ -817,10 +836,12 @@ public Builder mergeFrom(com.google.logging.v2.ListLogEntriesRequest other) { 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) @@ -856,9 +877,9 @@ private void ensureProjectIdsIsMutable() { * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public com.google.protobuf.ProtocolStringList + @java.lang.Deprecated public com.google.protobuf.ProtocolStringList getProjectIdsList() { return projectIds_.getUnmodifiableView(); } @@ -871,9 +892,9 @@ private void ensureProjectIdsIsMutable() { * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public int getProjectIdsCount() { + @java.lang.Deprecated public int getProjectIdsCount() { return projectIds_.size(); } /** @@ -885,9 +906,9 @@ public int getProjectIdsCount() { * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public java.lang.String getProjectIds(int index) { + @java.lang.Deprecated public java.lang.String getProjectIds(int index) { return projectIds_.get(index); } /** @@ -899,9 +920,9 @@ public java.lang.String getProjectIds(int index) { * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public com.google.protobuf.ByteString + @java.lang.Deprecated public com.google.protobuf.ByteString getProjectIdsBytes(int index) { return projectIds_.getByteString(index); } @@ -914,9 +935,9 @@ public java.lang.String getProjectIds(int index) { * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public Builder setProjectIds( + @java.lang.Deprecated public Builder setProjectIds( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -935,9 +956,9 @@ public Builder setProjectIds( * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public Builder addProjectIds( + @java.lang.Deprecated public Builder addProjectIds( java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -956,9 +977,9 @@ public Builder addProjectIds( * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public Builder addAllProjectIds( + @java.lang.Deprecated public Builder addAllProjectIds( java.lang.Iterable values) { ensureProjectIdsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( @@ -975,9 +996,9 @@ public Builder addAllProjectIds( * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public Builder clearProjectIds() { + @java.lang.Deprecated public Builder clearProjectIds() { projectIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); @@ -992,9 +1013,9 @@ public Builder clearProjectIds() { * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - public Builder addProjectIdsBytes( + @java.lang.Deprecated public Builder addProjectIdsBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -1570,11 +1591,13 @@ public Builder setPageTokenBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -1596,6 +1619,7 @@ public static com.google.logging.v2.ListLogEntriesRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListLogEntriesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1613,6 +1637,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.ListLogEntriesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java index 52cd71ae1783..68f3f08443f8 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesRequestOrBuilder.java @@ -16,9 +16,9 @@ public interface ListLogEntriesRequestOrBuilder extends * `resource_names`. * * - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - java.util.List + @java.lang.Deprecated java.util.List getProjectIdsList(); /** *
@@ -29,9 +29,9 @@ public interface ListLogEntriesRequestOrBuilder extends
    * `resource_names`.
    * 
* - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - int getProjectIdsCount(); + @java.lang.Deprecated int getProjectIdsCount(); /** *
    * Deprecated. Use `resource_names` instead.  One or more project identifiers
@@ -41,9 +41,9 @@ public interface ListLogEntriesRequestOrBuilder extends
    * `resource_names`.
    * 
* - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - java.lang.String getProjectIds(int index); + @java.lang.Deprecated java.lang.String getProjectIds(int index); /** *
    * Deprecated. Use `resource_names` instead.  One or more project identifiers
@@ -53,9 +53,9 @@ public interface ListLogEntriesRequestOrBuilder extends
    * `resource_names`.
    * 
* - * repeated string project_ids = 1; + * repeated string project_ids = 1 [deprecated = true]; */ - com.google.protobuf.ByteString + @java.lang.Deprecated com.google.protobuf.ByteString getProjectIdsBytes(int index); /** diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java index 6fd409b26e0d..30344960d4ab 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogEntriesResponse.java @@ -48,13 +48,6 @@ private ListLogEntriesResponse( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { entries_ = new java.util.ArrayList(); @@ -70,6 +63,13 @@ private ListLogEntriesResponse( nextPageToken_ = s; break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private ListLogEntriesResponse( return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogEntriesResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogEntriesResponse_fieldAccessorTable @@ -222,6 +223,7 @@ public java.lang.String getNextPageToken() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -231,6 +233,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < entries_.size(); i++) { @@ -242,6 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -366,6 +370,7 @@ public static com.google.logging.v2.ListLogEntriesResponse parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -373,6 +378,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListLogEntriesResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -400,6 +406,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogEntriesResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogEntriesResponse_fieldAccessorTable @@ -423,6 +430,7 @@ private void maybeForceBuilderInitialization() { getEntriesFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); if (entriesBuilder_ == null) { @@ -436,15 +444,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogEntriesResponse_descriptor; } + @java.lang.Override public com.google.logging.v2.ListLogEntriesResponse getDefaultInstanceForType() { return com.google.logging.v2.ListLogEntriesResponse.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListLogEntriesResponse build() { com.google.logging.v2.ListLogEntriesResponse result = buildPartial(); if (!result.isInitialized()) { @@ -453,6 +464,7 @@ public com.google.logging.v2.ListLogEntriesResponse build() { return result; } + @java.lang.Override public com.google.logging.v2.ListLogEntriesResponse buildPartial() { com.google.logging.v2.ListLogEntriesResponse result = new com.google.logging.v2.ListLogEntriesResponse(this); int from_bitField0_ = bitField0_; @@ -472,32 +484,39 @@ public com.google.logging.v2.ListLogEntriesResponse buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListLogEntriesResponse) { return mergeFrom((com.google.logging.v2.ListLogEntriesResponse)other); @@ -544,10 +563,12 @@ public Builder mergeFrom(com.google.logging.v2.ListLogEntriesResponse other) { 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) @@ -1043,11 +1064,13 @@ public Builder setNextPageTokenBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -1069,6 +1092,7 @@ public static com.google.logging.v2.ListLogEntriesResponse getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListLogEntriesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1086,6 +1110,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.ListLogEntriesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java index 527d5b5c013a..8f1ca7795f52 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsRequest.java @@ -49,13 +49,6 @@ private ListLogMetricsRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -73,6 +66,13 @@ private ListLogMetricsRequest( pageSize_ = input.readInt32(); break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private ListLogMetricsRequest( return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_ListLogMetricsRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_ListLogMetricsRequest_fieldAccessorTable @@ -205,6 +206,7 @@ public int getPageSize() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -214,6 +216,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { @@ -228,6 +231,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -357,6 +361,7 @@ public static com.google.logging.v2.ListLogMetricsRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -364,6 +369,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListLogMetricsRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -391,6 +397,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_ListLogMetricsRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_ListLogMetricsRequest_fieldAccessorTable @@ -413,6 +420,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); parent_ = ""; @@ -424,15 +432,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_ListLogMetricsRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.ListLogMetricsRequest getDefaultInstanceForType() { return com.google.logging.v2.ListLogMetricsRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListLogMetricsRequest build() { com.google.logging.v2.ListLogMetricsRequest result = buildPartial(); if (!result.isInitialized()) { @@ -441,6 +452,7 @@ public com.google.logging.v2.ListLogMetricsRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.ListLogMetricsRequest buildPartial() { com.google.logging.v2.ListLogMetricsRequest result = new com.google.logging.v2.ListLogMetricsRequest(this); result.parent_ = parent_; @@ -450,32 +462,39 @@ public com.google.logging.v2.ListLogMetricsRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListLogMetricsRequest) { return mergeFrom((com.google.logging.v2.ListLogMetricsRequest)other); @@ -503,10 +522,12 @@ public Builder mergeFrom(com.google.logging.v2.ListLogMetricsRequest other) { 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) @@ -766,11 +787,13 @@ public Builder clearPageSize() { onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -792,6 +815,7 @@ public static com.google.logging.v2.ListLogMetricsRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListLogMetricsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -809,6 +833,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.ListLogMetricsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java index f697b3b9278c..88a5299afb9c 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogMetricsResponse.java @@ -48,13 +48,6 @@ private ListLogMetricsResponse( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { metrics_ = new java.util.ArrayList(); @@ -70,6 +63,13 @@ private ListLogMetricsResponse( nextPageToken_ = s; break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private ListLogMetricsResponse( return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_ListLogMetricsResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_ListLogMetricsResponse_fieldAccessorTable @@ -200,6 +201,7 @@ public java.lang.String getNextPageToken() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -209,6 +211,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < metrics_.size(); i++) { @@ -220,6 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -344,6 +348,7 @@ public static com.google.logging.v2.ListLogMetricsResponse parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -351,6 +356,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListLogMetricsResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -378,6 +384,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_ListLogMetricsResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_ListLogMetricsResponse_fieldAccessorTable @@ -401,6 +408,7 @@ private void maybeForceBuilderInitialization() { getMetricsFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); if (metricsBuilder_ == null) { @@ -414,15 +422,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_ListLogMetricsResponse_descriptor; } + @java.lang.Override public com.google.logging.v2.ListLogMetricsResponse getDefaultInstanceForType() { return com.google.logging.v2.ListLogMetricsResponse.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListLogMetricsResponse build() { com.google.logging.v2.ListLogMetricsResponse result = buildPartial(); if (!result.isInitialized()) { @@ -431,6 +442,7 @@ public com.google.logging.v2.ListLogMetricsResponse build() { return result; } + @java.lang.Override public com.google.logging.v2.ListLogMetricsResponse buildPartial() { com.google.logging.v2.ListLogMetricsResponse result = new com.google.logging.v2.ListLogMetricsResponse(this); int from_bitField0_ = bitField0_; @@ -450,32 +462,39 @@ public com.google.logging.v2.ListLogMetricsResponse buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListLogMetricsResponse) { return mergeFrom((com.google.logging.v2.ListLogMetricsResponse)other); @@ -522,10 +541,12 @@ public Builder mergeFrom(com.google.logging.v2.ListLogMetricsResponse other) { 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) @@ -955,11 +976,13 @@ public Builder setNextPageTokenBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -981,6 +1004,7 @@ public static com.google.logging.v2.ListLogMetricsResponse getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListLogMetricsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -998,6 +1022,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.ListLogMetricsResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java index 8fee36c9a7b1..3fbdc57bcc53 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsRequest.java @@ -49,13 +49,6 @@ private ListLogsRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -73,6 +66,13 @@ private ListLogsRequest( pageToken_ = s; break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private ListLogsRequest( return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogsRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogsRequest_fieldAccessorTable @@ -211,6 +212,7 @@ public java.lang.String getPageToken() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -220,6 +222,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { @@ -234,6 +237,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -363,6 +367,7 @@ public static com.google.logging.v2.ListLogsRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -370,6 +375,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListLogsRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -397,6 +403,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogsRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogsRequest_fieldAccessorTable @@ -419,6 +426,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); parent_ = ""; @@ -430,15 +438,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogsRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.ListLogsRequest getDefaultInstanceForType() { return com.google.logging.v2.ListLogsRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListLogsRequest build() { com.google.logging.v2.ListLogsRequest result = buildPartial(); if (!result.isInitialized()) { @@ -447,6 +458,7 @@ public com.google.logging.v2.ListLogsRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.ListLogsRequest buildPartial() { com.google.logging.v2.ListLogsRequest result = new com.google.logging.v2.ListLogsRequest(this); result.parent_ = parent_; @@ -456,32 +468,39 @@ public com.google.logging.v2.ListLogsRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListLogsRequest) { return mergeFrom((com.google.logging.v2.ListLogsRequest)other); @@ -509,10 +528,12 @@ public Builder mergeFrom(com.google.logging.v2.ListLogsRequest other) { 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) @@ -787,11 +808,13 @@ public Builder setPageTokenBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -813,6 +836,7 @@ public static com.google.logging.v2.ListLogsRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListLogsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -830,6 +854,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.ListLogsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java index 6cd4fdf42a78..9f95d1fab938 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListLogsResponse.java @@ -48,13 +48,6 @@ private ListLogsResponse( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 18: { java.lang.String s = input.readStringRequireUtf8(); @@ -70,6 +63,13 @@ private ListLogsResponse( logNames_.add(s); break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private ListLogsResponse( return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogsResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogsResponse_fieldAccessorTable @@ -198,6 +199,7 @@ public java.lang.String getNextPageToken() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -207,6 +209,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNextPageTokenBytes().isEmpty()) { @@ -218,6 +221,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -346,6 +350,7 @@ public static com.google.logging.v2.ListLogsResponse parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -353,6 +358,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListLogsResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -380,6 +386,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogsResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogsResponse_fieldAccessorTable @@ -402,6 +409,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); logNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -411,15 +419,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListLogsResponse_descriptor; } + @java.lang.Override public com.google.logging.v2.ListLogsResponse getDefaultInstanceForType() { return com.google.logging.v2.ListLogsResponse.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListLogsResponse build() { com.google.logging.v2.ListLogsResponse result = buildPartial(); if (!result.isInitialized()) { @@ -428,6 +439,7 @@ public com.google.logging.v2.ListLogsResponse build() { return result; } + @java.lang.Override public com.google.logging.v2.ListLogsResponse buildPartial() { com.google.logging.v2.ListLogsResponse result = new com.google.logging.v2.ListLogsResponse(this); int from_bitField0_ = bitField0_; @@ -443,32 +455,39 @@ public com.google.logging.v2.ListLogsResponse buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListLogsResponse) { return mergeFrom((com.google.logging.v2.ListLogsResponse)other); @@ -499,10 +518,12 @@ public Builder mergeFrom(com.google.logging.v2.ListLogsResponse other) { 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) @@ -768,11 +789,13 @@ public Builder setNextPageTokenBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -794,6 +817,7 @@ public static com.google.logging.v2.ListLogsResponse getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListLogsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -811,6 +835,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.ListLogsResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java index 361f9f3b4f5a..74b81c0d39f4 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsRequest.java @@ -48,13 +48,6 @@ private ListMonitoredResourceDescriptorsRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 8: { pageSize_ = input.readInt32(); @@ -66,6 +59,13 @@ private ListMonitoredResourceDescriptorsRequest( pageToken_ = s; break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -83,6 +83,7 @@ private ListMonitoredResourceDescriptorsRequest( return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListMonitoredResourceDescriptorsRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListMonitoredResourceDescriptorsRequest_fieldAccessorTable @@ -154,6 +155,7 @@ public java.lang.String getPageToken() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -163,6 +165,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (pageSize_ != 0) { @@ -174,6 +177,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -296,6 +300,7 @@ public static com.google.logging.v2.ListMonitoredResourceDescriptorsRequest pars .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -303,6 +308,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListMonitoredResourceDescriptorsRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -330,6 +336,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListMonitoredResourceDescriptorsRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListMonitoredResourceDescriptorsRequest_fieldAccessorTable @@ -352,6 +359,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); pageSize_ = 0; @@ -361,15 +369,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListMonitoredResourceDescriptorsRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.ListMonitoredResourceDescriptorsRequest getDefaultInstanceForType() { return com.google.logging.v2.ListMonitoredResourceDescriptorsRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListMonitoredResourceDescriptorsRequest build() { com.google.logging.v2.ListMonitoredResourceDescriptorsRequest result = buildPartial(); if (!result.isInitialized()) { @@ -378,6 +389,7 @@ public com.google.logging.v2.ListMonitoredResourceDescriptorsRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.ListMonitoredResourceDescriptorsRequest buildPartial() { com.google.logging.v2.ListMonitoredResourceDescriptorsRequest result = new com.google.logging.v2.ListMonitoredResourceDescriptorsRequest(this); result.pageSize_ = pageSize_; @@ -386,32 +398,39 @@ public com.google.logging.v2.ListMonitoredResourceDescriptorsRequest buildPartia return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListMonitoredResourceDescriptorsRequest) { return mergeFrom((com.google.logging.v2.ListMonitoredResourceDescriptorsRequest)other); @@ -435,10 +454,12 @@ public Builder mergeFrom(com.google.logging.v2.ListMonitoredResourceDescriptorsR 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) @@ -604,11 +625,13 @@ public Builder setPageTokenBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -630,6 +653,7 @@ public static com.google.logging.v2.ListMonitoredResourceDescriptorsRequest getD private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListMonitoredResourceDescriptorsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -647,6 +671,7 @@ public com.google.protobuf.Parser getPa return PARSER; } + @java.lang.Override public com.google.logging.v2.ListMonitoredResourceDescriptorsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java index 7fcfe51ac236..e70a38005dee 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListMonitoredResourceDescriptorsResponse.java @@ -48,13 +48,6 @@ private ListMonitoredResourceDescriptorsResponse( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { resourceDescriptors_ = new java.util.ArrayList(); @@ -70,6 +63,13 @@ private ListMonitoredResourceDescriptorsResponse( nextPageToken_ = s; break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private ListMonitoredResourceDescriptorsResponse( return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListMonitoredResourceDescriptorsResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListMonitoredResourceDescriptorsResponse_fieldAccessorTable @@ -200,6 +201,7 @@ public java.lang.String getNextPageToken() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -209,6 +211,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < resourceDescriptors_.size(); i++) { @@ -220,6 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -344,6 +348,7 @@ public static com.google.logging.v2.ListMonitoredResourceDescriptorsResponse par .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -351,6 +356,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListMonitoredResourceDescriptorsResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -378,6 +384,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListMonitoredResourceDescriptorsResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListMonitoredResourceDescriptorsResponse_fieldAccessorTable @@ -401,6 +408,7 @@ private void maybeForceBuilderInitialization() { getResourceDescriptorsFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); if (resourceDescriptorsBuilder_ == null) { @@ -414,15 +422,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_ListMonitoredResourceDescriptorsResponse_descriptor; } + @java.lang.Override public com.google.logging.v2.ListMonitoredResourceDescriptorsResponse getDefaultInstanceForType() { return com.google.logging.v2.ListMonitoredResourceDescriptorsResponse.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListMonitoredResourceDescriptorsResponse build() { com.google.logging.v2.ListMonitoredResourceDescriptorsResponse result = buildPartial(); if (!result.isInitialized()) { @@ -431,6 +442,7 @@ public com.google.logging.v2.ListMonitoredResourceDescriptorsResponse build() { return result; } + @java.lang.Override public com.google.logging.v2.ListMonitoredResourceDescriptorsResponse buildPartial() { com.google.logging.v2.ListMonitoredResourceDescriptorsResponse result = new com.google.logging.v2.ListMonitoredResourceDescriptorsResponse(this); int from_bitField0_ = bitField0_; @@ -450,32 +462,39 @@ public com.google.logging.v2.ListMonitoredResourceDescriptorsResponse buildParti return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListMonitoredResourceDescriptorsResponse) { return mergeFrom((com.google.logging.v2.ListMonitoredResourceDescriptorsResponse)other); @@ -522,10 +541,12 @@ public Builder mergeFrom(com.google.logging.v2.ListMonitoredResourceDescriptorsR 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) @@ -955,11 +976,13 @@ public Builder setNextPageTokenBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -981,6 +1004,7 @@ public static com.google.logging.v2.ListMonitoredResourceDescriptorsResponse get private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListMonitoredResourceDescriptorsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -998,6 +1022,7 @@ public com.google.protobuf.Parser getP return PARSER; } + @java.lang.Override public com.google.logging.v2.ListMonitoredResourceDescriptorsResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java index 6a52edd4fb21..fe3bfa4c1f0d 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksRequest.java @@ -49,13 +49,6 @@ private ListSinksRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -73,6 +66,13 @@ private ListSinksRequest( pageSize_ = input.readInt32(); break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private ListSinksRequest( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListSinksRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListSinksRequest_fieldAccessorTable @@ -211,6 +212,7 @@ public int getPageSize() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -220,6 +222,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getParentBytes().isEmpty()) { @@ -234,6 +237,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -363,6 +367,7 @@ public static com.google.logging.v2.ListSinksRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -370,6 +375,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListSinksRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -397,6 +403,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListSinksRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListSinksRequest_fieldAccessorTable @@ -419,6 +426,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); parent_ = ""; @@ -430,15 +438,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListSinksRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.ListSinksRequest getDefaultInstanceForType() { return com.google.logging.v2.ListSinksRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListSinksRequest build() { com.google.logging.v2.ListSinksRequest result = buildPartial(); if (!result.isInitialized()) { @@ -447,6 +458,7 @@ public com.google.logging.v2.ListSinksRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.ListSinksRequest buildPartial() { com.google.logging.v2.ListSinksRequest result = new com.google.logging.v2.ListSinksRequest(this); result.parent_ = parent_; @@ -456,32 +468,39 @@ public com.google.logging.v2.ListSinksRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListSinksRequest) { return mergeFrom((com.google.logging.v2.ListSinksRequest)other); @@ -509,10 +528,12 @@ public Builder mergeFrom(com.google.logging.v2.ListSinksRequest other) { 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) @@ -787,11 +808,13 @@ public Builder clearPageSize() { onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -813,6 +836,7 @@ public static com.google.logging.v2.ListSinksRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListSinksRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -830,6 +854,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.ListSinksRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java index 139502775f9a..602b6b98c5bf 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/ListSinksResponse.java @@ -48,13 +48,6 @@ private ListSinksResponse( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { sinks_ = new java.util.ArrayList(); @@ -70,6 +63,13 @@ private ListSinksResponse( nextPageToken_ = s; break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private ListSinksResponse( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListSinksResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListSinksResponse_fieldAccessorTable @@ -200,6 +201,7 @@ public java.lang.String getNextPageToken() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -209,6 +211,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < sinks_.size(); i++) { @@ -220,6 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -344,6 +348,7 @@ public static com.google.logging.v2.ListSinksResponse parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -351,6 +356,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.ListSinksResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -378,6 +384,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListSinksResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListSinksResponse_fieldAccessorTable @@ -401,6 +408,7 @@ private void maybeForceBuilderInitialization() { getSinksFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); if (sinksBuilder_ == null) { @@ -414,15 +422,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_ListSinksResponse_descriptor; } + @java.lang.Override public com.google.logging.v2.ListSinksResponse getDefaultInstanceForType() { return com.google.logging.v2.ListSinksResponse.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.ListSinksResponse build() { com.google.logging.v2.ListSinksResponse result = buildPartial(); if (!result.isInitialized()) { @@ -431,6 +442,7 @@ public com.google.logging.v2.ListSinksResponse build() { return result; } + @java.lang.Override public com.google.logging.v2.ListSinksResponse buildPartial() { com.google.logging.v2.ListSinksResponse result = new com.google.logging.v2.ListSinksResponse(this); int from_bitField0_ = bitField0_; @@ -450,32 +462,39 @@ public com.google.logging.v2.ListSinksResponse buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.ListSinksResponse) { return mergeFrom((com.google.logging.v2.ListSinksResponse)other); @@ -522,10 +541,12 @@ public Builder mergeFrom(com.google.logging.v2.ListSinksResponse other) { 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) @@ -955,11 +976,13 @@ public Builder setNextPageTokenBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -981,6 +1004,7 @@ public static com.google.logging.v2.ListSinksResponse getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public ListSinksResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -998,6 +1022,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.ListSinksResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java index 9ff2198bfe69..374ad8a5b193 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntry.java @@ -51,13 +51,6 @@ private LogEntry( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 18: { com.google.protobuf.Any.Builder subBuilder = null; if (payloadCase_ == 2) { @@ -207,12 +200,32 @@ private LogEntry( break; } + case 202: { + com.google.api.MonitoredResourceMetadata.Builder subBuilder = null; + if (metadata_ != null) { + subBuilder = metadata_.toBuilder(); + } + metadata_ = input.readMessage(com.google.api.MonitoredResourceMetadata.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(metadata_); + metadata_ = subBuilder.buildPartial(); + } + + break; + } case 218: { java.lang.String s = input.readStringRequireUtf8(); spanId_ = s; break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -231,6 +244,7 @@ private LogEntry( } @SuppressWarnings({"rawtypes"}) + @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { @@ -241,6 +255,7 @@ protected com.google.protobuf.MapField internalGetMapField( "Invalid map field number: " + number); } } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntry_fieldAccessorTable @@ -369,7 +384,7 @@ public java.lang.String getLogName() { private com.google.api.MonitoredResource resource_; /** *
-   * Required. The monitored resource associated with this log entry.
+   * Required. The primary monitored resource associated with this log entry.
    * Example: a log entry that reports a database error would be
    * associated with the monitored resource designating the particular
    * database that reported the error.
@@ -382,7 +397,7 @@ public boolean hasResource() {
   }
   /**
    * 
-   * Required. The monitored resource associated with this log entry.
+   * Required. The primary monitored resource associated with this log entry.
    * Example: a log entry that reports a database error would be
    * associated with the monitored resource designating the particular
    * database that reported the error.
@@ -395,7 +410,7 @@ public com.google.api.MonitoredResource getResource() {
   }
   /**
    * 
-   * Required. The monitored resource associated with this log entry.
+   * Required. The primary monitored resource associated with this log entry.
    * Example: a log entry that reports a database error would be
    * associated with the monitored resource designating the particular
    * database that reported the error.
@@ -551,10 +566,14 @@ public com.google.protobuf.StructOrBuilder getJsonPayloadOrBuilder() {
    * This time is used to compute the log entry's age and to enforce
    * the logs retention period. If this field is omitted in a new log
    * entry, then Stackdriver Logging assigns it the current time.
+   * Timestamps have nanosecond accuracy, but trailing zeros in the fractional
+   * seconds might be omitted when the timestamp is displayed.
    * Incoming log entries should have timestamps that are no more than
-   * the [logs retention period](/logging/quota-policy) in the past,
-   * and no more than 24 hours in the future.
-   * See the `entries.write` API method for more information.
+   * the [logs retention period](/logging/quotas) in the past,
+   * and no more than 24 hours in the future. Log entries outside those time
+   * boundaries will not be available when calling `entries.list`, but
+   * those log entries can still be exported with
+   * [LogSinks](/logging/docs/api/tasks/exporting-logs).
    * 
* * .google.protobuf.Timestamp timestamp = 9; @@ -568,10 +587,14 @@ public boolean hasTimestamp() { * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -585,10 +608,14 @@ public com.google.protobuf.Timestamp getTimestamp() { * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -652,6 +679,7 @@ public int getSeverityValue() { * .google.logging.type.LogSeverity severity = 10; */ public com.google.logging.type.LogSeverity getSeverity() { + @SuppressWarnings("deprecation") com.google.logging.type.LogSeverity result = com.google.logging.type.LogSeverity.valueOf(severity_); return result == null ? com.google.logging.type.LogSeverity.UNRECOGNIZED : result; } @@ -840,6 +868,45 @@ public java.lang.String getLabelsOrThrow( return map.get(key); } + public static final int METADATA_FIELD_NUMBER = 25; + private com.google.api.MonitoredResourceMetadata metadata_; + /** + *
+   * Output only. Additional metadata about the monitored resource.
+   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+   * this field populated.
+   * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + public boolean hasMetadata() { + return metadata_ != null; + } + /** + *
+   * Output only. Additional metadata about the monitored resource.
+   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+   * this field populated.
+   * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + public com.google.api.MonitoredResourceMetadata getMetadata() { + return metadata_ == null ? com.google.api.MonitoredResourceMetadata.getDefaultInstance() : metadata_; + } + /** + *
+   * Output only. Additional metadata about the monitored resource.
+   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+   * this field populated.
+   * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + public com.google.api.MonitoredResourceMetadataOrBuilder getMetadataOrBuilder() { + return getMetadata(); + } + public static final int OPERATION_FIELD_NUMBER = 15; private com.google.logging.v2.LogEntryOperation operation_; /** @@ -928,11 +995,10 @@ public java.lang.String getTrace() { private volatile java.lang.Object spanId_; /** *
-   * Optional. Id of the span within the trace associated with the log entry.
-   * e.g. "0000000000000042"
-   * For Stackdriver trace spans, this is the same format that the Stackdriver
-   * trace API uses.
-   * The ID is a 16-character hexadecimal encoding of an 8-byte array.
+   * Optional. The span ID within the trace associated with the log entry. For
+   * Stackdriver Trace spans, this is the same format that the Stackdriver Trace
+   * API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
+   * as <code>"000000000000004a"</code>.
    * 
* * string span_id = 27; @@ -951,11 +1017,10 @@ public java.lang.String getSpanId() { } /** *
-   * Optional. Id of the span within the trace associated with the log entry.
-   * e.g. "0000000000000042"
-   * For Stackdriver trace spans, this is the same format that the Stackdriver
-   * trace API uses.
-   * The ID is a 16-character hexadecimal encoding of an 8-byte array.
+   * Optional. The span ID within the trace associated with the log entry. For
+   * Stackdriver Trace spans, this is the same format that the Stackdriver Trace
+   * API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
+   * as <code>"000000000000004a"</code>.
    * 
* * string span_id = 27; @@ -1011,6 +1076,7 @@ public com.google.logging.v2.LogEntrySourceLocationOrBuilder getSourceLocationOr } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -1020,6 +1086,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (payloadCase_ == 2) { @@ -1067,12 +1134,16 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (receiveTimestamp_ != null) { output.writeMessage(24, getReceiveTimestamp()); } + if (metadata_ != null) { + output.writeMessage(25, getMetadata()); + } if (!getSpanIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 27, spanId_); } unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -1136,6 +1207,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(24, getReceiveTimestamp()); } + if (metadata_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(25, getMetadata()); + } if (!getSpanIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, spanId_); } @@ -1182,6 +1257,11 @@ public boolean equals(final java.lang.Object obj) { } result = result && internalGetLabels().equals( other.internalGetLabels()); + result = result && (hasMetadata() == other.hasMetadata()); + if (hasMetadata()) { + result = result && getMetadata() + .equals(other.getMetadata()); + } result = result && (hasOperation() == other.hasOperation()); if (hasOperation()) { result = result && getOperation() @@ -1252,6 +1332,10 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } + if (hasMetadata()) { + hash = (37 * hash) + METADATA_FIELD_NUMBER; + hash = (53 * hash) + getMetadata().hashCode(); + } if (hasOperation()) { hash = (37 * hash) + OPERATION_FIELD_NUMBER; hash = (53 * hash) + getOperation().hashCode(); @@ -1355,6 +1439,7 @@ public static com.google.logging.v2.LogEntry parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -1362,6 +1447,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.LogEntry prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -1411,6 +1497,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( "Invalid map field number: " + number); } } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntry_fieldAccessorTable @@ -1433,6 +1520,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); logName_ = ""; @@ -1466,6 +1554,12 @@ public Builder clear() { httpRequestBuilder_ = null; } internalGetMutableLabels().clear(); + if (metadataBuilder_ == null) { + metadata_ = null; + } else { + metadata_ = null; + metadataBuilder_ = null; + } if (operationBuilder_ == null) { operation_ = null; } else { @@ -1487,15 +1581,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntry_descriptor; } + @java.lang.Override public com.google.logging.v2.LogEntry getDefaultInstanceForType() { return com.google.logging.v2.LogEntry.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.LogEntry build() { com.google.logging.v2.LogEntry result = buildPartial(); if (!result.isInitialized()) { @@ -1504,6 +1601,7 @@ public com.google.logging.v2.LogEntry build() { return result; } + @java.lang.Override public com.google.logging.v2.LogEntry buildPartial() { com.google.logging.v2.LogEntry result = new com.google.logging.v2.LogEntry(this); int from_bitField0_ = bitField0_; @@ -1550,6 +1648,11 @@ public com.google.logging.v2.LogEntry buildPartial() { } result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); + if (metadataBuilder_ == null) { + result.metadata_ = metadata_; + } else { + result.metadata_ = metadataBuilder_.build(); + } if (operationBuilder_ == null) { result.operation_ = operation_; } else { @@ -1568,32 +1671,39 @@ public com.google.logging.v2.LogEntry buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.LogEntry) { return mergeFrom((com.google.logging.v2.LogEntry)other); @@ -1630,6 +1740,9 @@ public Builder mergeFrom(com.google.logging.v2.LogEntry other) { } internalGetMutableLabels().mergeFrom( other.internalGetLabels()); + if (other.hasMetadata()) { + mergeMetadata(other.getMetadata()); + } if (other.hasOperation()) { mergeOperation(other.getOperation()); } @@ -1668,10 +1781,12 @@ public Builder mergeFrom(com.google.logging.v2.LogEntry other) { 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) @@ -1885,7 +2000,7 @@ public Builder setLogNameBytes( com.google.api.MonitoredResource, com.google.api.MonitoredResource.Builder, com.google.api.MonitoredResourceOrBuilder> resourceBuilder_; /** *
-     * Required. The monitored resource associated with this log entry.
+     * Required. The primary monitored resource associated with this log entry.
      * Example: a log entry that reports a database error would be
      * associated with the monitored resource designating the particular
      * database that reported the error.
@@ -1898,7 +2013,7 @@ public boolean hasResource() {
     }
     /**
      * 
-     * Required. The monitored resource associated with this log entry.
+     * Required. The primary monitored resource associated with this log entry.
      * Example: a log entry that reports a database error would be
      * associated with the monitored resource designating the particular
      * database that reported the error.
@@ -1915,7 +2030,7 @@ public com.google.api.MonitoredResource getResource() {
     }
     /**
      * 
-     * Required. The monitored resource associated with this log entry.
+     * Required. The primary monitored resource associated with this log entry.
      * Example: a log entry that reports a database error would be
      * associated with the monitored resource designating the particular
      * database that reported the error.
@@ -1938,7 +2053,7 @@ public Builder setResource(com.google.api.MonitoredResource value) {
     }
     /**
      * 
-     * Required. The monitored resource associated with this log entry.
+     * Required. The primary monitored resource associated with this log entry.
      * Example: a log entry that reports a database error would be
      * associated with the monitored resource designating the particular
      * database that reported the error.
@@ -1959,7 +2074,7 @@ public Builder setResource(
     }
     /**
      * 
-     * Required. The monitored resource associated with this log entry.
+     * Required. The primary monitored resource associated with this log entry.
      * Example: a log entry that reports a database error would be
      * associated with the monitored resource designating the particular
      * database that reported the error.
@@ -1984,7 +2099,7 @@ public Builder mergeResource(com.google.api.MonitoredResource value) {
     }
     /**
      * 
-     * Required. The monitored resource associated with this log entry.
+     * Required. The primary monitored resource associated with this log entry.
      * Example: a log entry that reports a database error would be
      * associated with the monitored resource designating the particular
      * database that reported the error.
@@ -2005,7 +2120,7 @@ public Builder clearResource() {
     }
     /**
      * 
-     * Required. The monitored resource associated with this log entry.
+     * Required. The primary monitored resource associated with this log entry.
      * Example: a log entry that reports a database error would be
      * associated with the monitored resource designating the particular
      * database that reported the error.
@@ -2020,7 +2135,7 @@ public com.google.api.MonitoredResource.Builder getResourceBuilder() {
     }
     /**
      * 
-     * Required. The monitored resource associated with this log entry.
+     * Required. The primary monitored resource associated with this log entry.
      * Example: a log entry that reports a database error would be
      * associated with the monitored resource designating the particular
      * database that reported the error.
@@ -2038,7 +2153,7 @@ public com.google.api.MonitoredResourceOrBuilder getResourceOrBuilder() {
     }
     /**
      * 
-     * Required. The monitored resource associated with this log entry.
+     * Required. The primary monitored resource associated with this log entry.
      * Example: a log entry that reports a database error would be
      * associated with the monitored resource designating the particular
      * database that reported the error.
@@ -2540,10 +2655,14 @@ public com.google.protobuf.StructOrBuilder getJsonPayloadOrBuilder() {
      * This time is used to compute the log entry's age and to enforce
      * the logs retention period. If this field is omitted in a new log
      * entry, then Stackdriver Logging assigns it the current time.
+     * Timestamps have nanosecond accuracy, but trailing zeros in the fractional
+     * seconds might be omitted when the timestamp is displayed.
      * Incoming log entries should have timestamps that are no more than
-     * the [logs retention period](/logging/quota-policy) in the past,
-     * and no more than 24 hours in the future.
-     * See the `entries.write` API method for more information.
+     * the [logs retention period](/logging/quotas) in the past,
+     * and no more than 24 hours in the future. Log entries outside those time
+     * boundaries will not be available when calling `entries.list`, but
+     * those log entries can still be exported with
+     * [LogSinks](/logging/docs/api/tasks/exporting-logs).
      * 
* * .google.protobuf.Timestamp timestamp = 9; @@ -2557,10 +2676,14 @@ public boolean hasTimestamp() { * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -2578,10 +2701,14 @@ public com.google.protobuf.Timestamp getTimestamp() { * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -2605,10 +2732,14 @@ public Builder setTimestamp(com.google.protobuf.Timestamp value) { * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -2630,10 +2761,14 @@ public Builder setTimestamp( * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -2659,10 +2794,14 @@ public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -2684,10 +2823,14 @@ public Builder clearTimestamp() { * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -2703,10 +2846,14 @@ public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -2725,10 +2872,14 @@ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -2934,6 +3085,7 @@ public Builder setSeverityValue(int value) { * .google.logging.type.LogSeverity severity = 10; */ public com.google.logging.type.LogSeverity getSeverity() { + @SuppressWarnings("deprecation") com.google.logging.type.LogSeverity result = com.google.logging.type.LogSeverity.valueOf(severity_); return result == null ? com.google.logging.type.LogSeverity.UNRECOGNIZED : result; } @@ -3403,6 +3555,177 @@ public Builder putAllLabels( return this; } + private com.google.api.MonitoredResourceMetadata metadata_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.MonitoredResourceMetadata, com.google.api.MonitoredResourceMetadata.Builder, com.google.api.MonitoredResourceMetadataOrBuilder> metadataBuilder_; + /** + *
+     * Output only. Additional metadata about the monitored resource.
+     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+     * this field populated.
+     * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + public boolean hasMetadata() { + return metadataBuilder_ != null || metadata_ != null; + } + /** + *
+     * Output only. Additional metadata about the monitored resource.
+     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+     * this field populated.
+     * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + public com.google.api.MonitoredResourceMetadata getMetadata() { + if (metadataBuilder_ == null) { + return metadata_ == null ? com.google.api.MonitoredResourceMetadata.getDefaultInstance() : metadata_; + } else { + return metadataBuilder_.getMessage(); + } + } + /** + *
+     * Output only. Additional metadata about the monitored resource.
+     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+     * this field populated.
+     * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + public Builder setMetadata(com.google.api.MonitoredResourceMetadata value) { + if (metadataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + metadata_ = value; + onChanged(); + } else { + metadataBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. Additional metadata about the monitored resource.
+     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+     * this field populated.
+     * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + public Builder setMetadata( + com.google.api.MonitoredResourceMetadata.Builder builderForValue) { + if (metadataBuilder_ == null) { + metadata_ = builderForValue.build(); + onChanged(); + } else { + metadataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. Additional metadata about the monitored resource.
+     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+     * this field populated.
+     * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + public Builder mergeMetadata(com.google.api.MonitoredResourceMetadata value) { + if (metadataBuilder_ == null) { + if (metadata_ != null) { + metadata_ = + com.google.api.MonitoredResourceMetadata.newBuilder(metadata_).mergeFrom(value).buildPartial(); + } else { + metadata_ = value; + } + onChanged(); + } else { + metadataBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. Additional metadata about the monitored resource.
+     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+     * this field populated.
+     * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + public Builder clearMetadata() { + if (metadataBuilder_ == null) { + metadata_ = null; + onChanged(); + } else { + metadata_ = null; + metadataBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. Additional metadata about the monitored resource.
+     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+     * this field populated.
+     * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + public com.google.api.MonitoredResourceMetadata.Builder getMetadataBuilder() { + + onChanged(); + return getMetadataFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. Additional metadata about the monitored resource.
+     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+     * this field populated.
+     * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + public com.google.api.MonitoredResourceMetadataOrBuilder getMetadataOrBuilder() { + if (metadataBuilder_ != null) { + return metadataBuilder_.getMessageOrBuilder(); + } else { + return metadata_ == null ? + com.google.api.MonitoredResourceMetadata.getDefaultInstance() : metadata_; + } + } + /** + *
+     * Output only. Additional metadata about the monitored resource.
+     * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+     * this field populated.
+     * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.MonitoredResourceMetadata, com.google.api.MonitoredResourceMetadata.Builder, com.google.api.MonitoredResourceMetadataOrBuilder> + getMetadataFieldBuilder() { + if (metadataBuilder_ == null) { + metadataBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.MonitoredResourceMetadata, com.google.api.MonitoredResourceMetadata.Builder, com.google.api.MonitoredResourceMetadataOrBuilder>( + getMetadata(), + getParentForChildren(), + isClean()); + metadata_ = null; + } + return metadataBuilder_; + } + private com.google.logging.v2.LogEntryOperation operation_ = null; private com.google.protobuf.SingleFieldBuilderV3< com.google.logging.v2.LogEntryOperation, com.google.logging.v2.LogEntryOperation.Builder, com.google.logging.v2.LogEntryOperationOrBuilder> operationBuilder_; @@ -3672,11 +3995,10 @@ public Builder setTraceBytes( private java.lang.Object spanId_ = ""; /** *
-     * Optional. Id of the span within the trace associated with the log entry.
-     * e.g. "0000000000000042"
-     * For Stackdriver trace spans, this is the same format that the Stackdriver
-     * trace API uses.
-     * The ID is a 16-character hexadecimal encoding of an 8-byte array.
+     * Optional. The span ID within the trace associated with the log entry. For
+     * Stackdriver Trace spans, this is the same format that the Stackdriver Trace
+     * API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
+     * as <code>"000000000000004a"</code>.
      * 
* * string span_id = 27; @@ -3695,11 +4017,10 @@ public java.lang.String getSpanId() { } /** *
-     * Optional. Id of the span within the trace associated with the log entry.
-     * e.g. "0000000000000042"
-     * For Stackdriver trace spans, this is the same format that the Stackdriver
-     * trace API uses.
-     * The ID is a 16-character hexadecimal encoding of an 8-byte array.
+     * Optional. The span ID within the trace associated with the log entry. For
+     * Stackdriver Trace spans, this is the same format that the Stackdriver Trace
+     * API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
+     * as <code>"000000000000004a"</code>.
      * 
* * string span_id = 27; @@ -3719,11 +4040,10 @@ public java.lang.String getSpanId() { } /** *
-     * Optional. Id of the span within the trace associated with the log entry.
-     * e.g. "0000000000000042"
-     * For Stackdriver trace spans, this is the same format that the Stackdriver
-     * trace API uses.
-     * The ID is a 16-character hexadecimal encoding of an 8-byte array.
+     * Optional. The span ID within the trace associated with the log entry. For
+     * Stackdriver Trace spans, this is the same format that the Stackdriver Trace
+     * API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
+     * as <code>"000000000000004a"</code>.
      * 
* * string span_id = 27; @@ -3740,11 +4060,10 @@ public Builder setSpanId( } /** *
-     * Optional. Id of the span within the trace associated with the log entry.
-     * e.g. "0000000000000042"
-     * For Stackdriver trace spans, this is the same format that the Stackdriver
-     * trace API uses.
-     * The ID is a 16-character hexadecimal encoding of an 8-byte array.
+     * Optional. The span ID within the trace associated with the log entry. For
+     * Stackdriver Trace spans, this is the same format that the Stackdriver Trace
+     * API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
+     * as <code>"000000000000004a"</code>.
      * 
* * string span_id = 27; @@ -3757,11 +4076,10 @@ public Builder clearSpanId() { } /** *
-     * Optional. Id of the span within the trace associated with the log entry.
-     * e.g. "0000000000000042"
-     * For Stackdriver trace spans, this is the same format that the Stackdriver
-     * trace API uses.
-     * The ID is a 16-character hexadecimal encoding of an 8-byte array.
+     * Optional. The span ID within the trace associated with the log entry. For
+     * Stackdriver Trace spans, this is the same format that the Stackdriver Trace
+     * API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
+     * as <code>"000000000000004a"</code>.
      * 
* * string span_id = 27; @@ -3939,11 +4257,13 @@ public com.google.logging.v2.LogEntrySourceLocationOrBuilder getSourceLocationOr } return sourceLocationBuilder_; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -3965,6 +4285,7 @@ public static com.google.logging.v2.LogEntry getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public LogEntry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -3982,6 +4303,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.LogEntry getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java index 7e96d49f5bf6..38c0ffcb9b31 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOperation.java @@ -51,13 +51,6 @@ private LogEntryOperation( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -80,6 +73,13 @@ private LogEntryOperation( last_ = input.readBool(); break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -97,6 +97,7 @@ private LogEntryOperation( return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntryOperation_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntryOperation_fieldAccessorTable @@ -221,6 +222,7 @@ public boolean getLast() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -230,6 +232,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getIdBytes().isEmpty()) { @@ -247,6 +250,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -386,6 +390,7 @@ public static com.google.logging.v2.LogEntryOperation parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -393,6 +398,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.LogEntryOperation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -421,6 +427,7 @@ public static final class Builder extends return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntryOperation_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntryOperation_fieldAccessorTable @@ -443,6 +450,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); id_ = ""; @@ -456,15 +464,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntryOperation_descriptor; } + @java.lang.Override public com.google.logging.v2.LogEntryOperation getDefaultInstanceForType() { return com.google.logging.v2.LogEntryOperation.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.LogEntryOperation build() { com.google.logging.v2.LogEntryOperation result = buildPartial(); if (!result.isInitialized()) { @@ -473,6 +484,7 @@ public com.google.logging.v2.LogEntryOperation build() { return result; } + @java.lang.Override public com.google.logging.v2.LogEntryOperation buildPartial() { com.google.logging.v2.LogEntryOperation result = new com.google.logging.v2.LogEntryOperation(this); result.id_ = id_; @@ -483,32 +495,39 @@ public com.google.logging.v2.LogEntryOperation buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.LogEntryOperation) { return mergeFrom((com.google.logging.v2.LogEntryOperation)other); @@ -539,10 +558,12 @@ public Builder mergeFrom(com.google.logging.v2.LogEntryOperation other) { 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) @@ -829,11 +850,13 @@ public Builder clearLast() { onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -855,6 +878,7 @@ public static com.google.logging.v2.LogEntryOperation getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public LogEntryOperation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -872,6 +896,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.LogEntryOperation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java index 76a51956fac4..f06d9b933da1 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryOrBuilder.java @@ -61,7 +61,7 @@ public interface LogEntryOrBuilder extends /** *
-   * Required. The monitored resource associated with this log entry.
+   * Required. The primary monitored resource associated with this log entry.
    * Example: a log entry that reports a database error would be
    * associated with the monitored resource designating the particular
    * database that reported the error.
@@ -72,7 +72,7 @@ public interface LogEntryOrBuilder extends
   boolean hasResource();
   /**
    * 
-   * Required. The monitored resource associated with this log entry.
+   * Required. The primary monitored resource associated with this log entry.
    * Example: a log entry that reports a database error would be
    * associated with the monitored resource designating the particular
    * database that reported the error.
@@ -83,7 +83,7 @@ public interface LogEntryOrBuilder extends
   com.google.api.MonitoredResource getResource();
   /**
    * 
-   * Required. The monitored resource associated with this log entry.
+   * Required. The primary monitored resource associated with this log entry.
    * Example: a log entry that reports a database error would be
    * associated with the monitored resource designating the particular
    * database that reported the error.
@@ -176,10 +176,14 @@ public interface LogEntryOrBuilder extends
    * This time is used to compute the log entry's age and to enforce
    * the logs retention period. If this field is omitted in a new log
    * entry, then Stackdriver Logging assigns it the current time.
+   * Timestamps have nanosecond accuracy, but trailing zeros in the fractional
+   * seconds might be omitted when the timestamp is displayed.
    * Incoming log entries should have timestamps that are no more than
-   * the [logs retention period](/logging/quota-policy) in the past,
-   * and no more than 24 hours in the future.
-   * See the `entries.write` API method for more information.
+   * the [logs retention period](/logging/quotas) in the past,
+   * and no more than 24 hours in the future. Log entries outside those time
+   * boundaries will not be available when calling `entries.list`, but
+   * those log entries can still be exported with
+   * [LogSinks](/logging/docs/api/tasks/exporting-logs).
    * 
* * .google.protobuf.Timestamp timestamp = 9; @@ -191,10 +195,14 @@ public interface LogEntryOrBuilder extends * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -206,10 +214,14 @@ public interface LogEntryOrBuilder extends * This time is used to compute the log entry's age and to enforce * the logs retention period. If this field is omitted in a new log * entry, then Stackdriver Logging assigns it the current time. + * Timestamps have nanosecond accuracy, but trailing zeros in the fractional + * seconds might be omitted when the timestamp is displayed. * Incoming log entries should have timestamps that are no more than - * the [logs retention period](/logging/quota-policy) in the past, - * and no more than 24 hours in the future. - * See the `entries.write` API method for more information. + * the [logs retention period](/logging/quotas) in the past, + * and no more than 24 hours in the future. Log entries outside those time + * boundaries will not be available when calling `entries.list`, but + * those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). *
* * .google.protobuf.Timestamp timestamp = 9; @@ -375,6 +387,37 @@ java.lang.String getLabelsOrDefault( java.lang.String getLabelsOrThrow( java.lang.String key); + /** + *
+   * Output only. Additional metadata about the monitored resource.
+   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+   * this field populated.
+   * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + boolean hasMetadata(); + /** + *
+   * Output only. Additional metadata about the monitored resource.
+   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+   * this field populated.
+   * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + com.google.api.MonitoredResourceMetadata getMetadata(); + /** + *
+   * Output only. Additional metadata about the monitored resource.
+   * Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have
+   * this field populated.
+   * 
+ * + * .google.api.MonitoredResourceMetadata metadata = 25; + */ + com.google.api.MonitoredResourceMetadataOrBuilder getMetadataOrBuilder(); + /** *
    * Optional. Information about an operation associated with the log entry, if
@@ -429,11 +472,10 @@ java.lang.String getLabelsOrThrow(
 
   /**
    * 
-   * Optional. Id of the span within the trace associated with the log entry.
-   * e.g. "0000000000000042"
-   * For Stackdriver trace spans, this is the same format that the Stackdriver
-   * trace API uses.
-   * The ID is a 16-character hexadecimal encoding of an 8-byte array.
+   * Optional. The span ID within the trace associated with the log entry. For
+   * Stackdriver Trace spans, this is the same format that the Stackdriver Trace
+   * API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
+   * as <code>"000000000000004a"</code>.
    * 
* * string span_id = 27; @@ -441,11 +483,10 @@ java.lang.String getLabelsOrThrow( java.lang.String getSpanId(); /** *
-   * Optional. Id of the span within the trace associated with the log entry.
-   * e.g. "0000000000000042"
-   * For Stackdriver trace spans, this is the same format that the Stackdriver
-   * trace API uses.
-   * The ID is a 16-character hexadecimal encoding of an 8-byte array.
+   * Optional. The span ID within the trace associated with the log entry. For
+   * Stackdriver Trace spans, this is the same format that the Stackdriver Trace
+   * API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such
+   * as <code>"000000000000004a"</code>.
    * 
* * string span_id = 27; diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java index 1cb256fd6678..b9379914d819 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntryProto.java @@ -50,7 +50,7 @@ public static void registerAllExtensions( "o\032&google/logging/type/log_severity.prot" + "o\032\031google/protobuf/any.proto\032\034google/pro" + "tobuf/struct.proto\032\037google/protobuf/time" + - "stamp.proto\"\272\005\n\010LogEntry\022\020\n\010log_name\030\014 \001" + + "stamp.proto\"\363\005\n\010LogEntry\022\020\n\010log_name\030\014 \001" + "(\t\022/\n\010resource\030\010 \001(\0132\035.google.api.Monito" + "redResource\022-\n\rproto_payload\030\002 \001(\0132\024.goo" + "gle.protobuf.AnyH\000\022\026\n\014text_payload\030\003 \001(\t" + @@ -62,20 +62,22 @@ public static void registerAllExtensions( "erity\022\021\n\tinsert_id\030\004 \001(\t\0226\n\014http_request" + "\030\007 \001(\0132 .google.logging.type.HttpRequest" + "\0227\n\006labels\030\013 \003(\0132\'.google.logging.v2.Log" + - "Entry.LabelsEntry\0227\n\toperation\030\017 \001(\0132$.g" + - "oogle.logging.v2.LogEntryOperation\022\r\n\005tr" + - "ace\030\026 \001(\t\022\017\n\007span_id\030\033 \001(\t\022B\n\017source_loc" + - "ation\030\027 \001(\0132).google.logging.v2.LogEntry" + - "SourceLocation\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001" + - "(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\t\n\007payload\"N\n\021LogE" + - "ntryOperation\022\n\n\002id\030\001 \001(\t\022\020\n\010producer\030\002 " + - "\001(\t\022\r\n\005first\030\003 \001(\010\022\014\n\004last\030\004 \001(\010\"F\n\026LogE" + - "ntrySourceLocation\022\014\n\004file\030\001 \001(\t\022\014\n\004line" + - "\030\002 \001(\003\022\020\n\010function\030\003 \001(\tB\231\001\n\025com.google." + - "logging.v2B\rLogEntryProtoP\001Z8google.gola" + - "ng.org/genproto/googleapis/logging/v2;lo" + - "gging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Goo" + - "gle\\Cloud\\Logging\\V2b\006proto3" + "Entry.LabelsEntry\0227\n\010metadata\030\031 \001(\0132%.go" + + "ogle.api.MonitoredResourceMetadata\0227\n\top" + + "eration\030\017 \001(\0132$.google.logging.v2.LogEnt" + + "ryOperation\022\r\n\005trace\030\026 \001(\t\022\017\n\007span_id\030\033 " + + "\001(\t\022B\n\017source_location\030\027 \001(\0132).google.lo" + + "gging.v2.LogEntrySourceLocation\032-\n\013Label" + + "sEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001B\t" + + "\n\007payload\"N\n\021LogEntryOperation\022\n\n\002id\030\001 \001" + + "(\t\022\020\n\010producer\030\002 \001(\t\022\r\n\005first\030\003 \001(\010\022\014\n\004l" + + "ast\030\004 \001(\010\"F\n\026LogEntrySourceLocation\022\014\n\004f" + + "ile\030\001 \001(\t\022\014\n\004line\030\002 \001(\003\022\020\n\010function\030\003 \001(" + + "\tB\231\001\n\025com.google.logging.v2B\rLogEntryPro" + + "toP\001Z8google.golang.org/genproto/googlea" + + "pis/logging/v2;logging\370\001\001\252\002\027Google.Cloud" + + ".Logging.V2\312\002\027Google\\Cloud\\Logging\\V2b\006p" + + "roto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { @@ -101,7 +103,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_logging_v2_LogEntry_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_LogEntry_descriptor, - new java.lang.String[] { "LogName", "Resource", "ProtoPayload", "TextPayload", "JsonPayload", "Timestamp", "ReceiveTimestamp", "Severity", "InsertId", "HttpRequest", "Labels", "Operation", "Trace", "SpanId", "SourceLocation", "Payload", }); + new java.lang.String[] { "LogName", "Resource", "ProtoPayload", "TextPayload", "JsonPayload", "Timestamp", "ReceiveTimestamp", "Severity", "InsertId", "HttpRequest", "Labels", "Metadata", "Operation", "Trace", "SpanId", "SourceLocation", "Payload", }); internal_static_google_logging_v2_LogEntry_LabelsEntry_descriptor = internal_static_google_logging_v2_LogEntry_descriptor.getNestedTypes().get(0); internal_static_google_logging_v2_LogEntry_LabelsEntry_fieldAccessorTable = new diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java index b16f38eb8768..abed2c2ed6ce 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogEntrySourceLocation.java @@ -50,13 +50,6 @@ private LogEntrySourceLocation( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -74,6 +67,13 @@ private LogEntrySourceLocation( function_ = s; break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -91,6 +91,7 @@ private LogEntrySourceLocation( return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntrySourceLocation_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntrySourceLocation_fieldAccessorTable @@ -209,6 +210,7 @@ public java.lang.String getFunction() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -218,6 +220,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getFileBytes().isEmpty()) { @@ -232,6 +235,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -362,6 +366,7 @@ public static com.google.logging.v2.LogEntrySourceLocation parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -369,6 +374,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.LogEntrySourceLocation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -397,6 +403,7 @@ public static final class Builder extends return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntrySourceLocation_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntrySourceLocation_fieldAccessorTable @@ -419,6 +426,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); file_ = ""; @@ -430,15 +438,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LogEntryProto.internal_static_google_logging_v2_LogEntrySourceLocation_descriptor; } + @java.lang.Override public com.google.logging.v2.LogEntrySourceLocation getDefaultInstanceForType() { return com.google.logging.v2.LogEntrySourceLocation.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.LogEntrySourceLocation build() { com.google.logging.v2.LogEntrySourceLocation result = buildPartial(); if (!result.isInitialized()) { @@ -447,6 +458,7 @@ public com.google.logging.v2.LogEntrySourceLocation build() { return result; } + @java.lang.Override public com.google.logging.v2.LogEntrySourceLocation buildPartial() { com.google.logging.v2.LogEntrySourceLocation result = new com.google.logging.v2.LogEntrySourceLocation(this); result.file_ = file_; @@ -456,32 +468,39 @@ public com.google.logging.v2.LogEntrySourceLocation buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.LogEntrySourceLocation) { return mergeFrom((com.google.logging.v2.LogEntrySourceLocation)other); @@ -509,10 +528,12 @@ public Builder mergeFrom(com.google.logging.v2.LogEntrySourceLocation other) { 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) @@ -779,11 +800,13 @@ public Builder setFunctionBytes( onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -805,6 +828,7 @@ public static com.google.logging.v2.LogEntrySourceLocation getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public LogEntrySourceLocation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -822,6 +846,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.LogEntrySourceLocation getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java index d33cc0862eee..72a08e50dcf4 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusion.java @@ -55,13 +55,6 @@ private LogExclusion( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -85,6 +78,13 @@ private LogExclusion( disabled_ = input.readBool(); break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -102,6 +102,7 @@ private LogExclusion( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_LogExclusion_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_LogExclusion_fieldAccessorTable @@ -208,7 +209,7 @@ public java.lang.String getDescription() { * you can exclude less than 100% of the matching log entries. * For example, the following filter matches 99% of low-severity log * entries from load balancers: - * "resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)" + * `"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"` *
* * string filter = 3; @@ -234,7 +235,7 @@ public java.lang.String getFilter() { * you can exclude less than 100% of the matching log entries. * For example, the following filter matches 99% of low-severity log * entries from load balancers: - * "resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)" + * `"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"` * * * string filter = 3; @@ -259,7 +260,7 @@ public java.lang.String getFilter() { *
    * Optional. If set to True, then this exclusion is disabled and it does not
    * exclude any log entries. You can use
-   * [exclusions.patch](/logging/docs/alpha-exclusion/docs/reference/v2/rest/v2/projects.exclusions/patch)
+   * [exclusions.patch](/logging/docs/reference/v2/rest/v2/projects.exclusions/patch)
    * to change the value of this field.
    * 
* @@ -270,6 +271,7 @@ public boolean getDisabled() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -279,6 +281,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { @@ -296,6 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -433,6 +437,7 @@ public static com.google.logging.v2.LogExclusion parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -440,6 +445,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.LogExclusion prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -472,6 +478,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_LogExclusion_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_LogExclusion_fieldAccessorTable @@ -494,6 +501,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); name_ = ""; @@ -507,15 +515,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_LogExclusion_descriptor; } + @java.lang.Override public com.google.logging.v2.LogExclusion getDefaultInstanceForType() { return com.google.logging.v2.LogExclusion.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.LogExclusion build() { com.google.logging.v2.LogExclusion result = buildPartial(); if (!result.isInitialized()) { @@ -524,6 +535,7 @@ public com.google.logging.v2.LogExclusion build() { return result; } + @java.lang.Override public com.google.logging.v2.LogExclusion buildPartial() { com.google.logging.v2.LogExclusion result = new com.google.logging.v2.LogExclusion(this); result.name_ = name_; @@ -534,32 +546,39 @@ public com.google.logging.v2.LogExclusion buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.LogExclusion) { return mergeFrom((com.google.logging.v2.LogExclusion)other); @@ -591,10 +610,12 @@ public Builder mergeFrom(com.google.logging.v2.LogExclusion other) { 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) @@ -811,7 +832,7 @@ public Builder setDescriptionBytes( * you can exclude less than 100% of the matching log entries. * For example, the following filter matches 99% of low-severity log * entries from load balancers: - * "resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)" + * `"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"` * * * string filter = 3; @@ -837,7 +858,7 @@ public java.lang.String getFilter() { * you can exclude less than 100% of the matching log entries. * For example, the following filter matches 99% of low-severity log * entries from load balancers: - * "resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)" + * `"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"` * * * string filter = 3; @@ -864,7 +885,7 @@ public java.lang.String getFilter() { * you can exclude less than 100% of the matching log entries. * For example, the following filter matches 99% of low-severity log * entries from load balancers: - * "resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)" + * `"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"` * * * string filter = 3; @@ -888,7 +909,7 @@ public Builder setFilter( * you can exclude less than 100% of the matching log entries. * For example, the following filter matches 99% of low-severity log * entries from load balancers: - * "resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)" + * `"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"` * * * string filter = 3; @@ -908,7 +929,7 @@ public Builder clearFilter() { * you can exclude less than 100% of the matching log entries. * For example, the following filter matches 99% of low-severity log * entries from load balancers: - * "resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)" + * `"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"` * * * string filter = 3; @@ -930,7 +951,7 @@ public Builder setFilterBytes( *
      * Optional. If set to True, then this exclusion is disabled and it does not
      * exclude any log entries. You can use
-     * [exclusions.patch](/logging/docs/alpha-exclusion/docs/reference/v2/rest/v2/projects.exclusions/patch)
+     * [exclusions.patch](/logging/docs/reference/v2/rest/v2/projects.exclusions/patch)
      * to change the value of this field.
      * 
* @@ -943,7 +964,7 @@ public boolean getDisabled() { *
      * Optional. If set to True, then this exclusion is disabled and it does not
      * exclude any log entries. You can use
-     * [exclusions.patch](/logging/docs/alpha-exclusion/docs/reference/v2/rest/v2/projects.exclusions/patch)
+     * [exclusions.patch](/logging/docs/reference/v2/rest/v2/projects.exclusions/patch)
      * to change the value of this field.
      * 
* @@ -959,7 +980,7 @@ public Builder setDisabled(boolean value) { *
      * Optional. If set to True, then this exclusion is disabled and it does not
      * exclude any log entries. You can use
-     * [exclusions.patch](/logging/docs/alpha-exclusion/docs/reference/v2/rest/v2/projects.exclusions/patch)
+     * [exclusions.patch](/logging/docs/reference/v2/rest/v2/projects.exclusions/patch)
      * to change the value of this field.
      * 
* @@ -971,11 +992,13 @@ public Builder clearDisabled() { onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -997,6 +1020,7 @@ public static com.google.logging.v2.LogExclusion getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public LogExclusion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1014,6 +1038,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.LogExclusion getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java index bf36ceb70d05..5b6d5ed680be 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogExclusionOrBuilder.java @@ -56,7 +56,7 @@ public interface LogExclusionOrBuilder extends * you can exclude less than 100% of the matching log entries. * For example, the following filter matches 99% of low-severity log * entries from load balancers: - * "resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)" + * `"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"` * * * string filter = 3; @@ -71,7 +71,7 @@ public interface LogExclusionOrBuilder extends * you can exclude less than 100% of the matching log entries. * For example, the following filter matches 99% of low-severity log * entries from load balancers: - * "resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)" + * `"resource.type=http_load_balancer severity<ERROR sample(insertId, 0.99)"` * * * string filter = 3; @@ -83,7 +83,7 @@ public interface LogExclusionOrBuilder extends *
    * Optional. If set to True, then this exclusion is disabled and it does not
    * exclude any log entries. You can use
-   * [exclusions.patch](/logging/docs/alpha-exclusion/docs/reference/v2/rest/v2/projects.exclusions/patch)
+   * [exclusions.patch](/logging/docs/reference/v2/rest/v2/projects.exclusions/patch)
    * to change the value of this field.
    * 
* diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java index 5002a5c06523..800a86b07ce4 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetric.java @@ -56,13 +56,6 @@ private LogMetric( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -132,6 +125,13 @@ private LogMetric( break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -150,6 +150,7 @@ private LogMetric( } @SuppressWarnings({"rawtypes"}) + @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { @@ -160,6 +161,7 @@ protected com.google.protobuf.MapField internalGetMapField( "Invalid map field number: " + number); } } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_LogMetric_fieldAccessorTable @@ -782,9 +784,9 @@ public com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuil * The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogMetric.ApiVersion version = 4; + * .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; */ - public int getVersionValue() { + @java.lang.Deprecated public int getVersionValue() { return version_; } /** @@ -793,14 +795,16 @@ public int getVersionValue() { * The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogMetric.ApiVersion version = 4; + * .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; */ - public com.google.logging.v2.LogMetric.ApiVersion getVersion() { + @java.lang.Deprecated public com.google.logging.v2.LogMetric.ApiVersion getVersion() { + @SuppressWarnings("deprecation") com.google.logging.v2.LogMetric.ApiVersion result = com.google.logging.v2.LogMetric.ApiVersion.valueOf(version_); return result == null ? com.google.logging.v2.LogMetric.ApiVersion.UNRECOGNIZED : result; } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -810,6 +814,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { @@ -842,6 +847,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -1026,6 +1032,7 @@ public static com.google.logging.v2.LogMetric parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -1033,6 +1040,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.LogMetric prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -1087,6 +1095,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( "Invalid map field number: " + number); } } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_LogMetric_fieldAccessorTable @@ -1109,6 +1118,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); name_ = ""; @@ -1137,15 +1147,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_LogMetric_descriptor; } + @java.lang.Override public com.google.logging.v2.LogMetric getDefaultInstanceForType() { return com.google.logging.v2.LogMetric.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.LogMetric build() { com.google.logging.v2.LogMetric result = buildPartial(); if (!result.isInitialized()) { @@ -1154,6 +1167,7 @@ public com.google.logging.v2.LogMetric build() { return result; } + @java.lang.Override public com.google.logging.v2.LogMetric buildPartial() { com.google.logging.v2.LogMetric result = new com.google.logging.v2.LogMetric(this); int from_bitField0_ = bitField0_; @@ -1180,32 +1194,39 @@ public com.google.logging.v2.LogMetric buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.LogMetric) { return mergeFrom((com.google.logging.v2.LogMetric)other); @@ -1249,10 +1270,12 @@ public Builder mergeFrom(com.google.logging.v2.LogMetric other) { 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) @@ -2491,9 +2514,9 @@ public com.google.api.Distribution.BucketOptionsOrBuilder getBucketOptionsOrBuil * The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogMetric.ApiVersion version = 4; + * .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; */ - public int getVersionValue() { + @java.lang.Deprecated public int getVersionValue() { return version_; } /** @@ -2502,9 +2525,9 @@ public int getVersionValue() { * The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogMetric.ApiVersion version = 4; + * .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; */ - public Builder setVersionValue(int value) { + @java.lang.Deprecated public Builder setVersionValue(int value) { version_ = value; onChanged(); return this; @@ -2515,9 +2538,10 @@ public Builder setVersionValue(int value) { * The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogMetric.ApiVersion version = 4; + * .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; */ - public com.google.logging.v2.LogMetric.ApiVersion getVersion() { + @java.lang.Deprecated public com.google.logging.v2.LogMetric.ApiVersion getVersion() { + @SuppressWarnings("deprecation") com.google.logging.v2.LogMetric.ApiVersion result = com.google.logging.v2.LogMetric.ApiVersion.valueOf(version_); return result == null ? com.google.logging.v2.LogMetric.ApiVersion.UNRECOGNIZED : result; } @@ -2527,9 +2551,9 @@ public com.google.logging.v2.LogMetric.ApiVersion getVersion() { * The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogMetric.ApiVersion version = 4; + * .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; */ - public Builder setVersion(com.google.logging.v2.LogMetric.ApiVersion value) { + @java.lang.Deprecated public Builder setVersion(com.google.logging.v2.LogMetric.ApiVersion value) { if (value == null) { throw new NullPointerException(); } @@ -2544,19 +2568,21 @@ public Builder setVersion(com.google.logging.v2.LogMetric.ApiVersion value) { * The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogMetric.ApiVersion version = 4; + * .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; */ - public Builder clearVersion() { + @java.lang.Deprecated public Builder clearVersion() { version_ = 0; onChanged(); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -2578,6 +2604,7 @@ public static com.google.logging.v2.LogMetric getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public LogMetric parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2595,6 +2622,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.LogMetric getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java index 3d0901f96afe..e7d43c12fdb8 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogMetricOrBuilder.java @@ -362,16 +362,16 @@ java.lang.String getLabelExtractorsOrThrow( * The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogMetric.ApiVersion version = 4; + * .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; */ - int getVersionValue(); + @java.lang.Deprecated int getVersionValue(); /** *
    * Deprecated. The API version that created or updated this metric.
    * The v2 format is used by default and cannot be changed.
    * 
* - * .google.logging.v2.LogMetric.ApiVersion version = 4; + * .google.logging.v2.LogMetric.ApiVersion version = 4 [deprecated = true]; */ - com.google.logging.v2.LogMetric.ApiVersion getVersion(); + @java.lang.Deprecated com.google.logging.v2.LogMetric.ApiVersion getVersion(); } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java index 4845b50b0885..1df7360f6fa0 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSink.java @@ -56,13 +56,6 @@ private LogSink( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -124,6 +117,13 @@ private LogSink( break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -141,6 +141,7 @@ private LogSink( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_LogSink_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_LogSink_fieldAccessorTable @@ -449,9 +450,9 @@ public java.lang.String getFilter() { * entries. The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogSink.VersionFormat output_version_format = 6; + * .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; */ - public int getOutputVersionFormatValue() { + @java.lang.Deprecated public int getOutputVersionFormatValue() { return outputVersionFormat_; } /** @@ -460,9 +461,10 @@ public int getOutputVersionFormatValue() { * entries. The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogSink.VersionFormat output_version_format = 6; + * .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; */ - public com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat() { + @java.lang.Deprecated public com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat() { + @SuppressWarnings("deprecation") com.google.logging.v2.LogSink.VersionFormat result = com.google.logging.v2.LogSink.VersionFormat.valueOf(outputVersionFormat_); return result == null ? com.google.logging.v2.LogSink.VersionFormat.UNRECOGNIZED : result; } @@ -564,9 +566,9 @@ public boolean getIncludeChildren() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - public boolean hasStartTime() { + @java.lang.Deprecated public boolean hasStartTime() { return startTime_ != null; } /** @@ -574,9 +576,9 @@ public boolean hasStartTime() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - public com.google.protobuf.Timestamp getStartTime() { + @java.lang.Deprecated public com.google.protobuf.Timestamp getStartTime() { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } /** @@ -584,9 +586,9 @@ public com.google.protobuf.Timestamp getStartTime() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + @java.lang.Deprecated public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { return getStartTime(); } @@ -597,9 +599,9 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - public boolean hasEndTime() { + @java.lang.Deprecated public boolean hasEndTime() { return endTime_ != null; } /** @@ -607,9 +609,9 @@ public boolean hasEndTime() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - public com.google.protobuf.Timestamp getEndTime() { + @java.lang.Deprecated public com.google.protobuf.Timestamp getEndTime() { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } /** @@ -617,13 +619,14 @@ public com.google.protobuf.Timestamp getEndTime() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + @java.lang.Deprecated public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { return getEndTime(); } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -633,6 +636,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { @@ -662,6 +666,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -839,6 +844,7 @@ public static com.google.logging.v2.LogSink parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -846,6 +852,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.LogSink prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -877,6 +884,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_LogSink_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_LogSink_fieldAccessorTable @@ -899,6 +907,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); name_ = ""; @@ -928,15 +937,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_LogSink_descriptor; } + @java.lang.Override public com.google.logging.v2.LogSink getDefaultInstanceForType() { return com.google.logging.v2.LogSink.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.LogSink build() { com.google.logging.v2.LogSink result = buildPartial(); if (!result.isInitialized()) { @@ -945,6 +957,7 @@ public com.google.logging.v2.LogSink build() { return result; } + @java.lang.Override public com.google.logging.v2.LogSink buildPartial() { com.google.logging.v2.LogSink result = new com.google.logging.v2.LogSink(this); result.name_ = name_; @@ -967,32 +980,39 @@ public com.google.logging.v2.LogSink buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.LogSink) { return mergeFrom((com.google.logging.v2.LogSink)other); @@ -1037,10 +1057,12 @@ public Builder mergeFrom(com.google.logging.v2.LogSink other) { 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) @@ -1408,9 +1430,9 @@ public Builder setFilterBytes( * entries. The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogSink.VersionFormat output_version_format = 6; + * .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; */ - public int getOutputVersionFormatValue() { + @java.lang.Deprecated public int getOutputVersionFormatValue() { return outputVersionFormat_; } /** @@ -1419,9 +1441,9 @@ public int getOutputVersionFormatValue() { * entries. The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogSink.VersionFormat output_version_format = 6; + * .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; */ - public Builder setOutputVersionFormatValue(int value) { + @java.lang.Deprecated public Builder setOutputVersionFormatValue(int value) { outputVersionFormat_ = value; onChanged(); return this; @@ -1432,9 +1454,10 @@ public Builder setOutputVersionFormatValue(int value) { * entries. The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogSink.VersionFormat output_version_format = 6; + * .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; */ - public com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat() { + @java.lang.Deprecated public com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat() { + @SuppressWarnings("deprecation") com.google.logging.v2.LogSink.VersionFormat result = com.google.logging.v2.LogSink.VersionFormat.valueOf(outputVersionFormat_); return result == null ? com.google.logging.v2.LogSink.VersionFormat.UNRECOGNIZED : result; } @@ -1444,9 +1467,9 @@ public com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat() { * entries. The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogSink.VersionFormat output_version_format = 6; + * .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; */ - public Builder setOutputVersionFormat(com.google.logging.v2.LogSink.VersionFormat value) { + @java.lang.Deprecated public Builder setOutputVersionFormat(com.google.logging.v2.LogSink.VersionFormat value) { if (value == null) { throw new NullPointerException(); } @@ -1461,9 +1484,9 @@ public Builder setOutputVersionFormat(com.google.logging.v2.LogSink.VersionForma * entries. The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogSink.VersionFormat output_version_format = 6; + * .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; */ - public Builder clearOutputVersionFormat() { + @java.lang.Deprecated public Builder clearOutputVersionFormat() { outputVersionFormat_ = 0; onChanged(); @@ -1698,9 +1721,9 @@ public Builder clearIncludeChildren() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - public boolean hasStartTime() { + @java.lang.Deprecated public boolean hasStartTime() { return startTimeBuilder_ != null || startTime_ != null; } /** @@ -1708,9 +1731,9 @@ public boolean hasStartTime() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - public com.google.protobuf.Timestamp getStartTime() { + @java.lang.Deprecated public com.google.protobuf.Timestamp getStartTime() { if (startTimeBuilder_ == null) { return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; } else { @@ -1722,9 +1745,9 @@ public com.google.protobuf.Timestamp getStartTime() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - public Builder setStartTime(com.google.protobuf.Timestamp value) { + @java.lang.Deprecated public Builder setStartTime(com.google.protobuf.Timestamp value) { if (startTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1742,9 +1765,9 @@ public Builder setStartTime(com.google.protobuf.Timestamp value) { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - public Builder setStartTime( + @java.lang.Deprecated public Builder setStartTime( com.google.protobuf.Timestamp.Builder builderForValue) { if (startTimeBuilder_ == null) { startTime_ = builderForValue.build(); @@ -1760,9 +1783,9 @@ public Builder setStartTime( * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + @java.lang.Deprecated public Builder mergeStartTime(com.google.protobuf.Timestamp value) { if (startTimeBuilder_ == null) { if (startTime_ != null) { startTime_ = @@ -1782,9 +1805,9 @@ public Builder mergeStartTime(com.google.protobuf.Timestamp value) { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - public Builder clearStartTime() { + @java.lang.Deprecated public Builder clearStartTime() { if (startTimeBuilder_ == null) { startTime_ = null; onChanged(); @@ -1800,9 +1823,9 @@ public Builder clearStartTime() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + @java.lang.Deprecated public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { onChanged(); return getStartTimeFieldBuilder().getBuilder(); @@ -1812,9 +1835,9 @@ public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + @java.lang.Deprecated public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { if (startTimeBuilder_ != null) { return startTimeBuilder_.getMessageOrBuilder(); } else { @@ -1827,7 +1850,7 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1851,9 +1874,9 @@ public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - public boolean hasEndTime() { + @java.lang.Deprecated public boolean hasEndTime() { return endTimeBuilder_ != null || endTime_ != null; } /** @@ -1861,9 +1884,9 @@ public boolean hasEndTime() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - public com.google.protobuf.Timestamp getEndTime() { + @java.lang.Deprecated public com.google.protobuf.Timestamp getEndTime() { if (endTimeBuilder_ == null) { return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; } else { @@ -1875,9 +1898,9 @@ public com.google.protobuf.Timestamp getEndTime() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - public Builder setEndTime(com.google.protobuf.Timestamp value) { + @java.lang.Deprecated public Builder setEndTime(com.google.protobuf.Timestamp value) { if (endTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); @@ -1895,9 +1918,9 @@ public Builder setEndTime(com.google.protobuf.Timestamp value) { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - public Builder setEndTime( + @java.lang.Deprecated public Builder setEndTime( com.google.protobuf.Timestamp.Builder builderForValue) { if (endTimeBuilder_ == null) { endTime_ = builderForValue.build(); @@ -1913,9 +1936,9 @@ public Builder setEndTime( * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + @java.lang.Deprecated public Builder mergeEndTime(com.google.protobuf.Timestamp value) { if (endTimeBuilder_ == null) { if (endTime_ != null) { endTime_ = @@ -1935,9 +1958,9 @@ public Builder mergeEndTime(com.google.protobuf.Timestamp value) { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - public Builder clearEndTime() { + @java.lang.Deprecated public Builder clearEndTime() { if (endTimeBuilder_ == null) { endTime_ = null; onChanged(); @@ -1953,9 +1976,9 @@ public Builder clearEndTime() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + @java.lang.Deprecated public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { onChanged(); return getEndTimeFieldBuilder().getBuilder(); @@ -1965,9 +1988,9 @@ public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + @java.lang.Deprecated public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { if (endTimeBuilder_ != null) { return endTimeBuilder_.getMessageOrBuilder(); } else { @@ -1980,7 +2003,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { * Deprecated. This field is ignored when creating or updating sinks. * * - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> @@ -1995,11 +2018,13 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { } return endTimeBuilder_; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -2021,6 +2046,7 @@ public static com.google.logging.v2.LogSink getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public LogSink parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2038,6 +2064,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.LogSink getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java index 6ce5c4ca91ee..5bb5eda9e781 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LogSinkOrBuilder.java @@ -97,18 +97,18 @@ public interface LogSinkOrBuilder extends * entries. The v2 format is used by default and cannot be changed. * * - * .google.logging.v2.LogSink.VersionFormat output_version_format = 6; + * .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; */ - int getOutputVersionFormatValue(); + @java.lang.Deprecated int getOutputVersionFormatValue(); /** *
    * Deprecated. The log entry format to use for this sink's exported log
    * entries.  The v2 format is used by default and cannot be changed.
    * 
* - * .google.logging.v2.LogSink.VersionFormat output_version_format = 6; + * .google.logging.v2.LogSink.VersionFormat output_version_format = 6 [deprecated = true]; */ - com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat(); + @java.lang.Deprecated com.google.logging.v2.LogSink.VersionFormat getOutputVersionFormat(); /** *
@@ -177,48 +177,48 @@ public interface LogSinkOrBuilder extends
    * Deprecated. This field is ignored when creating or updating sinks.
    * 
* - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - boolean hasStartTime(); + @java.lang.Deprecated boolean hasStartTime(); /** *
    * Deprecated. This field is ignored when creating or updating sinks.
    * 
* - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - com.google.protobuf.Timestamp getStartTime(); + @java.lang.Deprecated com.google.protobuf.Timestamp getStartTime(); /** *
    * Deprecated. This field is ignored when creating or updating sinks.
    * 
* - * .google.protobuf.Timestamp start_time = 10; + * .google.protobuf.Timestamp start_time = 10 [deprecated = true]; */ - com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + @java.lang.Deprecated com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); /** *
    * Deprecated. This field is ignored when creating or updating sinks.
    * 
* - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - boolean hasEndTime(); + @java.lang.Deprecated boolean hasEndTime(); /** *
    * Deprecated. This field is ignored when creating or updating sinks.
    * 
* - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - com.google.protobuf.Timestamp getEndTime(); + @java.lang.Deprecated com.google.protobuf.Timestamp getEndTime(); /** *
    * Deprecated. This field is ignored when creating or updating sinks.
    * 
* - * .google.protobuf.Timestamp end_time = 11; + * .google.protobuf.Timestamp end_time = 11 [deprecated = true]; */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + @java.lang.Deprecated com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java index 88a12ccba4fd..48e9f25dcc53 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingConfigProto.java @@ -97,80 +97,128 @@ public static void registerAllExtensions( "\022\021google.logging.v2\032\034google/api/annotati" + "ons.proto\032\033google/protobuf/empty.proto\032 " + "google/protobuf/field_mask.proto\032\037google" + - "/protobuf/timestamp.proto\"\327\002\n\007LogSink\022\014\n" + + "/protobuf/timestamp.proto\"\343\002\n\007LogSink\022\014\n" + "\004name\030\001 \001(\t\022\023\n\013destination\030\003 \001(\t\022\016\n\006filt" + - "er\030\005 \001(\t\022G\n\025output_version_format\030\006 \001(\0162" + + "er\030\005 \001(\t\022K\n\025output_version_format\030\006 \001(\0162" + "(.google.logging.v2.LogSink.VersionForma" + - "t\022\027\n\017writer_identity\030\010 \001(\t\022\030\n\020include_ch" + - "ildren\030\t \001(\010\022.\n\nstart_time\030\n \001(\0132\032.googl" + - "e.protobuf.Timestamp\022,\n\010end_time\030\013 \001(\0132\032" + - ".google.protobuf.Timestamp\"?\n\rVersionFor" + - "mat\022\036\n\032VERSION_FORMAT_UNSPECIFIED\020\000\022\006\n\002V" + - "2\020\001\022\006\n\002V1\020\002\"I\n\020ListSinksRequest\022\016\n\006paren" + - "t\030\001 \001(\t\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size" + - "\030\003 \001(\005\"W\n\021ListSinksResponse\022)\n\005sinks\030\001 \003" + - "(\0132\032.google.logging.v2.LogSink\022\027\n\017next_p" + - "age_token\030\002 \001(\t\"#\n\016GetSinkRequest\022\021\n\tsin" + - "k_name\030\001 \001(\t\"m\n\021CreateSinkRequest\022\016\n\006par" + - "ent\030\001 \001(\t\022(\n\004sink\030\002 \001(\0132\032.google.logging" + - ".v2.LogSink\022\036\n\026unique_writer_identity\030\003 " + - "\001(\010\"\241\001\n\021UpdateSinkRequest\022\021\n\tsink_name\030\001" + - " \001(\t\022(\n\004sink\030\002 \001(\0132\032.google.logging.v2.L" + - "ogSink\022\036\n\026unique_writer_identity\030\003 \001(\010\022/" + - "\n\013update_mask\030\004 \001(\0132\032.google.protobuf.Fi" + - "eldMask\"&\n\021DeleteSinkRequest\022\021\n\tsink_nam" + - "e\030\001 \001(\t\"S\n\014LogExclusion\022\014\n\004name\030\001 \001(\t\022\023\n" + - "\013description\030\002 \001(\t\022\016\n\006filter\030\003 \001(\t\022\020\n\010di" + - "sabled\030\004 \001(\010\"N\n\025ListExclusionsRequest\022\016\n" + - "\006parent\030\001 \001(\t\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpag" + - "e_size\030\003 \001(\005\"f\n\026ListExclusionsResponse\0223" + - "\n\nexclusions\030\001 \003(\0132\037.google.logging.v2.L" + - "ogExclusion\022\027\n\017next_page_token\030\002 \001(\t\"#\n\023" + - "GetExclusionRequest\022\014\n\004name\030\001 \001(\t\"\\\n\026Cre" + - "ateExclusionRequest\022\016\n\006parent\030\001 \001(\t\0222\n\te" + - "xclusion\030\002 \001(\0132\037.google.logging.v2.LogEx" + - "clusion\"\213\001\n\026UpdateExclusionRequest\022\014\n\004na" + - "me\030\001 \001(\t\0222\n\texclusion\030\002 \001(\0132\037.google.log" + - "ging.v2.LogExclusion\022/\n\013update_mask\030\003 \001(" + - "\0132\032.google.protobuf.FieldMask\"&\n\026DeleteE" + - "xclusionRequest\022\014\n\004name\030\001 \001(\t2\200\n\n\017Config" + - "ServiceV2\022v\n\tListSinks\022#.google.logging." + - "v2.ListSinksRequest\032$.google.logging.v2." + - "ListSinksResponse\"\036\202\323\344\223\002\030\022\026/v2/{parent=*" + - "/*}/sinks\022m\n\007GetSink\022!.google.logging.v2" + - ".GetSinkRequest\032\032.google.logging.v2.LogS" + - "ink\"#\202\323\344\223\002\035\022\033/v2/{sink_name=*/*/sinks/*}" + - "\022t\n\nCreateSink\022$.google.logging.v2.Creat" + - "eSinkRequest\032\032.google.logging.v2.LogSink" + - "\"$\202\323\344\223\002\036\"\026/v2/{parent=*/*}/sinks:\004sink\022y" + - "\n\nUpdateSink\022$.google.logging.v2.UpdateS" + - "inkRequest\032\032.google.logging.v2.LogSink\")" + - "\202\323\344\223\002#\032\033/v2/{sink_name=*/*/sinks/*}:\004sin" + - "k\022o\n\nDeleteSink\022$.google.logging.v2.Dele" + - "teSinkRequest\032\026.google.protobuf.Empty\"#\202" + - "\323\344\223\002\035*\033/v2/{sink_name=*/*/sinks/*}\022\212\001\n\016L" + - "istExclusions\022(.google.logging.v2.ListEx" + - "clusionsRequest\032).google.logging.v2.List" + - "ExclusionsResponse\"#\202\323\344\223\002\035\022\033/v2/{parent=" + - "*/*}/exclusions\022|\n\014GetExclusion\022&.google" + - ".logging.v2.GetExclusionRequest\032\037.google" + - ".logging.v2.LogExclusion\"#\202\323\344\223\002\035\022\033/v2/{n" + - "ame=*/*/exclusions/*}\022\215\001\n\017CreateExclusio" + - "n\022).google.logging.v2.CreateExclusionReq" + - "uest\032\037.google.logging.v2.LogExclusion\".\202" + - "\323\344\223\002(\"\033/v2/{parent=*/*}/exclusions:\texcl" + - "usion\022\215\001\n\017UpdateExclusion\022).google.loggi" + - "ng.v2.UpdateExclusionRequest\032\037.google.lo" + - "gging.v2.LogExclusion\".\202\323\344\223\002(2\033/v2/{name" + - "=*/*/exclusions/*}:\texclusion\022y\n\017DeleteE" + - "xclusion\022).google.logging.v2.DeleteExclu" + - "sionRequest\032\026.google.protobuf.Empty\"#\202\323\344" + - "\223\002\035*\033/v2/{name=*/*/exclusions/*}B\236\001\n\025com" + - ".google.logging.v2B\022LoggingConfigProtoP\001" + - "Z8google.golang.org/genproto/googleapis/" + - "logging/v2;logging\370\001\001\252\002\027Google.Cloud.Log" + - "ging.V2\312\002\027Google\\Cloud\\Logging\\V2b\006proto" + - "3" + "tB\002\030\001\022\027\n\017writer_identity\030\010 \001(\t\022\030\n\020includ" + + "e_children\030\t \001(\010\0222\n\nstart_time\030\n \001(\0132\032.g" + + "oogle.protobuf.TimestampB\002\030\001\0220\n\010end_time" + + "\030\013 \001(\0132\032.google.protobuf.TimestampB\002\030\001\"?" + + "\n\rVersionFormat\022\036\n\032VERSION_FORMAT_UNSPEC" + + "IFIED\020\000\022\006\n\002V2\020\001\022\006\n\002V1\020\002\"I\n\020ListSinksRequ" + + "est\022\016\n\006parent\030\001 \001(\t\022\022\n\npage_token\030\002 \001(\t\022" + + "\021\n\tpage_size\030\003 \001(\005\"W\n\021ListSinksResponse\022" + + ")\n\005sinks\030\001 \003(\0132\032.google.logging.v2.LogSi" + + "nk\022\027\n\017next_page_token\030\002 \001(\t\"#\n\016GetSinkRe" + + "quest\022\021\n\tsink_name\030\001 \001(\t\"m\n\021CreateSinkRe" + + "quest\022\016\n\006parent\030\001 \001(\t\022(\n\004sink\030\002 \001(\0132\032.go" + + "ogle.logging.v2.LogSink\022\036\n\026unique_writer" + + "_identity\030\003 \001(\010\"\241\001\n\021UpdateSinkRequest\022\021\n" + + "\tsink_name\030\001 \001(\t\022(\n\004sink\030\002 \001(\0132\032.google." + + "logging.v2.LogSink\022\036\n\026unique_writer_iden" + + "tity\030\003 \001(\010\022/\n\013update_mask\030\004 \001(\0132\032.google" + + ".protobuf.FieldMask\"&\n\021DeleteSinkRequest" + + "\022\021\n\tsink_name\030\001 \001(\t\"S\n\014LogExclusion\022\014\n\004n" + + "ame\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022\016\n\006filter" + + "\030\003 \001(\t\022\020\n\010disabled\030\004 \001(\010\"N\n\025ListExclusio" + + "nsRequest\022\016\n\006parent\030\001 \001(\t\022\022\n\npage_token\030" + + "\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\"f\n\026ListExclusio" + + "nsResponse\0223\n\nexclusions\030\001 \003(\0132\037.google." + + "logging.v2.LogExclusion\022\027\n\017next_page_tok" + + "en\030\002 \001(\t\"#\n\023GetExclusionRequest\022\014\n\004name\030" + + "\001 \001(\t\"\\\n\026CreateExclusionRequest\022\016\n\006paren" + + "t\030\001 \001(\t\0222\n\texclusion\030\002 \001(\0132\037.google.logg" + + "ing.v2.LogExclusion\"\213\001\n\026UpdateExclusionR" + + "equest\022\014\n\004name\030\001 \001(\t\0222\n\texclusion\030\002 \001(\0132" + + "\037.google.logging.v2.LogExclusion\022/\n\013upda" + + "te_mask\030\003 \001(\0132\032.google.protobuf.FieldMas" + + "k\"&\n\026DeleteExclusionRequest\022\014\n\004name\030\001 \001(" + + "\t2\224\031\n\017ConfigServiceV2\022\207\002\n\tListSinks\022#.go" + + "ogle.logging.v2.ListSinksRequest\032$.googl" + + "e.logging.v2.ListSinksResponse\"\256\001\202\323\344\223\002\247\001" + + "\022\026/v2/{parent=*/*}/sinksZ\037\022\035/v2/{parent=" + + "projects/*}/sinksZ$\022\"/v2/{parent=organiz" + + "ations/*}/sinksZ\036\022\034/v2/{parent=folders/*" + + "}/sinksZ&\022$/v2/{parent=billingAccounts/*" + + "}/sinks\022\222\002\n\007GetSink\022!.google.logging.v2." + + "GetSinkRequest\032\032.google.logging.v2.LogSi" + + "nk\"\307\001\202\323\344\223\002\300\001\022\033/v2/{sink_name=*/*/sinks/*" + + "}Z$\022\"/v2/{sink_name=projects/*/sinks/*}Z" + + ")\022\'/v2/{sink_name=organizations/*/sinks/" + + "*}Z#\022!/v2/{sink_name=folders/*/sinks/*}Z" + + "+\022)/v2/{sink_name=billingAccounts/*/sink" + + "s/*}\022\235\002\n\nCreateSink\022$.google.logging.v2." + + "CreateSinkRequest\032\032.google.logging.v2.Lo" + + "gSink\"\314\001\202\323\344\223\002\305\001\"\026/v2/{parent=*/*}/sinks:" + + "\004sinkZ%\"\035/v2/{parent=projects/*}/sinks:\004" + + "sinkZ*\"\"/v2/{parent=organizations/*}/sin" + + "ks:\004sinkZ$\"\034/v2/{parent=folders/*}/sinks" + + ":\004sinkZ,\"$/v2/{parent=billingAccounts/*}" + + "/sinks:\004sink\022\361\003\n\nUpdateSink\022$.google.log" + + "ging.v2.UpdateSinkRequest\032\032.google.loggi" + + "ng.v2.LogSink\"\240\003\202\323\344\223\002\231\003\032\033/v2/{sink_name=" + + "*/*/sinks/*}:\004sinkZ*\032\"/v2/{sink_name=pro" + + "jects/*/sinks/*}:\004sinkZ/\032\'/v2/{sink_name" + + "=organizations/*/sinks/*}:\004sinkZ)\032!/v2/{" + + "sink_name=folders/*/sinks/*}:\004sinkZ1\032)/v" + + "2/{sink_name=billingAccounts/*/sinks/*}:" + + "\004sinkZ*2\"/v2/{sink_name=projects/*/sinks" + + "/*}:\004sinkZ/2\'/v2/{sink_name=organization" + + "s/*/sinks/*}:\004sinkZ)2!/v2/{sink_name=fol" + + "ders/*/sinks/*}:\004sinkZ12)/v2/{sink_name=" + + "billingAccounts/*/sinks/*}:\004sink\022\224\002\n\nDel" + + "eteSink\022$.google.logging.v2.DeleteSinkRe" + + "quest\032\026.google.protobuf.Empty\"\307\001\202\323\344\223\002\300\001*" + + "\033/v2/{sink_name=*/*/sinks/*}Z$*\"/v2/{sin" + + "k_name=projects/*/sinks/*}Z)*\'/v2/{sink_" + + "name=organizations/*/sinks/*}Z#*!/v2/{si" + + "nk_name=folders/*/sinks/*}Z+*)/v2/{sink_" + + "name=billingAccounts/*/sinks/*}\022\257\002\n\016List" + + "Exclusions\022(.google.logging.v2.ListExclu" + + "sionsRequest\032).google.logging.v2.ListExc" + + "lusionsResponse\"\307\001\202\323\344\223\002\300\001\022\033/v2/{parent=*" + + "/*}/exclusionsZ$\022\"/v2/{parent=projects/*" + + "}/exclusionsZ)\022\'/v2/{parent=organization" + + "s/*}/exclusionsZ#\022!/v2/{parent=folders/*" + + "}/exclusionsZ+\022)/v2/{parent=billingAccou" + + "nts/*}/exclusions\022\241\002\n\014GetExclusion\022&.goo" + + "gle.logging.v2.GetExclusionRequest\032\037.goo" + + "gle.logging.v2.LogExclusion\"\307\001\202\323\344\223\002\300\001\022\033/" + + "v2/{name=*/*/exclusions/*}Z$\022\"/v2/{name=" + + "projects/*/exclusions/*}Z)\022\'/v2/{name=or" + + "ganizations/*/exclusions/*}Z#\022!/v2/{name" + + "=folders/*/exclusions/*}Z+\022)/v2/{name=bi" + + "llingAccounts/*/exclusions/*}\022\336\002\n\017Create" + + "Exclusion\022).google.logging.v2.CreateExcl" + + "usionRequest\032\037.google.logging.v2.LogExcl" + + "usion\"\376\001\202\323\344\223\002\367\001\"\033/v2/{parent=*/*}/exclus" + + "ions:\texclusionZ/\"\"/v2/{parent=projects/" + + "*}/exclusions:\texclusionZ4\"\'/v2/{parent=" + + "organizations/*}/exclusions:\texclusionZ." + + "\"!/v2/{parent=folders/*}/exclusions:\texc" + + "lusionZ6\")/v2/{parent=billingAccounts/*}" + + "/exclusions:\texclusion\022\336\002\n\017UpdateExclusi" + + "on\022).google.logging.v2.UpdateExclusionRe" + + "quest\032\037.google.logging.v2.LogExclusion\"\376" + + "\001\202\323\344\223\002\367\0012\033/v2/{name=*/*/exclusions/*}:\te" + + "xclusionZ/2\"/v2/{name=projects/*/exclusi" + + "ons/*}:\texclusionZ42\'/v2/{name=organizat" + + "ions/*/exclusions/*}:\texclusionZ.2!/v2/{" + + "name=folders/*/exclusions/*}:\texclusionZ" + + "62)/v2/{name=billingAccounts/*/exclusion" + + "s/*}:\texclusion\022\236\002\n\017DeleteExclusion\022).go" + + "ogle.logging.v2.DeleteExclusionRequest\032\026" + + ".google.protobuf.Empty\"\307\001\202\323\344\223\002\300\001*\033/v2/{n" + + "ame=*/*/exclusions/*}Z$*\"/v2/{name=proje" + + "cts/*/exclusions/*}Z)*\'/v2/{name=organiz" + + "ations/*/exclusions/*}Z#*!/v2/{name=fold" + + "ers/*/exclusions/*}Z+*)/v2/{name=billing" + + "Accounts/*/exclusions/*}B\236\001\n\025com.google." + + "logging.v2B\022LoggingConfigProtoP\001Z8google" + + ".golang.org/genproto/googleapis/logging/" + + "v2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312" + + "\002\027Google\\Cloud\\Logging\\V2b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java index e51a3615a54f..1ce3e1b01320 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingMetricsProto.java @@ -68,51 +68,51 @@ public static void registerAllExtensions( "ions.proto\032\035google/api/distribution.prot" + "o\032\027google/api/metric.proto\032\033google/proto" + "buf/empty.proto\032 google/protobuf/field_m" + - "ask.proto\"\255\003\n\tLogMetric\022\014\n\004name\030\001 \001(\t\022\023\n" + + "ask.proto\"\261\003\n\tLogMetric\022\014\n\004name\030\001 \001(\t\022\023\n" + "\013description\030\002 \001(\t\022\016\n\006filter\030\003 \001(\t\0227\n\021me" + "tric_descriptor\030\005 \001(\0132\034.google.api.Metri" + "cDescriptor\022\027\n\017value_extractor\030\006 \001(\t\022K\n\020" + "label_extractors\030\007 \003(\01321.google.logging." + "v2.LogMetric.LabelExtractorsEntry\022>\n\016buc" + "ket_options\030\010 \001(\0132&.google.api.Distribut" + - "ion.BucketOptions\0228\n\007version\030\004 \001(\0162\'.goo" + - "gle.logging.v2.LogMetric.ApiVersion\0326\n\024L" + - "abelExtractorsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + - "e\030\002 \001(\t:\0028\001\"\034\n\nApiVersion\022\006\n\002V2\020\000\022\006\n\002V1\020" + - "\001\"N\n\025ListLogMetricsRequest\022\016\n\006parent\030\001 \001" + - "(\t\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(" + - "\005\"`\n\026ListLogMetricsResponse\022-\n\007metrics\030\001" + - " \003(\0132\034.google.logging.v2.LogMetric\022\027\n\017ne" + - "xt_page_token\030\002 \001(\t\"*\n\023GetLogMetricReque" + - "st\022\023\n\013metric_name\030\001 \001(\t\"V\n\026CreateLogMetr" + - "icRequest\022\016\n\006parent\030\001 \001(\t\022,\n\006metric\030\002 \001(" + - "\0132\034.google.logging.v2.LogMetric\"[\n\026Updat" + - "eLogMetricRequest\022\023\n\013metric_name\030\001 \001(\t\022," + - "\n\006metric\030\002 \001(\0132\034.google.logging.v2.LogMe" + - "tric\"-\n\026DeleteLogMetricRequest\022\023\n\013metric" + - "_name\030\001 \001(\t2\324\005\n\020MetricsServiceV2\022\216\001\n\016Lis" + - "tLogMetrics\022(.google.logging.v2.ListLogM" + - "etricsRequest\032).google.logging.v2.ListLo" + - "gMetricsResponse\"\'\202\323\344\223\002!\022\037/v2/{parent=pr" + - "ojects/*}/metrics\022\204\001\n\014GetLogMetric\022&.goo" + - "gle.logging.v2.GetLogMetricRequest\032\034.goo" + - "gle.logging.v2.LogMetric\".\202\323\344\223\002(\022&/v2/{m" + - "etric_name=projects/*/metrics/*}\022\213\001\n\017Cre" + - "ateLogMetric\022).google.logging.v2.CreateL" + - "ogMetricRequest\032\034.google.logging.v2.LogM" + - "etric\"/\202\323\344\223\002)\"\037/v2/{parent=projects/*}/m" + - "etrics:\006metric\022\222\001\n\017UpdateLogMetric\022).goo" + - "gle.logging.v2.UpdateLogMetricRequest\032\034." + - "google.logging.v2.LogMetric\"6\202\323\344\223\0020\032&/v2" + - "/{metric_name=projects/*/metrics/*}:\006met" + - "ric\022\204\001\n\017DeleteLogMetric\022).google.logging" + - ".v2.DeleteLogMetricRequest\032\026.google.prot" + - "obuf.Empty\".\202\323\344\223\002(*&/v2/{metric_name=pro" + - "jects/*/metrics/*}B\237\001\n\025com.google.loggin" + - "g.v2B\023LoggingMetricsProtoP\001Z8google.gola" + - "ng.org/genproto/googleapis/logging/v2;lo" + - "gging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002\027Goo" + - "gle\\Cloud\\Logging\\V2b\006proto3" + "ion.BucketOptions\022<\n\007version\030\004 \001(\0162\'.goo" + + "gle.logging.v2.LogMetric.ApiVersionB\002\030\001\032" + + "6\n\024LabelExtractorsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005" + + "value\030\002 \001(\t:\0028\001\"\034\n\nApiVersion\022\006\n\002V2\020\000\022\006\n" + + "\002V1\020\001\"N\n\025ListLogMetricsRequest\022\016\n\006parent" + + "\030\001 \001(\t\022\022\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030" + + "\003 \001(\005\"`\n\026ListLogMetricsResponse\022-\n\007metri" + + "cs\030\001 \003(\0132\034.google.logging.v2.LogMetric\022\027" + + "\n\017next_page_token\030\002 \001(\t\"*\n\023GetLogMetricR" + + "equest\022\023\n\013metric_name\030\001 \001(\t\"V\n\026CreateLog" + + "MetricRequest\022\016\n\006parent\030\001 \001(\t\022,\n\006metric\030" + + "\002 \001(\0132\034.google.logging.v2.LogMetric\"[\n\026U" + + "pdateLogMetricRequest\022\023\n\013metric_name\030\001 \001" + + "(\t\022,\n\006metric\030\002 \001(\0132\034.google.logging.v2.L" + + "ogMetric\"-\n\026DeleteLogMetricRequest\022\023\n\013me" + + "tric_name\030\001 \001(\t2\324\005\n\020MetricsServiceV2\022\216\001\n" + + "\016ListLogMetrics\022(.google.logging.v2.List" + + "LogMetricsRequest\032).google.logging.v2.Li" + + "stLogMetricsResponse\"\'\202\323\344\223\002!\022\037/v2/{paren" + + "t=projects/*}/metrics\022\204\001\n\014GetLogMetric\022&" + + ".google.logging.v2.GetLogMetricRequest\032\034" + + ".google.logging.v2.LogMetric\".\202\323\344\223\002(\022&/v" + + "2/{metric_name=projects/*/metrics/*}\022\213\001\n" + + "\017CreateLogMetric\022).google.logging.v2.Cre" + + "ateLogMetricRequest\032\034.google.logging.v2." + + "LogMetric\"/\202\323\344\223\002)\"\037/v2/{parent=projects/" + + "*}/metrics:\006metric\022\222\001\n\017UpdateLogMetric\022)" + + ".google.logging.v2.UpdateLogMetricReques" + + "t\032\034.google.logging.v2.LogMetric\"6\202\323\344\223\0020\032" + + "&/v2/{metric_name=projects/*/metrics/*}:" + + "\006metric\022\204\001\n\017DeleteLogMetric\022).google.log" + + "ging.v2.DeleteLogMetricRequest\032\026.google." + + "protobuf.Empty\".\202\323\344\223\002(*&/v2/{metric_name" + + "=projects/*/metrics/*}B\237\001\n\025com.google.lo" + + "gging.v2B\023LoggingMetricsProtoP\001Z8google." + + "golang.org/genproto/googleapis/logging/v" + + "2;logging\370\001\001\252\002\027Google.Cloud.Logging.V2\312\002" + + "\027Google\\Cloud\\Logging\\V2b\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java index aa8cb015383a..5d493db25f79 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/LoggingProto.java @@ -90,53 +90,60 @@ public static void registerAllExtensions( "le/protobuf/duration.proto\032\033google/proto" + "buf/empty.proto\032\037google/protobuf/timesta" + "mp.proto\032\027google/rpc/status.proto\"$\n\020Del" + - "eteLogRequest\022\020\n\010log_name\030\001 \001(\t\"\230\002\n\026Writ" + + "eteLogRequest\022\020\n\010log_name\030\001 \001(\t\"\251\002\n\026Writ" + "eLogEntriesRequest\022\020\n\010log_name\030\001 \001(\t\022/\n\010" + "resource\030\002 \001(\0132\035.google.api.MonitoredRes" + "ource\022E\n\006labels\030\003 \003(\01325.google.logging.v" + "2.WriteLogEntriesRequest.LabelsEntry\022,\n\007" + "entries\030\004 \003(\0132\033.google.logging.v2.LogEnt" + - "ry\022\027\n\017partial_success\030\005 \001(\010\032-\n\013LabelsEnt" + - "ry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"\031\n\027Wr" + - "iteLogEntriesResponse\"\310\001\n\034WriteLogEntrie" + - "sPartialErrors\022]\n\020log_entry_errors\030\001 \003(\013" + - "2C.google.logging.v2.WriteLogEntriesPart" + - "ialErrors.LogEntryErrorsEntry\032I\n\023LogEntr" + - "yErrorsEntry\022\013\n\003key\030\001 \001(\005\022!\n\005value\030\002 \001(\013" + - "2\022.google.rpc.Status:\0028\001\"\215\001\n\025ListLogEntr" + - "iesRequest\022\023\n\013project_ids\030\001 \003(\t\022\026\n\016resou" + - "rce_names\030\010 \003(\t\022\016\n\006filter\030\002 \001(\t\022\020\n\010order" + - "_by\030\003 \001(\t\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npage_tok" + - "en\030\005 \001(\t\"_\n\026ListLogEntriesResponse\022,\n\007en" + - "tries\030\001 \003(\0132\033.google.logging.v2.LogEntry" + - "\022\027\n\017next_page_token\030\002 \001(\t\"P\n\'ListMonitor" + - "edResourceDescriptorsRequest\022\021\n\tpage_siz" + - "e\030\001 \001(\005\022\022\n\npage_token\030\002 \001(\t\"\212\001\n(ListMoni" + - "toredResourceDescriptorsResponse\022E\n\024reso" + - "urce_descriptors\030\001 \003(\0132\'.google.api.Moni" + - "toredResourceDescriptor\022\027\n\017next_page_tok" + - "en\030\002 \001(\t\"H\n\017ListLogsRequest\022\016\n\006parent\030\001 " + - "\001(\t\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001" + - "(\t\">\n\020ListLogsResponse\022\021\n\tlog_names\030\003 \003(" + - "\t\022\027\n\017next_page_token\030\002 \001(\t2\325\005\n\020LoggingSe" + - "rviceV2\022w\n\tDeleteLog\022#.google.logging.v2" + - ".DeleteLogRequest\032\026.google.protobuf.Empt" + - "y\"-\202\323\344\223\002\'*%/v2beta1/{log_name=projects/*" + - "/logs/*}\022\206\001\n\017WriteLogEntries\022).google.lo" + - "gging.v2.WriteLogEntriesRequest\032*.google" + - ".logging.v2.WriteLogEntriesResponse\"\034\202\323\344" + - "\223\002\026\"\021/v2/entries:write:\001*\022\202\001\n\016ListLogEnt" + - "ries\022(.google.logging.v2.ListLogEntriesR" + - "equest\032).google.logging.v2.ListLogEntrie" + - "sResponse\"\033\202\323\344\223\002\025\"\020/v2/entries:list:\001*\022\305" + - "\001\n ListMonitoredResourceDescriptors\022:.go" + - "ogle.logging.v2.ListMonitoredResourceDes" + - "criptorsRequest\032;.google.logging.v2.List" + - "MonitoredResourceDescriptorsResponse\"(\202\323" + - "\344\223\002\"\022 /v2/monitoredResourceDescriptors\022r" + - "\n\010ListLogs\022\".google.logging.v2.ListLogsR" + - "equest\032#.google.logging.v2.ListLogsRespo" + - "nse\"\035\202\323\344\223\002\027\022\025/v2/{parent=*/*}/logsB\230\001\n\025c" + + "ry\022\027\n\017partial_success\030\005 \001(\010\022\017\n\007dry_run\030\006" + + " \001(\010\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" + + "e\030\002 \001(\t:\0028\001\"\031\n\027WriteLogEntriesResponse\"\310" + + "\001\n\034WriteLogEntriesPartialErrors\022]\n\020log_e" + + "ntry_errors\030\001 \003(\0132C.google.logging.v2.Wr" + + "iteLogEntriesPartialErrors.LogEntryError" + + "sEntry\032I\n\023LogEntryErrorsEntry\022\013\n\003key\030\001 \001" + + "(\005\022!\n\005value\030\002 \001(\0132\022.google.rpc.Status:\0028" + + "\001\"\221\001\n\025ListLogEntriesRequest\022\027\n\013project_i" + + "ds\030\001 \003(\tB\002\030\001\022\026\n\016resource_names\030\010 \003(\t\022\016\n\006" + + "filter\030\002 \001(\t\022\020\n\010order_by\030\003 \001(\t\022\021\n\tpage_s" + + "ize\030\004 \001(\005\022\022\n\npage_token\030\005 \001(\t\"_\n\026ListLog" + + "EntriesResponse\022,\n\007entries\030\001 \003(\0132\033.googl" + + "e.logging.v2.LogEntry\022\027\n\017next_page_token" + + "\030\002 \001(\t\"P\n\'ListMonitoredResourceDescripto" + + "rsRequest\022\021\n\tpage_size\030\001 \001(\005\022\022\n\npage_tok" + + "en\030\002 \001(\t\"\212\001\n(ListMonitoredResourceDescri" + + "ptorsResponse\022E\n\024resource_descriptors\030\001 " + + "\003(\0132\'.google.api.MonitoredResourceDescri" + + "ptor\022\027\n\017next_page_token\030\002 \001(\t\"H\n\017ListLog" + + "sRequest\022\016\n\006parent\030\001 \001(\t\022\021\n\tpage_size\030\002 " + + "\001(\005\022\022\n\npage_token\030\003 \001(\t\">\n\020ListLogsRespo" + + "nse\022\021\n\tlog_names\030\003 \003(\t\022\027\n\017next_page_toke" + + "n\030\002 \001(\t2\330\007\n\020LoggingServiceV2\022\353\001\n\tDeleteL" + + "og\022#.google.logging.v2.DeleteLogRequest\032" + + "\026.google.protobuf.Empty\"\240\001\202\323\344\223\002\231\001* /v2/{" + + "log_name=projects/*/logs/*}Z\'*%/v2/{log_" + + "name=organizations/*/logs/*}Z!*\037/v2/{log" + + "_name=folders/*/logs/*}Z)*\'/v2/{log_name" + + "=billingAccounts/*/logs/*}\022\206\001\n\017WriteLogE" + + "ntries\022).google.logging.v2.WriteLogEntri" + + "esRequest\032*.google.logging.v2.WriteLogEn" + + "triesResponse\"\034\202\323\344\223\002\026\"\021/v2/entries:write" + + ":\001*\022\202\001\n\016ListLogEntries\022(.google.logging." + + "v2.ListLogEntriesRequest\032).google.loggin" + + "g.v2.ListLogEntriesResponse\"\033\202\323\344\223\002\025\"\020/v2" + + "/entries:list:\001*\022\305\001\n ListMonitoredResour" + + "ceDescriptors\022:.google.logging.v2.ListMo" + + "nitoredResourceDescriptorsRequest\032;.goog" + + "le.logging.v2.ListMonitoredResourceDescr" + + "iptorsResponse\"(\202\323\344\223\002\"\022 /v2/monitoredRes" + + "ourceDescriptors\022\377\001\n\010ListLogs\022\".google.l" + + "ogging.v2.ListLogsRequest\032#.google.loggi" + + "ng.v2.ListLogsResponse\"\251\001\202\323\344\223\002\242\001\022\025/v2/{p" + + "arent=*/*}/logsZ\036\022\034/v2/{parent=projects/" + + "*}/logsZ#\022!/v2/{parent=organizations/*}/" + + "logsZ\035\022\033/v2/{parent=folders/*}/logsZ%\022#/" + + "v2/{parent=billingAccounts/*}/logsB\230\001\n\025c" + "om.google.logging.v2B\014LoggingProtoP\001Z8go" + "ogle.golang.org/genproto/googleapis/logg" + "ing/v2;logging\370\001\001\252\002\027Google.Cloud.Logging" + @@ -172,7 +179,7 @@ public com.google.protobuf.ExtensionRegistry assignDescriptors( internal_static_google_logging_v2_WriteLogEntriesRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_logging_v2_WriteLogEntriesRequest_descriptor, - new java.lang.String[] { "LogName", "Resource", "Labels", "Entries", "PartialSuccess", }); + new java.lang.String[] { "LogName", "Resource", "Labels", "Entries", "PartialSuccess", "DryRun", }); internal_static_google_logging_v2_WriteLogEntriesRequest_LabelsEntry_descriptor = internal_static_google_logging_v2_WriteLogEntriesRequest_descriptor.getNestedTypes().get(0); internal_static_google_logging_v2_WriteLogEntriesRequest_LabelsEntry_fieldAccessorTable = new diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java index 221e5ab18b70..7555b729a5f8 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateExclusionRequest.java @@ -47,13 +47,6 @@ private UpdateExclusionRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -86,6 +79,13 @@ private UpdateExclusionRequest( break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -103,6 +103,7 @@ private UpdateExclusionRequest( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_UpdateExclusionRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_UpdateExclusionRequest_fieldAccessorTable @@ -247,6 +248,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -256,6 +258,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getNameBytes().isEmpty()) { @@ -270,6 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -410,6 +414,7 @@ public static com.google.logging.v2.UpdateExclusionRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -417,6 +422,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.UpdateExclusionRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -444,6 +450,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_UpdateExclusionRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_UpdateExclusionRequest_fieldAccessorTable @@ -466,6 +473,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); name_ = ""; @@ -485,15 +493,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_UpdateExclusionRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.UpdateExclusionRequest getDefaultInstanceForType() { return com.google.logging.v2.UpdateExclusionRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.UpdateExclusionRequest build() { com.google.logging.v2.UpdateExclusionRequest result = buildPartial(); if (!result.isInitialized()) { @@ -502,6 +513,7 @@ public com.google.logging.v2.UpdateExclusionRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.UpdateExclusionRequest buildPartial() { com.google.logging.v2.UpdateExclusionRequest result = new com.google.logging.v2.UpdateExclusionRequest(this); result.name_ = name_; @@ -519,32 +531,39 @@ public com.google.logging.v2.UpdateExclusionRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.UpdateExclusionRequest) { return mergeFrom((com.google.logging.v2.UpdateExclusionRequest)other); @@ -571,10 +590,12 @@ public Builder mergeFrom(com.google.logging.v2.UpdateExclusionRequest other) { 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) @@ -1066,11 +1087,13 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { } return updateMaskBuilder_; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -1092,6 +1115,7 @@ public static com.google.logging.v2.UpdateExclusionRequest getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public UpdateExclusionRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1109,6 +1133,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.UpdateExclusionRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java index 902161933579..90d91a58ed42 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateLogMetricRequest.java @@ -47,13 +47,6 @@ private UpdateLogMetricRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -73,6 +66,13 @@ private UpdateLogMetricRequest( break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -90,6 +90,7 @@ private UpdateLogMetricRequest( return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_UpdateLogMetricRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_UpdateLogMetricRequest_fieldAccessorTable @@ -181,6 +182,7 @@ public com.google.logging.v2.LogMetricOrBuilder getMetricOrBuilder() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -190,6 +192,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getMetricNameBytes().isEmpty()) { @@ -201,6 +204,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -328,6 +332,7 @@ public static com.google.logging.v2.UpdateLogMetricRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -335,6 +340,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.UpdateLogMetricRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -362,6 +368,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_UpdateLogMetricRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_UpdateLogMetricRequest_fieldAccessorTable @@ -384,6 +391,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); metricName_ = ""; @@ -397,15 +405,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingMetricsProto.internal_static_google_logging_v2_UpdateLogMetricRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.UpdateLogMetricRequest getDefaultInstanceForType() { return com.google.logging.v2.UpdateLogMetricRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.UpdateLogMetricRequest build() { com.google.logging.v2.UpdateLogMetricRequest result = buildPartial(); if (!result.isInitialized()) { @@ -414,6 +425,7 @@ public com.google.logging.v2.UpdateLogMetricRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.UpdateLogMetricRequest buildPartial() { com.google.logging.v2.UpdateLogMetricRequest result = new com.google.logging.v2.UpdateLogMetricRequest(this); result.metricName_ = metricName_; @@ -426,32 +438,39 @@ public com.google.logging.v2.UpdateLogMetricRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.UpdateLogMetricRequest) { return mergeFrom((com.google.logging.v2.UpdateLogMetricRequest)other); @@ -475,10 +494,12 @@ public Builder mergeFrom(com.google.logging.v2.UpdateLogMetricRequest other) { 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) @@ -758,11 +779,13 @@ public com.google.logging.v2.LogMetricOrBuilder getMetricOrBuilder() { } return metricBuilder_; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -784,6 +807,7 @@ public static com.google.logging.v2.UpdateLogMetricRequest getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public UpdateLogMetricRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -801,6 +825,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.UpdateLogMetricRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java index ff0d6aec13b3..89c1f152ebaf 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/UpdateSinkRequest.java @@ -48,13 +48,6 @@ private UpdateSinkRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -92,6 +85,13 @@ private UpdateSinkRequest( break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -109,6 +109,7 @@ private UpdateSinkRequest( return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_UpdateSinkRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_UpdateSinkRequest_fieldAccessorTable @@ -293,6 +294,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -302,6 +304,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getSinkNameBytes().isEmpty()) { @@ -319,6 +322,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -468,6 +472,7 @@ public static com.google.logging.v2.UpdateSinkRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -475,6 +480,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.UpdateSinkRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -502,6 +508,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_UpdateSinkRequest_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_UpdateSinkRequest_fieldAccessorTable @@ -524,6 +531,7 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); sinkName_ = ""; @@ -545,15 +553,18 @@ public Builder clear() { return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingConfigProto.internal_static_google_logging_v2_UpdateSinkRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.UpdateSinkRequest getDefaultInstanceForType() { return com.google.logging.v2.UpdateSinkRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.UpdateSinkRequest build() { com.google.logging.v2.UpdateSinkRequest result = buildPartial(); if (!result.isInitialized()) { @@ -562,6 +573,7 @@ public com.google.logging.v2.UpdateSinkRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.UpdateSinkRequest buildPartial() { com.google.logging.v2.UpdateSinkRequest result = new com.google.logging.v2.UpdateSinkRequest(this); result.sinkName_ = sinkName_; @@ -580,32 +592,39 @@ public com.google.logging.v2.UpdateSinkRequest buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.UpdateSinkRequest) { return mergeFrom((com.google.logging.v2.UpdateSinkRequest)other); @@ -635,10 +654,12 @@ public Builder mergeFrom(com.google.logging.v2.UpdateSinkRequest other) { 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) @@ -1248,11 +1269,13 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { } return updateMaskBuilder_; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -1274,6 +1297,7 @@ public static com.google.logging.v2.UpdateSinkRequest getDefaultInstance() { private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public UpdateSinkRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1291,6 +1315,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.UpdateSinkRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java index 69fa2da11347..95bd67b20fea 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesPartialErrors.java @@ -46,13 +46,6 @@ private WriteLogEntriesPartialErrors( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { logEntryErrors_ = com.google.protobuf.MapField.newMapField( @@ -66,6 +59,13 @@ private WriteLogEntriesPartialErrors( logEntryErrors__.getKey(), logEntryErrors__.getValue()); break; } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -84,6 +84,7 @@ private WriteLogEntriesPartialErrors( } @SuppressWarnings({"rawtypes"}) + @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { @@ -94,6 +95,7 @@ protected com.google.protobuf.MapField internalGetMapField( "Invalid map field number: " + number); } } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_WriteLogEntriesPartialErrors_fieldAccessorTable @@ -210,6 +212,7 @@ public com.google.rpc.Status getLogEntryErrorsOrThrow( } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -219,6 +222,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { com.google.protobuf.GeneratedMessageV3 @@ -230,6 +234,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -353,6 +358,7 @@ public static com.google.logging.v2.WriteLogEntriesPartialErrors parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -360,6 +366,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.WriteLogEntriesPartialErrors prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -409,6 +416,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( "Invalid map field number: " + number); } } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_WriteLogEntriesPartialErrors_fieldAccessorTable @@ -431,21 +439,25 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); internalGetMutableLogEntryErrors().clear(); return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_WriteLogEntriesPartialErrors_descriptor; } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesPartialErrors getDefaultInstanceForType() { return com.google.logging.v2.WriteLogEntriesPartialErrors.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesPartialErrors build() { com.google.logging.v2.WriteLogEntriesPartialErrors result = buildPartial(); if (!result.isInitialized()) { @@ -454,6 +466,7 @@ public com.google.logging.v2.WriteLogEntriesPartialErrors build() { return result; } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesPartialErrors buildPartial() { com.google.logging.v2.WriteLogEntriesPartialErrors result = new com.google.logging.v2.WriteLogEntriesPartialErrors(this); int from_bitField0_ = bitField0_; @@ -463,32 +476,39 @@ public com.google.logging.v2.WriteLogEntriesPartialErrors buildPartial() { return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.WriteLogEntriesPartialErrors) { return mergeFrom((com.google.logging.v2.WriteLogEntriesPartialErrors)other); @@ -507,10 +527,12 @@ public Builder mergeFrom(com.google.logging.v2.WriteLogEntriesPartialErrors othe 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) @@ -708,11 +730,13 @@ public Builder putAllLogEntryErrors( .putAll(values); return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -734,6 +758,7 @@ public static com.google.logging.v2.WriteLogEntriesPartialErrors getDefaultInsta private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public WriteLogEntriesPartialErrors parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -751,6 +776,7 @@ public com.google.protobuf.Parser getParserForType return PARSER; } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesPartialErrors getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java index cfa124e3ac7b..8dfbbed515a4 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequest.java @@ -23,6 +23,7 @@ private WriteLogEntriesRequest() { logName_ = ""; entries_ = java.util.Collections.emptyList(); partialSuccess_ = false; + dryRun_ = false; } @java.lang.Override @@ -49,13 +50,6 @@ private WriteLogEntriesRequest( case 0: done = true; break; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } case 10: { java.lang.String s = input.readStringRequireUtf8(); @@ -102,6 +96,18 @@ private WriteLogEntriesRequest( partialSuccess_ = input.readBool(); break; } + case 48: { + + dryRun_ = input.readBool(); + break; + } + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -123,6 +129,7 @@ private WriteLogEntriesRequest( } @SuppressWarnings({"rawtypes"}) + @java.lang.Override protected com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { @@ -133,6 +140,7 @@ protected com.google.protobuf.MapField internalGetMapField( "Invalid map field number: " + number); } } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_WriteLogEntriesRequest_fieldAccessorTable @@ -363,7 +371,8 @@ public java.lang.String getLabelsOrThrow( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -371,8 +380,9 @@ public java.lang.String getLabelsOrThrow( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -390,7 +400,8 @@ public java.util.List getEntriesList() { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -398,8 +409,9 @@ public java.util.List getEntriesList() { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -418,7 +430,8 @@ public java.util.List getEntriesList() { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -426,8 +439,9 @@ public java.util.List getEntriesList() { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -445,7 +459,8 @@ public int getEntriesCount() { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -453,8 +468,9 @@ public int getEntriesCount() { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -472,7 +488,8 @@ public com.google.logging.v2.LogEntry getEntries(int index) { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -480,8 +497,9 @@ public com.google.logging.v2.LogEntry getEntries(int index) { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -512,7 +530,23 @@ public boolean getPartialSuccess() { return partialSuccess_; } + public static final int DRY_RUN_FIELD_NUMBER = 6; + private boolean dryRun_; + /** + *
+   * Optional. If true, the request should expect normal response, but the
+   * entries won't be persisted nor exported. Useful for checking whether the
+   * logging API endpoints are working properly before sending valuable data.
+   * 
+ * + * bool dry_run = 6; + */ + public boolean getDryRun() { + return dryRun_; + } + private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -522,6 +556,7 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getLogNameBytes().isEmpty()) { @@ -542,9 +577,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (partialSuccess_ != false) { output.writeBool(5, partialSuccess_); } + if (dryRun_ != false) { + output.writeBool(6, dryRun_); + } unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -575,6 +614,10 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, partialSuccess_); } + if (dryRun_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(6, dryRun_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -604,6 +647,8 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getEntriesList()); result = result && (getPartialSuccess() == other.getPartialSuccess()); + result = result && (getDryRun() + == other.getDryRun()); result = result && unknownFields.equals(other.unknownFields); return result; } @@ -632,6 +677,9 @@ public int hashCode() { hash = (37 * hash) + PARTIAL_SUCCESS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getPartialSuccess()); + hash = (37 * hash) + DRY_RUN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getDryRun()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; @@ -707,6 +755,7 @@ public static com.google.logging.v2.WriteLogEntriesRequest parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -714,6 +763,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.WriteLogEntriesRequest prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -763,6 +813,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField( "Invalid map field number: " + number); } } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_WriteLogEntriesRequest_fieldAccessorTable @@ -786,6 +837,7 @@ private void maybeForceBuilderInitialization() { getEntriesFieldBuilder(); } } + @java.lang.Override public Builder clear() { super.clear(); logName_ = ""; @@ -805,18 +857,23 @@ public Builder clear() { } partialSuccess_ = false; + dryRun_ = false; + return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_WriteLogEntriesRequest_descriptor; } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesRequest getDefaultInstanceForType() { return com.google.logging.v2.WriteLogEntriesRequest.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesRequest build() { com.google.logging.v2.WriteLogEntriesRequest result = buildPartial(); if (!result.isInitialized()) { @@ -825,6 +882,7 @@ public com.google.logging.v2.WriteLogEntriesRequest build() { return result; } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesRequest buildPartial() { com.google.logging.v2.WriteLogEntriesRequest result = new com.google.logging.v2.WriteLogEntriesRequest(this); int from_bitField0_ = bitField0_; @@ -847,37 +905,45 @@ public com.google.logging.v2.WriteLogEntriesRequest buildPartial() { result.entries_ = entriesBuilder_.build(); } result.partialSuccess_ = partialSuccess_; + result.dryRun_ = dryRun_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.WriteLogEntriesRequest) { return mergeFrom((com.google.logging.v2.WriteLogEntriesRequest)other); @@ -927,15 +993,20 @@ public Builder mergeFrom(com.google.logging.v2.WriteLogEntriesRequest other) { if (other.getPartialSuccess() != false) { setPartialSuccess(other.getPartialSuccess()); } + if (other.getDryRun() != false) { + setDryRun(other.getDryRun()); + } this.mergeUnknownFields(other.unknownFields); 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) @@ -1482,7 +1553,8 @@ private void ensureEntriesIsMutable() { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1490,8 +1562,9 @@ private void ensureEntriesIsMutable() { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1513,7 +1586,8 @@ public java.util.List getEntriesList() { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1521,8 +1595,9 @@ public java.util.List getEntriesList() { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1544,7 +1619,8 @@ public int getEntriesCount() { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1552,8 +1628,9 @@ public int getEntriesCount() { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1575,7 +1652,8 @@ public com.google.logging.v2.LogEntry getEntries(int index) { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1583,8 +1661,9 @@ public com.google.logging.v2.LogEntry getEntries(int index) { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1613,7 +1692,8 @@ public Builder setEntries( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1621,8 +1701,9 @@ public Builder setEntries( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1648,7 +1729,8 @@ public Builder setEntries( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1656,8 +1738,9 @@ public Builder setEntries( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1685,7 +1768,8 @@ public Builder addEntries(com.google.logging.v2.LogEntry value) { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1693,8 +1777,9 @@ public Builder addEntries(com.google.logging.v2.LogEntry value) { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1723,7 +1808,8 @@ public Builder addEntries( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1731,8 +1817,9 @@ public Builder addEntries( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1758,7 +1845,8 @@ public Builder addEntries( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1766,8 +1854,9 @@ public Builder addEntries( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1793,7 +1882,8 @@ public Builder addEntries( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1801,8 +1891,9 @@ public Builder addEntries( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1829,7 +1920,8 @@ public Builder addAllEntries( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1837,8 +1929,9 @@ public Builder addAllEntries( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1863,7 +1956,8 @@ public Builder clearEntries() { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1871,8 +1965,9 @@ public Builder clearEntries() { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1897,7 +1992,8 @@ public Builder removeEntries(int index) { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1905,8 +2001,9 @@ public Builder removeEntries(int index) { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1925,7 +2022,8 @@ public com.google.logging.v2.LogEntry.Builder getEntriesBuilder( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1933,8 +2031,9 @@ public com.google.logging.v2.LogEntry.Builder getEntriesBuilder( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1956,7 +2055,8 @@ public com.google.logging.v2.LogEntryOrBuilder getEntriesOrBuilder( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1964,8 +2064,9 @@ public com.google.logging.v2.LogEntryOrBuilder getEntriesOrBuilder( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -1988,7 +2089,8 @@ public com.google.logging.v2.LogEntryOrBuilder getEntriesOrBuilder( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -1996,8 +2098,9 @@ public com.google.logging.v2.LogEntryOrBuilder getEntriesOrBuilder( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -2016,7 +2119,8 @@ public com.google.logging.v2.LogEntry.Builder addEntriesBuilder() { * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -2024,8 +2128,9 @@ public com.google.logging.v2.LogEntry.Builder addEntriesBuilder() { * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -2045,7 +2150,8 @@ public com.google.logging.v2.LogEntry.Builder addEntriesBuilder( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -2053,8 +2159,9 @@ public com.google.logging.v2.LogEntry.Builder addEntriesBuilder( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -2131,11 +2238,57 @@ public Builder clearPartialSuccess() { onChanged(); return this; } + + private boolean dryRun_ ; + /** + *
+     * Optional. If true, the request should expect normal response, but the
+     * entries won't be persisted nor exported. Useful for checking whether the
+     * logging API endpoints are working properly before sending valuable data.
+     * 
+ * + * bool dry_run = 6; + */ + public boolean getDryRun() { + return dryRun_; + } + /** + *
+     * Optional. If true, the request should expect normal response, but the
+     * entries won't be persisted nor exported. Useful for checking whether the
+     * logging API endpoints are working properly before sending valuable data.
+     * 
+ * + * bool dry_run = 6; + */ + public Builder setDryRun(boolean value) { + + dryRun_ = value; + onChanged(); + return this; + } + /** + *
+     * Optional. If true, the request should expect normal response, but the
+     * entries won't be persisted nor exported. Useful for checking whether the
+     * logging API endpoints are working properly before sending valuable data.
+     * 
+ * + * bool dry_run = 6; + */ + public Builder clearDryRun() { + + dryRun_ = false; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -2157,6 +2310,7 @@ public static com.google.logging.v2.WriteLogEntriesRequest getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public WriteLogEntriesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2174,6 +2328,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java index d2b0aa6a6718..bbe6279bb267 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesRequestOrBuilder.java @@ -160,7 +160,8 @@ java.lang.String getLabelsOrThrow( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -168,8 +169,9 @@ java.lang.String getLabelsOrThrow( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -186,7 +188,8 @@ java.lang.String getLabelsOrThrow( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -194,8 +197,9 @@ java.lang.String getLabelsOrThrow( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -211,7 +215,8 @@ java.lang.String getLabelsOrThrow( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -219,8 +224,9 @@ java.lang.String getLabelsOrThrow( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -236,7 +242,8 @@ java.lang.String getLabelsOrThrow( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -244,8 +251,9 @@ java.lang.String getLabelsOrThrow( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -262,7 +270,8 @@ java.lang.String getLabelsOrThrow( * entries in this list does not matter. Values supplied in this method's * `log_name`, `resource`, and `labels` fields are copied into those log * entries in this list that do not include values for their corresponding - * fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + * fields. For more information, see the + * [LogEntry][google.logging.v2.LogEntry] type. * If the `timestamp` or `insert_id` fields are missing in log entries, then * this method supplies the current time or a unique identifier, respectively. * The supplied values are chosen so that, among the log entries that did not @@ -270,8 +279,9 @@ java.lang.String getLabelsOrThrow( * the entries later in the list. See the `entries.list` method. * Log entries with timestamps that are more than the * [logs retention period](/logging/quota-policy) in the past or more than - * 24 hours in the future might be discarded. Discarding does not return - * an error. + * 24 hours in the future will not be available when calling `entries.list`. + * However, those log entries can still be exported with + * [LogSinks](/logging/docs/api/tasks/exporting-logs). * To improve throughput and to avoid exceeding the * [quota limit](/logging/quota-policy) for calls to `entries.write`, * you should try to include several log entries in this list, @@ -295,4 +305,15 @@ com.google.logging.v2.LogEntryOrBuilder getEntriesOrBuilder( * bool partial_success = 5; */ boolean getPartialSuccess(); + + /** + *
+   * Optional. If true, the request should expect normal response, but the
+   * entries won't be persisted nor exported. Useful for checking whether the
+   * logging API endpoints are working properly before sending valuable data.
+   * 
+ * + * bool dry_run = 6; + */ + boolean getDryRun(); } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java index 194929fd923c..3325ea3548d1 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/java/com/google/logging/v2/WriteLogEntriesResponse.java @@ -70,6 +70,7 @@ private WriteLogEntriesResponse( return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_WriteLogEntriesResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_WriteLogEntriesResponse_fieldAccessorTable @@ -78,6 +79,7 @@ private WriteLogEntriesResponse( } private byte memoizedIsInitialized = -1; + @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; @@ -87,11 +89,13 @@ public final boolean isInitialized() { return true; } + @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { unknownFields.writeTo(output); } + @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; @@ -199,6 +203,7 @@ public static com.google.logging.v2.WriteLogEntriesResponse parseFrom( .parseWithIOException(PARSER, input, extensionRegistry); } + @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); @@ -206,6 +211,7 @@ public static Builder newBuilder() { public static Builder newBuilder(com.google.logging.v2.WriteLogEntriesResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } + @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); @@ -234,6 +240,7 @@ public static final class Builder extends return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_WriteLogEntriesResponse_descriptor; } + @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_WriteLogEntriesResponse_fieldAccessorTable @@ -256,20 +263,24 @@ private void maybeForceBuilderInitialization() { .alwaysUseFieldBuilders) { } } + @java.lang.Override public Builder clear() { super.clear(); return this; } + @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.logging.v2.LoggingProto.internal_static_google_logging_v2_WriteLogEntriesResponse_descriptor; } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesResponse getDefaultInstanceForType() { return com.google.logging.v2.WriteLogEntriesResponse.getDefaultInstance(); } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesResponse build() { com.google.logging.v2.WriteLogEntriesResponse result = buildPartial(); if (!result.isInitialized()) { @@ -278,38 +289,46 @@ public com.google.logging.v2.WriteLogEntriesResponse build() { return result; } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesResponse buildPartial() { com.google.logging.v2.WriteLogEntriesResponse result = new com.google.logging.v2.WriteLogEntriesResponse(this); onBuilt(); return result; } + @java.lang.Override public Builder clone() { return (Builder) super.clone(); } + @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.setField(field, value); } + @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return (Builder) super.clearField(field); } + @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return (Builder) super.clearOneof(oneof); } + @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return (Builder) super.setRepeatedField(field, index, value); } + @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return (Builder) super.addRepeatedField(field, value); } + @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.logging.v2.WriteLogEntriesResponse) { return mergeFrom((com.google.logging.v2.WriteLogEntriesResponse)other); @@ -326,10 +345,12 @@ public Builder mergeFrom(com.google.logging.v2.WriteLogEntriesResponse other) { 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) @@ -347,11 +368,13 @@ public Builder mergeFrom( } return this; } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFieldsProto3(unknownFields); } + @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); @@ -373,6 +396,7 @@ public static com.google.logging.v2.WriteLogEntriesResponse getDefaultInstance() private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override public WriteLogEntriesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -390,6 +414,7 @@ public com.google.protobuf.Parser getParserForType() { return PARSER; } + @java.lang.Override public com.google.logging.v2.WriteLogEntriesResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/log_entry.proto b/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/log_entry.proto index 4a52bbc83691..0e5308c21fa8 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/log_entry.proto +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/log_entry.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -59,7 +59,7 @@ message LogEntry { // any results. string log_name = 12; - // Required. The monitored resource associated with this log entry. + // Required. The primary monitored resource associated with this log entry. // Example: a log entry that reports a database error would be // associated with the monitored resource designating the particular // database that reported the error. @@ -84,11 +84,15 @@ message LogEntry { // This time is used to compute the log entry's age and to enforce // the logs retention period. If this field is omitted in a new log // entry, then Stackdriver Logging assigns it the current time. + // Timestamps have nanosecond accuracy, but trailing zeros in the fractional + // seconds might be omitted when the timestamp is displayed. // // Incoming log entries should have timestamps that are no more than - // the [logs retention period](/logging/quota-policy) in the past, - // and no more than 24 hours in the future. - // See the `entries.write` API method for more information. + // the [logs retention period](/logging/quotas) in the past, + // and no more than 24 hours in the future. Log entries outside those time + // boundaries will not be available when calling `entries.list`, but + // those log entries can still be exported with + // [LogSinks](/logging/docs/api/tasks/exporting-logs). google.protobuf.Timestamp timestamp = 9; // Output only. The time the log entry was received by Stackdriver Logging. @@ -114,6 +118,11 @@ message LogEntry { // information about the log entry. map labels = 11; + // Output only. Additional metadata about the monitored resource. + // Only `k8s_container`, `k8s_pod`, and `k8s_node` MonitoredResources have + // this field populated. + google.api.MonitoredResourceMetadata metadata = 25; + // Optional. Information about an operation associated with the log entry, if // applicable. LogEntryOperation operation = 15; @@ -124,11 +133,10 @@ message LogEntry { // `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824` string trace = 22; - // Optional. Id of the span within the trace associated with the log entry. - // e.g. "0000000000000042" - // For Stackdriver trace spans, this is the same format that the Stackdriver - // trace API uses. - // The ID is a 16-character hexadecimal encoding of an 8-byte array. + // Optional. The span ID within the trace associated with the log entry. For + // Stackdriver Trace spans, this is the same format that the Stackdriver Trace + // API v2 uses: a 16-character hexadecimal encoding of an 8-byte array, such + // as "000000000000004a". string span_id = 27; // Optional. Source code location information associated with the log entry, diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging.proto b/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging.proto index a9b4e9306f3f..ef8b6b56b5df 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging.proto +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,37 +40,71 @@ service LoggingServiceV2 { // Log entries written shortly before the delete operation might not be // deleted. rpc DeleteLog(DeleteLogRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2beta1/{log_name=projects/*/logs/*}" }; + option (google.api.http) = { + delete: "/v2/{log_name=projects/*/logs/*}" + additional_bindings { + delete: "/v2/{log_name=organizations/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=folders/*/logs/*}" + } + additional_bindings { + delete: "/v2/{log_name=billingAccounts/*/logs/*}" + } + }; } - // ## Log entry resources - // // Writes log entries to Stackdriver Logging. This API method is the // only way to send log entries to Stackdriver Logging. This method // is used, directly or indirectly, by the Stackdriver Logging agent // (fluentd) and all logging libraries configured to use Stackdriver // Logging. + // A single request may contain log entries for a maximum of 1000 + // different resources (projects, organizations, billing accounts or + // folders) rpc WriteLogEntries(WriteLogEntriesRequest) returns (WriteLogEntriesResponse) { - option (google.api.http) = { post: "/v2/entries:write" body: "*" }; + option (google.api.http) = { + post: "/v2/entries:write" + body: "*" + }; } // Lists log entries. Use this method to retrieve log entries from // Stackdriver Logging. For ways to export log entries, see // [Exporting Logs](/logging/docs/export). rpc ListLogEntries(ListLogEntriesRequest) returns (ListLogEntriesResponse) { - option (google.api.http) = { post: "/v2/entries:list" body: "*" }; + option (google.api.http) = { + post: "/v2/entries:list" + body: "*" + }; } // Lists the descriptors for monitored resource types used by Stackdriver // Logging. rpc ListMonitoredResourceDescriptors(ListMonitoredResourceDescriptorsRequest) returns (ListMonitoredResourceDescriptorsResponse) { - option (google.api.http) = { get: "/v2/monitoredResourceDescriptors" }; + option (google.api.http) = { + get: "/v2/monitoredResourceDescriptors" + }; } // Lists the logs in projects, organizations, folders, or billing accounts. // Only logs that have entries are listed. rpc ListLogs(ListLogsRequest) returns (ListLogsResponse) { - option (google.api.http) = { get: "/v2/{parent=*/*}/logs" }; + option (google.api.http) = { + get: "/v2/{parent=*/*}/logs" + additional_bindings { + get: "/v2/{parent=projects/*}/logs" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/logs" + } + additional_bindings { + get: "/v2/{parent=folders/*}/logs" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/logs" + } + }; } } @@ -128,7 +162,8 @@ message WriteLogEntriesRequest { // entries in this list does not matter. Values supplied in this method's // `log_name`, `resource`, and `labels` fields are copied into those log // entries in this list that do not include values for their corresponding - // fields. For more information, see the [LogEntry][google.logging.v2.LogEntry] type. + // fields. For more information, see the + // [LogEntry][google.logging.v2.LogEntry] type. // // If the `timestamp` or `insert_id` fields are missing in log entries, then // this method supplies the current time or a unique identifier, respectively. @@ -138,8 +173,9 @@ message WriteLogEntriesRequest { // // Log entries with timestamps that are more than the // [logs retention period](/logging/quota-policy) in the past or more than - // 24 hours in the future might be discarded. Discarding does not return - // an error. + // 24 hours in the future will not be available when calling `entries.list`. + // However, those log entries can still be exported with + // [LogSinks](/logging/docs/api/tasks/exporting-logs). // // To improve throughput and to avoid exceeding the // [quota limit](/logging/quota-policy) for calls to `entries.write`, @@ -153,6 +189,11 @@ message WriteLogEntriesRequest { // with one of the failed entries and the response includes error details // keyed by the entries' zero-based index in the `entries.write` method. bool partial_success = 5; + + // Optional. If true, the request should expect normal response, but the + // entries won't be persisted nor exported. Useful for checking whether the + // logging API endpoints are working properly before sending valuable data. + bool dry_run = 6; } // Result returned from WriteLogEntries. @@ -179,7 +220,7 @@ message ListLogEntriesRequest { // `"my-project-1A"`. If present, these project identifiers are converted to // resource name format and added to the list of resources in // `resource_names`. - repeated string project_ids = 1; + repeated string project_ids = 1 [deprecated = true]; // Required. Names of one or more parent resources from which to // retrieve log entries: diff --git a/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_config.proto b/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_config.proto index 10095ef096df..dc2783e0e535 100644 --- a/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_config.proto +++ b/google-api-grpc/proto-google-cloud-logging-v2/src/main/proto/google/logging/v2/logging_config.proto @@ -1,4 +1,4 @@ -// Copyright 2017 Google Inc. +// Copyright 2018 Google Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -35,12 +35,40 @@ option php_namespace = "Google\\Cloud\\Logging\\V2"; service ConfigServiceV2 { // Lists sinks. rpc ListSinks(ListSinksRequest) returns (ListSinksResponse) { - option (google.api.http) = { get: "/v2/{parent=*/*}/sinks" }; + option (google.api.http) = { + get: "/v2/{parent=*/*}/sinks" + additional_bindings { + get: "/v2/{parent=projects/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=folders/*}/sinks" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/sinks" + } + }; } // Gets a sink. rpc GetSink(GetSinkRequest) returns (LogSink) { - option (google.api.http) = { get: "/v2/{sink_name=*/*/sinks/*}" }; + option (google.api.http) = { + get: "/v2/{sink_name=*/*/sinks/*}" + additional_bindings { + get: "/v2/{sink_name=projects/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=organizations/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=folders/*/sinks/*}" + } + additional_bindings { + get: "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }; } // Creates a sink that exports specified log entries to a destination. The @@ -48,7 +76,26 @@ service ConfigServiceV2 { // `writer_identity` is not permitted to write to the destination. A sink can // export log entries only from the resource owning the sink. rpc CreateSink(CreateSinkRequest) returns (LogSink) { - option (google.api.http) = { post: "/v2/{parent=*/*}/sinks" body: "sink" }; + option (google.api.http) = { + post: "/v2/{parent=*/*}/sinks" + body: "sink" + additional_bindings { + post: "/v2/{parent=projects/*}/sinks" + body: "sink" + } + additional_bindings { + post: "/v2/{parent=organizations/*}/sinks" + body: "sink" + } + additional_bindings { + post: "/v2/{parent=folders/*}/sinks" + body: "sink" + } + additional_bindings { + post: "/v2/{parent=billingAccounts/*}/sinks" + body: "sink" + } + }; } // Updates a sink. This method replaces the following fields in the existing @@ -56,40 +103,169 @@ service ConfigServiceV2 { // The updated sink might also have a new `writer_identity`; see the // `unique_writer_identity` field. rpc UpdateSink(UpdateSinkRequest) returns (LogSink) { - option (google.api.http) = { put: "/v2/{sink_name=*/*/sinks/*}" body: "sink" }; + option (google.api.http) = { + put: "/v2/{sink_name=*/*/sinks/*}" + body: "sink" + additional_bindings { + put: "/v2/{sink_name=projects/*/sinks/*}" + body: "sink" + } + additional_bindings { + put: "/v2/{sink_name=organizations/*/sinks/*}" + body: "sink" + } + additional_bindings { + put: "/v2/{sink_name=folders/*/sinks/*}" + body: "sink" + } + additional_bindings { + put: "/v2/{sink_name=billingAccounts/*/sinks/*}" + body: "sink" + } + additional_bindings { + patch: "/v2/{sink_name=projects/*/sinks/*}" + body: "sink" + } + additional_bindings { + patch: "/v2/{sink_name=organizations/*/sinks/*}" + body: "sink" + } + additional_bindings { + patch: "/v2/{sink_name=folders/*/sinks/*}" + body: "sink" + } + additional_bindings { + patch: "/v2/{sink_name=billingAccounts/*/sinks/*}" + body: "sink" + } + }; } // Deletes a sink. If the sink has a unique `writer_identity`, then that // service account is also deleted. rpc DeleteSink(DeleteSinkRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2/{sink_name=*/*/sinks/*}" }; + option (google.api.http) = { + delete: "/v2/{sink_name=*/*/sinks/*}" + additional_bindings { + delete: "/v2/{sink_name=projects/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=organizations/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=folders/*/sinks/*}" + } + additional_bindings { + delete: "/v2/{sink_name=billingAccounts/*/sinks/*}" + } + }; } // Lists all the exclusions in a parent resource. rpc ListExclusions(ListExclusionsRequest) returns (ListExclusionsResponse) { - option (google.api.http) = { get: "/v2/{parent=*/*}/exclusions" }; + option (google.api.http) = { + get: "/v2/{parent=*/*}/exclusions" + additional_bindings { + get: "/v2/{parent=projects/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=organizations/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=folders/*}/exclusions" + } + additional_bindings { + get: "/v2/{parent=billingAccounts/*}/exclusions" + } + }; } // Gets the description of an exclusion. rpc GetExclusion(GetExclusionRequest) returns (LogExclusion) { - option (google.api.http) = { get: "/v2/{name=*/*/exclusions/*}" }; + option (google.api.http) = { + get: "/v2/{name=*/*/exclusions/*}" + additional_bindings { + get: "/v2/{name=projects/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=folders/*/exclusions/*}" + } + additional_bindings { + get: "/v2/{name=billingAccounts/*/exclusions/*}" + } + }; } // Creates a new exclusion in a specified parent resource. // Only log entries belonging to that resource can be excluded. // You can have up to 10 exclusions in a resource. rpc CreateExclusion(CreateExclusionRequest) returns (LogExclusion) { - option (google.api.http) = { post: "/v2/{parent=*/*}/exclusions" body: "exclusion" }; + option (google.api.http) = { + post: "/v2/{parent=*/*}/exclusions" + body: "exclusion" + additional_bindings { + post: "/v2/{parent=projects/*}/exclusions" + body: "exclusion" + } + additional_bindings { + post: "/v2/{parent=organizations/*}/exclusions" + body: "exclusion" + } + additional_bindings { + post: "/v2/{parent=folders/*}/exclusions" + body: "exclusion" + } + additional_bindings { + post: "/v2/{parent=billingAccounts/*}/exclusions" + body: "exclusion" + } + }; } // Changes one or more properties of an existing exclusion. rpc UpdateExclusion(UpdateExclusionRequest) returns (LogExclusion) { - option (google.api.http) = { patch: "/v2/{name=*/*/exclusions/*}" body: "exclusion" }; + option (google.api.http) = { + patch: "/v2/{name=*/*/exclusions/*}" + body: "exclusion" + additional_bindings { + patch: "/v2/{name=projects/*/exclusions/*}" + body: "exclusion" + } + additional_bindings { + patch: "/v2/{name=organizations/*/exclusions/*}" + body: "exclusion" + } + additional_bindings { + patch: "/v2/{name=folders/*/exclusions/*}" + body: "exclusion" + } + additional_bindings { + patch: "/v2/{name=billingAccounts/*/exclusions/*}" + body: "exclusion" + } + }; } // Deletes an exclusion. rpc DeleteExclusion(DeleteExclusionRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { delete: "/v2/{name=*/*/exclusions/*}" }; + option (google.api.http) = { + delete: "/v2/{name=*/*/exclusions/*}" + additional_bindings { + delete: "/v2/{name=projects/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=folders/*/exclusions/*}" + } + additional_bindings { + delete: "/v2/{name=billingAccounts/*/exclusions/*}" + } + }; } } @@ -142,7 +318,7 @@ message LogSink { // Deprecated. The log entry format to use for this sink's exported log // entries. The v2 format is used by default and cannot be changed. - VersionFormat output_version_format = 6; + VersionFormat output_version_format = 6 [deprecated = true]; // Output only. An IAM identity—a service account or group—under // which Stackdriver Logging writes the exported log entries to the sink's @@ -176,10 +352,10 @@ message LogSink { bool include_children = 9; // Deprecated. This field is ignored when creating or updating sinks. - google.protobuf.Timestamp start_time = 10; + google.protobuf.Timestamp start_time = 10 [deprecated = true]; // Deprecated. This field is ignored when creating or updating sinks. - google.protobuf.Timestamp end_time = 11; + google.protobuf.Timestamp end_time = 11 [deprecated = true]; } // The parameters to `ListSinks`. @@ -343,12 +519,12 @@ message LogExclusion { // For example, the following filter matches 99% of low-severity log // entries from load balancers: // - // "resource.type=http_load_balancer severity + 4.0.0 + proto-google-cloud-tasks-v2beta2 + 0.18.1-SNAPSHOT + proto-google-cloud-tasks-v2beta2 + PROTO library for proto-google-cloud-tasks-v2beta2 + + com.google.api.grpc + google-api-grpc + 0.18.1-SNAPSHOT + + + + com.google.protobuf + protobuf-java + compile + + + com.google.api + api-common + compile + + + com.google.api.grpc + proto-google-common-protos + compile + + + com.google.api.grpc + proto-google-iam-v1 + compile + + + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AcknowledgeTaskRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AcknowledgeTaskRequest.java new file mode 100644 index 000000000000..6b64309293aa --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AcknowledgeTaskRequest.java @@ -0,0 +1,857 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for acknowledging a task using
+ * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.AcknowledgeTaskRequest} + */ +public final class AcknowledgeTaskRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.AcknowledgeTaskRequest) + AcknowledgeTaskRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AcknowledgeTaskRequest.newBuilder() to construct. + private AcknowledgeTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AcknowledgeTaskRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AcknowledgeTaskRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (scheduleTime_ != null) { + subBuilder = scheduleTime_.toBuilder(); + } + scheduleTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scheduleTime_); + scheduleTime_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest.class, com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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 task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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 SCHEDULE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp scheduleTime_; + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public boolean hasScheduleTime() { + return scheduleTime_ != null; + } + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.Timestamp getScheduleTime() { + return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() { + return getScheduleTime(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (scheduleTime_ != null) { + output.writeMessage(2, getScheduleTime()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (scheduleTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getScheduleTime()); + } + size += unknownFields.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.tasks.v2beta2.AcknowledgeTaskRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest other = (com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && (hasScheduleTime() == other.hasScheduleTime()); + if (hasScheduleTime()) { + result = result && getScheduleTime() + .equals(other.getScheduleTime()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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 (hasScheduleTime()) { + hash = (37 * hash) + SCHEDULE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getScheduleTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest 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.tasks.v2beta2.AcknowledgeTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest 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.tasks.v2beta2.AcknowledgeTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest 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.tasks.v2beta2.AcknowledgeTaskRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest 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.tasks.v2beta2.AcknowledgeTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for acknowledging a task using
+   * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.AcknowledgeTaskRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.AcknowledgeTaskRequest) + com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest.class, com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = null; + } else { + scheduleTime_ = null; + scheduleTimeBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest build() { + com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest buildPartial() { + com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest result = new com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest(this); + result.name_ = name_; + if (scheduleTimeBuilder_ == null) { + result.scheduleTime_ = scheduleTime_; + } else { + result.scheduleTime_ = scheduleTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest other) { + if (other == com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasScheduleTime()) { + mergeScheduleTime(other.getScheduleTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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.Timestamp scheduleTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> scheduleTimeBuilder_; + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public boolean hasScheduleTime() { + return scheduleTimeBuilder_ != null || scheduleTime_ != null; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.Timestamp getScheduleTime() { + if (scheduleTimeBuilder_ == null) { + return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } else { + return scheduleTimeBuilder_.getMessage(); + } + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder setScheduleTime(com.google.protobuf.Timestamp value) { + if (scheduleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduleTime_ = value; + onChanged(); + } else { + scheduleTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder setScheduleTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = builderForValue.build(); + onChanged(); + } else { + scheduleTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder mergeScheduleTime(com.google.protobuf.Timestamp value) { + if (scheduleTimeBuilder_ == null) { + if (scheduleTime_ != null) { + scheduleTime_ = + com.google.protobuf.Timestamp.newBuilder(scheduleTime_).mergeFrom(value).buildPartial(); + } else { + scheduleTime_ = value; + } + onChanged(); + } else { + scheduleTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder clearScheduleTime() { + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = null; + onChanged(); + } else { + scheduleTime_ = null; + scheduleTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getScheduleTimeBuilder() { + + onChanged(); + return getScheduleTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() { + if (scheduleTimeBuilder_ != null) { + return scheduleTimeBuilder_.getMessageOrBuilder(); + } else { + return scheduleTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getScheduleTimeFieldBuilder() { + if (scheduleTimeBuilder_ == null) { + scheduleTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getScheduleTime(), + getParentForChildren(), + isClean()); + scheduleTime_ = null; + } + return scheduleTimeBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.AcknowledgeTaskRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.AcknowledgeTaskRequest) + private static final com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest(); + } + + public static com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public AcknowledgeTaskRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AcknowledgeTaskRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AcknowledgeTaskRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AcknowledgeTaskRequestOrBuilder.java new file mode 100644 index 000000000000..5cc612c9117c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AcknowledgeTaskRequestOrBuilder.java @@ -0,0 +1,71 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface AcknowledgeTaskRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.AcknowledgeTaskRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + boolean hasScheduleTime(); + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + com.google.protobuf.Timestamp getScheduleTime(); + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequest.java new file mode 100644 index 000000000000..a9089a28889f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequest.java @@ -0,0 +1,1834 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * App Engine HTTP request.
+ * The message defines the HTTP request that is sent to an App Engine app when
+ * the task is dispatched.
+ * This proto can only be used for tasks in a queue which has
+ * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] set.
+ * Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] requires
+ * [`appengine.applications.get`](/appengine/docs/admin-api/access-control)
+ * Google IAM permission for the project
+ * and the following scope:
+ * `https://www.googleapis.com/auth/cloud-platform`
+ * The task will be delivered to the App Engine app which belongs to the same
+ * project as the queue. For more information, see
+ * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed)
+ * and how routing is affected by
+ * [dispatch files](/appengine/docs/python/config/dispatchref).
+ * The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to construct the URL that the task is
+ * delivered to can be set at the queue-level or task-level:
+ * * If set,
+ *    [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+ *    is used for all tasks in the queue, no matter what the setting
+ *    is for the
+ *    [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+ * The `url` that the task will be sent to is:
+ * * `url =` [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] `+`
+ *   [relative_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative_url]
+ * The task attempt has succeeded if the app's request handler returns
+ * an HTTP response code in the range [`200` - `299`]. `503` is
+ * considered an App Engine system error instead of an application
+ * error. Requests returning error `503` will be retried regardless of
+ * retry configuration and not counted against retry counts.
+ * Any other response code or a failure to receive a response before the
+ * deadline is a failed attempt.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.AppEngineHttpRequest} + */ +public final class AppEngineHttpRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.AppEngineHttpRequest) + AppEngineHttpRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use AppEngineHttpRequest.newBuilder() to construct. + private AppEngineHttpRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AppEngineHttpRequest() { + httpMethod_ = 0; + relativeUrl_ = ""; + payload_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AppEngineHttpRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + + httpMethod_ = rawValue; + break; + } + case 18: { + com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder subBuilder = null; + if (appEngineRouting_ != null) { + subBuilder = appEngineRouting_.toBuilder(); + } + appEngineRouting_ = input.readMessage(com.google.cloud.tasks.v2beta2.AppEngineRouting.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(appEngineRouting_); + appEngineRouting_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + relativeUrl_ = s; + break; + } + case 34: { + if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + headers_ = com.google.protobuf.MapField.newMapField( + HeadersDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000008; + } + com.google.protobuf.MapEntry + headers__ = input.readMessage( + HeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + headers_.getMutableMap().put( + headers__.getKey(), headers__.getValue()); + break; + } + case 42: { + + payload_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetHeaders(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.class, com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.Builder.class); + } + + private int bitField0_; + public static final int HTTP_METHOD_FIELD_NUMBER = 1; + private int httpMethod_; + /** + *
+   * The HTTP method to use for the request. The default is POST.
+   * The app's request handler for the task's target URL must be able to handle
+   * HTTP requests with this http_method, otherwise the task attempt will fail
+   * with error code 405 (Method Not Allowed). See
+   * [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+   * and the documentation for the request handlers in the language your app is
+   * written in e.g.
+   * [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass).
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + */ + public int getHttpMethodValue() { + return httpMethod_; + } + /** + *
+   * The HTTP method to use for the request. The default is POST.
+   * The app's request handler for the task's target URL must be able to handle
+   * HTTP requests with this http_method, otherwise the task attempt will fail
+   * with error code 405 (Method Not Allowed). See
+   * [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+   * and the documentation for the request handlers in the language your app is
+   * written in e.g.
+   * [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass).
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + */ + public com.google.cloud.tasks.v2beta2.HttpMethod getHttpMethod() { + com.google.cloud.tasks.v2beta2.HttpMethod result = com.google.cloud.tasks.v2beta2.HttpMethod.valueOf(httpMethod_); + return result == null ? com.google.cloud.tasks.v2beta2.HttpMethod.UNRECOGNIZED : result; + } + + public static final int APP_ENGINE_ROUTING_FIELD_NUMBER = 2; + private com.google.cloud.tasks.v2beta2.AppEngineRouting appEngineRouting_; + /** + *
+   * Task-level setting for App Engine routing.
+   * If set,
+   * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+   * is used for all tasks in the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + public boolean hasAppEngineRouting() { + return appEngineRouting_ != null; + } + /** + *
+   * Task-level setting for App Engine routing.
+   * If set,
+   * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+   * is used for all tasks in the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + public com.google.cloud.tasks.v2beta2.AppEngineRouting getAppEngineRouting() { + return appEngineRouting_ == null ? com.google.cloud.tasks.v2beta2.AppEngineRouting.getDefaultInstance() : appEngineRouting_; + } + /** + *
+   * Task-level setting for App Engine routing.
+   * If set,
+   * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+   * is used for all tasks in the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + public com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder getAppEngineRoutingOrBuilder() { + return getAppEngineRouting(); + } + + public static final int RELATIVE_URL_FIELD_NUMBER = 3; + private volatile java.lang.Object relativeUrl_; + /** + *
+   * The relative URL.
+   * The relative URL must begin with "/" and must be a valid HTTP relative URL.
+   * It can contain a path and query string arguments.
+   * If the relative URL is empty, then the root path "/" will be used.
+   * No spaces are allowed, and the maximum length allowed is 2083 characters.
+   * 
+ * + * string relative_url = 3; + */ + public java.lang.String getRelativeUrl() { + java.lang.Object ref = relativeUrl_; + 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(); + relativeUrl_ = s; + return s; + } + } + /** + *
+   * The relative URL.
+   * The relative URL must begin with "/" and must be a valid HTTP relative URL.
+   * It can contain a path and query string arguments.
+   * If the relative URL is empty, then the root path "/" will be used.
+   * No spaces are allowed, and the maximum length allowed is 2083 characters.
+   * 
+ * + * string relative_url = 3; + */ + public com.google.protobuf.ByteString + getRelativeUrlBytes() { + java.lang.Object ref = relativeUrl_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relativeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HEADERS_FIELD_NUMBER = 4; + private static final class HeadersDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, java.lang.String> defaultEntry = + com.google.protobuf.MapEntry + .newDefaultInstance( + com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_HeadersEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.STRING, + ""); + } + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> headers_; + private com.google.protobuf.MapField + internalGetHeaders() { + if (headers_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadersDefaultEntryHolder.defaultEntry); + } + return headers_; + } + + public int getHeadersCount() { + return internalGetHeaders().getMap().size(); + } + /** + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   * Repeated headers are not supported but a header value can contain commas.
+   * Cloud Tasks sets some headers to default values:
+   * * `User-Agent`: By default, this header is
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+   *   This header can be modified, but Cloud Tasks will append
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+   *   modified `User-Agent`.
+   * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+   * Tasks sets the following headers:
+   * * `Content-Type`: By default, the `Content-Type` header is set to
+   *   `"application/octet-stream"`. The default can be overridden by explicitly
+   *   setting `Content-Type` to a particular media type when the
+   *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   *   For example, `Content-Type` can be set to `"application/json"`.
+   * * `Content-Length`: This is computed by Cloud Tasks. This value is
+   *   output only.   It cannot be changed.
+   * The headers below cannot be set or overridden:
+   * * `Host`
+   * * `X-Google-*`
+   * * `X-AppEngine-*`
+   * In addition, Cloud Tasks sets some headers when the task is dispatched,
+   * such as headers containing information about the task; see
+   * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+   * These headers are set only when the task is dispatched, so they are not
+   * visible when the task is returned in a Cloud Tasks response.
+   * Although there is no specific limit for the maximum number of headers or
+   * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+   * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+   * 
+ * + * map<string, string> headers = 4; + */ + + public boolean containsHeaders( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetHeaders().getMap().containsKey(key); + } + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   * Repeated headers are not supported but a header value can contain commas.
+   * Cloud Tasks sets some headers to default values:
+   * * `User-Agent`: By default, this header is
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+   *   This header can be modified, but Cloud Tasks will append
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+   *   modified `User-Agent`.
+   * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+   * Tasks sets the following headers:
+   * * `Content-Type`: By default, the `Content-Type` header is set to
+   *   `"application/octet-stream"`. The default can be overridden by explicitly
+   *   setting `Content-Type` to a particular media type when the
+   *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   *   For example, `Content-Type` can be set to `"application/json"`.
+   * * `Content-Length`: This is computed by Cloud Tasks. This value is
+   *   output only.   It cannot be changed.
+   * The headers below cannot be set or overridden:
+   * * `Host`
+   * * `X-Google-*`
+   * * `X-AppEngine-*`
+   * In addition, Cloud Tasks sets some headers when the task is dispatched,
+   * such as headers containing information about the task; see
+   * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+   * These headers are set only when the task is dispatched, so they are not
+   * visible when the task is returned in a Cloud Tasks response.
+   * Although there is no specific limit for the maximum number of headers or
+   * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+   * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+   * 
+ * + * map<string, string> headers = 4; + */ + + public java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   * Repeated headers are not supported but a header value can contain commas.
+   * Cloud Tasks sets some headers to default values:
+   * * `User-Agent`: By default, this header is
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+   *   This header can be modified, but Cloud Tasks will append
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+   *   modified `User-Agent`.
+   * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+   * Tasks sets the following headers:
+   * * `Content-Type`: By default, the `Content-Type` header is set to
+   *   `"application/octet-stream"`. The default can be overridden by explicitly
+   *   setting `Content-Type` to a particular media type when the
+   *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   *   For example, `Content-Type` can be set to `"application/json"`.
+   * * `Content-Length`: This is computed by Cloud Tasks. This value is
+   *   output only.   It cannot be changed.
+   * The headers below cannot be set or overridden:
+   * * `Host`
+   * * `X-Google-*`
+   * * `X-AppEngine-*`
+   * In addition, Cloud Tasks sets some headers when the task is dispatched,
+   * such as headers containing information about the task; see
+   * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+   * These headers are set only when the task is dispatched, so they are not
+   * visible when the task is returned in a Cloud Tasks response.
+   * Although there is no specific limit for the maximum number of headers or
+   * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+   * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+   * 
+ * + * map<string, string> headers = 4; + */ + + public java.lang.String getHeadersOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   * Repeated headers are not supported but a header value can contain commas.
+   * Cloud Tasks sets some headers to default values:
+   * * `User-Agent`: By default, this header is
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+   *   This header can be modified, but Cloud Tasks will append
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+   *   modified `User-Agent`.
+   * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+   * Tasks sets the following headers:
+   * * `Content-Type`: By default, the `Content-Type` header is set to
+   *   `"application/octet-stream"`. The default can be overridden by explicitly
+   *   setting `Content-Type` to a particular media type when the
+   *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   *   For example, `Content-Type` can be set to `"application/json"`.
+   * * `Content-Length`: This is computed by Cloud Tasks. This value is
+   *   output only.   It cannot be changed.
+   * The headers below cannot be set or overridden:
+   * * `Host`
+   * * `X-Google-*`
+   * * `X-AppEngine-*`
+   * In addition, Cloud Tasks sets some headers when the task is dispatched,
+   * such as headers containing information about the task; see
+   * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+   * These headers are set only when the task is dispatched, so they are not
+   * visible when the task is returned in a Cloud Tasks response.
+   * Although there is no specific limit for the maximum number of headers or
+   * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+   * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+   * 
+ * + * map<string, string> headers = 4; + */ + + public java.lang.String getHeadersOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int PAYLOAD_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString payload_; + /** + *
+   * Payload.
+   * The payload will be sent as the HTTP message body. A message
+   * body, and thus a payload, is allowed only if the HTTP method is
+   * POST or PUT. It is an error to set a data payload on a task with
+   * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
+   * 
+ * + * bytes payload = 5; + */ + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (httpMethod_ != com.google.cloud.tasks.v2beta2.HttpMethod.HTTP_METHOD_UNSPECIFIED.getNumber()) { + output.writeEnum(1, httpMethod_); + } + if (appEngineRouting_ != null) { + output.writeMessage(2, getAppEngineRouting()); + } + if (!getRelativeUrlBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, relativeUrl_); + } + com.google.protobuf.GeneratedMessageV3 + .serializeStringMapTo( + output, + internalGetHeaders(), + HeadersDefaultEntryHolder.defaultEntry, + 4); + if (!payload_.isEmpty()) { + output.writeBytes(5, payload_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (httpMethod_ != com.google.cloud.tasks.v2beta2.HttpMethod.HTTP_METHOD_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, httpMethod_); + } + if (appEngineRouting_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getAppEngineRouting()); + } + if (!getRelativeUrlBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, relativeUrl_); + } + for (java.util.Map.Entry entry + : internalGetHeaders().getMap().entrySet()) { + com.google.protobuf.MapEntry + headers__ = HeadersDefaultEntryHolder.defaultEntry.newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, headers__); + } + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, payload_); + } + size += unknownFields.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.tasks.v2beta2.AppEngineHttpRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.AppEngineHttpRequest other = (com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) obj; + + boolean result = true; + result = result && httpMethod_ == other.httpMethod_; + result = result && (hasAppEngineRouting() == other.hasAppEngineRouting()); + if (hasAppEngineRouting()) { + result = result && getAppEngineRouting() + .equals(other.getAppEngineRouting()); + } + result = result && getRelativeUrl() + .equals(other.getRelativeUrl()); + result = result && internalGetHeaders().equals( + other.internalGetHeaders()); + result = result && getPayload() + .equals(other.getPayload()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HTTP_METHOD_FIELD_NUMBER; + hash = (53 * hash) + httpMethod_; + if (hasAppEngineRouting()) { + hash = (37 * hash) + APP_ENGINE_ROUTING_FIELD_NUMBER; + hash = (53 * hash) + getAppEngineRouting().hashCode(); + } + hash = (37 * hash) + RELATIVE_URL_FIELD_NUMBER; + hash = (53 * hash) + getRelativeUrl().hashCode(); + if (!internalGetHeaders().getMap().isEmpty()) { + hash = (37 * hash) + HEADERS_FIELD_NUMBER; + hash = (53 * hash) + internalGetHeaders().hashCode(); + } + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.AppEngineHttpRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpRequest 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.tasks.v2beta2.AppEngineHttpRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpRequest 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.tasks.v2beta2.AppEngineHttpRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpRequest 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.tasks.v2beta2.AppEngineHttpRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpRequest 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.tasks.v2beta2.AppEngineHttpRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.AppEngineHttpRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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; + } + /** + *
+   * App Engine HTTP request.
+   * The message defines the HTTP request that is sent to an App Engine app when
+   * the task is dispatched.
+   * This proto can only be used for tasks in a queue which has
+   * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] set.
+   * Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] requires
+   * [`appengine.applications.get`](/appengine/docs/admin-api/access-control)
+   * Google IAM permission for the project
+   * and the following scope:
+   * `https://www.googleapis.com/auth/cloud-platform`
+   * The task will be delivered to the App Engine app which belongs to the same
+   * project as the queue. For more information, see
+   * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed)
+   * and how routing is affected by
+   * [dispatch files](/appengine/docs/python/config/dispatchref).
+   * The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to construct the URL that the task is
+   * delivered to can be set at the queue-level or task-level:
+   * * If set,
+   *    [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+   *    is used for all tasks in the queue, no matter what the setting
+   *    is for the
+   *    [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * The `url` that the task will be sent to is:
+   * * `url =` [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] `+`
+   *   [relative_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative_url]
+   * The task attempt has succeeded if the app's request handler returns
+   * an HTTP response code in the range [`200` - `299`]. `503` is
+   * considered an App Engine system error instead of an application
+   * error. Requests returning error `503` will be retried regardless of
+   * retry configuration and not counted against retry counts.
+   * Any other response code or a failure to receive a response before the
+   * deadline is a failed attempt.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.AppEngineHttpRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.AppEngineHttpRequest) + com.google.cloud.tasks.v2beta2.AppEngineHttpRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField( + int number) { + switch (number) { + case 4: + return internalGetHeaders(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField( + int number) { + switch (number) { + case 4: + return internalGetMutableHeaders(); + default: + throw new RuntimeException( + "Invalid map field number: " + number); + } + } + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.class, com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + httpMethod_ = 0; + + if (appEngineRoutingBuilder_ == null) { + appEngineRouting_ = null; + } else { + appEngineRouting_ = null; + appEngineRoutingBuilder_ = null; + } + relativeUrl_ = ""; + + internalGetMutableHeaders().clear(); + payload_ = com.google.protobuf.ByteString.EMPTY; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.AppEngineHttpRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.AppEngineHttpRequest build() { + com.google.cloud.tasks.v2beta2.AppEngineHttpRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.AppEngineHttpRequest buildPartial() { + com.google.cloud.tasks.v2beta2.AppEngineHttpRequest result = new com.google.cloud.tasks.v2beta2.AppEngineHttpRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.httpMethod_ = httpMethod_; + if (appEngineRoutingBuilder_ == null) { + result.appEngineRouting_ = appEngineRouting_; + } else { + result.appEngineRouting_ = appEngineRoutingBuilder_.build(); + } + result.relativeUrl_ = relativeUrl_; + result.headers_ = internalGetHeaders(); + result.headers_.makeImmutable(); + result.payload_ = payload_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.AppEngineHttpRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.AppEngineHttpRequest other) { + if (other == com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.getDefaultInstance()) return this; + if (other.httpMethod_ != 0) { + setHttpMethodValue(other.getHttpMethodValue()); + } + if (other.hasAppEngineRouting()) { + mergeAppEngineRouting(other.getAppEngineRouting()); + } + if (!other.getRelativeUrl().isEmpty()) { + relativeUrl_ = other.relativeUrl_; + onChanged(); + } + internalGetMutableHeaders().mergeFrom( + other.internalGetHeaders()); + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.AppEngineHttpRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int httpMethod_ = 0; + /** + *
+     * The HTTP method to use for the request. The default is POST.
+     * The app's request handler for the task's target URL must be able to handle
+     * HTTP requests with this http_method, otherwise the task attempt will fail
+     * with error code 405 (Method Not Allowed). See
+     * [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+     * and the documentation for the request handlers in the language your app is
+     * written in e.g.
+     * [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass).
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + */ + public int getHttpMethodValue() { + return httpMethod_; + } + /** + *
+     * The HTTP method to use for the request. The default is POST.
+     * The app's request handler for the task's target URL must be able to handle
+     * HTTP requests with this http_method, otherwise the task attempt will fail
+     * with error code 405 (Method Not Allowed). See
+     * [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+     * and the documentation for the request handlers in the language your app is
+     * written in e.g.
+     * [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass).
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + */ + public Builder setHttpMethodValue(int value) { + httpMethod_ = value; + onChanged(); + return this; + } + /** + *
+     * The HTTP method to use for the request. The default is POST.
+     * The app's request handler for the task's target URL must be able to handle
+     * HTTP requests with this http_method, otherwise the task attempt will fail
+     * with error code 405 (Method Not Allowed). See
+     * [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+     * and the documentation for the request handlers in the language your app is
+     * written in e.g.
+     * [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass).
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + */ + public com.google.cloud.tasks.v2beta2.HttpMethod getHttpMethod() { + com.google.cloud.tasks.v2beta2.HttpMethod result = com.google.cloud.tasks.v2beta2.HttpMethod.valueOf(httpMethod_); + return result == null ? com.google.cloud.tasks.v2beta2.HttpMethod.UNRECOGNIZED : result; + } + /** + *
+     * The HTTP method to use for the request. The default is POST.
+     * The app's request handler for the task's target URL must be able to handle
+     * HTTP requests with this http_method, otherwise the task attempt will fail
+     * with error code 405 (Method Not Allowed). See
+     * [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+     * and the documentation for the request handlers in the language your app is
+     * written in e.g.
+     * [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass).
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + */ + public Builder setHttpMethod(com.google.cloud.tasks.v2beta2.HttpMethod value) { + if (value == null) { + throw new NullPointerException(); + } + + httpMethod_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The HTTP method to use for the request. The default is POST.
+     * The app's request handler for the task's target URL must be able to handle
+     * HTTP requests with this http_method, otherwise the task attempt will fail
+     * with error code 405 (Method Not Allowed). See
+     * [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+     * and the documentation for the request handlers in the language your app is
+     * written in e.g.
+     * [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass).
+     * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + */ + public Builder clearHttpMethod() { + + httpMethod_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.tasks.v2beta2.AppEngineRouting appEngineRouting_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AppEngineRouting, com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder, com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder> appEngineRoutingBuilder_; + /** + *
+     * Task-level setting for App Engine routing.
+     * If set,
+     * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+     * is used for all tasks in the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + public boolean hasAppEngineRouting() { + return appEngineRoutingBuilder_ != null || appEngineRouting_ != null; + } + /** + *
+     * Task-level setting for App Engine routing.
+     * If set,
+     * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+     * is used for all tasks in the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + public com.google.cloud.tasks.v2beta2.AppEngineRouting getAppEngineRouting() { + if (appEngineRoutingBuilder_ == null) { + return appEngineRouting_ == null ? com.google.cloud.tasks.v2beta2.AppEngineRouting.getDefaultInstance() : appEngineRouting_; + } else { + return appEngineRoutingBuilder_.getMessage(); + } + } + /** + *
+     * Task-level setting for App Engine routing.
+     * If set,
+     * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+     * is used for all tasks in the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + public Builder setAppEngineRouting(com.google.cloud.tasks.v2beta2.AppEngineRouting value) { + if (appEngineRoutingBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + appEngineRouting_ = value; + onChanged(); + } else { + appEngineRoutingBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Task-level setting for App Engine routing.
+     * If set,
+     * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+     * is used for all tasks in the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + public Builder setAppEngineRouting( + com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder builderForValue) { + if (appEngineRoutingBuilder_ == null) { + appEngineRouting_ = builderForValue.build(); + onChanged(); + } else { + appEngineRoutingBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Task-level setting for App Engine routing.
+     * If set,
+     * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+     * is used for all tasks in the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + public Builder mergeAppEngineRouting(com.google.cloud.tasks.v2beta2.AppEngineRouting value) { + if (appEngineRoutingBuilder_ == null) { + if (appEngineRouting_ != null) { + appEngineRouting_ = + com.google.cloud.tasks.v2beta2.AppEngineRouting.newBuilder(appEngineRouting_).mergeFrom(value).buildPartial(); + } else { + appEngineRouting_ = value; + } + onChanged(); + } else { + appEngineRoutingBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Task-level setting for App Engine routing.
+     * If set,
+     * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+     * is used for all tasks in the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + public Builder clearAppEngineRouting() { + if (appEngineRoutingBuilder_ == null) { + appEngineRouting_ = null; + onChanged(); + } else { + appEngineRouting_ = null; + appEngineRoutingBuilder_ = null; + } + + return this; + } + /** + *
+     * Task-level setting for App Engine routing.
+     * If set,
+     * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+     * is used for all tasks in the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + public com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder getAppEngineRoutingBuilder() { + + onChanged(); + return getAppEngineRoutingFieldBuilder().getBuilder(); + } + /** + *
+     * Task-level setting for App Engine routing.
+     * If set,
+     * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+     * is used for all tasks in the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + public com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder getAppEngineRoutingOrBuilder() { + if (appEngineRoutingBuilder_ != null) { + return appEngineRoutingBuilder_.getMessageOrBuilder(); + } else { + return appEngineRouting_ == null ? + com.google.cloud.tasks.v2beta2.AppEngineRouting.getDefaultInstance() : appEngineRouting_; + } + } + /** + *
+     * Task-level setting for App Engine routing.
+     * If set,
+     * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+     * is used for all tasks in the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AppEngineRouting, com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder, com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder> + getAppEngineRoutingFieldBuilder() { + if (appEngineRoutingBuilder_ == null) { + appEngineRoutingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AppEngineRouting, com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder, com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder>( + getAppEngineRouting(), + getParentForChildren(), + isClean()); + appEngineRouting_ = null; + } + return appEngineRoutingBuilder_; + } + + private java.lang.Object relativeUrl_ = ""; + /** + *
+     * The relative URL.
+     * The relative URL must begin with "/" and must be a valid HTTP relative URL.
+     * It can contain a path and query string arguments.
+     * If the relative URL is empty, then the root path "/" will be used.
+     * No spaces are allowed, and the maximum length allowed is 2083 characters.
+     * 
+ * + * string relative_url = 3; + */ + public java.lang.String getRelativeUrl() { + java.lang.Object ref = relativeUrl_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + relativeUrl_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The relative URL.
+     * The relative URL must begin with "/" and must be a valid HTTP relative URL.
+     * It can contain a path and query string arguments.
+     * If the relative URL is empty, then the root path "/" will be used.
+     * No spaces are allowed, and the maximum length allowed is 2083 characters.
+     * 
+ * + * string relative_url = 3; + */ + public com.google.protobuf.ByteString + getRelativeUrlBytes() { + java.lang.Object ref = relativeUrl_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + relativeUrl_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The relative URL.
+     * The relative URL must begin with "/" and must be a valid HTTP relative URL.
+     * It can contain a path and query string arguments.
+     * If the relative URL is empty, then the root path "/" will be used.
+     * No spaces are allowed, and the maximum length allowed is 2083 characters.
+     * 
+ * + * string relative_url = 3; + */ + public Builder setRelativeUrl( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + relativeUrl_ = value; + onChanged(); + return this; + } + /** + *
+     * The relative URL.
+     * The relative URL must begin with "/" and must be a valid HTTP relative URL.
+     * It can contain a path and query string arguments.
+     * If the relative URL is empty, then the root path "/" will be used.
+     * No spaces are allowed, and the maximum length allowed is 2083 characters.
+     * 
+ * + * string relative_url = 3; + */ + public Builder clearRelativeUrl() { + + relativeUrl_ = getDefaultInstance().getRelativeUrl(); + onChanged(); + return this; + } + /** + *
+     * The relative URL.
+     * The relative URL must begin with "/" and must be a valid HTTP relative URL.
+     * It can contain a path and query string arguments.
+     * If the relative URL is empty, then the root path "/" will be used.
+     * No spaces are allowed, and the maximum length allowed is 2083 characters.
+     * 
+ * + * string relative_url = 3; + */ + public Builder setRelativeUrlBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + relativeUrl_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, java.lang.String> headers_; + private com.google.protobuf.MapField + internalGetHeaders() { + if (headers_ == null) { + return com.google.protobuf.MapField.emptyMapField( + HeadersDefaultEntryHolder.defaultEntry); + } + return headers_; + } + private com.google.protobuf.MapField + internalGetMutableHeaders() { + onChanged();; + if (headers_ == null) { + headers_ = com.google.protobuf.MapField.newMapField( + HeadersDefaultEntryHolder.defaultEntry); + } + if (!headers_.isMutable()) { + headers_ = headers_.copy(); + } + return headers_; + } + + public int getHeadersCount() { + return internalGetHeaders().getMap().size(); + } + /** + *
+     * HTTP request headers.
+     * This map contains the header field names and values.
+     * Headers can be set when the
+     * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     * Repeated headers are not supported but a header value can contain commas.
+     * Cloud Tasks sets some headers to default values:
+     * * `User-Agent`: By default, this header is
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+     *   This header can be modified, but Cloud Tasks will append
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+     *   modified `User-Agent`.
+     * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+     * Tasks sets the following headers:
+     * * `Content-Type`: By default, the `Content-Type` header is set to
+     *   `"application/octet-stream"`. The default can be overridden by explicitly
+     *   setting `Content-Type` to a particular media type when the
+     *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     *   For example, `Content-Type` can be set to `"application/json"`.
+     * * `Content-Length`: This is computed by Cloud Tasks. This value is
+     *   output only.   It cannot be changed.
+     * The headers below cannot be set or overridden:
+     * * `Host`
+     * * `X-Google-*`
+     * * `X-AppEngine-*`
+     * In addition, Cloud Tasks sets some headers when the task is dispatched,
+     * such as headers containing information about the task; see
+     * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+     * These headers are set only when the task is dispatched, so they are not
+     * visible when the task is returned in a Cloud Tasks response.
+     * Although there is no specific limit for the maximum number of headers or
+     * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+     * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+     * 
+ * + * map<string, string> headers = 4; + */ + + public boolean containsHeaders( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + return internalGetHeaders().getMap().containsKey(key); + } + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Deprecated + public java.util.Map getHeaders() { + return getHeadersMap(); + } + /** + *
+     * HTTP request headers.
+     * This map contains the header field names and values.
+     * Headers can be set when the
+     * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     * Repeated headers are not supported but a header value can contain commas.
+     * Cloud Tasks sets some headers to default values:
+     * * `User-Agent`: By default, this header is
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+     *   This header can be modified, but Cloud Tasks will append
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+     *   modified `User-Agent`.
+     * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+     * Tasks sets the following headers:
+     * * `Content-Type`: By default, the `Content-Type` header is set to
+     *   `"application/octet-stream"`. The default can be overridden by explicitly
+     *   setting `Content-Type` to a particular media type when the
+     *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     *   For example, `Content-Type` can be set to `"application/json"`.
+     * * `Content-Length`: This is computed by Cloud Tasks. This value is
+     *   output only.   It cannot be changed.
+     * The headers below cannot be set or overridden:
+     * * `Host`
+     * * `X-Google-*`
+     * * `X-AppEngine-*`
+     * In addition, Cloud Tasks sets some headers when the task is dispatched,
+     * such as headers containing information about the task; see
+     * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+     * These headers are set only when the task is dispatched, so they are not
+     * visible when the task is returned in a Cloud Tasks response.
+     * Although there is no specific limit for the maximum number of headers or
+     * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+     * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+     * 
+ * + * map<string, string> headers = 4; + */ + + public java.util.Map getHeadersMap() { + return internalGetHeaders().getMap(); + } + /** + *
+     * HTTP request headers.
+     * This map contains the header field names and values.
+     * Headers can be set when the
+     * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     * Repeated headers are not supported but a header value can contain commas.
+     * Cloud Tasks sets some headers to default values:
+     * * `User-Agent`: By default, this header is
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+     *   This header can be modified, but Cloud Tasks will append
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+     *   modified `User-Agent`.
+     * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+     * Tasks sets the following headers:
+     * * `Content-Type`: By default, the `Content-Type` header is set to
+     *   `"application/octet-stream"`. The default can be overridden by explicitly
+     *   setting `Content-Type` to a particular media type when the
+     *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     *   For example, `Content-Type` can be set to `"application/json"`.
+     * * `Content-Length`: This is computed by Cloud Tasks. This value is
+     *   output only.   It cannot be changed.
+     * The headers below cannot be set or overridden:
+     * * `Host`
+     * * `X-Google-*`
+     * * `X-AppEngine-*`
+     * In addition, Cloud Tasks sets some headers when the task is dispatched,
+     * such as headers containing information about the task; see
+     * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+     * These headers are set only when the task is dispatched, so they are not
+     * visible when the task is returned in a Cloud Tasks response.
+     * Although there is no specific limit for the maximum number of headers or
+     * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+     * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+     * 
+ * + * map<string, string> headers = 4; + */ + + public java.lang.String getHeadersOrDefault( + java.lang.String key, + java.lang.String defaultValue) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetHeaders().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + *
+     * HTTP request headers.
+     * This map contains the header field names and values.
+     * Headers can be set when the
+     * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     * Repeated headers are not supported but a header value can contain commas.
+     * Cloud Tasks sets some headers to default values:
+     * * `User-Agent`: By default, this header is
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+     *   This header can be modified, but Cloud Tasks will append
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+     *   modified `User-Agent`.
+     * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+     * Tasks sets the following headers:
+     * * `Content-Type`: By default, the `Content-Type` header is set to
+     *   `"application/octet-stream"`. The default can be overridden by explicitly
+     *   setting `Content-Type` to a particular media type when the
+     *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     *   For example, `Content-Type` can be set to `"application/json"`.
+     * * `Content-Length`: This is computed by Cloud Tasks. This value is
+     *   output only.   It cannot be changed.
+     * The headers below cannot be set or overridden:
+     * * `Host`
+     * * `X-Google-*`
+     * * `X-AppEngine-*`
+     * In addition, Cloud Tasks sets some headers when the task is dispatched,
+     * such as headers containing information about the task; see
+     * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+     * These headers are set only when the task is dispatched, so they are not
+     * visible when the task is returned in a Cloud Tasks response.
+     * Although there is no specific limit for the maximum number of headers or
+     * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+     * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+     * 
+ * + * map<string, string> headers = 4; + */ + + public java.lang.String getHeadersOrThrow( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + java.util.Map map = + internalGetHeaders().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearHeaders() { + internalGetMutableHeaders().getMutableMap() + .clear(); + return this; + } + /** + *
+     * HTTP request headers.
+     * This map contains the header field names and values.
+     * Headers can be set when the
+     * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     * Repeated headers are not supported but a header value can contain commas.
+     * Cloud Tasks sets some headers to default values:
+     * * `User-Agent`: By default, this header is
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+     *   This header can be modified, but Cloud Tasks will append
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+     *   modified `User-Agent`.
+     * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+     * Tasks sets the following headers:
+     * * `Content-Type`: By default, the `Content-Type` header is set to
+     *   `"application/octet-stream"`. The default can be overridden by explicitly
+     *   setting `Content-Type` to a particular media type when the
+     *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     *   For example, `Content-Type` can be set to `"application/json"`.
+     * * `Content-Length`: This is computed by Cloud Tasks. This value is
+     *   output only.   It cannot be changed.
+     * The headers below cannot be set or overridden:
+     * * `Host`
+     * * `X-Google-*`
+     * * `X-AppEngine-*`
+     * In addition, Cloud Tasks sets some headers when the task is dispatched,
+     * such as headers containing information about the task; see
+     * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+     * These headers are set only when the task is dispatched, so they are not
+     * visible when the task is returned in a Cloud Tasks response.
+     * Although there is no specific limit for the maximum number of headers or
+     * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+     * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+     * 
+ * + * map<string, string> headers = 4; + */ + + public Builder removeHeaders( + java.lang.String key) { + if (key == null) { throw new java.lang.NullPointerException(); } + internalGetMutableHeaders().getMutableMap() + .remove(key); + return this; + } + /** + * Use alternate mutation accessors instead. + */ + @java.lang.Deprecated + public java.util.Map + getMutableHeaders() { + return internalGetMutableHeaders().getMutableMap(); + } + /** + *
+     * HTTP request headers.
+     * This map contains the header field names and values.
+     * Headers can be set when the
+     * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     * Repeated headers are not supported but a header value can contain commas.
+     * Cloud Tasks sets some headers to default values:
+     * * `User-Agent`: By default, this header is
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+     *   This header can be modified, but Cloud Tasks will append
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+     *   modified `User-Agent`.
+     * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+     * Tasks sets the following headers:
+     * * `Content-Type`: By default, the `Content-Type` header is set to
+     *   `"application/octet-stream"`. The default can be overridden by explicitly
+     *   setting `Content-Type` to a particular media type when the
+     *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     *   For example, `Content-Type` can be set to `"application/json"`.
+     * * `Content-Length`: This is computed by Cloud Tasks. This value is
+     *   output only.   It cannot be changed.
+     * The headers below cannot be set or overridden:
+     * * `Host`
+     * * `X-Google-*`
+     * * `X-AppEngine-*`
+     * In addition, Cloud Tasks sets some headers when the task is dispatched,
+     * such as headers containing information about the task; see
+     * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+     * These headers are set only when the task is dispatched, so they are not
+     * visible when the task is returned in a Cloud Tasks response.
+     * Although there is no specific limit for the maximum number of headers or
+     * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+     * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+     * 
+ * + * map<string, string> headers = 4; + */ + public Builder putHeaders( + java.lang.String key, + java.lang.String value) { + if (key == null) { throw new java.lang.NullPointerException(); } + if (value == null) { throw new java.lang.NullPointerException(); } + internalGetMutableHeaders().getMutableMap() + .put(key, value); + return this; + } + /** + *
+     * HTTP request headers.
+     * This map contains the header field names and values.
+     * Headers can be set when the
+     * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     * Repeated headers are not supported but a header value can contain commas.
+     * Cloud Tasks sets some headers to default values:
+     * * `User-Agent`: By default, this header is
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+     *   This header can be modified, but Cloud Tasks will append
+     *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+     *   modified `User-Agent`.
+     * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+     * Tasks sets the following headers:
+     * * `Content-Type`: By default, the `Content-Type` header is set to
+     *   `"application/octet-stream"`. The default can be overridden by explicitly
+     *   setting `Content-Type` to a particular media type when the
+     *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+     *   For example, `Content-Type` can be set to `"application/json"`.
+     * * `Content-Length`: This is computed by Cloud Tasks. This value is
+     *   output only.   It cannot be changed.
+     * The headers below cannot be set or overridden:
+     * * `Host`
+     * * `X-Google-*`
+     * * `X-AppEngine-*`
+     * In addition, Cloud Tasks sets some headers when the task is dispatched,
+     * such as headers containing information about the task; see
+     * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+     * These headers are set only when the task is dispatched, so they are not
+     * visible when the task is returned in a Cloud Tasks response.
+     * Although there is no specific limit for the maximum number of headers or
+     * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+     * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+     * 
+ * + * map<string, string> headers = 4; + */ + + public Builder putAllHeaders( + java.util.Map values) { + internalGetMutableHeaders().getMutableMap() + .putAll(values); + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * Payload.
+     * The payload will be sent as the HTTP message body. A message
+     * body, and thus a payload, is allowed only if the HTTP method is
+     * POST or PUT. It is an error to set a data payload on a task with
+     * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
+     * 
+ * + * bytes payload = 5; + */ + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + *
+     * Payload.
+     * The payload will be sent as the HTTP message body. A message
+     * body, and thus a payload, is allowed only if the HTTP method is
+     * POST or PUT. It is an error to set a data payload on a task with
+     * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
+     * 
+ * + * bytes payload = 5; + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + payload_ = value; + onChanged(); + return this; + } + /** + *
+     * Payload.
+     * The payload will be sent as the HTTP message body. A message
+     * body, and thus a payload, is allowed only if the HTTP method is
+     * POST or PUT. It is an error to set a data payload on a task with
+     * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
+     * 
+ * + * bytes payload = 5; + */ + public Builder clearPayload() { + + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.AppEngineHttpRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.AppEngineHttpRequest) + private static final com.google.cloud.tasks.v2beta2.AppEngineHttpRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.AppEngineHttpRequest(); + } + + public static com.google.cloud.tasks.v2beta2.AppEngineHttpRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public AppEngineHttpRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AppEngineHttpRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.AppEngineHttpRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequestOrBuilder.java new file mode 100644 index 000000000000..1b7664b739eb --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpRequestOrBuilder.java @@ -0,0 +1,325 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface AppEngineHttpRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.AppEngineHttpRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The HTTP method to use for the request. The default is POST.
+   * The app's request handler for the task's target URL must be able to handle
+   * HTTP requests with this http_method, otherwise the task attempt will fail
+   * with error code 405 (Method Not Allowed). See
+   * [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+   * and the documentation for the request handlers in the language your app is
+   * written in e.g.
+   * [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass).
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + */ + int getHttpMethodValue(); + /** + *
+   * The HTTP method to use for the request. The default is POST.
+   * The app's request handler for the task's target URL must be able to handle
+   * HTTP requests with this http_method, otherwise the task attempt will fail
+   * with error code 405 (Method Not Allowed). See
+   * [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
+   * and the documentation for the request handlers in the language your app is
+   * written in e.g.
+   * [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass).
+   * 
+ * + * .google.cloud.tasks.v2beta2.HttpMethod http_method = 1; + */ + com.google.cloud.tasks.v2beta2.HttpMethod getHttpMethod(); + + /** + *
+   * Task-level setting for App Engine routing.
+   * If set,
+   * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+   * is used for all tasks in the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + boolean hasAppEngineRouting(); + /** + *
+   * Task-level setting for App Engine routing.
+   * If set,
+   * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+   * is used for all tasks in the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + com.google.cloud.tasks.v2beta2.AppEngineRouting getAppEngineRouting(); + /** + *
+   * Task-level setting for App Engine routing.
+   * If set,
+   * [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
+   * is used for all tasks in the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing = 2; + */ + com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder getAppEngineRoutingOrBuilder(); + + /** + *
+   * The relative URL.
+   * The relative URL must begin with "/" and must be a valid HTTP relative URL.
+   * It can contain a path and query string arguments.
+   * If the relative URL is empty, then the root path "/" will be used.
+   * No spaces are allowed, and the maximum length allowed is 2083 characters.
+   * 
+ * + * string relative_url = 3; + */ + java.lang.String getRelativeUrl(); + /** + *
+   * The relative URL.
+   * The relative URL must begin with "/" and must be a valid HTTP relative URL.
+   * It can contain a path and query string arguments.
+   * If the relative URL is empty, then the root path "/" will be used.
+   * No spaces are allowed, and the maximum length allowed is 2083 characters.
+   * 
+ * + * string relative_url = 3; + */ + com.google.protobuf.ByteString + getRelativeUrlBytes(); + + /** + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   * Repeated headers are not supported but a header value can contain commas.
+   * Cloud Tasks sets some headers to default values:
+   * * `User-Agent`: By default, this header is
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+   *   This header can be modified, but Cloud Tasks will append
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+   *   modified `User-Agent`.
+   * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+   * Tasks sets the following headers:
+   * * `Content-Type`: By default, the `Content-Type` header is set to
+   *   `"application/octet-stream"`. The default can be overridden by explicitly
+   *   setting `Content-Type` to a particular media type when the
+   *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   *   For example, `Content-Type` can be set to `"application/json"`.
+   * * `Content-Length`: This is computed by Cloud Tasks. This value is
+   *   output only.   It cannot be changed.
+   * The headers below cannot be set or overridden:
+   * * `Host`
+   * * `X-Google-*`
+   * * `X-AppEngine-*`
+   * In addition, Cloud Tasks sets some headers when the task is dispatched,
+   * such as headers containing information about the task; see
+   * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+   * These headers are set only when the task is dispatched, so they are not
+   * visible when the task is returned in a Cloud Tasks response.
+   * Although there is no specific limit for the maximum number of headers or
+   * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+   * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+   * 
+ * + * map<string, string> headers = 4; + */ + int getHeadersCount(); + /** + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   * Repeated headers are not supported but a header value can contain commas.
+   * Cloud Tasks sets some headers to default values:
+   * * `User-Agent`: By default, this header is
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+   *   This header can be modified, but Cloud Tasks will append
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+   *   modified `User-Agent`.
+   * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+   * Tasks sets the following headers:
+   * * `Content-Type`: By default, the `Content-Type` header is set to
+   *   `"application/octet-stream"`. The default can be overridden by explicitly
+   *   setting `Content-Type` to a particular media type when the
+   *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   *   For example, `Content-Type` can be set to `"application/json"`.
+   * * `Content-Length`: This is computed by Cloud Tasks. This value is
+   *   output only.   It cannot be changed.
+   * The headers below cannot be set or overridden:
+   * * `Host`
+   * * `X-Google-*`
+   * * `X-AppEngine-*`
+   * In addition, Cloud Tasks sets some headers when the task is dispatched,
+   * such as headers containing information about the task; see
+   * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+   * These headers are set only when the task is dispatched, so they are not
+   * visible when the task is returned in a Cloud Tasks response.
+   * Although there is no specific limit for the maximum number of headers or
+   * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+   * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+   * 
+ * + * map<string, string> headers = 4; + */ + boolean containsHeaders( + java.lang.String key); + /** + * Use {@link #getHeadersMap()} instead. + */ + @java.lang.Deprecated + java.util.Map + getHeaders(); + /** + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   * Repeated headers are not supported but a header value can contain commas.
+   * Cloud Tasks sets some headers to default values:
+   * * `User-Agent`: By default, this header is
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+   *   This header can be modified, but Cloud Tasks will append
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+   *   modified `User-Agent`.
+   * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+   * Tasks sets the following headers:
+   * * `Content-Type`: By default, the `Content-Type` header is set to
+   *   `"application/octet-stream"`. The default can be overridden by explicitly
+   *   setting `Content-Type` to a particular media type when the
+   *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   *   For example, `Content-Type` can be set to `"application/json"`.
+   * * `Content-Length`: This is computed by Cloud Tasks. This value is
+   *   output only.   It cannot be changed.
+   * The headers below cannot be set or overridden:
+   * * `Host`
+   * * `X-Google-*`
+   * * `X-AppEngine-*`
+   * In addition, Cloud Tasks sets some headers when the task is dispatched,
+   * such as headers containing information about the task; see
+   * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+   * These headers are set only when the task is dispatched, so they are not
+   * visible when the task is returned in a Cloud Tasks response.
+   * Although there is no specific limit for the maximum number of headers or
+   * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+   * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+   * 
+ * + * map<string, string> headers = 4; + */ + java.util.Map + getHeadersMap(); + /** + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   * Repeated headers are not supported but a header value can contain commas.
+   * Cloud Tasks sets some headers to default values:
+   * * `User-Agent`: By default, this header is
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+   *   This header can be modified, but Cloud Tasks will append
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+   *   modified `User-Agent`.
+   * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+   * Tasks sets the following headers:
+   * * `Content-Type`: By default, the `Content-Type` header is set to
+   *   `"application/octet-stream"`. The default can be overridden by explicitly
+   *   setting `Content-Type` to a particular media type when the
+   *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   *   For example, `Content-Type` can be set to `"application/json"`.
+   * * `Content-Length`: This is computed by Cloud Tasks. This value is
+   *   output only.   It cannot be changed.
+   * The headers below cannot be set or overridden:
+   * * `Host`
+   * * `X-Google-*`
+   * * `X-AppEngine-*`
+   * In addition, Cloud Tasks sets some headers when the task is dispatched,
+   * such as headers containing information about the task; see
+   * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+   * These headers are set only when the task is dispatched, so they are not
+   * visible when the task is returned in a Cloud Tasks response.
+   * Although there is no specific limit for the maximum number of headers or
+   * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+   * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+   * 
+ * + * map<string, string> headers = 4; + */ + + java.lang.String getHeadersOrDefault( + java.lang.String key, + java.lang.String defaultValue); + /** + *
+   * HTTP request headers.
+   * This map contains the header field names and values.
+   * Headers can be set when the
+   * [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   * Repeated headers are not supported but a header value can contain commas.
+   * Cloud Tasks sets some headers to default values:
+   * * `User-Agent`: By default, this header is
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"`.
+   *   This header can be modified, but Cloud Tasks will append
+   *   `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
+   *   modified `User-Agent`.
+   * If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
+   * Tasks sets the following headers:
+   * * `Content-Type`: By default, the `Content-Type` header is set to
+   *   `"application/octet-stream"`. The default can be overridden by explicitly
+   *   setting `Content-Type` to a particular media type when the
+   *   [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask).
+   *   For example, `Content-Type` can be set to `"application/json"`.
+   * * `Content-Length`: This is computed by Cloud Tasks. This value is
+   *   output only.   It cannot be changed.
+   * The headers below cannot be set or overridden:
+   * * `Host`
+   * * `X-Google-*`
+   * * `X-AppEngine-*`
+   * In addition, Cloud Tasks sets some headers when the task is dispatched,
+   * such as headers containing information about the task; see
+   * [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+   * These headers are set only when the task is dispatched, so they are not
+   * visible when the task is returned in a Cloud Tasks response.
+   * Although there is no specific limit for the maximum number of headers or
+   * the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
+   * information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
+   * 
+ * + * map<string, string> headers = 4; + */ + + java.lang.String getHeadersOrThrow( + java.lang.String key); + + /** + *
+   * Payload.
+   * The payload will be sent as the HTTP message body. A message
+   * body, and thus a payload, is allowed only if the HTTP method is
+   * POST or PUT. It is an error to set a data payload on a task with
+   * an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
+   * 
+ * + * bytes payload = 5; + */ + com.google.protobuf.ByteString getPayload(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpTarget.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpTarget.java new file mode 100644 index 000000000000..5d75d50c8078 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpTarget.java @@ -0,0 +1,692 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * App Engine HTTP target.
+ * The task will be delivered to the App Engine application hostname
+ * specified by its [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest].
+ * The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] explains how the
+ * task's host URL is constructed.
+ * Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] requires
+ * [`appengine.applications.get`](/appengine/docs/admin-api/access-control)
+ * Google IAM permission for the project
+ * and the following scope:
+ * `https://www.googleapis.com/auth/cloud-platform`
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.AppEngineHttpTarget} + */ +public final class AppEngineHttpTarget extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.AppEngineHttpTarget) + AppEngineHttpTargetOrBuilder { +private static final long serialVersionUID = 0L; + // Use AppEngineHttpTarget.newBuilder() to construct. + private AppEngineHttpTarget(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AppEngineHttpTarget() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AppEngineHttpTarget( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder subBuilder = null; + if (appEngineRoutingOverride_ != null) { + subBuilder = appEngineRoutingOverride_.toBuilder(); + } + appEngineRoutingOverride_ = input.readMessage(com.google.cloud.tasks.v2beta2.AppEngineRouting.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(appEngineRoutingOverride_); + appEngineRoutingOverride_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineHttpTarget_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineHttpTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.class, com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.Builder.class); + } + + public static final int APP_ENGINE_ROUTING_OVERRIDE_FIELD_NUMBER = 1; + private com.google.cloud.tasks.v2beta2.AppEngineRouting appEngineRoutingOverride_; + /** + *
+   * Overrides for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * If set, `app_engine_routing_override` is used for all tasks in
+   * the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + public boolean hasAppEngineRoutingOverride() { + return appEngineRoutingOverride_ != null; + } + /** + *
+   * Overrides for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * If set, `app_engine_routing_override` is used for all tasks in
+   * the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + public com.google.cloud.tasks.v2beta2.AppEngineRouting getAppEngineRoutingOverride() { + return appEngineRoutingOverride_ == null ? com.google.cloud.tasks.v2beta2.AppEngineRouting.getDefaultInstance() : appEngineRoutingOverride_; + } + /** + *
+   * Overrides for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * If set, `app_engine_routing_override` is used for all tasks in
+   * the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + public com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder getAppEngineRoutingOverrideOrBuilder() { + return getAppEngineRoutingOverride(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (appEngineRoutingOverride_ != null) { + output.writeMessage(1, getAppEngineRoutingOverride()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (appEngineRoutingOverride_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getAppEngineRoutingOverride()); + } + size += unknownFields.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.tasks.v2beta2.AppEngineHttpTarget)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.AppEngineHttpTarget other = (com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) obj; + + boolean result = true; + result = result && (hasAppEngineRoutingOverride() == other.hasAppEngineRoutingOverride()); + if (hasAppEngineRoutingOverride()) { + result = result && getAppEngineRoutingOverride() + .equals(other.getAppEngineRoutingOverride()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasAppEngineRoutingOverride()) { + hash = (37 * hash) + APP_ENGINE_ROUTING_OVERRIDE_FIELD_NUMBER; + hash = (53 * hash) + getAppEngineRoutingOverride().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.AppEngineHttpTarget parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpTarget 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.tasks.v2beta2.AppEngineHttpTarget parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpTarget 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.tasks.v2beta2.AppEngineHttpTarget parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpTarget parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpTarget parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpTarget 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.tasks.v2beta2.AppEngineHttpTarget parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpTarget 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.tasks.v2beta2.AppEngineHttpTarget parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AppEngineHttpTarget parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.AppEngineHttpTarget prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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; + } + /** + *
+   * App Engine HTTP target.
+   * The task will be delivered to the App Engine application hostname
+   * specified by its [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest].
+   * The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] explains how the
+   * task's host URL is constructed.
+   * Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] requires
+   * [`appengine.applications.get`](/appengine/docs/admin-api/access-control)
+   * Google IAM permission for the project
+   * and the following scope:
+   * `https://www.googleapis.com/auth/cloud-platform`
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.AppEngineHttpTarget} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.AppEngineHttpTarget) + com.google.cloud.tasks.v2beta2.AppEngineHttpTargetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineHttpTarget_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineHttpTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.class, com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (appEngineRoutingOverrideBuilder_ == null) { + appEngineRoutingOverride_ = null; + } else { + appEngineRoutingOverride_ = null; + appEngineRoutingOverrideBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineHttpTarget_descriptor; + } + + public com.google.cloud.tasks.v2beta2.AppEngineHttpTarget getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.AppEngineHttpTarget build() { + com.google.cloud.tasks.v2beta2.AppEngineHttpTarget result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.AppEngineHttpTarget buildPartial() { + com.google.cloud.tasks.v2beta2.AppEngineHttpTarget result = new com.google.cloud.tasks.v2beta2.AppEngineHttpTarget(this); + if (appEngineRoutingOverrideBuilder_ == null) { + result.appEngineRoutingOverride_ = appEngineRoutingOverride_; + } else { + result.appEngineRoutingOverride_ = appEngineRoutingOverrideBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) { + return mergeFrom((com.google.cloud.tasks.v2beta2.AppEngineHttpTarget)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.AppEngineHttpTarget other) { + if (other == com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.getDefaultInstance()) return this; + if (other.hasAppEngineRoutingOverride()) { + mergeAppEngineRoutingOverride(other.getAppEngineRoutingOverride()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.AppEngineHttpTarget parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.tasks.v2beta2.AppEngineRouting appEngineRoutingOverride_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AppEngineRouting, com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder, com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder> appEngineRoutingOverrideBuilder_; + /** + *
+     * Overrides for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * If set, `app_engine_routing_override` is used for all tasks in
+     * the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + public boolean hasAppEngineRoutingOverride() { + return appEngineRoutingOverrideBuilder_ != null || appEngineRoutingOverride_ != null; + } + /** + *
+     * Overrides for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * If set, `app_engine_routing_override` is used for all tasks in
+     * the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + public com.google.cloud.tasks.v2beta2.AppEngineRouting getAppEngineRoutingOverride() { + if (appEngineRoutingOverrideBuilder_ == null) { + return appEngineRoutingOverride_ == null ? com.google.cloud.tasks.v2beta2.AppEngineRouting.getDefaultInstance() : appEngineRoutingOverride_; + } else { + return appEngineRoutingOverrideBuilder_.getMessage(); + } + } + /** + *
+     * Overrides for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * If set, `app_engine_routing_override` is used for all tasks in
+     * the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + public Builder setAppEngineRoutingOverride(com.google.cloud.tasks.v2beta2.AppEngineRouting value) { + if (appEngineRoutingOverrideBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + appEngineRoutingOverride_ = value; + onChanged(); + } else { + appEngineRoutingOverrideBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Overrides for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * If set, `app_engine_routing_override` is used for all tasks in
+     * the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + public Builder setAppEngineRoutingOverride( + com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder builderForValue) { + if (appEngineRoutingOverrideBuilder_ == null) { + appEngineRoutingOverride_ = builderForValue.build(); + onChanged(); + } else { + appEngineRoutingOverrideBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Overrides for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * If set, `app_engine_routing_override` is used for all tasks in
+     * the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + public Builder mergeAppEngineRoutingOverride(com.google.cloud.tasks.v2beta2.AppEngineRouting value) { + if (appEngineRoutingOverrideBuilder_ == null) { + if (appEngineRoutingOverride_ != null) { + appEngineRoutingOverride_ = + com.google.cloud.tasks.v2beta2.AppEngineRouting.newBuilder(appEngineRoutingOverride_).mergeFrom(value).buildPartial(); + } else { + appEngineRoutingOverride_ = value; + } + onChanged(); + } else { + appEngineRoutingOverrideBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Overrides for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * If set, `app_engine_routing_override` is used for all tasks in
+     * the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + public Builder clearAppEngineRoutingOverride() { + if (appEngineRoutingOverrideBuilder_ == null) { + appEngineRoutingOverride_ = null; + onChanged(); + } else { + appEngineRoutingOverride_ = null; + appEngineRoutingOverrideBuilder_ = null; + } + + return this; + } + /** + *
+     * Overrides for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * If set, `app_engine_routing_override` is used for all tasks in
+     * the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + public com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder getAppEngineRoutingOverrideBuilder() { + + onChanged(); + return getAppEngineRoutingOverrideFieldBuilder().getBuilder(); + } + /** + *
+     * Overrides for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * If set, `app_engine_routing_override` is used for all tasks in
+     * the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + public com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder getAppEngineRoutingOverrideOrBuilder() { + if (appEngineRoutingOverrideBuilder_ != null) { + return appEngineRoutingOverrideBuilder_.getMessageOrBuilder(); + } else { + return appEngineRoutingOverride_ == null ? + com.google.cloud.tasks.v2beta2.AppEngineRouting.getDefaultInstance() : appEngineRoutingOverride_; + } + } + /** + *
+     * Overrides for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * If set, `app_engine_routing_override` is used for all tasks in
+     * the queue, no matter what the setting is for the
+     * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AppEngineRouting, com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder, com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder> + getAppEngineRoutingOverrideFieldBuilder() { + if (appEngineRoutingOverrideBuilder_ == null) { + appEngineRoutingOverrideBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AppEngineRouting, com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder, com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder>( + getAppEngineRoutingOverride(), + getParentForChildren(), + isClean()); + appEngineRoutingOverride_ = null; + } + return appEngineRoutingOverrideBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.AppEngineHttpTarget) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.AppEngineHttpTarget) + private static final com.google.cloud.tasks.v2beta2.AppEngineHttpTarget DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.AppEngineHttpTarget(); + } + + public static com.google.cloud.tasks.v2beta2.AppEngineHttpTarget getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public AppEngineHttpTarget parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AppEngineHttpTarget(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.AppEngineHttpTarget getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpTargetOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpTargetOrBuilder.java new file mode 100644 index 000000000000..197da53d4c28 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineHttpTargetOrBuilder.java @@ -0,0 +1,46 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface AppEngineHttpTargetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.AppEngineHttpTarget) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Overrides for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * If set, `app_engine_routing_override` is used for all tasks in
+   * the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + boolean hasAppEngineRoutingOverride(); + /** + *
+   * Overrides for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * If set, `app_engine_routing_override` is used for all tasks in
+   * the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + com.google.cloud.tasks.v2beta2.AppEngineRouting getAppEngineRoutingOverride(); + /** + *
+   * Overrides for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * If set, `app_engine_routing_override` is used for all tasks in
+   * the queue, no matter what the setting is for the
+   * [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineRouting app_engine_routing_override = 1; + */ + com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder getAppEngineRoutingOverrideOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineRouting.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineRouting.java new file mode 100644 index 000000000000..9549b7b68a27 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineRouting.java @@ -0,0 +1,1559 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * App Engine Routing.
+ * For more information about services, versions, and instances see
+ * [An Overview of App Engine](/appengine/docs/python/an-overview-of-app-engine),
+ * [Microservices Architecture on Google App Engine](/appengine/docs/python/microservices-on-app-engine),
+ * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed),
+ * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.AppEngineRouting} + */ +public final class AppEngineRouting extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.AppEngineRouting) + AppEngineRoutingOrBuilder { +private static final long serialVersionUID = 0L; + // Use AppEngineRouting.newBuilder() to construct. + private AppEngineRouting(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AppEngineRouting() { + service_ = ""; + version_ = ""; + instance_ = ""; + host_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AppEngineRouting( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + service_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + version_ = s; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + instance_ = s; + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + host_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.AppEngineRouting.class, com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + private volatile java.lang.Object service_; + /** + *
+   * App service.
+   * By default, the task is sent to the service which is the default
+   * service when the task is attempted.
+   * For some queues or tasks which were created using the App Engine
+   * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+   * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+   * which were created using the App Engine SDK use a custom domain
+   * name; custom domains are not parsed by Cloud Tasks. If
+   * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+   * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+   * 
+ * + * string service = 1; + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + 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(); + service_ = s; + return s; + } + } + /** + *
+   * App service.
+   * By default, the task is sent to the service which is the default
+   * service when the task is attempted.
+   * For some queues or tasks which were created using the App Engine
+   * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+   * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+   * which were created using the App Engine SDK use a custom domain
+   * name; custom domains are not parsed by Cloud Tasks. If
+   * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+   * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+   * 
+ * + * string service = 1; + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VERSION_FIELD_NUMBER = 2; + private volatile java.lang.Object version_; + /** + *
+   * App version.
+   * By default, the task is sent to the version which is the default
+   * version when the task is attempted.
+   * For some queues or tasks which were created using the App Engine
+   * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+   * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+   * which were created using the App Engine SDK use a custom domain
+   * name; custom domains are not parsed by Cloud Tasks. If
+   * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+   * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+   * 
+ * + * string version = 2; + */ + 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; + } + } + /** + *
+   * App version.
+   * By default, the task is sent to the version which is the default
+   * version when the task is attempted.
+   * For some queues or tasks which were created using the App Engine
+   * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+   * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+   * which were created using the App Engine SDK use a custom domain
+   * name; custom domains are not parsed by Cloud Tasks. If
+   * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+   * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+   * 
+ * + * string version = 2; + */ + 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; + } + } + + public static final int INSTANCE_FIELD_NUMBER = 3; + private volatile java.lang.Object instance_; + /** + *
+   * App instance.
+   * By default, the task is sent to an instance which is available when
+   * the task is attempted.
+   * Requests can only be sent to a specific instance if
+   * [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+   * App Engine Flex does not support instances. For more information, see
+   * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed)
+   * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).
+   * 
+ * + * string instance = 3; + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + 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(); + instance_ = s; + return s; + } + } + /** + *
+   * App instance.
+   * By default, the task is sent to an instance which is available when
+   * the task is attempted.
+   * Requests can only be sent to a specific instance if
+   * [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+   * App Engine Flex does not support instances. For more information, see
+   * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed)
+   * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).
+   * 
+ * + * string instance = 3; + */ + public com.google.protobuf.ByteString + getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HOST_FIELD_NUMBER = 4; + private volatile java.lang.Object host_; + /** + *
+   * Output only. The host that the task is sent to.
+   * For more information, see
+   * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).
+   * The host is constructed as:
+   * * `host = [application_domain_name]`</br>
+   *   `| [service] + '.' + [application_domain_name]`</br>
+   *   `| [version] + '.' + [application_domain_name]`</br>
+   *   `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+   *   `| [instance] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+   * * `application_domain_name` = The domain name of the app, for
+   *   example <app-id>.appspot.com, which is associated with the
+   *   queue's project ID. Some tasks which were created using the App Engine
+   *   SDK use a custom domain name.
+   * * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+   * * `version_dot_service =`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]
+   * * `instance_dot_service =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `instance_dot_version =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+   * * `instance_dot_version_dot_service =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent
+   * to the service which is the default service when the task is attempted.
+   * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent
+   * to the version which is the default version when the task is attempted.
+   * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task
+   * will be sent to an instance which is available when the task is
+   * attempted.
+   * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task
+   * will be sent to the default version of the default service when
+   * the task is attempted.
+   * 
+ * + * string host = 4; + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + 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(); + host_ = s; + return s; + } + } + /** + *
+   * Output only. The host that the task is sent to.
+   * For more information, see
+   * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).
+   * The host is constructed as:
+   * * `host = [application_domain_name]`</br>
+   *   `| [service] + '.' + [application_domain_name]`</br>
+   *   `| [version] + '.' + [application_domain_name]`</br>
+   *   `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+   *   `| [instance] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+   * * `application_domain_name` = The domain name of the app, for
+   *   example <app-id>.appspot.com, which is associated with the
+   *   queue's project ID. Some tasks which were created using the App Engine
+   *   SDK use a custom domain name.
+   * * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+   * * `version_dot_service =`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]
+   * * `instance_dot_service =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `instance_dot_version =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+   * * `instance_dot_version_dot_service =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent
+   * to the service which is the default service when the task is attempted.
+   * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent
+   * to the version which is the default version when the task is attempted.
+   * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task
+   * will be sent to an instance which is available when the task is
+   * attempted.
+   * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task
+   * will be sent to the default version of the default service when
+   * the task is attempted.
+   * 
+ * + * string host = 4; + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getServiceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, service_); + } + if (!getVersionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_); + } + if (!getInstanceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instance_); + } + if (!getHostBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, host_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, service_); + } + if (!getVersionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, version_); + } + if (!getInstanceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instance_); + } + if (!getHostBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, host_); + } + size += unknownFields.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.tasks.v2beta2.AppEngineRouting)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.AppEngineRouting other = (com.google.cloud.tasks.v2beta2.AppEngineRouting) obj; + + boolean result = true; + result = result && getService() + .equals(other.getService()); + result = result && getVersion() + .equals(other.getVersion()); + result = result && getInstance() + .equals(other.getInstance()); + result = result && getHost() + .equals(other.getHost()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + hash = (37 * hash) + VERSION_FIELD_NUMBER; + hash = (53 * hash) + getVersion().hashCode(); + hash = (37 * hash) + INSTANCE_FIELD_NUMBER; + hash = (53 * hash) + getInstance().hashCode(); + hash = (37 * hash) + HOST_FIELD_NUMBER; + hash = (53 * hash) + getHost().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.AppEngineRouting parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AppEngineRouting 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.tasks.v2beta2.AppEngineRouting parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AppEngineRouting 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.tasks.v2beta2.AppEngineRouting parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AppEngineRouting parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.AppEngineRouting parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AppEngineRouting 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.tasks.v2beta2.AppEngineRouting parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AppEngineRouting 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.tasks.v2beta2.AppEngineRouting parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AppEngineRouting parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.AppEngineRouting prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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; + } + /** + *
+   * App Engine Routing.
+   * For more information about services, versions, and instances see
+   * [An Overview of App Engine](/appengine/docs/python/an-overview-of-app-engine),
+   * [Microservices Architecture on Google App Engine](/appengine/docs/python/microservices-on-app-engine),
+   * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed),
+   * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.AppEngineRouting} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.AppEngineRouting) + com.google.cloud.tasks.v2beta2.AppEngineRoutingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.AppEngineRouting.class, com.google.cloud.tasks.v2beta2.AppEngineRouting.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.AppEngineRouting.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + service_ = ""; + + version_ = ""; + + instance_ = ""; + + host_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_descriptor; + } + + public com.google.cloud.tasks.v2beta2.AppEngineRouting getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.AppEngineRouting.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.AppEngineRouting build() { + com.google.cloud.tasks.v2beta2.AppEngineRouting result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.AppEngineRouting buildPartial() { + com.google.cloud.tasks.v2beta2.AppEngineRouting result = new com.google.cloud.tasks.v2beta2.AppEngineRouting(this); + result.service_ = service_; + result.version_ = version_; + result.instance_ = instance_; + result.host_ = host_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.AppEngineRouting) { + return mergeFrom((com.google.cloud.tasks.v2beta2.AppEngineRouting)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.AppEngineRouting other) { + if (other == com.google.cloud.tasks.v2beta2.AppEngineRouting.getDefaultInstance()) return this; + if (!other.getService().isEmpty()) { + service_ = other.service_; + onChanged(); + } + if (!other.getVersion().isEmpty()) { + version_ = other.version_; + onChanged(); + } + if (!other.getInstance().isEmpty()) { + instance_ = other.instance_; + onChanged(); + } + if (!other.getHost().isEmpty()) { + host_ = other.host_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.AppEngineRouting parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.AppEngineRouting) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object service_ = ""; + /** + *
+     * App service.
+     * By default, the task is sent to the service which is the default
+     * service when the task is attempted.
+     * For some queues or tasks which were created using the App Engine
+     * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+     * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+     * which were created using the App Engine SDK use a custom domain
+     * name; custom domains are not parsed by Cloud Tasks. If
+     * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+     * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+     * 
+ * + * string service = 1; + */ + public java.lang.String getService() { + java.lang.Object ref = service_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + service_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * App service.
+     * By default, the task is sent to the service which is the default
+     * service when the task is attempted.
+     * For some queues or tasks which were created using the App Engine
+     * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+     * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+     * which were created using the App Engine SDK use a custom domain
+     * name; custom domains are not parsed by Cloud Tasks. If
+     * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+     * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+     * 
+ * + * string service = 1; + */ + public com.google.protobuf.ByteString + getServiceBytes() { + java.lang.Object ref = service_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + service_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * App service.
+     * By default, the task is sent to the service which is the default
+     * service when the task is attempted.
+     * For some queues or tasks which were created using the App Engine
+     * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+     * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+     * which were created using the App Engine SDK use a custom domain
+     * name; custom domains are not parsed by Cloud Tasks. If
+     * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+     * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+     * 
+ * + * string service = 1; + */ + public Builder setService( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + service_ = value; + onChanged(); + return this; + } + /** + *
+     * App service.
+     * By default, the task is sent to the service which is the default
+     * service when the task is attempted.
+     * For some queues or tasks which were created using the App Engine
+     * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+     * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+     * which were created using the App Engine SDK use a custom domain
+     * name; custom domains are not parsed by Cloud Tasks. If
+     * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+     * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+     * 
+ * + * string service = 1; + */ + public Builder clearService() { + + service_ = getDefaultInstance().getService(); + onChanged(); + return this; + } + /** + *
+     * App service.
+     * By default, the task is sent to the service which is the default
+     * service when the task is attempted.
+     * For some queues or tasks which were created using the App Engine
+     * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+     * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+     * which were created using the App Engine SDK use a custom domain
+     * name; custom domains are not parsed by Cloud Tasks. If
+     * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+     * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+     * 
+ * + * string service = 1; + */ + public Builder setServiceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + service_ = value; + onChanged(); + return this; + } + + private java.lang.Object version_ = ""; + /** + *
+     * App version.
+     * By default, the task is sent to the version which is the default
+     * version when the task is attempted.
+     * For some queues or tasks which were created using the App Engine
+     * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+     * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+     * which were created using the App Engine SDK use a custom domain
+     * name; custom domains are not parsed by Cloud Tasks. If
+     * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+     * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+     * 
+ * + * string version = 2; + */ + 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; + } + } + /** + *
+     * App version.
+     * By default, the task is sent to the version which is the default
+     * version when the task is attempted.
+     * For some queues or tasks which were created using the App Engine
+     * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+     * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+     * which were created using the App Engine SDK use a custom domain
+     * name; custom domains are not parsed by Cloud Tasks. If
+     * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+     * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+     * 
+ * + * string version = 2; + */ + 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; + } + } + /** + *
+     * App version.
+     * By default, the task is sent to the version which is the default
+     * version when the task is attempted.
+     * For some queues or tasks which were created using the App Engine
+     * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+     * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+     * which were created using the App Engine SDK use a custom domain
+     * name; custom domains are not parsed by Cloud Tasks. If
+     * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+     * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+     * 
+ * + * string version = 2; + */ + public Builder setVersion( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + version_ = value; + onChanged(); + return this; + } + /** + *
+     * App version.
+     * By default, the task is sent to the version which is the default
+     * version when the task is attempted.
+     * For some queues or tasks which were created using the App Engine
+     * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+     * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+     * which were created using the App Engine SDK use a custom domain
+     * name; custom domains are not parsed by Cloud Tasks. If
+     * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+     * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+     * 
+ * + * string version = 2; + */ + public Builder clearVersion() { + + version_ = getDefaultInstance().getVersion(); + onChanged(); + return this; + } + /** + *
+     * App version.
+     * By default, the task is sent to the version which is the default
+     * version when the task is attempted.
+     * For some queues or tasks which were created using the App Engine
+     * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+     * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+     * which were created using the App Engine SDK use a custom domain
+     * name; custom domains are not parsed by Cloud Tasks. If
+     * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+     * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+     * 
+ * + * string version = 2; + */ + public Builder setVersionBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + version_ = value; + onChanged(); + return this; + } + + private java.lang.Object instance_ = ""; + /** + *
+     * App instance.
+     * By default, the task is sent to an instance which is available when
+     * the task is attempted.
+     * Requests can only be sent to a specific instance if
+     * [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+     * App Engine Flex does not support instances. For more information, see
+     * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed)
+     * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).
+     * 
+ * + * string instance = 3; + */ + public java.lang.String getInstance() { + java.lang.Object ref = instance_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + instance_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * App instance.
+     * By default, the task is sent to an instance which is available when
+     * the task is attempted.
+     * Requests can only be sent to a specific instance if
+     * [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+     * App Engine Flex does not support instances. For more information, see
+     * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed)
+     * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).
+     * 
+ * + * string instance = 3; + */ + public com.google.protobuf.ByteString + getInstanceBytes() { + java.lang.Object ref = instance_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + instance_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * App instance.
+     * By default, the task is sent to an instance which is available when
+     * the task is attempted.
+     * Requests can only be sent to a specific instance if
+     * [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+     * App Engine Flex does not support instances. For more information, see
+     * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed)
+     * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).
+     * 
+ * + * string instance = 3; + */ + public Builder setInstance( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + instance_ = value; + onChanged(); + return this; + } + /** + *
+     * App instance.
+     * By default, the task is sent to an instance which is available when
+     * the task is attempted.
+     * Requests can only be sent to a specific instance if
+     * [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+     * App Engine Flex does not support instances. For more information, see
+     * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed)
+     * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).
+     * 
+ * + * string instance = 3; + */ + public Builder clearInstance() { + + instance_ = getDefaultInstance().getInstance(); + onChanged(); + return this; + } + /** + *
+     * App instance.
+     * By default, the task is sent to an instance which is available when
+     * the task is attempted.
+     * Requests can only be sent to a specific instance if
+     * [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+     * App Engine Flex does not support instances. For more information, see
+     * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed)
+     * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).
+     * 
+ * + * string instance = 3; + */ + public Builder setInstanceBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + instance_ = value; + onChanged(); + return this; + } + + private java.lang.Object host_ = ""; + /** + *
+     * Output only. The host that the task is sent to.
+     * For more information, see
+     * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).
+     * The host is constructed as:
+     * * `host = [application_domain_name]`</br>
+     *   `| [service] + '.' + [application_domain_name]`</br>
+     *   `| [version] + '.' + [application_domain_name]`</br>
+     *   `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+     *   `| [instance] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+     * * `application_domain_name` = The domain name of the app, for
+     *   example <app-id>.appspot.com, which is associated with the
+     *   queue's project ID. Some tasks which were created using the App Engine
+     *   SDK use a custom domain name.
+     * * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+     * * `version_dot_service =`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]
+     * * `instance_dot_service =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `instance_dot_version =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+     * * `instance_dot_version_dot_service =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent
+     * to the service which is the default service when the task is attempted.
+     * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent
+     * to the version which is the default version when the task is attempted.
+     * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task
+     * will be sent to an instance which is available when the task is
+     * attempted.
+     * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task
+     * will be sent to the default version of the default service when
+     * the task is attempted.
+     * 
+ * + * string host = 4; + */ + public java.lang.String getHost() { + java.lang.Object ref = host_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + host_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * Output only. The host that the task is sent to.
+     * For more information, see
+     * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).
+     * The host is constructed as:
+     * * `host = [application_domain_name]`</br>
+     *   `| [service] + '.' + [application_domain_name]`</br>
+     *   `| [version] + '.' + [application_domain_name]`</br>
+     *   `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+     *   `| [instance] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+     * * `application_domain_name` = The domain name of the app, for
+     *   example <app-id>.appspot.com, which is associated with the
+     *   queue's project ID. Some tasks which were created using the App Engine
+     *   SDK use a custom domain name.
+     * * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+     * * `version_dot_service =`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]
+     * * `instance_dot_service =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `instance_dot_version =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+     * * `instance_dot_version_dot_service =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent
+     * to the service which is the default service when the task is attempted.
+     * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent
+     * to the version which is the default version when the task is attempted.
+     * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task
+     * will be sent to an instance which is available when the task is
+     * attempted.
+     * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task
+     * will be sent to the default version of the default service when
+     * the task is attempted.
+     * 
+ * + * string host = 4; + */ + public com.google.protobuf.ByteString + getHostBytes() { + java.lang.Object ref = host_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + host_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * Output only. The host that the task is sent to.
+     * For more information, see
+     * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).
+     * The host is constructed as:
+     * * `host = [application_domain_name]`</br>
+     *   `| [service] + '.' + [application_domain_name]`</br>
+     *   `| [version] + '.' + [application_domain_name]`</br>
+     *   `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+     *   `| [instance] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+     * * `application_domain_name` = The domain name of the app, for
+     *   example <app-id>.appspot.com, which is associated with the
+     *   queue's project ID. Some tasks which were created using the App Engine
+     *   SDK use a custom domain name.
+     * * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+     * * `version_dot_service =`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]
+     * * `instance_dot_service =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `instance_dot_version =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+     * * `instance_dot_version_dot_service =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent
+     * to the service which is the default service when the task is attempted.
+     * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent
+     * to the version which is the default version when the task is attempted.
+     * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task
+     * will be sent to an instance which is available when the task is
+     * attempted.
+     * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task
+     * will be sent to the default version of the default service when
+     * the task is attempted.
+     * 
+ * + * string host = 4; + */ + public Builder setHost( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + host_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The host that the task is sent to.
+     * For more information, see
+     * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).
+     * The host is constructed as:
+     * * `host = [application_domain_name]`</br>
+     *   `| [service] + '.' + [application_domain_name]`</br>
+     *   `| [version] + '.' + [application_domain_name]`</br>
+     *   `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+     *   `| [instance] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+     * * `application_domain_name` = The domain name of the app, for
+     *   example <app-id>.appspot.com, which is associated with the
+     *   queue's project ID. Some tasks which were created using the App Engine
+     *   SDK use a custom domain name.
+     * * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+     * * `version_dot_service =`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]
+     * * `instance_dot_service =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `instance_dot_version =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+     * * `instance_dot_version_dot_service =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent
+     * to the service which is the default service when the task is attempted.
+     * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent
+     * to the version which is the default version when the task is attempted.
+     * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task
+     * will be sent to an instance which is available when the task is
+     * attempted.
+     * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task
+     * will be sent to the default version of the default service when
+     * the task is attempted.
+     * 
+ * + * string host = 4; + */ + public Builder clearHost() { + + host_ = getDefaultInstance().getHost(); + onChanged(); + return this; + } + /** + *
+     * Output only. The host that the task is sent to.
+     * For more information, see
+     * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).
+     * The host is constructed as:
+     * * `host = [application_domain_name]`</br>
+     *   `| [service] + '.' + [application_domain_name]`</br>
+     *   `| [version] + '.' + [application_domain_name]`</br>
+     *   `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+     *   `| [instance] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+     *   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+     * * `application_domain_name` = The domain name of the app, for
+     *   example <app-id>.appspot.com, which is associated with the
+     *   queue's project ID. Some tasks which were created using the App Engine
+     *   SDK use a custom domain name.
+     * * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+     * * `version_dot_service =`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]
+     * * `instance_dot_service =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * * `instance_dot_version =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+     * * `instance_dot_version_dot_service =`
+     *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+     *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+     *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+     * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent
+     * to the service which is the default service when the task is attempted.
+     * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent
+     * to the version which is the default version when the task is attempted.
+     * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task
+     * will be sent to an instance which is available when the task is
+     * attempted.
+     * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+     * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or
+     * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task
+     * will be sent to the default version of the default service when
+     * the task is attempted.
+     * 
+ * + * string host = 4; + */ + public Builder setHostBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + host_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.AppEngineRouting) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.AppEngineRouting) + private static final com.google.cloud.tasks.v2beta2.AppEngineRouting DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.AppEngineRouting(); + } + + public static com.google.cloud.tasks.v2beta2.AppEngineRouting getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public AppEngineRouting parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AppEngineRouting(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.AppEngineRouting getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineRoutingOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineRoutingOrBuilder.java new file mode 100644 index 000000000000..39c77ce8ea78 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AppEngineRoutingOrBuilder.java @@ -0,0 +1,233 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface AppEngineRoutingOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.AppEngineRouting) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * App service.
+   * By default, the task is sent to the service which is the default
+   * service when the task is attempted.
+   * For some queues or tasks which were created using the App Engine
+   * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+   * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+   * which were created using the App Engine SDK use a custom domain
+   * name; custom domains are not parsed by Cloud Tasks. If
+   * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+   * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+   * 
+ * + * string service = 1; + */ + java.lang.String getService(); + /** + *
+   * App service.
+   * By default, the task is sent to the service which is the default
+   * service when the task is attempted.
+   * For some queues or tasks which were created using the App Engine
+   * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+   * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+   * which were created using the App Engine SDK use a custom domain
+   * name; custom domains are not parsed by Cloud Tasks. If
+   * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+   * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+   * 
+ * + * string service = 1; + */ + com.google.protobuf.ByteString + getServiceBytes(); + + /** + *
+   * App version.
+   * By default, the task is sent to the version which is the default
+   * version when the task is attempted.
+   * For some queues or tasks which were created using the App Engine
+   * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+   * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+   * which were created using the App Engine SDK use a custom domain
+   * name; custom domains are not parsed by Cloud Tasks. If
+   * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+   * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+   * 
+ * + * string version = 2; + */ + java.lang.String getVersion(); + /** + *
+   * App version.
+   * By default, the task is sent to the version which is the default
+   * version when the task is attempted.
+   * For some queues or tasks which were created using the App Engine
+   * Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
+   * into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
+   * which were created using the App Engine SDK use a custom domain
+   * name; custom domains are not parsed by Cloud Tasks. If
+   * [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
+   * [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
+   * 
+ * + * string version = 2; + */ + com.google.protobuf.ByteString + getVersionBytes(); + + /** + *
+   * App instance.
+   * By default, the task is sent to an instance which is available when
+   * the task is attempted.
+   * Requests can only be sent to a specific instance if
+   * [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+   * App Engine Flex does not support instances. For more information, see
+   * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed)
+   * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).
+   * 
+ * + * string instance = 3; + */ + java.lang.String getInstance(); + /** + *
+   * App instance.
+   * By default, the task is sent to an instance which is available when
+   * the task is attempted.
+   * Requests can only be sent to a specific instance if
+   * [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
+   * App Engine Flex does not support instances. For more information, see
+   * [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed)
+   * and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed).
+   * 
+ * + * string instance = 3; + */ + com.google.protobuf.ByteString + getInstanceBytes(); + + /** + *
+   * Output only. The host that the task is sent to.
+   * For more information, see
+   * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).
+   * The host is constructed as:
+   * * `host = [application_domain_name]`</br>
+   *   `| [service] + '.' + [application_domain_name]`</br>
+   *   `| [version] + '.' + [application_domain_name]`</br>
+   *   `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+   *   `| [instance] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+   * * `application_domain_name` = The domain name of the app, for
+   *   example <app-id>.appspot.com, which is associated with the
+   *   queue's project ID. Some tasks which were created using the App Engine
+   *   SDK use a custom domain name.
+   * * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+   * * `version_dot_service =`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]
+   * * `instance_dot_service =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `instance_dot_version =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+   * * `instance_dot_version_dot_service =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent
+   * to the service which is the default service when the task is attempted.
+   * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent
+   * to the version which is the default version when the task is attempted.
+   * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task
+   * will be sent to an instance which is available when the task is
+   * attempted.
+   * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task
+   * will be sent to the default version of the default service when
+   * the task is attempted.
+   * 
+ * + * string host = 4; + */ + java.lang.String getHost(); + /** + *
+   * Output only. The host that the task is sent to.
+   * For more information, see
+   * [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed).
+   * The host is constructed as:
+   * * `host = [application_domain_name]`</br>
+   *   `| [service] + '.' + [application_domain_name]`</br>
+   *   `| [version] + '.' + [application_domain_name]`</br>
+   *   `| [version_dot_service]+ '.' + [application_domain_name]`</br>
+   *   `| [instance] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_service] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_version] + '.' + [application_domain_name]`</br>
+   *   `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
+   * * `application_domain_name` = The domain name of the app, for
+   *   example <app-id>.appspot.com, which is associated with the
+   *   queue's project ID. Some tasks which were created using the App Engine
+   *   SDK use a custom domain name.
+   * * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+   * * `version_dot_service =`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]
+   * * `instance_dot_service =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * * `instance_dot_version =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
+   * * `instance_dot_version_dot_service =`
+   *   [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
+   *   [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
+   *   [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
+   * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent
+   * to the service which is the default service when the task is attempted.
+   * If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent
+   * to the version which is the default version when the task is attempted.
+   * If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task
+   * will be sent to an instance which is available when the task is
+   * attempted.
+   * If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
+   * [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or
+   * [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task
+   * will be sent to the default version of the default service when
+   * the task is attempted.
+   * 
+ * + * string host = 4; + */ + com.google.protobuf.ByteString + getHostBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AttemptStatus.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AttemptStatus.java new file mode 100644 index 000000000000..bcb0fd70c066 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AttemptStatus.java @@ -0,0 +1,1373 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/task.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * The status of a task attempt.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.AttemptStatus} + */ +public final class AttemptStatus extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.AttemptStatus) + AttemptStatusOrBuilder { +private static final long serialVersionUID = 0L; + // Use AttemptStatus.newBuilder() to construct. + private AttemptStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AttemptStatus() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private AttemptStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (scheduleTime_ != null) { + subBuilder = scheduleTime_.toBuilder(); + } + scheduleTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scheduleTime_); + scheduleTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (dispatchTime_ != null) { + subBuilder = dispatchTime_.toBuilder(); + } + dispatchTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(dispatchTime_); + dispatchTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (responseTime_ != null) { + subBuilder = responseTime_.toBuilder(); + } + responseTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(responseTime_); + responseTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.rpc.Status.Builder subBuilder = null; + if (responseStatus_ != null) { + subBuilder = responseStatus_.toBuilder(); + } + responseStatus_ = input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(responseStatus_); + responseStatus_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_AttemptStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_AttemptStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.AttemptStatus.class, com.google.cloud.tasks.v2beta2.AttemptStatus.Builder.class); + } + + public static final int SCHEDULE_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp scheduleTime_; + /** + *
+   * Output only. The time that this attempt was scheduled.
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + public boolean hasScheduleTime() { + return scheduleTime_ != null; + } + /** + *
+   * Output only. The time that this attempt was scheduled.
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + public com.google.protobuf.Timestamp getScheduleTime() { + return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } + /** + *
+   * Output only. The time that this attempt was scheduled.
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() { + return getScheduleTime(); + } + + public static final int DISPATCH_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp dispatchTime_; + /** + *
+   * Output only. The time that this attempt was dispatched.
+   * `dispatch_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + public boolean hasDispatchTime() { + return dispatchTime_ != null; + } + /** + *
+   * Output only. The time that this attempt was dispatched.
+   * `dispatch_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + public com.google.protobuf.Timestamp getDispatchTime() { + return dispatchTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dispatchTime_; + } + /** + *
+   * Output only. The time that this attempt was dispatched.
+   * `dispatch_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getDispatchTimeOrBuilder() { + return getDispatchTime(); + } + + public static final int RESPONSE_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp responseTime_; + /** + *
+   * Output only. The time that this attempt response was received.
+   * `response_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public boolean hasResponseTime() { + return responseTime_ != null; + } + /** + *
+   * Output only. The time that this attempt response was received.
+   * `response_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public com.google.protobuf.Timestamp getResponseTime() { + return responseTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : responseTime_; + } + /** + *
+   * Output only. The time that this attempt response was received.
+   * `response_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getResponseTimeOrBuilder() { + return getResponseTime(); + } + + public static final int RESPONSE_STATUS_FIELD_NUMBER = 4; + private com.google.rpc.Status responseStatus_; + /** + *
+   * Output only. The response from the target for this attempt.
+   * If the task has not been attempted or the task is currently running
+   * then the response status is unset.
+   * 
+ * + * .google.rpc.Status response_status = 4; + */ + public boolean hasResponseStatus() { + return responseStatus_ != null; + } + /** + *
+   * Output only. The response from the target for this attempt.
+   * If the task has not been attempted or the task is currently running
+   * then the response status is unset.
+   * 
+ * + * .google.rpc.Status response_status = 4; + */ + public com.google.rpc.Status getResponseStatus() { + return responseStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : responseStatus_; + } + /** + *
+   * Output only. The response from the target for this attempt.
+   * If the task has not been attempted or the task is currently running
+   * then the response status is unset.
+   * 
+ * + * .google.rpc.Status response_status = 4; + */ + public com.google.rpc.StatusOrBuilder getResponseStatusOrBuilder() { + return getResponseStatus(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (scheduleTime_ != null) { + output.writeMessage(1, getScheduleTime()); + } + if (dispatchTime_ != null) { + output.writeMessage(2, getDispatchTime()); + } + if (responseTime_ != null) { + output.writeMessage(3, getResponseTime()); + } + if (responseStatus_ != null) { + output.writeMessage(4, getResponseStatus()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (scheduleTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getScheduleTime()); + } + if (dispatchTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDispatchTime()); + } + if (responseTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getResponseTime()); + } + if (responseStatus_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getResponseStatus()); + } + size += unknownFields.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.tasks.v2beta2.AttemptStatus)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.AttemptStatus other = (com.google.cloud.tasks.v2beta2.AttemptStatus) obj; + + boolean result = true; + result = result && (hasScheduleTime() == other.hasScheduleTime()); + if (hasScheduleTime()) { + result = result && getScheduleTime() + .equals(other.getScheduleTime()); + } + result = result && (hasDispatchTime() == other.hasDispatchTime()); + if (hasDispatchTime()) { + result = result && getDispatchTime() + .equals(other.getDispatchTime()); + } + result = result && (hasResponseTime() == other.hasResponseTime()); + if (hasResponseTime()) { + result = result && getResponseTime() + .equals(other.getResponseTime()); + } + result = result && (hasResponseStatus() == other.hasResponseStatus()); + if (hasResponseStatus()) { + result = result && getResponseStatus() + .equals(other.getResponseStatus()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasScheduleTime()) { + hash = (37 * hash) + SCHEDULE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getScheduleTime().hashCode(); + } + if (hasDispatchTime()) { + hash = (37 * hash) + DISPATCH_TIME_FIELD_NUMBER; + hash = (53 * hash) + getDispatchTime().hashCode(); + } + if (hasResponseTime()) { + hash = (37 * hash) + RESPONSE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getResponseTime().hashCode(); + } + if (hasResponseStatus()) { + hash = (37 * hash) + RESPONSE_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getResponseStatus().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.AttemptStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AttemptStatus 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.tasks.v2beta2.AttemptStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AttemptStatus 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.tasks.v2beta2.AttemptStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.AttemptStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.AttemptStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AttemptStatus 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.tasks.v2beta2.AttemptStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AttemptStatus 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.tasks.v2beta2.AttemptStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.AttemptStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.AttemptStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 status of a task attempt.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.AttemptStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.AttemptStatus) + com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_AttemptStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_AttemptStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.AttemptStatus.class, com.google.cloud.tasks.v2beta2.AttemptStatus.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.AttemptStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = null; + } else { + scheduleTime_ = null; + scheduleTimeBuilder_ = null; + } + if (dispatchTimeBuilder_ == null) { + dispatchTime_ = null; + } else { + dispatchTime_ = null; + dispatchTimeBuilder_ = null; + } + if (responseTimeBuilder_ == null) { + responseTime_ = null; + } else { + responseTime_ = null; + responseTimeBuilder_ = null; + } + if (responseStatusBuilder_ == null) { + responseStatus_ = null; + } else { + responseStatus_ = null; + responseStatusBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_AttemptStatus_descriptor; + } + + public com.google.cloud.tasks.v2beta2.AttemptStatus getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.AttemptStatus.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.AttemptStatus build() { + com.google.cloud.tasks.v2beta2.AttemptStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.AttemptStatus buildPartial() { + com.google.cloud.tasks.v2beta2.AttemptStatus result = new com.google.cloud.tasks.v2beta2.AttemptStatus(this); + if (scheduleTimeBuilder_ == null) { + result.scheduleTime_ = scheduleTime_; + } else { + result.scheduleTime_ = scheduleTimeBuilder_.build(); + } + if (dispatchTimeBuilder_ == null) { + result.dispatchTime_ = dispatchTime_; + } else { + result.dispatchTime_ = dispatchTimeBuilder_.build(); + } + if (responseTimeBuilder_ == null) { + result.responseTime_ = responseTime_; + } else { + result.responseTime_ = responseTimeBuilder_.build(); + } + if (responseStatusBuilder_ == null) { + result.responseStatus_ = responseStatus_; + } else { + result.responseStatus_ = responseStatusBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.AttemptStatus) { + return mergeFrom((com.google.cloud.tasks.v2beta2.AttemptStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.AttemptStatus other) { + if (other == com.google.cloud.tasks.v2beta2.AttemptStatus.getDefaultInstance()) return this; + if (other.hasScheduleTime()) { + mergeScheduleTime(other.getScheduleTime()); + } + if (other.hasDispatchTime()) { + mergeDispatchTime(other.getDispatchTime()); + } + if (other.hasResponseTime()) { + mergeResponseTime(other.getResponseTime()); + } + if (other.hasResponseStatus()) { + mergeResponseStatus(other.getResponseStatus()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.AttemptStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.AttemptStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp scheduleTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> scheduleTimeBuilder_; + /** + *
+     * Output only. The time that this attempt was scheduled.
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + public boolean hasScheduleTime() { + return scheduleTimeBuilder_ != null || scheduleTime_ != null; + } + /** + *
+     * Output only. The time that this attempt was scheduled.
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + public com.google.protobuf.Timestamp getScheduleTime() { + if (scheduleTimeBuilder_ == null) { + return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } else { + return scheduleTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time that this attempt was scheduled.
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + public Builder setScheduleTime(com.google.protobuf.Timestamp value) { + if (scheduleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduleTime_ = value; + onChanged(); + } else { + scheduleTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The time that this attempt was scheduled.
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + public Builder setScheduleTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = builderForValue.build(); + onChanged(); + } else { + scheduleTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The time that this attempt was scheduled.
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + public Builder mergeScheduleTime(com.google.protobuf.Timestamp value) { + if (scheduleTimeBuilder_ == null) { + if (scheduleTime_ != null) { + scheduleTime_ = + com.google.protobuf.Timestamp.newBuilder(scheduleTime_).mergeFrom(value).buildPartial(); + } else { + scheduleTime_ = value; + } + onChanged(); + } else { + scheduleTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The time that this attempt was scheduled.
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + public Builder clearScheduleTime() { + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = null; + onChanged(); + } else { + scheduleTime_ = null; + scheduleTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The time that this attempt was scheduled.
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + public com.google.protobuf.Timestamp.Builder getScheduleTimeBuilder() { + + onChanged(); + return getScheduleTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time that this attempt was scheduled.
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() { + if (scheduleTimeBuilder_ != null) { + return scheduleTimeBuilder_.getMessageOrBuilder(); + } else { + return scheduleTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } + } + /** + *
+     * Output only. The time that this attempt was scheduled.
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getScheduleTimeFieldBuilder() { + if (scheduleTimeBuilder_ == null) { + scheduleTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getScheduleTime(), + getParentForChildren(), + isClean()); + scheduleTime_ = null; + } + return scheduleTimeBuilder_; + } + + private com.google.protobuf.Timestamp dispatchTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> dispatchTimeBuilder_; + /** + *
+     * Output only. The time that this attempt was dispatched.
+     * `dispatch_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + public boolean hasDispatchTime() { + return dispatchTimeBuilder_ != null || dispatchTime_ != null; + } + /** + *
+     * Output only. The time that this attempt was dispatched.
+     * `dispatch_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + public com.google.protobuf.Timestamp getDispatchTime() { + if (dispatchTimeBuilder_ == null) { + return dispatchTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : dispatchTime_; + } else { + return dispatchTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time that this attempt was dispatched.
+     * `dispatch_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + public Builder setDispatchTime(com.google.protobuf.Timestamp value) { + if (dispatchTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + dispatchTime_ = value; + onChanged(); + } else { + dispatchTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The time that this attempt was dispatched.
+     * `dispatch_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + public Builder setDispatchTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (dispatchTimeBuilder_ == null) { + dispatchTime_ = builderForValue.build(); + onChanged(); + } else { + dispatchTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The time that this attempt was dispatched.
+     * `dispatch_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + public Builder mergeDispatchTime(com.google.protobuf.Timestamp value) { + if (dispatchTimeBuilder_ == null) { + if (dispatchTime_ != null) { + dispatchTime_ = + com.google.protobuf.Timestamp.newBuilder(dispatchTime_).mergeFrom(value).buildPartial(); + } else { + dispatchTime_ = value; + } + onChanged(); + } else { + dispatchTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The time that this attempt was dispatched.
+     * `dispatch_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + public Builder clearDispatchTime() { + if (dispatchTimeBuilder_ == null) { + dispatchTime_ = null; + onChanged(); + } else { + dispatchTime_ = null; + dispatchTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The time that this attempt was dispatched.
+     * `dispatch_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getDispatchTimeBuilder() { + + onChanged(); + return getDispatchTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time that this attempt was dispatched.
+     * `dispatch_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getDispatchTimeOrBuilder() { + if (dispatchTimeBuilder_ != null) { + return dispatchTimeBuilder_.getMessageOrBuilder(); + } else { + return dispatchTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : dispatchTime_; + } + } + /** + *
+     * Output only. The time that this attempt was dispatched.
+     * `dispatch_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getDispatchTimeFieldBuilder() { + if (dispatchTimeBuilder_ == null) { + dispatchTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getDispatchTime(), + getParentForChildren(), + isClean()); + dispatchTime_ = null; + } + return dispatchTimeBuilder_; + } + + private com.google.protobuf.Timestamp responseTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> responseTimeBuilder_; + /** + *
+     * Output only. The time that this attempt response was received.
+     * `response_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public boolean hasResponseTime() { + return responseTimeBuilder_ != null || responseTime_ != null; + } + /** + *
+     * Output only. The time that this attempt response was received.
+     * `response_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public com.google.protobuf.Timestamp getResponseTime() { + if (responseTimeBuilder_ == null) { + return responseTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : responseTime_; + } else { + return responseTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The time that this attempt response was received.
+     * `response_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public Builder setResponseTime(com.google.protobuf.Timestamp value) { + if (responseTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + responseTime_ = value; + onChanged(); + } else { + responseTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The time that this attempt response was received.
+     * `response_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public Builder setResponseTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (responseTimeBuilder_ == null) { + responseTime_ = builderForValue.build(); + onChanged(); + } else { + responseTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The time that this attempt response was received.
+     * `response_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public Builder mergeResponseTime(com.google.protobuf.Timestamp value) { + if (responseTimeBuilder_ == null) { + if (responseTime_ != null) { + responseTime_ = + com.google.protobuf.Timestamp.newBuilder(responseTime_).mergeFrom(value).buildPartial(); + } else { + responseTime_ = value; + } + onChanged(); + } else { + responseTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The time that this attempt response was received.
+     * `response_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public Builder clearResponseTime() { + if (responseTimeBuilder_ == null) { + responseTime_ = null; + onChanged(); + } else { + responseTime_ = null; + responseTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The time that this attempt response was received.
+     * `response_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public com.google.protobuf.Timestamp.Builder getResponseTimeBuilder() { + + onChanged(); + return getResponseTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time that this attempt response was received.
+     * `response_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + public com.google.protobuf.TimestampOrBuilder getResponseTimeOrBuilder() { + if (responseTimeBuilder_ != null) { + return responseTimeBuilder_.getMessageOrBuilder(); + } else { + return responseTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : responseTime_; + } + } + /** + *
+     * Output only. The time that this attempt response was received.
+     * `response_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getResponseTimeFieldBuilder() { + if (responseTimeBuilder_ == null) { + responseTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getResponseTime(), + getParentForChildren(), + isClean()); + responseTime_ = null; + } + return responseTimeBuilder_; + } + + private com.google.rpc.Status responseStatus_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> responseStatusBuilder_; + /** + *
+     * Output only. The response from the target for this attempt.
+     * If the task has not been attempted or the task is currently running
+     * then the response status is unset.
+     * 
+ * + * .google.rpc.Status response_status = 4; + */ + public boolean hasResponseStatus() { + return responseStatusBuilder_ != null || responseStatus_ != null; + } + /** + *
+     * Output only. The response from the target for this attempt.
+     * If the task has not been attempted or the task is currently running
+     * then the response status is unset.
+     * 
+ * + * .google.rpc.Status response_status = 4; + */ + public com.google.rpc.Status getResponseStatus() { + if (responseStatusBuilder_ == null) { + return responseStatus_ == null ? com.google.rpc.Status.getDefaultInstance() : responseStatus_; + } else { + return responseStatusBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The response from the target for this attempt.
+     * If the task has not been attempted or the task is currently running
+     * then the response status is unset.
+     * 
+ * + * .google.rpc.Status response_status = 4; + */ + public Builder setResponseStatus(com.google.rpc.Status value) { + if (responseStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + responseStatus_ = value; + onChanged(); + } else { + responseStatusBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The response from the target for this attempt.
+     * If the task has not been attempted or the task is currently running
+     * then the response status is unset.
+     * 
+ * + * .google.rpc.Status response_status = 4; + */ + public Builder setResponseStatus( + com.google.rpc.Status.Builder builderForValue) { + if (responseStatusBuilder_ == null) { + responseStatus_ = builderForValue.build(); + onChanged(); + } else { + responseStatusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The response from the target for this attempt.
+     * If the task has not been attempted or the task is currently running
+     * then the response status is unset.
+     * 
+ * + * .google.rpc.Status response_status = 4; + */ + public Builder mergeResponseStatus(com.google.rpc.Status value) { + if (responseStatusBuilder_ == null) { + if (responseStatus_ != null) { + responseStatus_ = + com.google.rpc.Status.newBuilder(responseStatus_).mergeFrom(value).buildPartial(); + } else { + responseStatus_ = value; + } + onChanged(); + } else { + responseStatusBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The response from the target for this attempt.
+     * If the task has not been attempted or the task is currently running
+     * then the response status is unset.
+     * 
+ * + * .google.rpc.Status response_status = 4; + */ + public Builder clearResponseStatus() { + if (responseStatusBuilder_ == null) { + responseStatus_ = null; + onChanged(); + } else { + responseStatus_ = null; + responseStatusBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The response from the target for this attempt.
+     * If the task has not been attempted or the task is currently running
+     * then the response status is unset.
+     * 
+ * + * .google.rpc.Status response_status = 4; + */ + public com.google.rpc.Status.Builder getResponseStatusBuilder() { + + onChanged(); + return getResponseStatusFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The response from the target for this attempt.
+     * If the task has not been attempted or the task is currently running
+     * then the response status is unset.
+     * 
+ * + * .google.rpc.Status response_status = 4; + */ + public com.google.rpc.StatusOrBuilder getResponseStatusOrBuilder() { + if (responseStatusBuilder_ != null) { + return responseStatusBuilder_.getMessageOrBuilder(); + } else { + return responseStatus_ == null ? + com.google.rpc.Status.getDefaultInstance() : responseStatus_; + } + } + /** + *
+     * Output only. The response from the target for this attempt.
+     * If the task has not been attempted or the task is currently running
+     * then the response status is unset.
+     * 
+ * + * .google.rpc.Status response_status = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> + getResponseStatusFieldBuilder() { + if (responseStatusBuilder_ == null) { + responseStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( + getResponseStatus(), + getParentForChildren(), + isClean()); + responseStatus_ = null; + } + return responseStatusBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.AttemptStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.AttemptStatus) + private static final com.google.cloud.tasks.v2beta2.AttemptStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.AttemptStatus(); + } + + public static com.google.cloud.tasks.v2beta2.AttemptStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public AttemptStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AttemptStatus(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.AttemptStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AttemptStatusOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AttemptStatusOrBuilder.java new file mode 100644 index 000000000000..85880770c7d4 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/AttemptStatusOrBuilder.java @@ -0,0 +1,124 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/task.proto + +package com.google.cloud.tasks.v2beta2; + +public interface AttemptStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.AttemptStatus) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The time that this attempt was scheduled.
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + boolean hasScheduleTime(); + /** + *
+   * Output only. The time that this attempt was scheduled.
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + com.google.protobuf.Timestamp getScheduleTime(); + /** + *
+   * Output only. The time that this attempt was scheduled.
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 1; + */ + com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder(); + + /** + *
+   * Output only. The time that this attempt was dispatched.
+   * `dispatch_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + boolean hasDispatchTime(); + /** + *
+   * Output only. The time that this attempt was dispatched.
+   * `dispatch_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + com.google.protobuf.Timestamp getDispatchTime(); + /** + *
+   * Output only. The time that this attempt was dispatched.
+   * `dispatch_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp dispatch_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getDispatchTimeOrBuilder(); + + /** + *
+   * Output only. The time that this attempt response was received.
+   * `response_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + boolean hasResponseTime(); + /** + *
+   * Output only. The time that this attempt response was received.
+   * `response_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + com.google.protobuf.Timestamp getResponseTime(); + /** + *
+   * Output only. The time that this attempt response was received.
+   * `response_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp response_time = 3; + */ + com.google.protobuf.TimestampOrBuilder getResponseTimeOrBuilder(); + + /** + *
+   * Output only. The response from the target for this attempt.
+   * If the task has not been attempted or the task is currently running
+   * then the response status is unset.
+   * 
+ * + * .google.rpc.Status response_status = 4; + */ + boolean hasResponseStatus(); + /** + *
+   * Output only. The response from the target for this attempt.
+   * If the task has not been attempted or the task is currently running
+   * then the response status is unset.
+   * 
+ * + * .google.rpc.Status response_status = 4; + */ + com.google.rpc.Status getResponseStatus(); + /** + *
+   * Output only. The response from the target for this attempt.
+   * If the task has not been attempted or the task is currently running
+   * then the response status is unset.
+   * 
+ * + * .google.rpc.Status response_status = 4; + */ + com.google.rpc.StatusOrBuilder getResponseStatusOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CancelLeaseRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CancelLeaseRequest.java new file mode 100644 index 000000000000..20444f16f34c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CancelLeaseRequest.java @@ -0,0 +1,1031 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for canceling a lease using
+ * [CancelLease][google.cloud.tasks.v2beta2.CloudTasks.CancelLease].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.CancelLeaseRequest} + */ +public final class CancelLeaseRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.CancelLeaseRequest) + CancelLeaseRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CancelLeaseRequest.newBuilder() to construct. + private CancelLeaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CancelLeaseRequest() { + name_ = ""; + responseView_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CancelLeaseRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (scheduleTime_ != null) { + subBuilder = scheduleTime_.toBuilder(); + } + scheduleTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scheduleTime_); + scheduleTime_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + int rawValue = input.readEnum(); + + responseView_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.CancelLeaseRequest.class, com.google.cloud.tasks.v2beta2.CancelLeaseRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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 task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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 SCHEDULE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp scheduleTime_; + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public boolean hasScheduleTime() { + return scheduleTime_ != null; + } + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.Timestamp getScheduleTime() { + return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() { + return getScheduleTime(); + } + + public static final int RESPONSE_VIEW_FIELD_NUMBER = 3; + private int responseView_; + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (scheduleTime_ != null) { + output.writeMessage(2, getScheduleTime()); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(3, responseView_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (scheduleTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getScheduleTime()); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, responseView_); + } + size += unknownFields.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.tasks.v2beta2.CancelLeaseRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.CancelLeaseRequest other = (com.google.cloud.tasks.v2beta2.CancelLeaseRequest) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && (hasScheduleTime() == other.hasScheduleTime()); + if (hasScheduleTime()) { + result = result && getScheduleTime() + .equals(other.getScheduleTime()); + } + result = result && responseView_ == other.responseView_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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 (hasScheduleTime()) { + hash = (37 * hash) + SCHEDULE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getScheduleTime().hashCode(); + } + hash = (37 * hash) + RESPONSE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + responseView_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.CancelLeaseRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.CancelLeaseRequest 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.tasks.v2beta2.CancelLeaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.CancelLeaseRequest 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.tasks.v2beta2.CancelLeaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.CancelLeaseRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.CancelLeaseRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.CancelLeaseRequest 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.tasks.v2beta2.CancelLeaseRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.CancelLeaseRequest 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.tasks.v2beta2.CancelLeaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.CancelLeaseRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.CancelLeaseRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for canceling a lease using
+   * [CancelLease][google.cloud.tasks.v2beta2.CloudTasks.CancelLease].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.CancelLeaseRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.CancelLeaseRequest) + com.google.cloud.tasks.v2beta2.CancelLeaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.CancelLeaseRequest.class, com.google.cloud.tasks.v2beta2.CancelLeaseRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.CancelLeaseRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = null; + } else { + scheduleTime_ = null; + scheduleTimeBuilder_ = null; + } + responseView_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.CancelLeaseRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.CancelLeaseRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.CancelLeaseRequest build() { + com.google.cloud.tasks.v2beta2.CancelLeaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.CancelLeaseRequest buildPartial() { + com.google.cloud.tasks.v2beta2.CancelLeaseRequest result = new com.google.cloud.tasks.v2beta2.CancelLeaseRequest(this); + result.name_ = name_; + if (scheduleTimeBuilder_ == null) { + result.scheduleTime_ = scheduleTime_; + } else { + result.scheduleTime_ = scheduleTimeBuilder_.build(); + } + result.responseView_ = responseView_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.CancelLeaseRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.CancelLeaseRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.CancelLeaseRequest other) { + if (other == com.google.cloud.tasks.v2beta2.CancelLeaseRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasScheduleTime()) { + mergeScheduleTime(other.getScheduleTime()); + } + if (other.responseView_ != 0) { + setResponseViewValue(other.getResponseViewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.CancelLeaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.CancelLeaseRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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.Timestamp scheduleTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> scheduleTimeBuilder_; + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public boolean hasScheduleTime() { + return scheduleTimeBuilder_ != null || scheduleTime_ != null; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.Timestamp getScheduleTime() { + if (scheduleTimeBuilder_ == null) { + return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } else { + return scheduleTimeBuilder_.getMessage(); + } + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder setScheduleTime(com.google.protobuf.Timestamp value) { + if (scheduleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduleTime_ = value; + onChanged(); + } else { + scheduleTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder setScheduleTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = builderForValue.build(); + onChanged(); + } else { + scheduleTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder mergeScheduleTime(com.google.protobuf.Timestamp value) { + if (scheduleTimeBuilder_ == null) { + if (scheduleTime_ != null) { + scheduleTime_ = + com.google.protobuf.Timestamp.newBuilder(scheduleTime_).mergeFrom(value).buildPartial(); + } else { + scheduleTime_ = value; + } + onChanged(); + } else { + scheduleTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder clearScheduleTime() { + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = null; + onChanged(); + } else { + scheduleTime_ = null; + scheduleTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getScheduleTimeBuilder() { + + onChanged(); + return getScheduleTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() { + if (scheduleTimeBuilder_ != null) { + return scheduleTimeBuilder_.getMessageOrBuilder(); + } else { + return scheduleTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getScheduleTimeFieldBuilder() { + if (scheduleTimeBuilder_ == null) { + scheduleTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getScheduleTime(), + getParentForChildren(), + isClean()); + scheduleTime_ = null; + } + return scheduleTimeBuilder_; + } + + private int responseView_ = 0; + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public Builder setResponseViewValue(int value) { + responseView_ = value; + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public Builder setResponseView(com.google.cloud.tasks.v2beta2.Task.View value) { + if (value == null) { + throw new NullPointerException(); + } + + responseView_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public Builder clearResponseView() { + + responseView_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.CancelLeaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.CancelLeaseRequest) + private static final com.google.cloud.tasks.v2beta2.CancelLeaseRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.CancelLeaseRequest(); + } + + public static com.google.cloud.tasks.v2beta2.CancelLeaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CancelLeaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CancelLeaseRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.CancelLeaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CancelLeaseRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CancelLeaseRequestOrBuilder.java new file mode 100644 index 000000000000..324fccbe8e03 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CancelLeaseRequestOrBuilder.java @@ -0,0 +1,106 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface CancelLeaseRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.CancelLeaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + boolean hasScheduleTime(); + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + com.google.protobuf.Timestamp getScheduleTime(); + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder(); + + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + int getResponseViewValue(); + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + com.google.cloud.tasks.v2beta2.Task.View getResponseView(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java new file mode 100644 index 000000000000..3c96c8a4dc72 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksProto.java @@ -0,0 +1,431 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public final class CloudTasksProto { + private CloudTasksProto() {} + 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_tasks_v2beta2_ListQueuesRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_ListQueuesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_ListQueuesResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_ListQueuesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_GetQueueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_GetQueueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_CreateQueueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_CreateQueueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_UpdateQueueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_UpdateQueueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_DeleteQueueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_DeleteQueueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_PurgeQueueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_PurgeQueueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_PauseQueueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_PauseQueueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_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/tasks/v2beta2/cloudtasks." + + "proto\022\032google.cloud.tasks.v2beta2\032\034googl" + + "e/api/annotations.proto\032&google/cloud/ta" + + "sks/v2beta2/queue.proto\032%google/cloud/ta" + + "sks/v2beta2/task.proto\032\036google/iam/v1/ia" + + "m_policy.proto\032\032google/iam/v1/policy.pro" + + "to\032\036google/protobuf/duration.proto\032\033goog" + + "le/protobuf/empty.proto\032 google/protobuf" + + "/field_mask.proto\032\037google/protobuf/times" + + "tamp.proto\032\025google/rpc/code.proto\"Z\n\021Lis" + + "tQueuesRequest\022\016\n\006parent\030\001 \001(\t\022\016\n\006filter" + + "\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\022\022\n\npage_token\030" + + "\004 \001(\t\"`\n\022ListQueuesResponse\0221\n\006queues\030\001 " + + "\003(\0132!.google.cloud.tasks.v2beta2.Queue\022\027" + + "\n\017next_page_token\030\002 \001(\t\"\037\n\017GetQueueReque" + + "st\022\014\n\004name\030\001 \001(\t\"V\n\022CreateQueueRequest\022\016" + + "\n\006parent\030\001 \001(\t\0220\n\005queue\030\002 \001(\0132!.google.c" + + "loud.tasks.v2beta2.Queue\"w\n\022UpdateQueueR" + + "equest\0220\n\005queue\030\001 \001(\0132!.google.cloud.tas" + + "ks.v2beta2.Queue\022/\n\013update_mask\030\002 \001(\0132\032." + + "google.protobuf.FieldMask\"\"\n\022DeleteQueue" + + "Request\022\014\n\004name\030\001 \001(\t\"!\n\021PurgeQueueReque" + + "st\022\014\n\004name\030\001 \001(\t\"!\n\021PauseQueueRequest\022\014\n" + + "\004name\030\001 \001(\t\"\"\n\022ResumeQueueRequest\022\014\n\004nam" + + "e\030\001 \001(\t\"\231\001\n\020ListTasksRequest\022\016\n\006parent\030\001" + + " \001(\t\022<\n\rresponse_view\030\002 \001(\0162%.google.clo" + + "ud.tasks.v2beta2.Task.View\022\020\n\010order_by\030\003" + + " \001(\t\022\021\n\tpage_size\030\004 \001(\005\022\022\n\npage_token\030\005 " + + "\001(\t\"]\n\021ListTasksResponse\022/\n\005tasks\030\001 \003(\0132" + + " .google.cloud.tasks.v2beta2.Task\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\"\\\n\016GetTaskRequest\022\014\n\004" + + "name\030\001 \001(\t\022<\n\rresponse_view\030\002 \001(\0162%.goog" + + "le.cloud.tasks.v2beta2.Task.View\"\221\001\n\021Cre" + + "ateTaskRequest\022\016\n\006parent\030\001 \001(\t\022.\n\004task\030\002" + + " \001(\0132 .google.cloud.tasks.v2beta2.Task\022<" + + "\n\rresponse_view\030\003 \001(\0162%.google.cloud.tas" + + "ks.v2beta2.Task.View\"!\n\021DeleteTaskReques" + + "t\022\014\n\004name\030\001 \001(\t\"\267\001\n\021LeaseTasksRequest\022\016\n" + + "\006parent\030\001 \001(\t\022\021\n\tmax_tasks\030\002 \001(\005\0221\n\016leas" + + "e_duration\030\003 \001(\0132\031.google.protobuf.Durat" + + "ion\022<\n\rresponse_view\030\004 \001(\0162%.google.clou" + + "d.tasks.v2beta2.Task.View\022\016\n\006filter\030\005 \001(" + + "\t\"E\n\022LeaseTasksResponse\022/\n\005tasks\030\001 \003(\0132 " + + ".google.cloud.tasks.v2beta2.Task\"Y\n\026Ackn" + + "owledgeTaskRequest\022\014\n\004name\030\001 \001(\t\0221\n\rsche" + + "dule_time\030\002 \001(\0132\032.google.protobuf.Timest" + + "amp\"\305\001\n\021RenewLeaseRequest\022\014\n\004name\030\001 \001(\t\022" + + "1\n\rschedule_time\030\002 \001(\0132\032.google.protobuf" + + ".Timestamp\0221\n\016lease_duration\030\003 \001(\0132\031.goo" + + "gle.protobuf.Duration\022<\n\rresponse_view\030\004" + + " \001(\0162%.google.cloud.tasks.v2beta2.Task.V" + + "iew\"\223\001\n\022CancelLeaseRequest\022\014\n\004name\030\001 \001(\t" + + "\0221\n\rschedule_time\030\002 \001(\0132\032.google.protobu" + + "f.Timestamp\022<\n\rresponse_view\030\003 \001(\0162%.goo" + + "gle.cloud.tasks.v2beta2.Task.View\"\\\n\016Run" + + "TaskRequest\022\014\n\004name\030\001 \001(\t\022<\n\rresponse_vi" + + "ew\030\002 \001(\0162%.google.cloud.tasks.v2beta2.Ta" + + "sk.View2\360\031\n\nCloudTasks\022\244\001\n\nListQueues\022-." + + "google.cloud.tasks.v2beta2.ListQueuesReq" + + "uest\032..google.cloud.tasks.v2beta2.ListQu" + + "euesResponse\"7\202\323\344\223\0021\022//v2beta2/{parent=p" + + "rojects/*/locations/*}/queues\022\223\001\n\010GetQue" + + "ue\022+.google.cloud.tasks.v2beta2.GetQueue" + + "Request\032!.google.cloud.tasks.v2beta2.Que" + + "ue\"7\202\323\344\223\0021\022//v2beta2/{name=projects/*/lo" + + "cations/*/queues/*}\022\240\001\n\013CreateQueue\022..go" + + "ogle.cloud.tasks.v2beta2.CreateQueueRequ" + + "est\032!.google.cloud.tasks.v2beta2.Queue\">" + + "\202\323\344\223\0028\"//v2beta2/{parent=projects/*/loca" + + "tions/*}/queues:\005queue\022\246\001\n\013UpdateQueue\022." + + ".google.cloud.tasks.v2beta2.UpdateQueueR" + + "equest\032!.google.cloud.tasks.v2beta2.Queu" + + "e\"D\202\323\344\223\002>25/v2beta2/{queue.name=projects" + + "/*/locations/*/queues/*}:\005queue\022\216\001\n\013Dele" + + "teQueue\022..google.cloud.tasks.v2beta2.Del" + + "eteQueueRequest\032\026.google.protobuf.Empty\"" + + "7\202\323\344\223\0021*//v2beta2/{name=projects/*/locat" + + "ions/*/queues/*}\022\240\001\n\nPurgeQueue\022-.google" + + ".cloud.tasks.v2beta2.PurgeQueueRequest\032!" + + ".google.cloud.tasks.v2beta2.Queue\"@\202\323\344\223\002" + + ":\"5/v2beta2/{name=projects/*/locations/*" + + "/queues/*}:purge:\001*\022\240\001\n\nPauseQueue\022-.goo" + + "gle.cloud.tasks.v2beta2.PauseQueueReques" + + "t\032!.google.cloud.tasks.v2beta2.Queue\"@\202\323" + + "\344\223\002:\"5/v2beta2/{name=projects/*/location" + + "s/*/queues/*}:pause:\001*\022\243\001\n\013ResumeQueue\022." + + ".google.cloud.tasks.v2beta2.ResumeQueueR" + + "equest\032!.google.cloud.tasks.v2beta2.Queu" + + "e\"A\202\323\344\223\002;\"6/v2beta2/{name=projects/*/loc" + + "ations/*/queues/*}:resume:\001*\022\226\001\n\014GetIamP" + + "olicy\022\".google.iam.v1.GetIamPolicyReques" + + "t\032\025.google.iam.v1.Policy\"K\202\323\344\223\002E\"@/v2bet" + + "a2/{resource=projects/*/locations/*/queu" + + "es/*}:getIamPolicy:\001*\022\226\001\n\014SetIamPolicy\022\"" + + ".google.iam.v1.SetIamPolicyRequest\032\025.goo" + + "gle.iam.v1.Policy\"K\202\323\344\223\002E\"@/v2beta2/{res" + + "ource=projects/*/locations/*/queues/*}:s" + + "etIamPolicy:\001*\022\274\001\n\022TestIamPermissions\022(." + + "google.iam.v1.TestIamPermissionsRequest\032" + + ").google.iam.v1.TestIamPermissionsRespon" + + "se\"Q\202\323\344\223\002K\"F/v2beta2/{resource=projects/" + + "*/locations/*/queues/*}:testIamPermissio" + + "ns:\001*\022\251\001\n\tListTasks\022,.google.cloud.tasks" + + ".v2beta2.ListTasksRequest\032-.google.cloud" + + ".tasks.v2beta2.ListTasksResponse\"?\202\323\344\223\0029" + + "\0227/v2beta2/{parent=projects/*/locations/" + + "*/queues/*}/tasks\022\230\001\n\007GetTask\022*.google.c" + + "loud.tasks.v2beta2.GetTaskRequest\032 .goog" + + "le.cloud.tasks.v2beta2.Task\"?\202\323\344\223\0029\0227/v2" + + "beta2/{name=projects/*/locations/*/queue" + + "s/*/tasks/*}\022\241\001\n\nCreateTask\022-.google.clo" + + "ud.tasks.v2beta2.CreateTaskRequest\032 .goo" + + "gle.cloud.tasks.v2beta2.Task\"B\202\323\344\223\002<\"7/v" + + "2beta2/{parent=projects/*/locations/*/qu" + + "eues/*}/tasks:\001*\022\224\001\n\nDeleteTask\022-.google" + + ".cloud.tasks.v2beta2.DeleteTaskRequest\032\026" + + ".google.protobuf.Empty\"?\202\323\344\223\0029*7/v2beta2" + + "/{name=projects/*/locations/*/queues/*/t" + + "asks/*}\022\265\001\n\nLeaseTasks\022-.google.cloud.ta" + + "sks.v2beta2.LeaseTasksRequest\032..google.c" + + "loud.tasks.v2beta2.LeaseTasksResponse\"H\202" + + "\323\344\223\002B\"=/v2beta2/{parent=projects/*/locat" + + "ions/*/queues/*}/tasks:lease:\001*\022\255\001\n\017Ackn" + + "owledgeTask\0222.google.cloud.tasks.v2beta2" + + ".AcknowledgeTaskRequest\032\026.google.protobu" + + "f.Empty\"N\202\323\344\223\002H\"C/v2beta2/{name=projects" + + "/*/locations/*/queues/*/tasks/*}:acknowl" + + "edge:\001*\022\254\001\n\nRenewLease\022-.google.cloud.ta" + + "sks.v2beta2.RenewLeaseRequest\032 .google.c" + + "loud.tasks.v2beta2.Task\"M\202\323\344\223\002G\"B/v2beta" + + "2/{name=projects/*/locations/*/queues/*/" + + "tasks/*}:renewLease:\001*\022\257\001\n\013CancelLease\022." + + ".google.cloud.tasks.v2beta2.CancelLeaseR" + + "equest\032 .google.cloud.tasks.v2beta2.Task" + + "\"N\202\323\344\223\002H\"C/v2beta2/{name=projects/*/loca" + + "tions/*/queues/*/tasks/*}:cancelLease:\001*" + + "\022\237\001\n\007RunTask\022*.google.cloud.tasks.v2beta" + + "2.RunTaskRequest\032 .google.cloud.tasks.v2" + + "beta2.Task\"F\202\323\344\223\002@\";/v2beta2/{name=proje" + + "cts/*/locations/*/queues/*/tasks/*}:run:" + + "\001*B|\n\036com.google.cloud.tasks.v2beta2B\017Cl" + + "oudTasksProtoP\001Z?google.golang.org/genpr" + + "oto/googleapis/cloud/tasks/v2beta2;tasks" + + "\242\002\005TASKSb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.cloud.tasks.v2beta2.QueueProto.getDescriptor(), + com.google.cloud.tasks.v2beta2.TaskProto.getDescriptor(), + com.google.iam.v1.IamPolicyProto.getDescriptor(), + com.google.iam.v1.PolicyProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.CodeProto.getDescriptor(), + }, assigner); + internal_static_google_cloud_tasks_v2beta2_ListQueuesRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_tasks_v2beta2_ListQueuesRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_ListQueuesRequest_descriptor, + new java.lang.String[] { "Parent", "Filter", "PageSize", "PageToken", }); + internal_static_google_cloud_tasks_v2beta2_ListQueuesResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_tasks_v2beta2_ListQueuesResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_ListQueuesResponse_descriptor, + new java.lang.String[] { "Queues", "NextPageToken", }); + internal_static_google_cloud_tasks_v2beta2_GetQueueRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_tasks_v2beta2_GetQueueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_GetQueueRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tasks_v2beta2_CreateQueueRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_tasks_v2beta2_CreateQueueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_CreateQueueRequest_descriptor, + new java.lang.String[] { "Parent", "Queue", }); + internal_static_google_cloud_tasks_v2beta2_UpdateQueueRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_tasks_v2beta2_UpdateQueueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_UpdateQueueRequest_descriptor, + new java.lang.String[] { "Queue", "UpdateMask", }); + internal_static_google_cloud_tasks_v2beta2_DeleteQueueRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_tasks_v2beta2_DeleteQueueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_DeleteQueueRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tasks_v2beta2_PurgeQueueRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_tasks_v2beta2_PurgeQueueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_PurgeQueueRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tasks_v2beta2_PauseQueueRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_tasks_v2beta2_PauseQueueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_PauseQueueRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_descriptor, + new java.lang.String[] { "Parent", "ResponseView", "OrderBy", "PageSize", "PageToken", }); + internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_descriptor, + new java.lang.String[] { "Tasks", "NextPageToken", }); + internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_descriptor, + new java.lang.String[] { "Name", "ResponseView", }); + internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_descriptor, + new java.lang.String[] { "Parent", "Task", "ResponseView", }); + internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_descriptor, + new java.lang.String[] { "Parent", "MaxTasks", "LeaseDuration", "ResponseView", "Filter", }); + internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_descriptor, + new java.lang.String[] { "Tasks", }); + internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_AcknowledgeTaskRequest_descriptor, + new java.lang.String[] { "Name", "ScheduleTime", }); + internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_descriptor, + new java.lang.String[] { "Name", "ScheduleTime", "LeaseDuration", "ResponseView", }); + internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_CancelLeaseRequest_descriptor, + new java.lang.String[] { "Name", "ScheduleTime", "ResponseView", }); + internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_descriptor, + new java.lang.String[] { "Name", "ResponseView", }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.AnnotationsProto.http); + com.google.protobuf.Descriptors.FileDescriptor + .internalUpdateFileDescriptor(descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.cloud.tasks.v2beta2.QueueProto.getDescriptor(); + com.google.cloud.tasks.v2beta2.TaskProto.getDescriptor(); + com.google.iam.v1.IamPolicyProto.getDescriptor(); + com.google.iam.v1.PolicyProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.CodeProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateQueueRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateQueueRequest.java new file mode 100644 index 000000000000..b6f10090f17a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateQueueRequest.java @@ -0,0 +1,840 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.CreateQueueRequest} + */ +public final class CreateQueueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.CreateQueueRequest) + CreateQueueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateQueueRequest.newBuilder() to construct. + private CreateQueueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateQueueRequest() { + parent_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateQueueRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.tasks.v2beta2.Queue.Builder subBuilder = null; + if (queue_ != null) { + subBuilder = queue_.toBuilder(); + } + queue_ = input.readMessage(com.google.cloud.tasks.v2beta2.Queue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(queue_); + queue_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CreateQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CreateQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.CreateQueueRequest.class, com.google.cloud.tasks.v2beta2.CreateQueueRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required.
+   * The location name in which the queue will be created.
+   * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+   * The list of allowed locations can be obtained by calling Cloud
+   * Tasks' implementation of
+   * [ListLocations][google.cloud.location.Locations.ListLocations].
+   * 
+ * + * string parent = 1; + */ + 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 location name in which the queue will be created.
+   * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+   * The list of allowed locations can be obtained by calling Cloud
+   * Tasks' implementation of
+   * [ListLocations][google.cloud.location.Locations.ListLocations].
+   * 
+ * + * string parent = 1; + */ + 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 QUEUE_FIELD_NUMBER = 2; + private com.google.cloud.tasks.v2beta2.Queue queue_; + /** + *
+   * Required.
+   * The queue to create.
+   * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + public boolean hasQueue() { + return queue_ != null; + } + /** + *
+   * Required.
+   * The queue to create.
+   * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + public com.google.cloud.tasks.v2beta2.Queue getQueue() { + return queue_ == null ? com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance() : queue_; + } + /** + *
+   * Required.
+   * The queue to create.
+   * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + public com.google.cloud.tasks.v2beta2.QueueOrBuilder getQueueOrBuilder() { + return getQueue(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (queue_ != null) { + output.writeMessage(2, getQueue()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (queue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getQueue()); + } + size += unknownFields.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.tasks.v2beta2.CreateQueueRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.CreateQueueRequest other = (com.google.cloud.tasks.v2beta2.CreateQueueRequest) obj; + + boolean result = true; + result = result && getParent() + .equals(other.getParent()); + result = result && (hasQueue() == other.hasQueue()); + if (hasQueue()) { + result = result && getQueue() + .equals(other.getQueue()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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(); + if (hasQueue()) { + hash = (37 * hash) + QUEUE_FIELD_NUMBER; + hash = (53 * hash) + getQueue().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.CreateQueueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.CreateQueueRequest 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.tasks.v2beta2.CreateQueueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.CreateQueueRequest 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.tasks.v2beta2.CreateQueueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.CreateQueueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.CreateQueueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.CreateQueueRequest 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.tasks.v2beta2.CreateQueueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.CreateQueueRequest 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.tasks.v2beta2.CreateQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.CreateQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.CreateQueueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.CreateQueueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.CreateQueueRequest) + com.google.cloud.tasks.v2beta2.CreateQueueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CreateQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CreateQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.CreateQueueRequest.class, com.google.cloud.tasks.v2beta2.CreateQueueRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.CreateQueueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + parent_ = ""; + + if (queueBuilder_ == null) { + queue_ = null; + } else { + queue_ = null; + queueBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CreateQueueRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.CreateQueueRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.CreateQueueRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.CreateQueueRequest build() { + com.google.cloud.tasks.v2beta2.CreateQueueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.CreateQueueRequest buildPartial() { + com.google.cloud.tasks.v2beta2.CreateQueueRequest result = new com.google.cloud.tasks.v2beta2.CreateQueueRequest(this); + result.parent_ = parent_; + if (queueBuilder_ == null) { + result.queue_ = queue_; + } else { + result.queue_ = queueBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.CreateQueueRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.CreateQueueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.CreateQueueRequest other) { + if (other == com.google.cloud.tasks.v2beta2.CreateQueueRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasQueue()) { + mergeQueue(other.getQueue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.CreateQueueRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.CreateQueueRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required.
+     * The location name in which the queue will be created.
+     * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+     * The list of allowed locations can be obtained by calling Cloud
+     * Tasks' implementation of
+     * [ListLocations][google.cloud.location.Locations.ListLocations].
+     * 
+ * + * string parent = 1; + */ + 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 location name in which the queue will be created.
+     * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+     * The list of allowed locations can be obtained by calling Cloud
+     * Tasks' implementation of
+     * [ListLocations][google.cloud.location.Locations.ListLocations].
+     * 
+ * + * string parent = 1; + */ + 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 location name in which the queue will be created.
+     * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+     * The list of allowed locations can be obtained by calling Cloud
+     * Tasks' implementation of
+     * [ListLocations][google.cloud.location.Locations.ListLocations].
+     * 
+ * + * string parent = 1; + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The location name in which the queue will be created.
+     * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+     * The list of allowed locations can be obtained by calling Cloud
+     * Tasks' implementation of
+     * [ListLocations][google.cloud.location.Locations.ListLocations].
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The location name in which the queue will be created.
+     * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+     * The list of allowed locations can be obtained by calling Cloud
+     * Tasks' implementation of
+     * [ListLocations][google.cloud.location.Locations.ListLocations].
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.tasks.v2beta2.Queue queue_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Queue, com.google.cloud.tasks.v2beta2.Queue.Builder, com.google.cloud.tasks.v2beta2.QueueOrBuilder> queueBuilder_; + /** + *
+     * Required.
+     * The queue to create.
+     * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + public boolean hasQueue() { + return queueBuilder_ != null || queue_ != null; + } + /** + *
+     * Required.
+     * The queue to create.
+     * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + public com.google.cloud.tasks.v2beta2.Queue getQueue() { + if (queueBuilder_ == null) { + return queue_ == null ? com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance() : queue_; + } else { + return queueBuilder_.getMessage(); + } + } + /** + *
+     * Required.
+     * The queue to create.
+     * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + public Builder setQueue(com.google.cloud.tasks.v2beta2.Queue value) { + if (queueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queue_ = value; + onChanged(); + } else { + queueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required.
+     * The queue to create.
+     * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + public Builder setQueue( + com.google.cloud.tasks.v2beta2.Queue.Builder builderForValue) { + if (queueBuilder_ == null) { + queue_ = builderForValue.build(); + onChanged(); + } else { + queueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required.
+     * The queue to create.
+     * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + public Builder mergeQueue(com.google.cloud.tasks.v2beta2.Queue value) { + if (queueBuilder_ == null) { + if (queue_ != null) { + queue_ = + com.google.cloud.tasks.v2beta2.Queue.newBuilder(queue_).mergeFrom(value).buildPartial(); + } else { + queue_ = value; + } + onChanged(); + } else { + queueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required.
+     * The queue to create.
+     * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + public Builder clearQueue() { + if (queueBuilder_ == null) { + queue_ = null; + onChanged(); + } else { + queue_ = null; + queueBuilder_ = null; + } + + return this; + } + /** + *
+     * Required.
+     * The queue to create.
+     * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + public com.google.cloud.tasks.v2beta2.Queue.Builder getQueueBuilder() { + + onChanged(); + return getQueueFieldBuilder().getBuilder(); + } + /** + *
+     * Required.
+     * The queue to create.
+     * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + public com.google.cloud.tasks.v2beta2.QueueOrBuilder getQueueOrBuilder() { + if (queueBuilder_ != null) { + return queueBuilder_.getMessageOrBuilder(); + } else { + return queue_ == null ? + com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance() : queue_; + } + } + /** + *
+     * Required.
+     * The queue to create.
+     * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Queue, com.google.cloud.tasks.v2beta2.Queue.Builder, com.google.cloud.tasks.v2beta2.QueueOrBuilder> + getQueueFieldBuilder() { + if (queueBuilder_ == null) { + queueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Queue, com.google.cloud.tasks.v2beta2.Queue.Builder, com.google.cloud.tasks.v2beta2.QueueOrBuilder>( + getQueue(), + getParentForChildren(), + isClean()); + queue_ = null; + } + return queueBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.CreateQueueRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.CreateQueueRequest) + private static final com.google.cloud.tasks.v2beta2.CreateQueueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.CreateQueueRequest(); + } + + public static com.google.cloud.tasks.v2beta2.CreateQueueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CreateQueueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateQueueRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.CreateQueueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateQueueRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateQueueRequestOrBuilder.java new file mode 100644 index 000000000000..54935e57416b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateQueueRequestOrBuilder.java @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface CreateQueueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.CreateQueueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The location name in which the queue will be created.
+   * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+   * The list of allowed locations can be obtained by calling Cloud
+   * Tasks' implementation of
+   * [ListLocations][google.cloud.location.Locations.ListLocations].
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + *
+   * Required.
+   * The location name in which the queue will be created.
+   * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+   * The list of allowed locations can be obtained by calling Cloud
+   * Tasks' implementation of
+   * [ListLocations][google.cloud.location.Locations.ListLocations].
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required.
+   * The queue to create.
+   * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + boolean hasQueue(); + /** + *
+   * Required.
+   * The queue to create.
+   * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + com.google.cloud.tasks.v2beta2.Queue getQueue(); + /** + *
+   * Required.
+   * The queue to create.
+   * [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 2; + */ + com.google.cloud.tasks.v2beta2.QueueOrBuilder getQueueOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequest.java new file mode 100644 index 000000000000..83bb0c0ee764 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequest.java @@ -0,0 +1,1312 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.CreateTaskRequest} + */ +public final class CreateTaskRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.CreateTaskRequest) + CreateTaskRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use CreateTaskRequest.newBuilder() to construct. + private CreateTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CreateTaskRequest() { + parent_ = ""; + responseView_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private CreateTaskRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + com.google.cloud.tasks.v2beta2.Task.Builder subBuilder = null; + if (task_ != null) { + subBuilder = task_.toBuilder(); + } + task_ = input.readMessage(com.google.cloud.tasks.v2beta2.Task.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(task_); + task_ = subBuilder.buildPartial(); + } + + break; + } + case 24: { + int rawValue = input.readEnum(); + + responseView_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.CreateTaskRequest.class, com.google.cloud.tasks.v2beta2.CreateTaskRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * The queue must already exist.
+   * 
+ * + * string parent = 1; + */ + 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 queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * The queue must already exist.
+   * 
+ * + * string parent = 1; + */ + 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 TASK_FIELD_NUMBER = 2; + private com.google.cloud.tasks.v2beta2.Task task_; + /** + *
+   * Required.
+   * The task to add.
+   * Task names have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+   * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+   * name is not specified then the system will generate a random
+   * unique task id, which will be set in the task returned in the
+   * [response][google.cloud.tasks.v2beta2.Task.name].
+   * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+   * past then Cloud Tasks will set it to the current time.
+   * Task De-duplication:
+   * Explicitly specifying a task ID enables task de-duplication.  If
+   * a task's ID is identical to that of an existing task or a task
+   * that was deleted or completed recently then the call will fail
+   * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+   * If the task's queue was created using Cloud Tasks, then another task with
+   * the same name can't be created for ~1hour after the original task was
+   * deleted or completed. If the task's queue was created using queue.yaml or
+   * queue.xml, then another task with the same name can't be created
+   * for ~9days after the original task was deleted or completed.
+   * Because there is an extra lookup cost to identify duplicate task
+   * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+   * increased latency. Using hashed strings for the task id or for
+   * the prefix of the task id is recommended. Choosing task ids that
+   * are sequential or have sequential prefixes, for example using a
+   * timestamp, causes an increase in latency and error rates in all
+   * task commands. The infrastructure relies on an approximately
+   * uniform distribution of task ids to store and serve tasks
+   * efficiently.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + public boolean hasTask() { + return task_ != null; + } + /** + *
+   * Required.
+   * The task to add.
+   * Task names have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+   * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+   * name is not specified then the system will generate a random
+   * unique task id, which will be set in the task returned in the
+   * [response][google.cloud.tasks.v2beta2.Task.name].
+   * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+   * past then Cloud Tasks will set it to the current time.
+   * Task De-duplication:
+   * Explicitly specifying a task ID enables task de-duplication.  If
+   * a task's ID is identical to that of an existing task or a task
+   * that was deleted or completed recently then the call will fail
+   * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+   * If the task's queue was created using Cloud Tasks, then another task with
+   * the same name can't be created for ~1hour after the original task was
+   * deleted or completed. If the task's queue was created using queue.yaml or
+   * queue.xml, then another task with the same name can't be created
+   * for ~9days after the original task was deleted or completed.
+   * Because there is an extra lookup cost to identify duplicate task
+   * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+   * increased latency. Using hashed strings for the task id or for
+   * the prefix of the task id is recommended. Choosing task ids that
+   * are sequential or have sequential prefixes, for example using a
+   * timestamp, causes an increase in latency and error rates in all
+   * task commands. The infrastructure relies on an approximately
+   * uniform distribution of task ids to store and serve tasks
+   * efficiently.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + public com.google.cloud.tasks.v2beta2.Task getTask() { + return task_ == null ? com.google.cloud.tasks.v2beta2.Task.getDefaultInstance() : task_; + } + /** + *
+   * Required.
+   * The task to add.
+   * Task names have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+   * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+   * name is not specified then the system will generate a random
+   * unique task id, which will be set in the task returned in the
+   * [response][google.cloud.tasks.v2beta2.Task.name].
+   * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+   * past then Cloud Tasks will set it to the current time.
+   * Task De-duplication:
+   * Explicitly specifying a task ID enables task de-duplication.  If
+   * a task's ID is identical to that of an existing task or a task
+   * that was deleted or completed recently then the call will fail
+   * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+   * If the task's queue was created using Cloud Tasks, then another task with
+   * the same name can't be created for ~1hour after the original task was
+   * deleted or completed. If the task's queue was created using queue.yaml or
+   * queue.xml, then another task with the same name can't be created
+   * for ~9days after the original task was deleted or completed.
+   * Because there is an extra lookup cost to identify duplicate task
+   * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+   * increased latency. Using hashed strings for the task id or for
+   * the prefix of the task id is recommended. Choosing task ids that
+   * are sequential or have sequential prefixes, for example using a
+   * timestamp, causes an increase in latency and error rates in all
+   * task commands. The infrastructure relies on an approximately
+   * uniform distribution of task ids to store and serve tasks
+   * efficiently.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + public com.google.cloud.tasks.v2beta2.TaskOrBuilder getTaskOrBuilder() { + return getTask(); + } + + public static final int RESPONSE_VIEW_FIELD_NUMBER = 3; + private int responseView_; + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (task_ != null) { + output.writeMessage(2, getTask()); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(3, responseView_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (task_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getTask()); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, responseView_); + } + size += unknownFields.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.tasks.v2beta2.CreateTaskRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.CreateTaskRequest other = (com.google.cloud.tasks.v2beta2.CreateTaskRequest) obj; + + boolean result = true; + result = result && getParent() + .equals(other.getParent()); + result = result && (hasTask() == other.hasTask()); + if (hasTask()) { + result = result && getTask() + .equals(other.getTask()); + } + result = result && responseView_ == other.responseView_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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(); + if (hasTask()) { + hash = (37 * hash) + TASK_FIELD_NUMBER; + hash = (53 * hash) + getTask().hashCode(); + } + hash = (37 * hash) + RESPONSE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + responseView_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.CreateTaskRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.CreateTaskRequest 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.tasks.v2beta2.CreateTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.CreateTaskRequest 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.tasks.v2beta2.CreateTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.CreateTaskRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.CreateTaskRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.CreateTaskRequest 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.tasks.v2beta2.CreateTaskRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.CreateTaskRequest 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.tasks.v2beta2.CreateTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.CreateTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.CreateTaskRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.CreateTaskRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.CreateTaskRequest) + com.google.cloud.tasks.v2beta2.CreateTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.CreateTaskRequest.class, com.google.cloud.tasks.v2beta2.CreateTaskRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.CreateTaskRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + parent_ = ""; + + if (taskBuilder_ == null) { + task_ = null; + } else { + task_ = null; + taskBuilder_ = null; + } + responseView_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_CreateTaskRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.CreateTaskRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.CreateTaskRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.CreateTaskRequest build() { + com.google.cloud.tasks.v2beta2.CreateTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.CreateTaskRequest buildPartial() { + com.google.cloud.tasks.v2beta2.CreateTaskRequest result = new com.google.cloud.tasks.v2beta2.CreateTaskRequest(this); + result.parent_ = parent_; + if (taskBuilder_ == null) { + result.task_ = task_; + } else { + result.task_ = taskBuilder_.build(); + } + result.responseView_ = responseView_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.CreateTaskRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.CreateTaskRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.CreateTaskRequest other) { + if (other == com.google.cloud.tasks.v2beta2.CreateTaskRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasTask()) { + mergeTask(other.getTask()); + } + if (other.responseView_ != 0) { + setResponseViewValue(other.getResponseViewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.CreateTaskRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.CreateTaskRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * The queue must already exist.
+     * 
+ * + * string parent = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * The queue must already exist.
+     * 
+ * + * string parent = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * The queue must already exist.
+     * 
+ * + * string parent = 1; + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * The queue must already exist.
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * The queue must already exist.
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.tasks.v2beta2.Task task_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, com.google.cloud.tasks.v2beta2.Task.Builder, com.google.cloud.tasks.v2beta2.TaskOrBuilder> taskBuilder_; + /** + *
+     * Required.
+     * The task to add.
+     * Task names have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+     * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+     * name is not specified then the system will generate a random
+     * unique task id, which will be set in the task returned in the
+     * [response][google.cloud.tasks.v2beta2.Task.name].
+     * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+     * past then Cloud Tasks will set it to the current time.
+     * Task De-duplication:
+     * Explicitly specifying a task ID enables task de-duplication.  If
+     * a task's ID is identical to that of an existing task or a task
+     * that was deleted or completed recently then the call will fail
+     * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+     * If the task's queue was created using Cloud Tasks, then another task with
+     * the same name can't be created for ~1hour after the original task was
+     * deleted or completed. If the task's queue was created using queue.yaml or
+     * queue.xml, then another task with the same name can't be created
+     * for ~9days after the original task was deleted or completed.
+     * Because there is an extra lookup cost to identify duplicate task
+     * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+     * increased latency. Using hashed strings for the task id or for
+     * the prefix of the task id is recommended. Choosing task ids that
+     * are sequential or have sequential prefixes, for example using a
+     * timestamp, causes an increase in latency and error rates in all
+     * task commands. The infrastructure relies on an approximately
+     * uniform distribution of task ids to store and serve tasks
+     * efficiently.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + public boolean hasTask() { + return taskBuilder_ != null || task_ != null; + } + /** + *
+     * Required.
+     * The task to add.
+     * Task names have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+     * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+     * name is not specified then the system will generate a random
+     * unique task id, which will be set in the task returned in the
+     * [response][google.cloud.tasks.v2beta2.Task.name].
+     * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+     * past then Cloud Tasks will set it to the current time.
+     * Task De-duplication:
+     * Explicitly specifying a task ID enables task de-duplication.  If
+     * a task's ID is identical to that of an existing task or a task
+     * that was deleted or completed recently then the call will fail
+     * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+     * If the task's queue was created using Cloud Tasks, then another task with
+     * the same name can't be created for ~1hour after the original task was
+     * deleted or completed. If the task's queue was created using queue.yaml or
+     * queue.xml, then another task with the same name can't be created
+     * for ~9days after the original task was deleted or completed.
+     * Because there is an extra lookup cost to identify duplicate task
+     * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+     * increased latency. Using hashed strings for the task id or for
+     * the prefix of the task id is recommended. Choosing task ids that
+     * are sequential or have sequential prefixes, for example using a
+     * timestamp, causes an increase in latency and error rates in all
+     * task commands. The infrastructure relies on an approximately
+     * uniform distribution of task ids to store and serve tasks
+     * efficiently.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + public com.google.cloud.tasks.v2beta2.Task getTask() { + if (taskBuilder_ == null) { + return task_ == null ? com.google.cloud.tasks.v2beta2.Task.getDefaultInstance() : task_; + } else { + return taskBuilder_.getMessage(); + } + } + /** + *
+     * Required.
+     * The task to add.
+     * Task names have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+     * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+     * name is not specified then the system will generate a random
+     * unique task id, which will be set in the task returned in the
+     * [response][google.cloud.tasks.v2beta2.Task.name].
+     * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+     * past then Cloud Tasks will set it to the current time.
+     * Task De-duplication:
+     * Explicitly specifying a task ID enables task de-duplication.  If
+     * a task's ID is identical to that of an existing task or a task
+     * that was deleted or completed recently then the call will fail
+     * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+     * If the task's queue was created using Cloud Tasks, then another task with
+     * the same name can't be created for ~1hour after the original task was
+     * deleted or completed. If the task's queue was created using queue.yaml or
+     * queue.xml, then another task with the same name can't be created
+     * for ~9days after the original task was deleted or completed.
+     * Because there is an extra lookup cost to identify duplicate task
+     * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+     * increased latency. Using hashed strings for the task id or for
+     * the prefix of the task id is recommended. Choosing task ids that
+     * are sequential or have sequential prefixes, for example using a
+     * timestamp, causes an increase in latency and error rates in all
+     * task commands. The infrastructure relies on an approximately
+     * uniform distribution of task ids to store and serve tasks
+     * efficiently.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + public Builder setTask(com.google.cloud.tasks.v2beta2.Task value) { + if (taskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + task_ = value; + onChanged(); + } else { + taskBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required.
+     * The task to add.
+     * Task names have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+     * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+     * name is not specified then the system will generate a random
+     * unique task id, which will be set in the task returned in the
+     * [response][google.cloud.tasks.v2beta2.Task.name].
+     * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+     * past then Cloud Tasks will set it to the current time.
+     * Task De-duplication:
+     * Explicitly specifying a task ID enables task de-duplication.  If
+     * a task's ID is identical to that of an existing task or a task
+     * that was deleted or completed recently then the call will fail
+     * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+     * If the task's queue was created using Cloud Tasks, then another task with
+     * the same name can't be created for ~1hour after the original task was
+     * deleted or completed. If the task's queue was created using queue.yaml or
+     * queue.xml, then another task with the same name can't be created
+     * for ~9days after the original task was deleted or completed.
+     * Because there is an extra lookup cost to identify duplicate task
+     * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+     * increased latency. Using hashed strings for the task id or for
+     * the prefix of the task id is recommended. Choosing task ids that
+     * are sequential or have sequential prefixes, for example using a
+     * timestamp, causes an increase in latency and error rates in all
+     * task commands. The infrastructure relies on an approximately
+     * uniform distribution of task ids to store and serve tasks
+     * efficiently.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + public Builder setTask( + com.google.cloud.tasks.v2beta2.Task.Builder builderForValue) { + if (taskBuilder_ == null) { + task_ = builderForValue.build(); + onChanged(); + } else { + taskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required.
+     * The task to add.
+     * Task names have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+     * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+     * name is not specified then the system will generate a random
+     * unique task id, which will be set in the task returned in the
+     * [response][google.cloud.tasks.v2beta2.Task.name].
+     * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+     * past then Cloud Tasks will set it to the current time.
+     * Task De-duplication:
+     * Explicitly specifying a task ID enables task de-duplication.  If
+     * a task's ID is identical to that of an existing task or a task
+     * that was deleted or completed recently then the call will fail
+     * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+     * If the task's queue was created using Cloud Tasks, then another task with
+     * the same name can't be created for ~1hour after the original task was
+     * deleted or completed. If the task's queue was created using queue.yaml or
+     * queue.xml, then another task with the same name can't be created
+     * for ~9days after the original task was deleted or completed.
+     * Because there is an extra lookup cost to identify duplicate task
+     * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+     * increased latency. Using hashed strings for the task id or for
+     * the prefix of the task id is recommended. Choosing task ids that
+     * are sequential or have sequential prefixes, for example using a
+     * timestamp, causes an increase in latency and error rates in all
+     * task commands. The infrastructure relies on an approximately
+     * uniform distribution of task ids to store and serve tasks
+     * efficiently.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + public Builder mergeTask(com.google.cloud.tasks.v2beta2.Task value) { + if (taskBuilder_ == null) { + if (task_ != null) { + task_ = + com.google.cloud.tasks.v2beta2.Task.newBuilder(task_).mergeFrom(value).buildPartial(); + } else { + task_ = value; + } + onChanged(); + } else { + taskBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required.
+     * The task to add.
+     * Task names have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+     * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+     * name is not specified then the system will generate a random
+     * unique task id, which will be set in the task returned in the
+     * [response][google.cloud.tasks.v2beta2.Task.name].
+     * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+     * past then Cloud Tasks will set it to the current time.
+     * Task De-duplication:
+     * Explicitly specifying a task ID enables task de-duplication.  If
+     * a task's ID is identical to that of an existing task or a task
+     * that was deleted or completed recently then the call will fail
+     * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+     * If the task's queue was created using Cloud Tasks, then another task with
+     * the same name can't be created for ~1hour after the original task was
+     * deleted or completed. If the task's queue was created using queue.yaml or
+     * queue.xml, then another task with the same name can't be created
+     * for ~9days after the original task was deleted or completed.
+     * Because there is an extra lookup cost to identify duplicate task
+     * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+     * increased latency. Using hashed strings for the task id or for
+     * the prefix of the task id is recommended. Choosing task ids that
+     * are sequential or have sequential prefixes, for example using a
+     * timestamp, causes an increase in latency and error rates in all
+     * task commands. The infrastructure relies on an approximately
+     * uniform distribution of task ids to store and serve tasks
+     * efficiently.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + public Builder clearTask() { + if (taskBuilder_ == null) { + task_ = null; + onChanged(); + } else { + task_ = null; + taskBuilder_ = null; + } + + return this; + } + /** + *
+     * Required.
+     * The task to add.
+     * Task names have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+     * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+     * name is not specified then the system will generate a random
+     * unique task id, which will be set in the task returned in the
+     * [response][google.cloud.tasks.v2beta2.Task.name].
+     * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+     * past then Cloud Tasks will set it to the current time.
+     * Task De-duplication:
+     * Explicitly specifying a task ID enables task de-duplication.  If
+     * a task's ID is identical to that of an existing task or a task
+     * that was deleted or completed recently then the call will fail
+     * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+     * If the task's queue was created using Cloud Tasks, then another task with
+     * the same name can't be created for ~1hour after the original task was
+     * deleted or completed. If the task's queue was created using queue.yaml or
+     * queue.xml, then another task with the same name can't be created
+     * for ~9days after the original task was deleted or completed.
+     * Because there is an extra lookup cost to identify duplicate task
+     * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+     * increased latency. Using hashed strings for the task id or for
+     * the prefix of the task id is recommended. Choosing task ids that
+     * are sequential or have sequential prefixes, for example using a
+     * timestamp, causes an increase in latency and error rates in all
+     * task commands. The infrastructure relies on an approximately
+     * uniform distribution of task ids to store and serve tasks
+     * efficiently.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + public com.google.cloud.tasks.v2beta2.Task.Builder getTaskBuilder() { + + onChanged(); + return getTaskFieldBuilder().getBuilder(); + } + /** + *
+     * Required.
+     * The task to add.
+     * Task names have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+     * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+     * name is not specified then the system will generate a random
+     * unique task id, which will be set in the task returned in the
+     * [response][google.cloud.tasks.v2beta2.Task.name].
+     * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+     * past then Cloud Tasks will set it to the current time.
+     * Task De-duplication:
+     * Explicitly specifying a task ID enables task de-duplication.  If
+     * a task's ID is identical to that of an existing task or a task
+     * that was deleted or completed recently then the call will fail
+     * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+     * If the task's queue was created using Cloud Tasks, then another task with
+     * the same name can't be created for ~1hour after the original task was
+     * deleted or completed. If the task's queue was created using queue.yaml or
+     * queue.xml, then another task with the same name can't be created
+     * for ~9days after the original task was deleted or completed.
+     * Because there is an extra lookup cost to identify duplicate task
+     * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+     * increased latency. Using hashed strings for the task id or for
+     * the prefix of the task id is recommended. Choosing task ids that
+     * are sequential or have sequential prefixes, for example using a
+     * timestamp, causes an increase in latency and error rates in all
+     * task commands. The infrastructure relies on an approximately
+     * uniform distribution of task ids to store and serve tasks
+     * efficiently.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + public com.google.cloud.tasks.v2beta2.TaskOrBuilder getTaskOrBuilder() { + if (taskBuilder_ != null) { + return taskBuilder_.getMessageOrBuilder(); + } else { + return task_ == null ? + com.google.cloud.tasks.v2beta2.Task.getDefaultInstance() : task_; + } + } + /** + *
+     * Required.
+     * The task to add.
+     * Task names have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+     * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+     * name is not specified then the system will generate a random
+     * unique task id, which will be set in the task returned in the
+     * [response][google.cloud.tasks.v2beta2.Task.name].
+     * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+     * past then Cloud Tasks will set it to the current time.
+     * Task De-duplication:
+     * Explicitly specifying a task ID enables task de-duplication.  If
+     * a task's ID is identical to that of an existing task or a task
+     * that was deleted or completed recently then the call will fail
+     * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+     * If the task's queue was created using Cloud Tasks, then another task with
+     * the same name can't be created for ~1hour after the original task was
+     * deleted or completed. If the task's queue was created using queue.yaml or
+     * queue.xml, then another task with the same name can't be created
+     * for ~9days after the original task was deleted or completed.
+     * Because there is an extra lookup cost to identify duplicate task
+     * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+     * increased latency. Using hashed strings for the task id or for
+     * the prefix of the task id is recommended. Choosing task ids that
+     * are sequential or have sequential prefixes, for example using a
+     * timestamp, causes an increase in latency and error rates in all
+     * task commands. The infrastructure relies on an approximately
+     * uniform distribution of task ids to store and serve tasks
+     * efficiently.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, com.google.cloud.tasks.v2beta2.Task.Builder, com.google.cloud.tasks.v2beta2.TaskOrBuilder> + getTaskFieldBuilder() { + if (taskBuilder_ == null) { + taskBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, com.google.cloud.tasks.v2beta2.Task.Builder, com.google.cloud.tasks.v2beta2.TaskOrBuilder>( + getTask(), + getParentForChildren(), + isClean()); + task_ = null; + } + return taskBuilder_; + } + + private int responseView_ = 0; + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public Builder setResponseViewValue(int value) { + responseView_ = value; + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public Builder setResponseView(com.google.cloud.tasks.v2beta2.Task.View value) { + if (value == null) { + throw new NullPointerException(); + } + + responseView_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + public Builder clearResponseView() { + + responseView_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.CreateTaskRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.CreateTaskRequest) + private static final com.google.cloud.tasks.v2beta2.CreateTaskRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.CreateTaskRequest(); + } + + public static com.google.cloud.tasks.v2beta2.CreateTaskRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CreateTaskRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTaskRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.CreateTaskRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequestOrBuilder.java new file mode 100644 index 000000000000..d6777d21c979 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/CreateTaskRequestOrBuilder.java @@ -0,0 +1,177 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface CreateTaskRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.CreateTaskRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * The queue must already exist.
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * The queue must already exist.
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * Required.
+   * The task to add.
+   * Task names have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+   * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+   * name is not specified then the system will generate a random
+   * unique task id, which will be set in the task returned in the
+   * [response][google.cloud.tasks.v2beta2.Task.name].
+   * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+   * past then Cloud Tasks will set it to the current time.
+   * Task De-duplication:
+   * Explicitly specifying a task ID enables task de-duplication.  If
+   * a task's ID is identical to that of an existing task or a task
+   * that was deleted or completed recently then the call will fail
+   * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+   * If the task's queue was created using Cloud Tasks, then another task with
+   * the same name can't be created for ~1hour after the original task was
+   * deleted or completed. If the task's queue was created using queue.yaml or
+   * queue.xml, then another task with the same name can't be created
+   * for ~9days after the original task was deleted or completed.
+   * Because there is an extra lookup cost to identify duplicate task
+   * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+   * increased latency. Using hashed strings for the task id or for
+   * the prefix of the task id is recommended. Choosing task ids that
+   * are sequential or have sequential prefixes, for example using a
+   * timestamp, causes an increase in latency and error rates in all
+   * task commands. The infrastructure relies on an approximately
+   * uniform distribution of task ids to store and serve tasks
+   * efficiently.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + boolean hasTask(); + /** + *
+   * Required.
+   * The task to add.
+   * Task names have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+   * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+   * name is not specified then the system will generate a random
+   * unique task id, which will be set in the task returned in the
+   * [response][google.cloud.tasks.v2beta2.Task.name].
+   * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+   * past then Cloud Tasks will set it to the current time.
+   * Task De-duplication:
+   * Explicitly specifying a task ID enables task de-duplication.  If
+   * a task's ID is identical to that of an existing task or a task
+   * that was deleted or completed recently then the call will fail
+   * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+   * If the task's queue was created using Cloud Tasks, then another task with
+   * the same name can't be created for ~1hour after the original task was
+   * deleted or completed. If the task's queue was created using queue.yaml or
+   * queue.xml, then another task with the same name can't be created
+   * for ~9days after the original task was deleted or completed.
+   * Because there is an extra lookup cost to identify duplicate task
+   * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+   * increased latency. Using hashed strings for the task id or for
+   * the prefix of the task id is recommended. Choosing task ids that
+   * are sequential or have sequential prefixes, for example using a
+   * timestamp, causes an increase in latency and error rates in all
+   * task commands. The infrastructure relies on an approximately
+   * uniform distribution of task ids to store and serve tasks
+   * efficiently.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + com.google.cloud.tasks.v2beta2.Task getTask(); + /** + *
+   * Required.
+   * The task to add.
+   * Task names have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`.
+   * The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a
+   * name is not specified then the system will generate a random
+   * unique task id, which will be set in the task returned in the
+   * [response][google.cloud.tasks.v2beta2.Task.name].
+   * If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the
+   * past then Cloud Tasks will set it to the current time.
+   * Task De-duplication:
+   * Explicitly specifying a task ID enables task de-duplication.  If
+   * a task's ID is identical to that of an existing task or a task
+   * that was deleted or completed recently then the call will fail
+   * with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS].
+   * If the task's queue was created using Cloud Tasks, then another task with
+   * the same name can't be created for ~1hour after the original task was
+   * deleted or completed. If the task's queue was created using queue.yaml or
+   * queue.xml, then another task with the same name can't be created
+   * for ~9days after the original task was deleted or completed.
+   * Because there is an extra lookup cost to identify duplicate task
+   * names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly
+   * increased latency. Using hashed strings for the task id or for
+   * the prefix of the task id is recommended. Choosing task ids that
+   * are sequential or have sequential prefixes, for example using a
+   * timestamp, causes an increase in latency and error rates in all
+   * task commands. The infrastructure relies on an approximately
+   * uniform distribution of task ids to store and serve tasks
+   * efficiently.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task task = 2; + */ + com.google.cloud.tasks.v2beta2.TaskOrBuilder getTaskOrBuilder(); + + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + int getResponseViewValue(); + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 3; + */ + com.google.cloud.tasks.v2beta2.Task.View getResponseView(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteQueueRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteQueueRequest.java new file mode 100644 index 000000000000..1bec52902891 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteQueueRequest.java @@ -0,0 +1,566 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.DeleteQueueRequest} + */ +public final class DeleteQueueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.DeleteQueueRequest) + DeleteQueueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteQueueRequest.newBuilder() to construct. + private DeleteQueueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteQueueRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteQueueRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_DeleteQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_DeleteQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.DeleteQueueRequest.class, com.google.cloud.tasks.v2beta2.DeleteQueueRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + 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; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.tasks.v2beta2.DeleteQueueRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.DeleteQueueRequest other = (com.google.cloud.tasks.v2beta2.DeleteQueueRequest) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.DeleteQueueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.DeleteQueueRequest 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.tasks.v2beta2.DeleteQueueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.DeleteQueueRequest 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.tasks.v2beta2.DeleteQueueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.DeleteQueueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.DeleteQueueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.DeleteQueueRequest 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.tasks.v2beta2.DeleteQueueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.DeleteQueueRequest 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.tasks.v2beta2.DeleteQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.DeleteQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.DeleteQueueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.DeleteQueueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.DeleteQueueRequest) + com.google.cloud.tasks.v2beta2.DeleteQueueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_DeleteQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_DeleteQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.DeleteQueueRequest.class, com.google.cloud.tasks.v2beta2.DeleteQueueRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.DeleteQueueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_DeleteQueueRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.DeleteQueueRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.DeleteQueueRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.DeleteQueueRequest build() { + com.google.cloud.tasks.v2beta2.DeleteQueueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.DeleteQueueRequest buildPartial() { + com.google.cloud.tasks.v2beta2.DeleteQueueRequest result = new com.google.cloud.tasks.v2beta2.DeleteQueueRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.DeleteQueueRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.DeleteQueueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.DeleteQueueRequest other) { + if (other == com.google.cloud.tasks.v2beta2.DeleteQueueRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.DeleteQueueRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.DeleteQueueRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.DeleteQueueRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.DeleteQueueRequest) + private static final com.google.cloud.tasks.v2beta2.DeleteQueueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.DeleteQueueRequest(); + } + + public static com.google.cloud.tasks.v2beta2.DeleteQueueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeleteQueueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteQueueRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.DeleteQueueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteQueueRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteQueueRequestOrBuilder.java new file mode 100644 index 000000000000..8eb637ac86a8 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteQueueRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface DeleteQueueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.DeleteQueueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteTaskRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteTaskRequest.java new file mode 100644 index 000000000000..16f21df2a877 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteTaskRequest.java @@ -0,0 +1,568 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for deleting a task using
+ * [DeleteTask][google.cloud.tasks.v2beta2.CloudTasks.DeleteTask].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.DeleteTaskRequest} + */ +public final class DeleteTaskRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.DeleteTaskRequest) + DeleteTaskRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use DeleteTaskRequest.newBuilder() to construct. + private DeleteTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DeleteTaskRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private DeleteTaskRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.DeleteTaskRequest.class, com.google.cloud.tasks.v2beta2.DeleteTaskRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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 task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.tasks.v2beta2.DeleteTaskRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.DeleteTaskRequest other = (com.google.cloud.tasks.v2beta2.DeleteTaskRequest) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.DeleteTaskRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.DeleteTaskRequest 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.tasks.v2beta2.DeleteTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.DeleteTaskRequest 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.tasks.v2beta2.DeleteTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.DeleteTaskRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.DeleteTaskRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.DeleteTaskRequest 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.tasks.v2beta2.DeleteTaskRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.DeleteTaskRequest 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.tasks.v2beta2.DeleteTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.DeleteTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.DeleteTaskRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for deleting a task using
+   * [DeleteTask][google.cloud.tasks.v2beta2.CloudTasks.DeleteTask].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.DeleteTaskRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.DeleteTaskRequest) + com.google.cloud.tasks.v2beta2.DeleteTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.DeleteTaskRequest.class, com.google.cloud.tasks.v2beta2.DeleteTaskRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.DeleteTaskRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_DeleteTaskRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.DeleteTaskRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.DeleteTaskRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.DeleteTaskRequest build() { + com.google.cloud.tasks.v2beta2.DeleteTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.DeleteTaskRequest buildPartial() { + com.google.cloud.tasks.v2beta2.DeleteTaskRequest result = new com.google.cloud.tasks.v2beta2.DeleteTaskRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.DeleteTaskRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.DeleteTaskRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.DeleteTaskRequest other) { + if (other == com.google.cloud.tasks.v2beta2.DeleteTaskRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.DeleteTaskRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.DeleteTaskRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.DeleteTaskRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.DeleteTaskRequest) + private static final com.google.cloud.tasks.v2beta2.DeleteTaskRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.DeleteTaskRequest(); + } + + public static com.google.cloud.tasks.v2beta2.DeleteTaskRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public DeleteTaskRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteTaskRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.DeleteTaskRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteTaskRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteTaskRequestOrBuilder.java new file mode 100644 index 000000000000..89ccbdad3a1a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/DeleteTaskRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface DeleteTaskRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.DeleteTaskRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequest.java new file mode 100644 index 000000000000..51072e8329b1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequest.java @@ -0,0 +1,566 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.GetQueueRequest} + */ +public final class GetQueueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.GetQueueRequest) + GetQueueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetQueueRequest.newBuilder() to construct. + private GetQueueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetQueueRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetQueueRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_GetQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_GetQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.GetQueueRequest.class, com.google.cloud.tasks.v2beta2.GetQueueRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required.
+   * The resource name of the queue. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + 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 of the queue. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + 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; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.tasks.v2beta2.GetQueueRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.GetQueueRequest other = (com.google.cloud.tasks.v2beta2.GetQueueRequest) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.GetQueueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.GetQueueRequest 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.tasks.v2beta2.GetQueueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.GetQueueRequest 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.tasks.v2beta2.GetQueueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.GetQueueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.GetQueueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.GetQueueRequest 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.tasks.v2beta2.GetQueueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.GetQueueRequest 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.tasks.v2beta2.GetQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.GetQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.GetQueueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.GetQueueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.GetQueueRequest) + com.google.cloud.tasks.v2beta2.GetQueueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_GetQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_GetQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.GetQueueRequest.class, com.google.cloud.tasks.v2beta2.GetQueueRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.GetQueueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_GetQueueRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.GetQueueRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.GetQueueRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.GetQueueRequest build() { + com.google.cloud.tasks.v2beta2.GetQueueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.GetQueueRequest buildPartial() { + com.google.cloud.tasks.v2beta2.GetQueueRequest result = new com.google.cloud.tasks.v2beta2.GetQueueRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.GetQueueRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.GetQueueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.GetQueueRequest other) { + if (other == com.google.cloud.tasks.v2beta2.GetQueueRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.GetQueueRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.GetQueueRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required.
+     * The resource name of the queue. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + 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 of the queue. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + 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 of the queue. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The resource name of the queue. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The resource name of the queue. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.GetQueueRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.GetQueueRequest) + private static final com.google.cloud.tasks.v2beta2.GetQueueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.GetQueueRequest(); + } + + public static com.google.cloud.tasks.v2beta2.GetQueueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GetQueueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetQueueRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.GetQueueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequestOrBuilder.java new file mode 100644 index 000000000000..cbb1a62d5269 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetQueueRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface GetQueueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.GetQueueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The resource name of the queue. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Required.
+   * The resource name of the queue. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetTaskRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetTaskRequest.java new file mode 100644 index 000000000000..eba6365ad59f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetTaskRequest.java @@ -0,0 +1,740 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for getting a task using [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.GetTaskRequest} + */ +public final class GetTaskRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.GetTaskRequest) + GetTaskRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use GetTaskRequest.newBuilder() to construct. + private GetTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private GetTaskRequest() { + name_ = ""; + responseView_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private GetTaskRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + + responseView_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.GetTaskRequest.class, com.google.cloud.tasks.v2beta2.GetTaskRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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 task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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 RESPONSE_VIEW_FIELD_NUMBER = 2; + private int responseView_; + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(2, responseView_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, responseView_); + } + size += unknownFields.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.tasks.v2beta2.GetTaskRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.GetTaskRequest other = (com.google.cloud.tasks.v2beta2.GetTaskRequest) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && responseView_ == other.responseView_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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) + RESPONSE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + responseView_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.GetTaskRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.GetTaskRequest 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.tasks.v2beta2.GetTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.GetTaskRequest 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.tasks.v2beta2.GetTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.GetTaskRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.GetTaskRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.GetTaskRequest 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.tasks.v2beta2.GetTaskRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.GetTaskRequest 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.tasks.v2beta2.GetTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.GetTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.GetTaskRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for getting a task using [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.GetTaskRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.GetTaskRequest) + com.google.cloud.tasks.v2beta2.GetTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.GetTaskRequest.class, com.google.cloud.tasks.v2beta2.GetTaskRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.GetTaskRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + responseView_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_GetTaskRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.GetTaskRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.GetTaskRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.GetTaskRequest build() { + com.google.cloud.tasks.v2beta2.GetTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.GetTaskRequest buildPartial() { + com.google.cloud.tasks.v2beta2.GetTaskRequest result = new com.google.cloud.tasks.v2beta2.GetTaskRequest(this); + result.name_ = name_; + result.responseView_ = responseView_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.GetTaskRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.GetTaskRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.GetTaskRequest other) { + if (other == com.google.cloud.tasks.v2beta2.GetTaskRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.responseView_ != 0) { + setResponseViewValue(other.getResponseViewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.GetTaskRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.GetTaskRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int responseView_ = 0; + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public Builder setResponseViewValue(int value) { + responseView_ = value; + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public Builder setResponseView(com.google.cloud.tasks.v2beta2.Task.View value) { + if (value == null) { + throw new NullPointerException(); + } + + responseView_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public Builder clearResponseView() { + + responseView_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.GetTaskRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.GetTaskRequest) + private static final com.google.cloud.tasks.v2beta2.GetTaskRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.GetTaskRequest(); + } + + public static com.google.cloud.tasks.v2beta2.GetTaskRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public GetTaskRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetTaskRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.GetTaskRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetTaskRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetTaskRequestOrBuilder.java new file mode 100644 index 000000000000..9fc307623354 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/GetTaskRequestOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface GetTaskRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.GetTaskRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + int getResponseViewValue(); + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + com.google.cloud.tasks.v2beta2.Task.View getResponseView(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpMethod.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpMethod.java new file mode 100644 index 000000000000..86acc4df5737 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/HttpMethod.java @@ -0,0 +1,191 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * The HTTP method used to execute the task.
+ * 
+ * + * Protobuf enum {@code google.cloud.tasks.v2beta2.HttpMethod} + */ +public enum HttpMethod + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+   * HTTP method unspecified
+   * 
+ * + * HTTP_METHOD_UNSPECIFIED = 0; + */ + HTTP_METHOD_UNSPECIFIED(0), + /** + *
+   * HTTP Post
+   * 
+ * + * POST = 1; + */ + POST(1), + /** + *
+   * HTTP Get
+   * 
+ * + * GET = 2; + */ + GET(2), + /** + *
+   * HTTP Head
+   * 
+ * + * HEAD = 3; + */ + HEAD(3), + /** + *
+   * HTTP Put
+   * 
+ * + * PUT = 4; + */ + PUT(4), + /** + *
+   * HTTP Delete
+   * 
+ * + * DELETE = 5; + */ + DELETE(5), + UNRECOGNIZED(-1), + ; + + /** + *
+   * HTTP method unspecified
+   * 
+ * + * HTTP_METHOD_UNSPECIFIED = 0; + */ + public static final int HTTP_METHOD_UNSPECIFIED_VALUE = 0; + /** + *
+   * HTTP Post
+   * 
+ * + * POST = 1; + */ + public static final int POST_VALUE = 1; + /** + *
+   * HTTP Get
+   * 
+ * + * GET = 2; + */ + public static final int GET_VALUE = 2; + /** + *
+   * HTTP Head
+   * 
+ * + * HEAD = 3; + */ + public static final int HEAD_VALUE = 3; + /** + *
+   * HTTP Put
+   * 
+ * + * PUT = 4; + */ + public static final int PUT_VALUE = 4; + /** + *
+   * HTTP Delete
+   * 
+ * + * DELETE = 5; + */ + public static final int DELETE_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; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static HttpMethod valueOf(int value) { + return forNumber(value); + } + + public static HttpMethod forNumber(int value) { + switch (value) { + case 0: return HTTP_METHOD_UNSPECIFIED; + case 1: return POST; + case 2: return GET; + case 3: return HEAD; + case 4: return PUT; + case 5: return DELETE; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + HttpMethod> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public HttpMethod findValueByNumber(int number) { + return HttpMethod.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + 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.tasks.v2beta2.TargetProto.getDescriptor().getEnumTypes().get(0); + } + + private static final HttpMethod[] VALUES = values(); + + public static HttpMethod 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 HttpMethod(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tasks.v2beta2.HttpMethod) +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksRequest.java new file mode 100644 index 000000000000..8214a794d408 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksRequest.java @@ -0,0 +1,1434 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.LeaseTasksRequest} + */ +public final class LeaseTasksRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.LeaseTasksRequest) + LeaseTasksRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use LeaseTasksRequest.newBuilder() to construct. + private LeaseTasksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LeaseTasksRequest() { + parent_ = ""; + maxTasks_ = 0; + responseView_ = 0; + filter_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LeaseTasksRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + + maxTasks_ = input.readInt32(); + break; + } + case 26: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (leaseDuration_ != null) { + subBuilder = leaseDuration_.toBuilder(); + } + leaseDuration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(leaseDuration_); + leaseDuration_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + int rawValue = input.readEnum(); + + responseView_ = rawValue; + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.LeaseTasksRequest.class, com.google.cloud.tasks.v2beta2.LeaseTasksRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string parent = 1; + */ + 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 queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string parent = 1; + */ + 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 MAX_TASKS_FIELD_NUMBER = 2; + private int maxTasks_; + /** + *
+   * The maximum number of tasks to lease.
+   * The system will make a best effort to return as close to as
+   * `max_tasks` as possible.
+   * The largest that `max_tasks` can be is 1000.
+   * 
+ * + * int32 max_tasks = 2; + */ + public int getMaxTasks() { + return maxTasks_; + } + + public static final int LEASE_DURATION_FIELD_NUMBER = 3; + private com.google.protobuf.Duration leaseDuration_; + /** + *
+   * After the worker has successfully finished the work associated
+   * with the task, the worker must call via
+   * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+   * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+   * that another worker can retry it.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public boolean hasLeaseDuration() { + return leaseDuration_ != null; + } + /** + *
+   * After the worker has successfully finished the work associated
+   * with the task, the worker must call via
+   * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+   * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+   * that another worker can retry it.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public com.google.protobuf.Duration getLeaseDuration() { + return leaseDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : leaseDuration_; + } + /** + *
+   * After the worker has successfully finished the work associated
+   * with the task, the worker must call via
+   * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+   * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+   * that another worker can retry it.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public com.google.protobuf.DurationOrBuilder getLeaseDurationOrBuilder() { + return getLeaseDuration(); + } + + public static final int RESPONSE_VIEW_FIELD_NUMBER = 4; + private int responseView_; + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + + public static final int FILTER_FIELD_NUMBER = 5; + private volatile java.lang.Object filter_; + /** + *
+   * `filter` can be used to specify a subset of tasks to lease.
+   * When `filter` is set to `tag=<my-tag>` then the
+   * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose
+   * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to `<my-tag>`. `<my-tag>` must be
+   * less than 500 characters.
+   * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
+   * the same tag as the task with the oldest
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned.
+   * Grammar Syntax:
+   * * `filter = "tag=" tag | "tag_function=" function`
+   * * `tag = string`
+   * * `function = "oldest_tag()"`
+   * The `oldest_tag()` function returns tasks which have the same tag as the
+   * oldest task (ordered by schedule time).
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or
+   * [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
+   * aren't UTF-8 encoded can't be used in the
+   * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's
+   * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks.
+   * 
+ * + * string filter = 5; + */ + 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; + } + } + /** + *
+   * `filter` can be used to specify a subset of tasks to lease.
+   * When `filter` is set to `tag=<my-tag>` then the
+   * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose
+   * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to `<my-tag>`. `<my-tag>` must be
+   * less than 500 characters.
+   * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
+   * the same tag as the task with the oldest
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned.
+   * Grammar Syntax:
+   * * `filter = "tag=" tag | "tag_function=" function`
+   * * `tag = string`
+   * * `function = "oldest_tag()"`
+   * The `oldest_tag()` function returns tasks which have the same tag as the
+   * oldest task (ordered by schedule time).
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or
+   * [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
+   * aren't UTF-8 encoded can't be used in the
+   * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's
+   * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks.
+   * 
+ * + * string filter = 5; + */ + 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; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (maxTasks_ != 0) { + output.writeInt32(2, maxTasks_); + } + if (leaseDuration_ != null) { + output.writeMessage(3, getLeaseDuration()); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(4, responseView_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, filter_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (maxTasks_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxTasks_); + } + if (leaseDuration_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLeaseDuration()); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, responseView_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, filter_); + } + size += unknownFields.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.tasks.v2beta2.LeaseTasksRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.LeaseTasksRequest other = (com.google.cloud.tasks.v2beta2.LeaseTasksRequest) obj; + + boolean result = true; + result = result && getParent() + .equals(other.getParent()); + result = result && (getMaxTasks() + == other.getMaxTasks()); + result = result && (hasLeaseDuration() == other.hasLeaseDuration()); + if (hasLeaseDuration()) { + result = result && getLeaseDuration() + .equals(other.getLeaseDuration()); + } + result = result && responseView_ == other.responseView_; + result = result && getFilter() + .equals(other.getFilter()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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) + MAX_TASKS_FIELD_NUMBER; + hash = (53 * hash) + getMaxTasks(); + if (hasLeaseDuration()) { + hash = (37 * hash) + LEASE_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getLeaseDuration().hashCode(); + } + hash = (37 * hash) + RESPONSE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + responseView_; + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.LeaseTasksRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksRequest 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.tasks.v2beta2.LeaseTasksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksRequest 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.tasks.v2beta2.LeaseTasksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksRequest 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.tasks.v2beta2.LeaseTasksRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksRequest 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.tasks.v2beta2.LeaseTasksRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.LeaseTasksRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.LeaseTasksRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.LeaseTasksRequest) + com.google.cloud.tasks.v2beta2.LeaseTasksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.LeaseTasksRequest.class, com.google.cloud.tasks.v2beta2.LeaseTasksRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.LeaseTasksRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + parent_ = ""; + + maxTasks_ = 0; + + if (leaseDurationBuilder_ == null) { + leaseDuration_ = null; + } else { + leaseDuration_ = null; + leaseDurationBuilder_ = null; + } + responseView_ = 0; + + filter_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_LeaseTasksRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.LeaseTasksRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.LeaseTasksRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.LeaseTasksRequest build() { + com.google.cloud.tasks.v2beta2.LeaseTasksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.LeaseTasksRequest buildPartial() { + com.google.cloud.tasks.v2beta2.LeaseTasksRequest result = new com.google.cloud.tasks.v2beta2.LeaseTasksRequest(this); + result.parent_ = parent_; + result.maxTasks_ = maxTasks_; + if (leaseDurationBuilder_ == null) { + result.leaseDuration_ = leaseDuration_; + } else { + result.leaseDuration_ = leaseDurationBuilder_.build(); + } + result.responseView_ = responseView_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.LeaseTasksRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.LeaseTasksRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.LeaseTasksRequest other) { + if (other == com.google.cloud.tasks.v2beta2.LeaseTasksRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getMaxTasks() != 0) { + setMaxTasks(other.getMaxTasks()); + } + if (other.hasLeaseDuration()) { + mergeLeaseDuration(other.getLeaseDuration()); + } + if (other.responseView_ != 0) { + setResponseViewValue(other.getResponseViewValue()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.LeaseTasksRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.LeaseTasksRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string parent = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string parent = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string parent = 1; + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int maxTasks_ ; + /** + *
+     * The maximum number of tasks to lease.
+     * The system will make a best effort to return as close to as
+     * `max_tasks` as possible.
+     * The largest that `max_tasks` can be is 1000.
+     * 
+ * + * int32 max_tasks = 2; + */ + public int getMaxTasks() { + return maxTasks_; + } + /** + *
+     * The maximum number of tasks to lease.
+     * The system will make a best effort to return as close to as
+     * `max_tasks` as possible.
+     * The largest that `max_tasks` can be is 1000.
+     * 
+ * + * int32 max_tasks = 2; + */ + public Builder setMaxTasks(int value) { + + maxTasks_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of tasks to lease.
+     * The system will make a best effort to return as close to as
+     * `max_tasks` as possible.
+     * The largest that `max_tasks` can be is 1000.
+     * 
+ * + * int32 max_tasks = 2; + */ + public Builder clearMaxTasks() { + + maxTasks_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Duration leaseDuration_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> leaseDurationBuilder_; + /** + *
+     * After the worker has successfully finished the work associated
+     * with the task, the worker must call via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+     * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+     * that another worker can retry it.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public boolean hasLeaseDuration() { + return leaseDurationBuilder_ != null || leaseDuration_ != null; + } + /** + *
+     * After the worker has successfully finished the work associated
+     * with the task, the worker must call via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+     * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+     * that another worker can retry it.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public com.google.protobuf.Duration getLeaseDuration() { + if (leaseDurationBuilder_ == null) { + return leaseDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : leaseDuration_; + } else { + return leaseDurationBuilder_.getMessage(); + } + } + /** + *
+     * After the worker has successfully finished the work associated
+     * with the task, the worker must call via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+     * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+     * that another worker can retry it.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public Builder setLeaseDuration(com.google.protobuf.Duration value) { + if (leaseDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + leaseDuration_ = value; + onChanged(); + } else { + leaseDurationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * After the worker has successfully finished the work associated
+     * with the task, the worker must call via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+     * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+     * that another worker can retry it.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public Builder setLeaseDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (leaseDurationBuilder_ == null) { + leaseDuration_ = builderForValue.build(); + onChanged(); + } else { + leaseDurationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * After the worker has successfully finished the work associated
+     * with the task, the worker must call via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+     * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+     * that another worker can retry it.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public Builder mergeLeaseDuration(com.google.protobuf.Duration value) { + if (leaseDurationBuilder_ == null) { + if (leaseDuration_ != null) { + leaseDuration_ = + com.google.protobuf.Duration.newBuilder(leaseDuration_).mergeFrom(value).buildPartial(); + } else { + leaseDuration_ = value; + } + onChanged(); + } else { + leaseDurationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * After the worker has successfully finished the work associated
+     * with the task, the worker must call via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+     * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+     * that another worker can retry it.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public Builder clearLeaseDuration() { + if (leaseDurationBuilder_ == null) { + leaseDuration_ = null; + onChanged(); + } else { + leaseDuration_ = null; + leaseDurationBuilder_ = null; + } + + return this; + } + /** + *
+     * After the worker has successfully finished the work associated
+     * with the task, the worker must call via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+     * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+     * that another worker can retry it.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public com.google.protobuf.Duration.Builder getLeaseDurationBuilder() { + + onChanged(); + return getLeaseDurationFieldBuilder().getBuilder(); + } + /** + *
+     * After the worker has successfully finished the work associated
+     * with the task, the worker must call via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+     * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+     * that another worker can retry it.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public com.google.protobuf.DurationOrBuilder getLeaseDurationOrBuilder() { + if (leaseDurationBuilder_ != null) { + return leaseDurationBuilder_.getMessageOrBuilder(); + } else { + return leaseDuration_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : leaseDuration_; + } + } + /** + *
+     * After the worker has successfully finished the work associated
+     * with the task, the worker must call via
+     * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+     * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+     * that another worker can retry it.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getLeaseDurationFieldBuilder() { + if (leaseDurationBuilder_ == null) { + leaseDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getLeaseDuration(), + getParentForChildren(), + isClean()); + leaseDuration_ = null; + } + return leaseDurationBuilder_; + } + + private int responseView_ = 0; + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public Builder setResponseViewValue(int value) { + responseView_ = value; + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public Builder setResponseView(com.google.cloud.tasks.v2beta2.Task.View value) { + if (value == null) { + throw new NullPointerException(); + } + + responseView_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public Builder clearResponseView() { + + responseView_ = 0; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + *
+     * `filter` can be used to specify a subset of tasks to lease.
+     * When `filter` is set to `tag=<my-tag>` then the
+     * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose
+     * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to `<my-tag>`. `<my-tag>` must be
+     * less than 500 characters.
+     * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
+     * the same tag as the task with the oldest
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned.
+     * Grammar Syntax:
+     * * `filter = "tag=" tag | "tag_function=" function`
+     * * `tag = string`
+     * * `function = "oldest_tag()"`
+     * The `oldest_tag()` function returns tasks which have the same tag as the
+     * oldest task (ordered by schedule time).
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or
+     * [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
+     * aren't UTF-8 encoded can't be used in the
+     * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's
+     * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks.
+     * 
+ * + * string filter = 5; + */ + 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; + } + } + /** + *
+     * `filter` can be used to specify a subset of tasks to lease.
+     * When `filter` is set to `tag=<my-tag>` then the
+     * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose
+     * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to `<my-tag>`. `<my-tag>` must be
+     * less than 500 characters.
+     * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
+     * the same tag as the task with the oldest
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned.
+     * Grammar Syntax:
+     * * `filter = "tag=" tag | "tag_function=" function`
+     * * `tag = string`
+     * * `function = "oldest_tag()"`
+     * The `oldest_tag()` function returns tasks which have the same tag as the
+     * oldest task (ordered by schedule time).
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or
+     * [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
+     * aren't UTF-8 encoded can't be used in the
+     * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's
+     * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks.
+     * 
+ * + * string filter = 5; + */ + 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; + } + } + /** + *
+     * `filter` can be used to specify a subset of tasks to lease.
+     * When `filter` is set to `tag=<my-tag>` then the
+     * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose
+     * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to `<my-tag>`. `<my-tag>` must be
+     * less than 500 characters.
+     * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
+     * the same tag as the task with the oldest
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned.
+     * Grammar Syntax:
+     * * `filter = "tag=" tag | "tag_function=" function`
+     * * `tag = string`
+     * * `function = "oldest_tag()"`
+     * The `oldest_tag()` function returns tasks which have the same tag as the
+     * oldest task (ordered by schedule time).
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or
+     * [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
+     * aren't UTF-8 encoded can't be used in the
+     * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's
+     * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks.
+     * 
+ * + * string filter = 5; + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * `filter` can be used to specify a subset of tasks to lease.
+     * When `filter` is set to `tag=<my-tag>` then the
+     * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose
+     * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to `<my-tag>`. `<my-tag>` must be
+     * less than 500 characters.
+     * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
+     * the same tag as the task with the oldest
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned.
+     * Grammar Syntax:
+     * * `filter = "tag=" tag | "tag_function=" function`
+     * * `tag = string`
+     * * `function = "oldest_tag()"`
+     * The `oldest_tag()` function returns tasks which have the same tag as the
+     * oldest task (ordered by schedule time).
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or
+     * [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
+     * aren't UTF-8 encoded can't be used in the
+     * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's
+     * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks.
+     * 
+ * + * string filter = 5; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * `filter` can be used to specify a subset of tasks to lease.
+     * When `filter` is set to `tag=<my-tag>` then the
+     * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose
+     * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to `<my-tag>`. `<my-tag>` must be
+     * less than 500 characters.
+     * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
+     * the same tag as the task with the oldest
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned.
+     * Grammar Syntax:
+     * * `filter = "tag=" tag | "tag_function=" function`
+     * * `tag = string`
+     * * `function = "oldest_tag()"`
+     * The `oldest_tag()` function returns tasks which have the same tag as the
+     * oldest task (ordered by schedule time).
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or
+     * [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
+     * aren't UTF-8 encoded can't be used in the
+     * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's
+     * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks.
+     * 
+ * + * string filter = 5; + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.LeaseTasksRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.LeaseTasksRequest) + private static final com.google.cloud.tasks.v2beta2.LeaseTasksRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.LeaseTasksRequest(); + } + + public static com.google.cloud.tasks.v2beta2.LeaseTasksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public LeaseTasksRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LeaseTasksRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.LeaseTasksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksRequestOrBuilder.java new file mode 100644 index 000000000000..88350d0aa290 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksRequestOrBuilder.java @@ -0,0 +1,182 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface LeaseTasksRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.LeaseTasksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The maximum number of tasks to lease.
+   * The system will make a best effort to return as close to as
+   * `max_tasks` as possible.
+   * The largest that `max_tasks` can be is 1000.
+   * 
+ * + * int32 max_tasks = 2; + */ + int getMaxTasks(); + + /** + *
+   * After the worker has successfully finished the work associated
+   * with the task, the worker must call via
+   * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+   * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+   * that another worker can retry it.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + boolean hasLeaseDuration(); + /** + *
+   * After the worker has successfully finished the work associated
+   * with the task, the worker must call via
+   * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+   * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+   * that another worker can retry it.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + com.google.protobuf.Duration getLeaseDuration(); + /** + *
+   * After the worker has successfully finished the work associated
+   * with the task, the worker must call via
+   * [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be
+   * returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so
+   * that another worker can retry it.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + com.google.protobuf.DurationOrBuilder getLeaseDurationOrBuilder(); + + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + int getResponseViewValue(); + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + com.google.cloud.tasks.v2beta2.Task.View getResponseView(); + + /** + *
+   * `filter` can be used to specify a subset of tasks to lease.
+   * When `filter` is set to `tag=<my-tag>` then the
+   * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose
+   * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to `<my-tag>`. `<my-tag>` must be
+   * less than 500 characters.
+   * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
+   * the same tag as the task with the oldest
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned.
+   * Grammar Syntax:
+   * * `filter = "tag=" tag | "tag_function=" function`
+   * * `tag = string`
+   * * `function = "oldest_tag()"`
+   * The `oldest_tag()` function returns tasks which have the same tag as the
+   * oldest task (ordered by schedule time).
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or
+   * [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
+   * aren't UTF-8 encoded can't be used in the
+   * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's
+   * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks.
+   * 
+ * + * string filter = 5; + */ + java.lang.String getFilter(); + /** + *
+   * `filter` can be used to specify a subset of tasks to lease.
+   * When `filter` is set to `tag=<my-tag>` then the
+   * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose
+   * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to `<my-tag>`. `<my-tag>` must be
+   * less than 500 characters.
+   * When `filter` is set to `tag_function=oldest_tag()`, only tasks which have
+   * the same tag as the task with the oldest
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned.
+   * Grammar Syntax:
+   * * `filter = "tag=" tag | "tag_function=" function`
+   * * `tag = string`
+   * * `function = "oldest_tag()"`
+   * The `oldest_tag()` function returns tasks which have the same tag as the
+   * oldest task (ordered by schedule time).
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or
+   * [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. Tag which
+   * aren't UTF-8 encoded can't be used in the
+   * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's
+   * [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks.
+   * 
+ * + * string filter = 5; + */ + com.google.protobuf.ByteString + getFilterBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksResponse.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksResponse.java new file mode 100644 index 000000000000..ce6c9e140942 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksResponse.java @@ -0,0 +1,834 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Response message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.LeaseTasksResponse} + */ +public final class LeaseTasksResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.LeaseTasksResponse) + LeaseTasksResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use LeaseTasksResponse.newBuilder() to construct. + private LeaseTasksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private LeaseTasksResponse() { + tasks_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private LeaseTasksResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + tasks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tasks_.add( + input.readMessage(com.google.cloud.tasks.v2beta2.Task.parser(), extensionRegistry)); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + tasks_ = java.util.Collections.unmodifiableList(tasks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.LeaseTasksResponse.class, com.google.cloud.tasks.v2beta2.LeaseTasksResponse.Builder.class); + } + + public static final int TASKS_FIELD_NUMBER = 1; + private java.util.List tasks_; + /** + *
+   * The leased tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public java.util.List getTasksList() { + return tasks_; + } + /** + *
+   * The leased tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public java.util.List + getTasksOrBuilderList() { + return tasks_; + } + /** + *
+   * The leased tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public int getTasksCount() { + return tasks_.size(); + } + /** + *
+   * The leased tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.Task getTasks(int index) { + return tasks_.get(index); + } + /** + *
+   * The leased tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.TaskOrBuilder getTasksOrBuilder( + int index) { + return tasks_.get(index); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < tasks_.size(); i++) { + output.writeMessage(1, tasks_.get(i)); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tasks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tasks_.get(i)); + } + size += unknownFields.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.tasks.v2beta2.LeaseTasksResponse)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.LeaseTasksResponse other = (com.google.cloud.tasks.v2beta2.LeaseTasksResponse) obj; + + boolean result = true; + result = result && getTasksList() + .equals(other.getTasksList()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTasksCount() > 0) { + hash = (37 * hash) + TASKS_FIELD_NUMBER; + hash = (53 * hash) + getTasksList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.LeaseTasksResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksResponse 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.tasks.v2beta2.LeaseTasksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksResponse 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.tasks.v2beta2.LeaseTasksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksResponse 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.tasks.v2beta2.LeaseTasksResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksResponse 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.tasks.v2beta2.LeaseTasksResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.LeaseTasksResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.LeaseTasksResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.LeaseTasksResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.LeaseTasksResponse) + com.google.cloud.tasks.v2beta2.LeaseTasksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.LeaseTasksResponse.class, com.google.cloud.tasks.v2beta2.LeaseTasksResponse.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.LeaseTasksResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTasksFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tasksBuilder_.clear(); + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_LeaseTasksResponse_descriptor; + } + + public com.google.cloud.tasks.v2beta2.LeaseTasksResponse getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.LeaseTasksResponse.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.LeaseTasksResponse build() { + com.google.cloud.tasks.v2beta2.LeaseTasksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.LeaseTasksResponse buildPartial() { + com.google.cloud.tasks.v2beta2.LeaseTasksResponse result = new com.google.cloud.tasks.v2beta2.LeaseTasksResponse(this); + int from_bitField0_ = bitField0_; + if (tasksBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + tasks_ = java.util.Collections.unmodifiableList(tasks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tasks_ = tasks_; + } else { + result.tasks_ = tasksBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.LeaseTasksResponse) { + return mergeFrom((com.google.cloud.tasks.v2beta2.LeaseTasksResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.LeaseTasksResponse other) { + if (other == com.google.cloud.tasks.v2beta2.LeaseTasksResponse.getDefaultInstance()) return this; + if (tasksBuilder_ == null) { + if (!other.tasks_.isEmpty()) { + if (tasks_.isEmpty()) { + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTasksIsMutable(); + tasks_.addAll(other.tasks_); + } + onChanged(); + } + } else { + if (!other.tasks_.isEmpty()) { + if (tasksBuilder_.isEmpty()) { + tasksBuilder_.dispose(); + tasksBuilder_ = null; + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + tasksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTasksFieldBuilder() : null; + } else { + tasksBuilder_.addAllMessages(other.tasks_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.LeaseTasksResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.LeaseTasksResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List tasks_ = + java.util.Collections.emptyList(); + private void ensureTasksIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + tasks_ = new java.util.ArrayList(tasks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, com.google.cloud.tasks.v2beta2.Task.Builder, com.google.cloud.tasks.v2beta2.TaskOrBuilder> tasksBuilder_; + + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public java.util.List getTasksList() { + if (tasksBuilder_ == null) { + return java.util.Collections.unmodifiableList(tasks_); + } else { + return tasksBuilder_.getMessageList(); + } + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public int getTasksCount() { + if (tasksBuilder_ == null) { + return tasks_.size(); + } else { + return tasksBuilder_.getCount(); + } + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.Task getTasks(int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); + } else { + return tasksBuilder_.getMessage(index); + } + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder setTasks( + int index, com.google.cloud.tasks.v2beta2.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.set(index, value); + onChanged(); + } else { + tasksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder setTasks( + int index, com.google.cloud.tasks.v2beta2.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.set(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder addTasks(com.google.cloud.tasks.v2beta2.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(value); + onChanged(); + } else { + tasksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder addTasks( + int index, com.google.cloud.tasks.v2beta2.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(index, value); + onChanged(); + } else { + tasksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder addTasks( + com.google.cloud.tasks.v2beta2.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder addTasks( + int index, com.google.cloud.tasks.v2beta2.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder addAllTasks( + java.lang.Iterable values) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tasks_); + onChanged(); + } else { + tasksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder clearTasks() { + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tasksBuilder_.clear(); + } + return this; + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder removeTasks(int index) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.remove(index); + onChanged(); + } else { + tasksBuilder_.remove(index); + } + return this; + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.Task.Builder getTasksBuilder( + int index) { + return getTasksFieldBuilder().getBuilder(index); + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.TaskOrBuilder getTasksOrBuilder( + int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); } else { + return tasksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public java.util.List + getTasksOrBuilderList() { + if (tasksBuilder_ != null) { + return tasksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tasks_); + } + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.Task.Builder addTasksBuilder() { + return getTasksFieldBuilder().addBuilder( + com.google.cloud.tasks.v2beta2.Task.getDefaultInstance()); + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.Task.Builder addTasksBuilder( + int index) { + return getTasksFieldBuilder().addBuilder( + index, com.google.cloud.tasks.v2beta2.Task.getDefaultInstance()); + } + /** + *
+     * The leased tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public java.util.List + getTasksBuilderList() { + return getTasksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, com.google.cloud.tasks.v2beta2.Task.Builder, com.google.cloud.tasks.v2beta2.TaskOrBuilder> + getTasksFieldBuilder() { + if (tasksBuilder_ == null) { + tasksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, com.google.cloud.tasks.v2beta2.Task.Builder, com.google.cloud.tasks.v2beta2.TaskOrBuilder>( + tasks_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + tasks_ = null; + } + return tasksBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.LeaseTasksResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.LeaseTasksResponse) + private static final com.google.cloud.tasks.v2beta2.LeaseTasksResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.LeaseTasksResponse(); + } + + public static com.google.cloud.tasks.v2beta2.LeaseTasksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public LeaseTasksResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new LeaseTasksResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.LeaseTasksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksResponseOrBuilder.java new file mode 100644 index 000000000000..9fd3c606a20f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LeaseTasksResponseOrBuilder.java @@ -0,0 +1,53 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface LeaseTasksResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.LeaseTasksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The leased tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + java.util.List + getTasksList(); + /** + *
+   * The leased tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + com.google.cloud.tasks.v2beta2.Task getTasks(int index); + /** + *
+   * The leased tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + int getTasksCount(); + /** + *
+   * The leased tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + java.util.List + getTasksOrBuilderList(); + /** + *
+   * The leased tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + com.google.cloud.tasks.v2beta2.TaskOrBuilder getTasksOrBuilder( + int index); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequest.java new file mode 100644 index 000000000000..1f0a462ec5fd --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequest.java @@ -0,0 +1,1061 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.ListQueuesRequest} + */ +public final class ListQueuesRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.ListQueuesRequest) + ListQueuesRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListQueuesRequest.newBuilder() to construct. + private ListQueuesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListQueuesRequest() { + parent_ = ""; + filter_ = ""; + pageSize_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListQueuesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 24: { + + pageSize_ = input.readInt32(); + break; + } + case 34: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListQueuesRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListQueuesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.ListQueuesRequest.class, com.google.cloud.tasks.v2beta2.ListQueuesRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required.
+   * The location name.
+   * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+   * 
+ * + * string parent = 1; + */ + 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 location name.
+   * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+   * 
+ * + * string parent = 1; + */ + 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 FILTER_FIELD_NUMBER = 2; + private volatile java.lang.Object filter_; + /** + *
+   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue]
+   * field can be used as a filter and several operators as supported.
+   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+   * described in
+   * [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).
+   * Sample filter "app_engine_http_target: *".
+   * Note that using filters might cause fewer queues than the
+   * requested_page size to be returned.
+   * 
+ * + * string filter = 2; + */ + 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; + } + } + /** + *
+   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue]
+   * field can be used as a filter and several operators as supported.
+   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+   * described in
+   * [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).
+   * Sample filter "app_engine_http_target: *".
+   * Note that using filters might cause fewer queues than the
+   * requested_page size to be returned.
+   * 
+ * + * string filter = 2; + */ + 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 PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + *
+   * Requested page size.
+   * The maximum page size is 9800. If unspecified, the page size will
+   * be the maximum. Fewer queues than requested might be returned,
+   * even if more queues exist; use the
+   * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] in the
+   * response to determine if more queues exist.
+   * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + *
+   * A token identifying the page of results to return.
+   * To request the first page results, page_token must be empty. To
+   * request the next page of results, page_token must be the value of
+   * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned
+   * from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]
+   * method. It is an error to switch the value of the
+   * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages.
+   * 
+ * + * string page_token = 4; + */ + 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; + } + } + /** + *
+   * A token identifying the page of results to return.
+   * To request the first page results, page_token must be empty. To
+   * request the next page of results, page_token must be the value of
+   * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned
+   * from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]
+   * method. It is an error to switch the value of the
+   * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages.
+   * 
+ * + * string page_token = 4; + */ + 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; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + size += unknownFields.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.tasks.v2beta2.ListQueuesRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.ListQueuesRequest other = (com.google.cloud.tasks.v2beta2.ListQueuesRequest) obj; + + boolean result = true; + result = result && getParent() + .equals(other.getParent()); + result = result && getFilter() + .equals(other.getFilter()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && getPageToken() + .equals(other.getPageToken()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.ListQueuesRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesRequest 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.tasks.v2beta2.ListQueuesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesRequest 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.tasks.v2beta2.ListQueuesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesRequest 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.tasks.v2beta2.ListQueuesRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesRequest 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.tasks.v2beta2.ListQueuesRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.ListQueuesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.ListQueuesRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.ListQueuesRequest) + com.google.cloud.tasks.v2beta2.ListQueuesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListQueuesRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListQueuesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.ListQueuesRequest.class, com.google.cloud.tasks.v2beta2.ListQueuesRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.ListQueuesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + parent_ = ""; + + filter_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListQueuesRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.ListQueuesRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.ListQueuesRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.ListQueuesRequest build() { + com.google.cloud.tasks.v2beta2.ListQueuesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.ListQueuesRequest buildPartial() { + com.google.cloud.tasks.v2beta2.ListQueuesRequest result = new com.google.cloud.tasks.v2beta2.ListQueuesRequest(this); + result.parent_ = parent_; + result.filter_ = filter_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.ListQueuesRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.ListQueuesRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.ListQueuesRequest other) { + if (other == com.google.cloud.tasks.v2beta2.ListQueuesRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.ListQueuesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.ListQueuesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required.
+     * The location name.
+     * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+     * 
+ * + * string parent = 1; + */ + 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 location name.
+     * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+     * 
+ * + * string parent = 1; + */ + 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 location name.
+     * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+     * 
+ * + * string parent = 1; + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The location name.
+     * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The location name.
+     * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+     * 
+ * + * string parent = 1; + */ + 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 filter_ = ""; + /** + *
+     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue]
+     * field can be used as a filter and several operators as supported.
+     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+     * described in
+     * [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).
+     * Sample filter "app_engine_http_target: *".
+     * Note that using filters might cause fewer queues than the
+     * requested_page size to be returned.
+     * 
+ * + * string filter = 2; + */ + 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; + } + } + /** + *
+     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue]
+     * field can be used as a filter and several operators as supported.
+     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+     * described in
+     * [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).
+     * Sample filter "app_engine_http_target: *".
+     * Note that using filters might cause fewer queues than the
+     * requested_page size to be returned.
+     * 
+ * + * string filter = 2; + */ + 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; + } + } + /** + *
+     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue]
+     * field can be used as a filter and several operators as supported.
+     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+     * described in
+     * [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).
+     * Sample filter "app_engine_http_target: *".
+     * Note that using filters might cause fewer queues than the
+     * requested_page size to be returned.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilter( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + *
+     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue]
+     * field can be used as a filter and several operators as supported.
+     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+     * described in
+     * [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).
+     * Sample filter "app_engine_http_target: *".
+     * Note that using filters might cause fewer queues than the
+     * requested_page size to be returned.
+     * 
+ * + * string filter = 2; + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + *
+     * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue]
+     * field can be used as a filter and several operators as supported.
+     * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+     * described in
+     * [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).
+     * Sample filter "app_engine_http_target: *".
+     * Note that using filters might cause fewer queues than the
+     * requested_page size to be returned.
+     * 
+ * + * string filter = 2; + */ + public Builder setFilterBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Requested page size.
+     * The maximum page size is 9800. If unspecified, the page size will
+     * be the maximum. Fewer queues than requested might be returned,
+     * even if more queues exist; use the
+     * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] in the
+     * response to determine if more queues exist.
+     * 
+ * + * int32 page_size = 3; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Requested page size.
+     * The maximum page size is 9800. If unspecified, the page size will
+     * be the maximum. Fewer queues than requested might be returned,
+     * even if more queues exist; use the
+     * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] in the
+     * response to determine if more queues exist.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Requested page size.
+     * The maximum page size is 9800. If unspecified, the page size will
+     * be the maximum. Fewer queues than requested might be returned,
+     * even if more queues exist; use the
+     * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] in the
+     * response to determine if more queues exist.
+     * 
+ * + * int32 page_size = 3; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * A token identifying the page of results to return.
+     * To request the first page results, page_token must be empty. To
+     * request the next page of results, page_token must be the value of
+     * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned
+     * from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]
+     * method. It is an error to switch the value of the
+     * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages.
+     * 
+ * + * string page_token = 4; + */ + 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; + } + } + /** + *
+     * A token identifying the page of results to return.
+     * To request the first page results, page_token must be empty. To
+     * request the next page of results, page_token must be the value of
+     * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned
+     * from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]
+     * method. It is an error to switch the value of the
+     * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages.
+     * 
+ * + * string page_token = 4; + */ + 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; + } + } + /** + *
+     * A token identifying the page of results to return.
+     * To request the first page results, page_token must be empty. To
+     * request the next page of results, page_token must be the value of
+     * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned
+     * from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]
+     * method. It is an error to switch the value of the
+     * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A token identifying the page of results to return.
+     * To request the first page results, page_token must be empty. To
+     * request the next page of results, page_token must be the value of
+     * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned
+     * from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]
+     * method. It is an error to switch the value of the
+     * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages.
+     * 
+ * + * string page_token = 4; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * A token identifying the page of results to return.
+     * To request the first page results, page_token must be empty. To
+     * request the next page of results, page_token must be the value of
+     * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned
+     * from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]
+     * method. It is an error to switch the value of the
+     * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages.
+     * 
+ * + * string page_token = 4; + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.ListQueuesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.ListQueuesRequest) + private static final com.google.cloud.tasks.v2beta2.ListQueuesRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.ListQueuesRequest(); + } + + public static com.google.cloud.tasks.v2beta2.ListQueuesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListQueuesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListQueuesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.ListQueuesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequestOrBuilder.java new file mode 100644 index 000000000000..b808973cae4b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesRequestOrBuilder.java @@ -0,0 +1,107 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface ListQueuesRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.ListQueuesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The location name.
+   * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + *
+   * Required.
+   * The location name.
+   * For example: `projects/PROJECT_ID/locations/LOCATION_ID`
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue]
+   * field can be used as a filter and several operators as supported.
+   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+   * described in
+   * [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).
+   * Sample filter "app_engine_http_target: *".
+   * Note that using filters might cause fewer queues than the
+   * requested_page size to be returned.
+   * 
+ * + * string filter = 2; + */ + java.lang.String getFilter(); + /** + *
+   * `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue]
+   * field can be used as a filter and several operators as supported.
+   * For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as
+   * described in
+   * [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters).
+   * Sample filter "app_engine_http_target: *".
+   * Note that using filters might cause fewer queues than the
+   * requested_page size to be returned.
+   * 
+ * + * string filter = 2; + */ + com.google.protobuf.ByteString + getFilterBytes(); + + /** + *
+   * Requested page size.
+   * The maximum page size is 9800. If unspecified, the page size will
+   * be the maximum. Fewer queues than requested might be returned,
+   * even if more queues exist; use the
+   * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] in the
+   * response to determine if more queues exist.
+   * 
+ * + * int32 page_size = 3; + */ + int getPageSize(); + + /** + *
+   * A token identifying the page of results to return.
+   * To request the first page results, page_token must be empty. To
+   * request the next page of results, page_token must be the value of
+   * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned
+   * from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]
+   * method. It is an error to switch the value of the
+   * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages.
+   * 
+ * + * string page_token = 4; + */ + java.lang.String getPageToken(); + /** + *
+   * A token identifying the page of results to return.
+   * To request the first page results, page_token must be empty. To
+   * request the next page of results, page_token must be the value of
+   * [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned
+   * from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]
+   * method. It is an error to switch the value of the
+   * [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages.
+   * 
+ * + * string page_token = 4; + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesResponse.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesResponse.java new file mode 100644 index 000000000000..f85a0cb7ee93 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesResponse.java @@ -0,0 +1,1027 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Response message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.ListQueuesResponse} + */ +public final class ListQueuesResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.ListQueuesResponse) + ListQueuesResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListQueuesResponse.newBuilder() to construct. + private ListQueuesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListQueuesResponse() { + queues_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListQueuesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + queues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + queues_.add( + input.readMessage(com.google.cloud.tasks.v2beta2.Queue.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + queues_ = java.util.Collections.unmodifiableList(queues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListQueuesResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListQueuesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.ListQueuesResponse.class, com.google.cloud.tasks.v2beta2.ListQueuesResponse.Builder.class); + } + + private int bitField0_; + public static final int QUEUES_FIELD_NUMBER = 1; + private java.util.List queues_; + /** + *
+   * The list of queues.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public java.util.List getQueuesList() { + return queues_; + } + /** + *
+   * The list of queues.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public java.util.List + getQueuesOrBuilderList() { + return queues_; + } + /** + *
+   * The list of queues.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public int getQueuesCount() { + return queues_.size(); + } + /** + *
+   * The list of queues.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public com.google.cloud.tasks.v2beta2.Queue getQueues(int index) { + return queues_.get(index); + } + /** + *
+   * The list of queues.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public com.google.cloud.tasks.v2beta2.QueueOrBuilder getQueuesOrBuilder( + int index) { + return queues_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * A token to retrieve next page of results.
+   * To return the next page of results, call
+   * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the
+   * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token].
+   * If the next_page_token is empty, there are no more results.
+   * The page token is valid for only 2 hours.
+   * 
+ * + * string next_page_token = 2; + */ + 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; + } + } + /** + *
+   * A token to retrieve next page of results.
+   * To return the next page of results, call
+   * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the
+   * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token].
+   * If the next_page_token is empty, there are no more results.
+   * The page token is valid for only 2 hours.
+   * 
+ * + * string next_page_token = 2; + */ + 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; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < queues_.size(); i++) { + output.writeMessage(1, queues_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < queues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, queues_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.tasks.v2beta2.ListQueuesResponse)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.ListQueuesResponse other = (com.google.cloud.tasks.v2beta2.ListQueuesResponse) obj; + + boolean result = true; + result = result && getQueuesList() + .equals(other.getQueuesList()); + result = result && getNextPageToken() + .equals(other.getNextPageToken()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getQueuesCount() > 0) { + hash = (37 * hash) + QUEUES_FIELD_NUMBER; + hash = (53 * hash) + getQueuesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.ListQueuesResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesResponse 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.tasks.v2beta2.ListQueuesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesResponse 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.tasks.v2beta2.ListQueuesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesResponse 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.tasks.v2beta2.ListQueuesResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesResponse 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.tasks.v2beta2.ListQueuesResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListQueuesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.ListQueuesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.ListQueuesResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.ListQueuesResponse) + com.google.cloud.tasks.v2beta2.ListQueuesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListQueuesResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListQueuesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.ListQueuesResponse.class, com.google.cloud.tasks.v2beta2.ListQueuesResponse.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.ListQueuesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getQueuesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (queuesBuilder_ == null) { + queues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + queuesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListQueuesResponse_descriptor; + } + + public com.google.cloud.tasks.v2beta2.ListQueuesResponse getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.ListQueuesResponse.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.ListQueuesResponse build() { + com.google.cloud.tasks.v2beta2.ListQueuesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.ListQueuesResponse buildPartial() { + com.google.cloud.tasks.v2beta2.ListQueuesResponse result = new com.google.cloud.tasks.v2beta2.ListQueuesResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (queuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + queues_ = java.util.Collections.unmodifiableList(queues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.queues_ = queues_; + } else { + result.queues_ = queuesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.ListQueuesResponse) { + return mergeFrom((com.google.cloud.tasks.v2beta2.ListQueuesResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.ListQueuesResponse other) { + if (other == com.google.cloud.tasks.v2beta2.ListQueuesResponse.getDefaultInstance()) return this; + if (queuesBuilder_ == null) { + if (!other.queues_.isEmpty()) { + if (queues_.isEmpty()) { + queues_ = other.queues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureQueuesIsMutable(); + queues_.addAll(other.queues_); + } + onChanged(); + } + } else { + if (!other.queues_.isEmpty()) { + if (queuesBuilder_.isEmpty()) { + queuesBuilder_.dispose(); + queuesBuilder_ = null; + queues_ = other.queues_; + bitField0_ = (bitField0_ & ~0x00000001); + queuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getQueuesFieldBuilder() : null; + } else { + queuesBuilder_.addAllMessages(other.queues_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.ListQueuesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.ListQueuesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List queues_ = + java.util.Collections.emptyList(); + private void ensureQueuesIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + queues_ = new java.util.ArrayList(queues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Queue, com.google.cloud.tasks.v2beta2.Queue.Builder, com.google.cloud.tasks.v2beta2.QueueOrBuilder> queuesBuilder_; + + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public java.util.List getQueuesList() { + if (queuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(queues_); + } else { + return queuesBuilder_.getMessageList(); + } + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public int getQueuesCount() { + if (queuesBuilder_ == null) { + return queues_.size(); + } else { + return queuesBuilder_.getCount(); + } + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public com.google.cloud.tasks.v2beta2.Queue getQueues(int index) { + if (queuesBuilder_ == null) { + return queues_.get(index); + } else { + return queuesBuilder_.getMessage(index); + } + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public Builder setQueues( + int index, com.google.cloud.tasks.v2beta2.Queue value) { + if (queuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueuesIsMutable(); + queues_.set(index, value); + onChanged(); + } else { + queuesBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public Builder setQueues( + int index, com.google.cloud.tasks.v2beta2.Queue.Builder builderForValue) { + if (queuesBuilder_ == null) { + ensureQueuesIsMutable(); + queues_.set(index, builderForValue.build()); + onChanged(); + } else { + queuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public Builder addQueues(com.google.cloud.tasks.v2beta2.Queue value) { + if (queuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueuesIsMutable(); + queues_.add(value); + onChanged(); + } else { + queuesBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public Builder addQueues( + int index, com.google.cloud.tasks.v2beta2.Queue value) { + if (queuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureQueuesIsMutable(); + queues_.add(index, value); + onChanged(); + } else { + queuesBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public Builder addQueues( + com.google.cloud.tasks.v2beta2.Queue.Builder builderForValue) { + if (queuesBuilder_ == null) { + ensureQueuesIsMutable(); + queues_.add(builderForValue.build()); + onChanged(); + } else { + queuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public Builder addQueues( + int index, com.google.cloud.tasks.v2beta2.Queue.Builder builderForValue) { + if (queuesBuilder_ == null) { + ensureQueuesIsMutable(); + queues_.add(index, builderForValue.build()); + onChanged(); + } else { + queuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public Builder addAllQueues( + java.lang.Iterable values) { + if (queuesBuilder_ == null) { + ensureQueuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, queues_); + onChanged(); + } else { + queuesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public Builder clearQueues() { + if (queuesBuilder_ == null) { + queues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + queuesBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public Builder removeQueues(int index) { + if (queuesBuilder_ == null) { + ensureQueuesIsMutable(); + queues_.remove(index); + onChanged(); + } else { + queuesBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public com.google.cloud.tasks.v2beta2.Queue.Builder getQueuesBuilder( + int index) { + return getQueuesFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public com.google.cloud.tasks.v2beta2.QueueOrBuilder getQueuesOrBuilder( + int index) { + if (queuesBuilder_ == null) { + return queues_.get(index); } else { + return queuesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public java.util.List + getQueuesOrBuilderList() { + if (queuesBuilder_ != null) { + return queuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(queues_); + } + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public com.google.cloud.tasks.v2beta2.Queue.Builder addQueuesBuilder() { + return getQueuesFieldBuilder().addBuilder( + com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance()); + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public com.google.cloud.tasks.v2beta2.Queue.Builder addQueuesBuilder( + int index) { + return getQueuesFieldBuilder().addBuilder( + index, com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance()); + } + /** + *
+     * The list of queues.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + public java.util.List + getQueuesBuilderList() { + return getQueuesFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Queue, com.google.cloud.tasks.v2beta2.Queue.Builder, com.google.cloud.tasks.v2beta2.QueueOrBuilder> + getQueuesFieldBuilder() { + if (queuesBuilder_ == null) { + queuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Queue, com.google.cloud.tasks.v2beta2.Queue.Builder, com.google.cloud.tasks.v2beta2.QueueOrBuilder>( + queues_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + queues_ = null; + } + return queuesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token to retrieve next page of results.
+     * To return the next page of results, call
+     * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the
+     * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token].
+     * If the next_page_token is empty, there are no more results.
+     * The page token is valid for only 2 hours.
+     * 
+ * + * string next_page_token = 2; + */ + 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; + } + } + /** + *
+     * A token to retrieve next page of results.
+     * To return the next page of results, call
+     * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the
+     * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token].
+     * If the next_page_token is empty, there are no more results.
+     * The page token is valid for only 2 hours.
+     * 
+ * + * string next_page_token = 2; + */ + 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; + } + } + /** + *
+     * A token to retrieve next page of results.
+     * To return the next page of results, call
+     * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the
+     * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token].
+     * If the next_page_token is empty, there are no more results.
+     * The page token is valid for only 2 hours.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A token to retrieve next page of results.
+     * To return the next page of results, call
+     * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the
+     * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token].
+     * If the next_page_token is empty, there are no more results.
+     * The page token is valid for only 2 hours.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * A token to retrieve next page of results.
+     * To return the next page of results, call
+     * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the
+     * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token].
+     * If the next_page_token is empty, there are no more results.
+     * The page token is valid for only 2 hours.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.ListQueuesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.ListQueuesResponse) + private static final com.google.cloud.tasks.v2beta2.ListQueuesResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.ListQueuesResponse(); + } + + public static com.google.cloud.tasks.v2beta2.ListQueuesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListQueuesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListQueuesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.ListQueuesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesResponseOrBuilder.java new file mode 100644 index 000000000000..068db27caed1 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListQueuesResponseOrBuilder.java @@ -0,0 +1,81 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface ListQueuesResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.ListQueuesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of queues.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + java.util.List + getQueuesList(); + /** + *
+   * The list of queues.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + com.google.cloud.tasks.v2beta2.Queue getQueues(int index); + /** + *
+   * The list of queues.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + int getQueuesCount(); + /** + *
+   * The list of queues.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + java.util.List + getQueuesOrBuilderList(); + /** + *
+   * The list of queues.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Queue queues = 1; + */ + com.google.cloud.tasks.v2beta2.QueueOrBuilder getQueuesOrBuilder( + int index); + + /** + *
+   * A token to retrieve next page of results.
+   * To return the next page of results, call
+   * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the
+   * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token].
+   * If the next_page_token is empty, there are no more results.
+   * The page token is valid for only 2 hours.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token to retrieve next page of results.
+   * To return the next page of results, call
+   * [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the
+   * [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token].
+   * If the next_page_token is empty, there are no more results.
+   * The page token is valid for only 2 hours.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksRequest.java new file mode 100644 index 000000000000..60a0cea60214 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksRequest.java @@ -0,0 +1,1207 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.ListTasksRequest} + */ +public final class ListTasksRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.ListTasksRequest) + ListTasksRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListTasksRequest.newBuilder() to construct. + private ListTasksRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListTasksRequest() { + parent_ = ""; + responseView_ = 0; + orderBy_ = ""; + pageSize_ = 0; + pageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListTasksRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + + responseView_ = rawValue; + break; + } + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + + orderBy_ = s; + break; + } + case 32: { + + pageSize_ = input.readInt32(); + break; + } + case 42: { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.ListTasksRequest.class, com.google.cloud.tasks.v2beta2.ListTasksRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string parent = 1; + */ + 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 queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string parent = 1; + */ + 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 RESPONSE_VIEW_FIELD_NUMBER = 2; + private int responseView_; + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + + public static final int ORDER_BY_FIELD_NUMBER = 3; + private volatile java.lang.Object orderBy_; + /** + *
+   * Sort order used for the query. The only fields supported for sorting
+   * are `schedule_time` and `pull_message.tag`. All results will be
+   * returned in approximately ascending order. The default ordering is by
+   * `schedule_time`.
+   * 
+ * + * string order_by = 3; + */ + 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 order used for the query. The only fields supported for sorting
+   * are `schedule_time` and `pull_message.tag`. All results will be
+   * returned in approximately ascending order. The default ordering is by
+   * `schedule_time`.
+   * 
+ * + * string order_by = 3; + */ + 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; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + *
+   * Requested page size. Fewer tasks than requested might be returned.
+   * The maximum page size is 1000. If unspecified, the page size will
+   * be the maximum. Fewer tasks than requested might be returned,
+   * even if more tasks exist; use
+   * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] in the
+   * response to determine if more tasks exist.
+   * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + private volatile java.lang.Object pageToken_; + /** + *
+   * A token identifying the page of results to return.
+   * To request the first page results, page_token must be empty. To
+   * request the next page of results, page_token must be the value of
+   * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned
+   * from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]
+   * method.
+   * The page token is valid for only 2 hours.
+   * 
+ * + * string page_token = 5; + */ + 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; + } + } + /** + *
+   * A token identifying the page of results to return.
+   * To request the first page results, page_token must be empty. To
+   * request the next page of results, page_token must be the value of
+   * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned
+   * from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]
+   * method.
+   * The page token is valid for only 2 hours.
+   * 
+ * + * string page_token = 5; + */ + 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; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(2, responseView_); + } + if (!getOrderByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, orderBy_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, responseView_); + } + if (!getOrderByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, orderBy_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + size += unknownFields.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.tasks.v2beta2.ListTasksRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.ListTasksRequest other = (com.google.cloud.tasks.v2beta2.ListTasksRequest) obj; + + boolean result = true; + result = result && getParent() + .equals(other.getParent()); + result = result && responseView_ == other.responseView_; + result = result && getOrderBy() + .equals(other.getOrderBy()); + result = result && (getPageSize() + == other.getPageSize()); + result = result && getPageToken() + .equals(other.getPageToken()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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) + RESPONSE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + responseView_; + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.ListTasksRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListTasksRequest 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.tasks.v2beta2.ListTasksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListTasksRequest 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.tasks.v2beta2.ListTasksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListTasksRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.ListTasksRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListTasksRequest 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.tasks.v2beta2.ListTasksRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListTasksRequest 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.tasks.v2beta2.ListTasksRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListTasksRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.ListTasksRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.ListTasksRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.ListTasksRequest) + com.google.cloud.tasks.v2beta2.ListTasksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.ListTasksRequest.class, com.google.cloud.tasks.v2beta2.ListTasksRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.ListTasksRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + parent_ = ""; + + responseView_ = 0; + + orderBy_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListTasksRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.ListTasksRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.ListTasksRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.ListTasksRequest build() { + com.google.cloud.tasks.v2beta2.ListTasksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.ListTasksRequest buildPartial() { + com.google.cloud.tasks.v2beta2.ListTasksRequest result = new com.google.cloud.tasks.v2beta2.ListTasksRequest(this); + result.parent_ = parent_; + result.responseView_ = responseView_; + result.orderBy_ = orderBy_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.ListTasksRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.ListTasksRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.ListTasksRequest other) { + if (other == com.google.cloud.tasks.v2beta2.ListTasksRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.responseView_ != 0) { + setResponseViewValue(other.getResponseViewValue()); + } + if (!other.getOrderBy().isEmpty()) { + orderBy_ = other.orderBy_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.ListTasksRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.ListTasksRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string parent = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string parent = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string parent = 1; + */ + public Builder setParent( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string parent = 1; + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string parent = 1; + */ + public Builder setParentBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int responseView_ = 0; + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public Builder setResponseViewValue(int value) { + responseView_ = value; + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public Builder setResponseView(com.google.cloud.tasks.v2beta2.Task.View value) { + if (value == null) { + throw new NullPointerException(); + } + + responseView_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public Builder clearResponseView() { + + responseView_ = 0; + onChanged(); + return this; + } + + private java.lang.Object orderBy_ = ""; + /** + *
+     * Sort order used for the query. The only fields supported for sorting
+     * are `schedule_time` and `pull_message.tag`. All results will be
+     * returned in approximately ascending order. The default ordering is by
+     * `schedule_time`.
+     * 
+ * + * string order_by = 3; + */ + 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 order used for the query. The only fields supported for sorting
+     * are `schedule_time` and `pull_message.tag`. All results will be
+     * returned in approximately ascending order. The default ordering is by
+     * `schedule_time`.
+     * 
+ * + * string order_by = 3; + */ + 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 order used for the query. The only fields supported for sorting
+     * are `schedule_time` and `pull_message.tag`. All results will be
+     * returned in approximately ascending order. The default ordering is by
+     * `schedule_time`.
+     * 
+ * + * string order_by = 3; + */ + public Builder setOrderBy( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orderBy_ = value; + onChanged(); + return this; + } + /** + *
+     * Sort order used for the query. The only fields supported for sorting
+     * are `schedule_time` and `pull_message.tag`. All results will be
+     * returned in approximately ascending order. The default ordering is by
+     * `schedule_time`.
+     * 
+ * + * string order_by = 3; + */ + public Builder clearOrderBy() { + + orderBy_ = getDefaultInstance().getOrderBy(); + onChanged(); + return this; + } + /** + *
+     * Sort order used for the query. The only fields supported for sorting
+     * are `schedule_time` and `pull_message.tag`. All results will be
+     * returned in approximately ascending order. The default ordering is by
+     * `schedule_time`.
+     * 
+ * + * string order_by = 3; + */ + public Builder setOrderByBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orderBy_ = value; + onChanged(); + return this; + } + + private int pageSize_ ; + /** + *
+     * Requested page size. Fewer tasks than requested might be returned.
+     * The maximum page size is 1000. If unspecified, the page size will
+     * be the maximum. Fewer tasks than requested might be returned,
+     * even if more tasks exist; use
+     * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] in the
+     * response to determine if more tasks exist.
+     * 
+ * + * int32 page_size = 4; + */ + public int getPageSize() { + return pageSize_; + } + /** + *
+     * Requested page size. Fewer tasks than requested might be returned.
+     * The maximum page size is 1000. If unspecified, the page size will
+     * be the maximum. Fewer tasks than requested might be returned,
+     * even if more tasks exist; use
+     * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] in the
+     * response to determine if more tasks exist.
+     * 
+ * + * int32 page_size = 4; + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Requested page size. Fewer tasks than requested might be returned.
+     * The maximum page size is 1000. If unspecified, the page size will
+     * be the maximum. Fewer tasks than requested might be returned,
+     * even if more tasks exist; use
+     * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] in the
+     * response to determine if more tasks exist.
+     * 
+ * + * int32 page_size = 4; + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + *
+     * A token identifying the page of results to return.
+     * To request the first page results, page_token must be empty. To
+     * request the next page of results, page_token must be the value of
+     * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned
+     * from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]
+     * method.
+     * The page token is valid for only 2 hours.
+     * 
+ * + * string page_token = 5; + */ + 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; + } + } + /** + *
+     * A token identifying the page of results to return.
+     * To request the first page results, page_token must be empty. To
+     * request the next page of results, page_token must be the value of
+     * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned
+     * from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]
+     * method.
+     * The page token is valid for only 2 hours.
+     * 
+ * + * string page_token = 5; + */ + 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; + } + } + /** + *
+     * A token identifying the page of results to return.
+     * To request the first page results, page_token must be empty. To
+     * request the next page of results, page_token must be the value of
+     * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned
+     * from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]
+     * method.
+     * The page token is valid for only 2 hours.
+     * 
+ * + * string page_token = 5; + */ + public Builder setPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A token identifying the page of results to return.
+     * To request the first page results, page_token must be empty. To
+     * request the next page of results, page_token must be the value of
+     * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned
+     * from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]
+     * method.
+     * The page token is valid for only 2 hours.
+     * 
+ * + * string page_token = 5; + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + *
+     * A token identifying the page of results to return.
+     * To request the first page results, page_token must be empty. To
+     * request the next page of results, page_token must be the value of
+     * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned
+     * from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]
+     * method.
+     * The page token is valid for only 2 hours.
+     * 
+ * + * string page_token = 5; + */ + public Builder setPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.ListTasksRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.ListTasksRequest) + private static final com.google.cloud.tasks.v2beta2.ListTasksRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.ListTasksRequest(); + } + + public static com.google.cloud.tasks.v2beta2.ListTasksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListTasksRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTasksRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.ListTasksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksRequestOrBuilder.java new file mode 100644 index 000000000000..d6f6563d5622 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksRequestOrBuilder.java @@ -0,0 +1,134 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface ListTasksRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.ListTasksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string parent = 1; + */ + java.lang.String getParent(); + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string parent = 1; + */ + com.google.protobuf.ByteString + getParentBytes(); + + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + int getResponseViewValue(); + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + com.google.cloud.tasks.v2beta2.Task.View getResponseView(); + + /** + *
+   * Sort order used for the query. The only fields supported for sorting
+   * are `schedule_time` and `pull_message.tag`. All results will be
+   * returned in approximately ascending order. The default ordering is by
+   * `schedule_time`.
+   * 
+ * + * string order_by = 3; + */ + java.lang.String getOrderBy(); + /** + *
+   * Sort order used for the query. The only fields supported for sorting
+   * are `schedule_time` and `pull_message.tag`. All results will be
+   * returned in approximately ascending order. The default ordering is by
+   * `schedule_time`.
+   * 
+ * + * string order_by = 3; + */ + com.google.protobuf.ByteString + getOrderByBytes(); + + /** + *
+   * Requested page size. Fewer tasks than requested might be returned.
+   * The maximum page size is 1000. If unspecified, the page size will
+   * be the maximum. Fewer tasks than requested might be returned,
+   * even if more tasks exist; use
+   * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] in the
+   * response to determine if more tasks exist.
+   * 
+ * + * int32 page_size = 4; + */ + int getPageSize(); + + /** + *
+   * A token identifying the page of results to return.
+   * To request the first page results, page_token must be empty. To
+   * request the next page of results, page_token must be the value of
+   * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned
+   * from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]
+   * method.
+   * The page token is valid for only 2 hours.
+   * 
+ * + * string page_token = 5; + */ + java.lang.String getPageToken(); + /** + *
+   * A token identifying the page of results to return.
+   * To request the first page results, page_token must be empty. To
+   * request the next page of results, page_token must be the value of
+   * [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned
+   * from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]
+   * method.
+   * The page token is valid for only 2 hours.
+   * 
+ * + * string page_token = 5; + */ + com.google.protobuf.ByteString + getPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksResponse.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksResponse.java new file mode 100644 index 000000000000..1b0232999f37 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksResponse.java @@ -0,0 +1,1020 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.ListTasksResponse} + */ +public final class ListTasksResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.ListTasksResponse) + ListTasksResponseOrBuilder { +private static final long serialVersionUID = 0L; + // Use ListTasksResponse.newBuilder() to construct. + private ListTasksResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ListTasksResponse() { + tasks_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ListTasksResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + tasks_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + tasks_.add( + input.readMessage(com.google.cloud.tasks.v2beta2.Task.parser(), extensionRegistry)); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + tasks_ = java.util.Collections.unmodifiableList(tasks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.ListTasksResponse.class, com.google.cloud.tasks.v2beta2.ListTasksResponse.Builder.class); + } + + private int bitField0_; + public static final int TASKS_FIELD_NUMBER = 1; + private java.util.List tasks_; + /** + *
+   * The list of tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public java.util.List getTasksList() { + return tasks_; + } + /** + *
+   * The list of tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public java.util.List + getTasksOrBuilderList() { + return tasks_; + } + /** + *
+   * The list of tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public int getTasksCount() { + return tasks_.size(); + } + /** + *
+   * The list of tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.Task getTasks(int index) { + return tasks_.get(index); + } + /** + *
+   * The list of tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.TaskOrBuilder getTasksOrBuilder( + int index) { + return tasks_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + *
+   * A token to retrieve next page of results.
+   * To return the next page of results, call
+   * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the
+   * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token].
+   * If the next_page_token is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + */ + 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; + } + } + /** + *
+   * A token to retrieve next page of results.
+   * To return the next page of results, call
+   * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the
+   * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token].
+   * If the next_page_token is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + */ + 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; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < tasks_.size(); i++) { + output.writeMessage(1, tasks_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tasks_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, tasks_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.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.tasks.v2beta2.ListTasksResponse)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.ListTasksResponse other = (com.google.cloud.tasks.v2beta2.ListTasksResponse) obj; + + boolean result = true; + result = result && getTasksList() + .equals(other.getTasksList()); + result = result && getNextPageToken() + .equals(other.getNextPageToken()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTasksCount() > 0) { + hash = (37 * hash) + TASKS_FIELD_NUMBER; + hash = (53 * hash) + getTasksList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.ListTasksResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListTasksResponse 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.tasks.v2beta2.ListTasksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListTasksResponse 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.tasks.v2beta2.ListTasksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ListTasksResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.ListTasksResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListTasksResponse 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.tasks.v2beta2.ListTasksResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListTasksResponse 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.tasks.v2beta2.ListTasksResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ListTasksResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.ListTasksResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.ListTasksResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.ListTasksResponse) + com.google.cloud.tasks.v2beta2.ListTasksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.ListTasksResponse.class, com.google.cloud.tasks.v2beta2.ListTasksResponse.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.ListTasksResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getTasksFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + tasksBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ListTasksResponse_descriptor; + } + + public com.google.cloud.tasks.v2beta2.ListTasksResponse getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.ListTasksResponse.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.ListTasksResponse build() { + com.google.cloud.tasks.v2beta2.ListTasksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.ListTasksResponse buildPartial() { + com.google.cloud.tasks.v2beta2.ListTasksResponse result = new com.google.cloud.tasks.v2beta2.ListTasksResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (tasksBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + tasks_ = java.util.Collections.unmodifiableList(tasks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tasks_ = tasks_; + } else { + result.tasks_ = tasksBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.ListTasksResponse) { + return mergeFrom((com.google.cloud.tasks.v2beta2.ListTasksResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.ListTasksResponse other) { + if (other == com.google.cloud.tasks.v2beta2.ListTasksResponse.getDefaultInstance()) return this; + if (tasksBuilder_ == null) { + if (!other.tasks_.isEmpty()) { + if (tasks_.isEmpty()) { + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTasksIsMutable(); + tasks_.addAll(other.tasks_); + } + onChanged(); + } + } else { + if (!other.tasks_.isEmpty()) { + if (tasksBuilder_.isEmpty()) { + tasksBuilder_.dispose(); + tasksBuilder_ = null; + tasks_ = other.tasks_; + bitField0_ = (bitField0_ & ~0x00000001); + tasksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getTasksFieldBuilder() : null; + } else { + tasksBuilder_.addAllMessages(other.tasks_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.ListTasksResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.ListTasksResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List tasks_ = + java.util.Collections.emptyList(); + private void ensureTasksIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + tasks_ = new java.util.ArrayList(tasks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, com.google.cloud.tasks.v2beta2.Task.Builder, com.google.cloud.tasks.v2beta2.TaskOrBuilder> tasksBuilder_; + + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public java.util.List getTasksList() { + if (tasksBuilder_ == null) { + return java.util.Collections.unmodifiableList(tasks_); + } else { + return tasksBuilder_.getMessageList(); + } + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public int getTasksCount() { + if (tasksBuilder_ == null) { + return tasks_.size(); + } else { + return tasksBuilder_.getCount(); + } + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.Task getTasks(int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); + } else { + return tasksBuilder_.getMessage(index); + } + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder setTasks( + int index, com.google.cloud.tasks.v2beta2.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.set(index, value); + onChanged(); + } else { + tasksBuilder_.setMessage(index, value); + } + return this; + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder setTasks( + int index, com.google.cloud.tasks.v2beta2.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.set(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder addTasks(com.google.cloud.tasks.v2beta2.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(value); + onChanged(); + } else { + tasksBuilder_.addMessage(value); + } + return this; + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder addTasks( + int index, com.google.cloud.tasks.v2beta2.Task value) { + if (tasksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTasksIsMutable(); + tasks_.add(index, value); + onChanged(); + } else { + tasksBuilder_.addMessage(index, value); + } + return this; + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder addTasks( + com.google.cloud.tasks.v2beta2.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder addTasks( + int index, com.google.cloud.tasks.v2beta2.Task.Builder builderForValue) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.add(index, builderForValue.build()); + onChanged(); + } else { + tasksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder addAllTasks( + java.lang.Iterable values) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tasks_); + onChanged(); + } else { + tasksBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder clearTasks() { + if (tasksBuilder_ == null) { + tasks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + tasksBuilder_.clear(); + } + return this; + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public Builder removeTasks(int index) { + if (tasksBuilder_ == null) { + ensureTasksIsMutable(); + tasks_.remove(index); + onChanged(); + } else { + tasksBuilder_.remove(index); + } + return this; + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.Task.Builder getTasksBuilder( + int index) { + return getTasksFieldBuilder().getBuilder(index); + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.TaskOrBuilder getTasksOrBuilder( + int index) { + if (tasksBuilder_ == null) { + return tasks_.get(index); } else { + return tasksBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public java.util.List + getTasksOrBuilderList() { + if (tasksBuilder_ != null) { + return tasksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tasks_); + } + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.Task.Builder addTasksBuilder() { + return getTasksFieldBuilder().addBuilder( + com.google.cloud.tasks.v2beta2.Task.getDefaultInstance()); + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public com.google.cloud.tasks.v2beta2.Task.Builder addTasksBuilder( + int index) { + return getTasksFieldBuilder().addBuilder( + index, com.google.cloud.tasks.v2beta2.Task.getDefaultInstance()); + } + /** + *
+     * The list of tasks.
+     * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + public java.util.List + getTasksBuilderList() { + return getTasksFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, com.google.cloud.tasks.v2beta2.Task.Builder, com.google.cloud.tasks.v2beta2.TaskOrBuilder> + getTasksFieldBuilder() { + if (tasksBuilder_ == null) { + tasksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Task, com.google.cloud.tasks.v2beta2.Task.Builder, com.google.cloud.tasks.v2beta2.TaskOrBuilder>( + tasks_, + ((bitField0_ & 0x00000001) == 0x00000001), + getParentForChildren(), + isClean()); + tasks_ = null; + } + return tasksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + *
+     * A token to retrieve next page of results.
+     * To return the next page of results, call
+     * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the
+     * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token].
+     * If the next_page_token is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + */ + 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; + } + } + /** + *
+     * A token to retrieve next page of results.
+     * To return the next page of results, call
+     * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the
+     * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token].
+     * If the next_page_token is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + */ + 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; + } + } + /** + *
+     * A token to retrieve next page of results.
+     * To return the next page of results, call
+     * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the
+     * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token].
+     * If the next_page_token is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageToken( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + *
+     * A token to retrieve next page of results.
+     * To return the next page of results, call
+     * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the
+     * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token].
+     * If the next_page_token is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + *
+     * A token to retrieve next page of results.
+     * To return the next page of results, call
+     * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the
+     * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token].
+     * If the next_page_token is empty, there are no more results.
+     * 
+ * + * string next_page_token = 2; + */ + public Builder setNextPageTokenBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.ListTasksResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.ListTasksResponse) + private static final com.google.cloud.tasks.v2beta2.ListTasksResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.ListTasksResponse(); + } + + public static com.google.cloud.tasks.v2beta2.ListTasksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ListTasksResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTasksResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.ListTasksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksResponseOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksResponseOrBuilder.java new file mode 100644 index 000000000000..e4bcf84114f8 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ListTasksResponseOrBuilder.java @@ -0,0 +1,79 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface ListTasksResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.ListTasksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The list of tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + java.util.List + getTasksList(); + /** + *
+   * The list of tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + com.google.cloud.tasks.v2beta2.Task getTasks(int index); + /** + *
+   * The list of tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + int getTasksCount(); + /** + *
+   * The list of tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + java.util.List + getTasksOrBuilderList(); + /** + *
+   * The list of tasks.
+   * 
+ * + * repeated .google.cloud.tasks.v2beta2.Task tasks = 1; + */ + com.google.cloud.tasks.v2beta2.TaskOrBuilder getTasksOrBuilder( + int index); + + /** + *
+   * A token to retrieve next page of results.
+   * To return the next page of results, call
+   * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the
+   * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token].
+   * If the next_page_token is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + */ + java.lang.String getNextPageToken(); + /** + *
+   * A token to retrieve next page of results.
+   * To return the next page of results, call
+   * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the
+   * [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token].
+   * If the next_page_token is empty, there are no more results.
+   * 
+ * + * string next_page_token = 2; + */ + com.google.protobuf.ByteString + getNextPageTokenBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LocationName.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LocationName.java new file mode 100644 index 000000000000..ccf455c50dc5 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/LocationName.java @@ -0,0 +1,189 @@ +/* + * Copyright 2018 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. + */ + +package com.google.cloud.tasks.v2beta2; + +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import java.util.Map; +import java.util.ArrayList; +import java.util.List; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +@javax.annotation.Generated("by GAPIC protoc plugin") +public class LocationName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private LocationName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + } + + 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 = + PATH_TEMPLATE.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 PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "location", location); + } + + /** Builder for LocationName. */ + public static class Builder { + + private String project; + private String location; + + 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() { + } + + private Builder(LocationName locationName) { + project = locationName.project; + location = locationName.location; + } + + public LocationName build() { + return new LocationName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof LocationName) { + LocationName that = (LocationName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + return h; + } +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PauseQueueRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PauseQueueRequest.java new file mode 100644 index 000000000000..d0ac4e606a91 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PauseQueueRequest.java @@ -0,0 +1,566 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.PauseQueueRequest} + */ +public final class PauseQueueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.PauseQueueRequest) + PauseQueueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use PauseQueueRequest.newBuilder() to construct. + private PauseQueueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PauseQueueRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PauseQueueRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_PauseQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_PauseQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.PauseQueueRequest.class, com.google.cloud.tasks.v2beta2.PauseQueueRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + 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; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.tasks.v2beta2.PauseQueueRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.PauseQueueRequest other = (com.google.cloud.tasks.v2beta2.PauseQueueRequest) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.PauseQueueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PauseQueueRequest 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.tasks.v2beta2.PauseQueueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PauseQueueRequest 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.tasks.v2beta2.PauseQueueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PauseQueueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.PauseQueueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PauseQueueRequest 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.tasks.v2beta2.PauseQueueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PauseQueueRequest 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.tasks.v2beta2.PauseQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PauseQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.PauseQueueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.PauseQueueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.PauseQueueRequest) + com.google.cloud.tasks.v2beta2.PauseQueueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_PauseQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_PauseQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.PauseQueueRequest.class, com.google.cloud.tasks.v2beta2.PauseQueueRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.PauseQueueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_PauseQueueRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.PauseQueueRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.PauseQueueRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.PauseQueueRequest build() { + com.google.cloud.tasks.v2beta2.PauseQueueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.PauseQueueRequest buildPartial() { + com.google.cloud.tasks.v2beta2.PauseQueueRequest result = new com.google.cloud.tasks.v2beta2.PauseQueueRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.PauseQueueRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.PauseQueueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.PauseQueueRequest other) { + if (other == com.google.cloud.tasks.v2beta2.PauseQueueRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.PauseQueueRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.PauseQueueRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.PauseQueueRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.PauseQueueRequest) + private static final com.google.cloud.tasks.v2beta2.PauseQueueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.PauseQueueRequest(); + } + + public static com.google.cloud.tasks.v2beta2.PauseQueueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public PauseQueueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PauseQueueRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.PauseQueueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PauseQueueRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PauseQueueRequestOrBuilder.java new file mode 100644 index 000000000000..194482abd978 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PauseQueueRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface PauseQueueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.PauseQueueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ProjectName.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ProjectName.java new file mode 100644 index 000000000000..90c3a46016ef --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ProjectName.java @@ -0,0 +1,166 @@ +/* + * Copyright 2018 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. + */ + +package com.google.cloud.tasks.v2beta2; + +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import java.util.Map; +import java.util.ArrayList; +import java.util.List; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +@javax.annotation.Generated("by GAPIC protoc plugin") +public class ProjectName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}"); + + private volatile Map fieldValuesMap; + + private final String project; + + public String getProject() { + return project; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private ProjectName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + } + + public static ProjectName of(String project) { + return newBuilder() + .setProject(project) + .build(); + } + + public static String format(String project) { + return newBuilder() + .setProject(project) + .build() + .toString(); + } + + public static ProjectName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch(formattedString, "ProjectName.parse: formattedString not in valid format"); + return of(matchMap.get("project")); + } + + 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 (ProjectName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project); + } + + /** Builder for ProjectName. */ + public static class Builder { + + private String project; + + public String getProject() { + return project; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + private Builder() { + } + + private Builder(ProjectName projectName) { + project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ProjectName) { + ProjectName that = (ProjectName) o; + return (this.project.equals(that.project)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + return h; + } +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullMessage.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullMessage.java new file mode 100644 index 000000000000..c8abf204d78f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullMessage.java @@ -0,0 +1,726 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * The pull message contains data that can be used by the caller of
+ * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task.
+ * This proto can only be used for tasks in a queue which has
+ * [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.PullMessage} + */ +public final class PullMessage extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.PullMessage) + PullMessageOrBuilder { +private static final long serialVersionUID = 0L; + // Use PullMessage.newBuilder() to construct. + private PullMessage(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PullMessage() { + payload_ = com.google.protobuf.ByteString.EMPTY; + tag_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PullMessage( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + + payload_ = input.readBytes(); + break; + } + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + + tag_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_PullMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_PullMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.PullMessage.class, com.google.cloud.tasks.v2beta2.PullMessage.Builder.class); + } + + public static final int PAYLOAD_FIELD_NUMBER = 1; + private com.google.protobuf.ByteString payload_; + /** + *
+   * A data payload consumed by the worker to execute the task.
+   * 
+ * + * bytes payload = 1; + */ + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + + public static final int TAG_FIELD_NUMBER = 2; + private volatile java.lang.Object tag_; + /** + *
+   * The task's tag.
+   * Tags allow similar tasks to be processed in a batch. If you label
+   * tasks with a tag, your worker can
+   * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using
+   * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to
+   * aggregate the events associated with a specific user once a day,
+   * you could tag tasks with the user ID.
+   * The task's tag can only be set when the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+   * The tag must be less than 500 characters.
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+   * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+   * 
+ * + * string tag = 2; + */ + public java.lang.String getTag() { + java.lang.Object ref = tag_; + 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(); + tag_ = s; + return s; + } + } + /** + *
+   * The task's tag.
+   * Tags allow similar tasks to be processed in a batch. If you label
+   * tasks with a tag, your worker can
+   * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using
+   * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to
+   * aggregate the events associated with a specific user once a day,
+   * you could tag tasks with the user ID.
+   * The task's tag can only be set when the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+   * The tag must be less than 500 characters.
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+   * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+   * 
+ * + * string tag = 2; + */ + public com.google.protobuf.ByteString + getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!payload_.isEmpty()) { + output.writeBytes(1, payload_); + } + if (!getTagBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!payload_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, payload_); + } + if (!getTagBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tag_); + } + size += unknownFields.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.tasks.v2beta2.PullMessage)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.PullMessage other = (com.google.cloud.tasks.v2beta2.PullMessage) obj; + + boolean result = true; + result = result && getPayload() + .equals(other.getPayload()); + result = result && getTag() + .equals(other.getTag()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAYLOAD_FIELD_NUMBER; + hash = (53 * hash) + getPayload().hashCode(); + hash = (37 * hash) + TAG_FIELD_NUMBER; + hash = (53 * hash) + getTag().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.PullMessage parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PullMessage 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.tasks.v2beta2.PullMessage parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PullMessage 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.tasks.v2beta2.PullMessage parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PullMessage parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.PullMessage parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PullMessage 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.tasks.v2beta2.PullMessage parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PullMessage 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.tasks.v2beta2.PullMessage parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PullMessage parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.PullMessage prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 pull message contains data that can be used by the caller of
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task.
+   * This proto can only be used for tasks in a queue which has
+   * [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.PullMessage} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.PullMessage) + com.google.cloud.tasks.v2beta2.PullMessageOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_PullMessage_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_PullMessage_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.PullMessage.class, com.google.cloud.tasks.v2beta2.PullMessage.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.PullMessage.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + payload_ = com.google.protobuf.ByteString.EMPTY; + + tag_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_PullMessage_descriptor; + } + + public com.google.cloud.tasks.v2beta2.PullMessage getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.PullMessage.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.PullMessage build() { + com.google.cloud.tasks.v2beta2.PullMessage result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.PullMessage buildPartial() { + com.google.cloud.tasks.v2beta2.PullMessage result = new com.google.cloud.tasks.v2beta2.PullMessage(this); + result.payload_ = payload_; + result.tag_ = tag_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.PullMessage) { + return mergeFrom((com.google.cloud.tasks.v2beta2.PullMessage)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.PullMessage other) { + if (other == com.google.cloud.tasks.v2beta2.PullMessage.getDefaultInstance()) return this; + if (other.getPayload() != com.google.protobuf.ByteString.EMPTY) { + setPayload(other.getPayload()); + } + if (!other.getTag().isEmpty()) { + tag_ = other.tag_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.PullMessage parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.PullMessage) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.ByteString payload_ = com.google.protobuf.ByteString.EMPTY; + /** + *
+     * A data payload consumed by the worker to execute the task.
+     * 
+ * + * bytes payload = 1; + */ + public com.google.protobuf.ByteString getPayload() { + return payload_; + } + /** + *
+     * A data payload consumed by the worker to execute the task.
+     * 
+ * + * bytes payload = 1; + */ + public Builder setPayload(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + payload_ = value; + onChanged(); + return this; + } + /** + *
+     * A data payload consumed by the worker to execute the task.
+     * 
+ * + * bytes payload = 1; + */ + public Builder clearPayload() { + + payload_ = getDefaultInstance().getPayload(); + onChanged(); + return this; + } + + private java.lang.Object tag_ = ""; + /** + *
+     * The task's tag.
+     * Tags allow similar tasks to be processed in a batch. If you label
+     * tasks with a tag, your worker can
+     * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using
+     * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to
+     * aggregate the events associated with a specific user once a day,
+     * you could tag tasks with the user ID.
+     * The task's tag can only be set when the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+     * The tag must be less than 500 characters.
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+     * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+     * 
+ * + * string tag = 2; + */ + public java.lang.String getTag() { + java.lang.Object ref = tag_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tag_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + *
+     * The task's tag.
+     * Tags allow similar tasks to be processed in a batch. If you label
+     * tasks with a tag, your worker can
+     * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using
+     * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to
+     * aggregate the events associated with a specific user once a day,
+     * you could tag tasks with the user ID.
+     * The task's tag can only be set when the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+     * The tag must be less than 500 characters.
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+     * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+     * 
+ * + * string tag = 2; + */ + public com.google.protobuf.ByteString + getTagBytes() { + java.lang.Object ref = tag_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + tag_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + *
+     * The task's tag.
+     * Tags allow similar tasks to be processed in a batch. If you label
+     * tasks with a tag, your worker can
+     * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using
+     * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to
+     * aggregate the events associated with a specific user once a day,
+     * you could tag tasks with the user ID.
+     * The task's tag can only be set when the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+     * The tag must be less than 500 characters.
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+     * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+     * 
+ * + * string tag = 2; + */ + public Builder setTag( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tag_ = value; + onChanged(); + return this; + } + /** + *
+     * The task's tag.
+     * Tags allow similar tasks to be processed in a batch. If you label
+     * tasks with a tag, your worker can
+     * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using
+     * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to
+     * aggregate the events associated with a specific user once a day,
+     * you could tag tasks with the user ID.
+     * The task's tag can only be set when the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+     * The tag must be less than 500 characters.
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+     * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+     * 
+ * + * string tag = 2; + */ + public Builder clearTag() { + + tag_ = getDefaultInstance().getTag(); + onChanged(); + return this; + } + /** + *
+     * The task's tag.
+     * Tags allow similar tasks to be processed in a batch. If you label
+     * tasks with a tag, your worker can
+     * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using
+     * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to
+     * aggregate the events associated with a specific user once a day,
+     * you could tag tasks with the user ID.
+     * The task's tag can only be set when the
+     * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+     * The tag must be less than 500 characters.
+     * SDK compatibility: Although the SDK allows tags to be either
+     * string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+     * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+     * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+     * 
+ * + * string tag = 2; + */ + public Builder setTagBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tag_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.PullMessage) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.PullMessage) + private static final com.google.cloud.tasks.v2beta2.PullMessage DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.PullMessage(); + } + + public static com.google.cloud.tasks.v2beta2.PullMessage getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public PullMessage parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PullMessage(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.PullMessage getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullMessageOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullMessageOrBuilder.java new file mode 100644 index 000000000000..5592f8100af7 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullMessageOrBuilder.java @@ -0,0 +1,62 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface PullMessageOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.PullMessage) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * A data payload consumed by the worker to execute the task.
+   * 
+ * + * bytes payload = 1; + */ + com.google.protobuf.ByteString getPayload(); + + /** + *
+   * The task's tag.
+   * Tags allow similar tasks to be processed in a batch. If you label
+   * tasks with a tag, your worker can
+   * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using
+   * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to
+   * aggregate the events associated with a specific user once a day,
+   * you could tag tasks with the user ID.
+   * The task's tag can only be set when the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+   * The tag must be less than 500 characters.
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+   * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+   * 
+ * + * string tag = 2; + */ + java.lang.String getTag(); + /** + *
+   * The task's tag.
+   * Tags allow similar tasks to be processed in a batch. If you label
+   * tasks with a tag, your worker can
+   * [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using
+   * [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to
+   * aggregate the events associated with a specific user once a day,
+   * you could tag tasks with the user ID.
+   * The task's tag can only be set when the
+   * [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+   * The tag must be less than 500 characters.
+   * SDK compatibility: Although the SDK allows tags to be either
+   * string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
+   * only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
+   * encoded, the tag will be empty when the task is returned by Cloud Tasks.
+   * 
+ * + * string tag = 2; + */ + com.google.protobuf.ByteString + getTagBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullTarget.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullTarget.java new file mode 100644 index 000000000000..53248ed52874 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullTarget.java @@ -0,0 +1,396 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Pull target.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.PullTarget} + */ +public final class PullTarget extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.PullTarget) + PullTargetOrBuilder { +private static final long serialVersionUID = 0L; + // Use PullTarget.newBuilder() to construct. + private PullTarget(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PullTarget() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PullTarget( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_PullTarget_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_PullTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.PullTarget.class, com.google.cloud.tasks.v2beta2.PullTarget.Builder.class); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.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.tasks.v2beta2.PullTarget)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.PullTarget other = (com.google.cloud.tasks.v2beta2.PullTarget) obj; + + boolean result = true; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.PullTarget parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PullTarget 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.tasks.v2beta2.PullTarget parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PullTarget 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.tasks.v2beta2.PullTarget parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PullTarget parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.PullTarget parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PullTarget 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.tasks.v2beta2.PullTarget parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PullTarget 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.tasks.v2beta2.PullTarget parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PullTarget parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.PullTarget prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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; + } + /** + *
+   * Pull target.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.PullTarget} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.PullTarget) + com.google.cloud.tasks.v2beta2.PullTargetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_PullTarget_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_PullTarget_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.PullTarget.class, com.google.cloud.tasks.v2beta2.PullTarget.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.PullTarget.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TargetProto.internal_static_google_cloud_tasks_v2beta2_PullTarget_descriptor; + } + + public com.google.cloud.tasks.v2beta2.PullTarget getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.PullTarget.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.PullTarget build() { + com.google.cloud.tasks.v2beta2.PullTarget result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.PullTarget buildPartial() { + com.google.cloud.tasks.v2beta2.PullTarget result = new com.google.cloud.tasks.v2beta2.PullTarget(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.PullTarget) { + return mergeFrom((com.google.cloud.tasks.v2beta2.PullTarget)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.PullTarget other) { + if (other == com.google.cloud.tasks.v2beta2.PullTarget.getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.PullTarget parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.PullTarget) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.PullTarget) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.PullTarget) + private static final com.google.cloud.tasks.v2beta2.PullTarget DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.PullTarget(); + } + + public static com.google.cloud.tasks.v2beta2.PullTarget getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public PullTarget parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PullTarget(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.PullTarget getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullTargetOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullTargetOrBuilder.java new file mode 100644 index 000000000000..27ec888a99bb --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PullTargetOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public interface PullTargetOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.PullTarget) + com.google.protobuf.MessageOrBuilder { +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PurgeQueueRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PurgeQueueRequest.java new file mode 100644 index 000000000000..9e4d76a8902c --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PurgeQueueRequest.java @@ -0,0 +1,566 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.PurgeQueueRequest} + */ +public final class PurgeQueueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.PurgeQueueRequest) + PurgeQueueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use PurgeQueueRequest.newBuilder() to construct. + private PurgeQueueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PurgeQueueRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private PurgeQueueRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_PurgeQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_PurgeQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.PurgeQueueRequest.class, com.google.cloud.tasks.v2beta2.PurgeQueueRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + 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; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.tasks.v2beta2.PurgeQueueRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.PurgeQueueRequest other = (com.google.cloud.tasks.v2beta2.PurgeQueueRequest) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.PurgeQueueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PurgeQueueRequest 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.tasks.v2beta2.PurgeQueueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PurgeQueueRequest 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.tasks.v2beta2.PurgeQueueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.PurgeQueueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.PurgeQueueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PurgeQueueRequest 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.tasks.v2beta2.PurgeQueueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PurgeQueueRequest 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.tasks.v2beta2.PurgeQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.PurgeQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.PurgeQueueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.PurgeQueueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.PurgeQueueRequest) + com.google.cloud.tasks.v2beta2.PurgeQueueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_PurgeQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_PurgeQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.PurgeQueueRequest.class, com.google.cloud.tasks.v2beta2.PurgeQueueRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.PurgeQueueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_PurgeQueueRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.PurgeQueueRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.PurgeQueueRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.PurgeQueueRequest build() { + com.google.cloud.tasks.v2beta2.PurgeQueueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.PurgeQueueRequest buildPartial() { + com.google.cloud.tasks.v2beta2.PurgeQueueRequest result = new com.google.cloud.tasks.v2beta2.PurgeQueueRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.PurgeQueueRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.PurgeQueueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.PurgeQueueRequest other) { + if (other == com.google.cloud.tasks.v2beta2.PurgeQueueRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.PurgeQueueRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.PurgeQueueRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.PurgeQueueRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.PurgeQueueRequest) + private static final com.google.cloud.tasks.v2beta2.PurgeQueueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.PurgeQueueRequest(); + } + + public static com.google.cloud.tasks.v2beta2.PurgeQueueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public PurgeQueueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PurgeQueueRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.PurgeQueueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PurgeQueueRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PurgeQueueRequestOrBuilder.java new file mode 100644 index 000000000000..0104748c1d0d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/PurgeQueueRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface PurgeQueueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.PurgeQueueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java new file mode 100644 index 000000000000..bb3386443182 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Queue.java @@ -0,0 +1,2575 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/queue.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * A queue is a container of related tasks. Queues are configured to manage
+ * how those tasks are dispatched. Configurable properties include rate limits,
+ * retry options, target types, and others.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.Queue} + */ +public final class Queue extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.Queue) + QueueOrBuilder { +private static final long serialVersionUID = 0L; + // Use Queue.newBuilder() to construct. + private Queue(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Queue() { + name_ = ""; + state_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Queue( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.Builder subBuilder = null; + if (targetTypeCase_ == 3) { + subBuilder = ((com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) targetType_).toBuilder(); + } + targetType_ = + input.readMessage(com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) targetType_); + targetType_ = subBuilder.buildPartial(); + } + targetTypeCase_ = 3; + break; + } + case 34: { + com.google.cloud.tasks.v2beta2.PullTarget.Builder subBuilder = null; + if (targetTypeCase_ == 4) { + subBuilder = ((com.google.cloud.tasks.v2beta2.PullTarget) targetType_).toBuilder(); + } + targetType_ = + input.readMessage(com.google.cloud.tasks.v2beta2.PullTarget.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.tasks.v2beta2.PullTarget) targetType_); + targetType_ = subBuilder.buildPartial(); + } + targetTypeCase_ = 4; + break; + } + case 42: { + com.google.cloud.tasks.v2beta2.RateLimits.Builder subBuilder = null; + if (rateLimits_ != null) { + subBuilder = rateLimits_.toBuilder(); + } + rateLimits_ = input.readMessage(com.google.cloud.tasks.v2beta2.RateLimits.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rateLimits_); + rateLimits_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.cloud.tasks.v2beta2.RetryConfig.Builder subBuilder = null; + if (retryConfig_ != null) { + subBuilder = retryConfig_.toBuilder(); + } + retryConfig_ = input.readMessage(com.google.cloud.tasks.v2beta2.RetryConfig.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(retryConfig_); + retryConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 56: { + int rawValue = input.readEnum(); + + state_ = rawValue; + break; + } + case 66: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (purgeTime_ != null) { + subBuilder = purgeTime_.toBuilder(); + } + purgeTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(purgeTime_); + purgeTime_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_Queue_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_Queue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.Queue.class, com.google.cloud.tasks.v2beta2.Queue.Builder.class); + } + + /** + *
+   * State of the queue.
+   * 
+ * + * Protobuf enum {@code google.cloud.tasks.v2beta2.Queue.State} + */ + public enum State + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + STATE_UNSPECIFIED(0), + /** + *
+     * The queue is running. Tasks can be dispatched.
+     * If the queue was created using Cloud Tasks and the queue has
+     * had no activity (method calls or task dispatches) for 30 days,
+     * the queue may take a few minutes to re-activate. Some method
+     * calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and
+     * tasks may not be dispatched for a few minutes until the queue
+     * has been re-activated.
+     * 
+ * + * RUNNING = 1; + */ + RUNNING(1), + /** + *
+     * Tasks are paused by the user. If the queue is paused then Cloud
+     * Tasks will stop delivering tasks from it, but more tasks can
+     * still be added to it by the user. When a pull queue is paused,
+     * all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls will return a
+     * [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION].
+     * 
+ * + * PAUSED = 2; + */ + PAUSED(2), + /** + *
+     * The queue is disabled.
+     * A queue becomes `DISABLED` when
+     * [queue.yaml](/appengine/docs/python/config/queueref) or
+     * [queue.xml](appengine/docs/standard/java/config/queueref) is uploaded
+     * which does not contain the queue. You cannot directly disable a queue.
+     * When a queue is disabled, tasks can still be added to a queue
+     * but the tasks are not dispatched and
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls return a
+     * `FAILED_PRECONDITION` error.
+     * To permanently delete this queue and all of its tasks, call
+     * [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue].
+     * 
+ * + * DISABLED = 3; + */ + DISABLED(3), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified state.
+     * 
+ * + * STATE_UNSPECIFIED = 0; + */ + public static final int STATE_UNSPECIFIED_VALUE = 0; + /** + *
+     * The queue is running. Tasks can be dispatched.
+     * If the queue was created using Cloud Tasks and the queue has
+     * had no activity (method calls or task dispatches) for 30 days,
+     * the queue may take a few minutes to re-activate. Some method
+     * calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and
+     * tasks may not be dispatched for a few minutes until the queue
+     * has been re-activated.
+     * 
+ * + * RUNNING = 1; + */ + public static final int RUNNING_VALUE = 1; + /** + *
+     * Tasks are paused by the user. If the queue is paused then Cloud
+     * Tasks will stop delivering tasks from it, but more tasks can
+     * still be added to it by the user. When a pull queue is paused,
+     * all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls will return a
+     * [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION].
+     * 
+ * + * PAUSED = 2; + */ + public static final int PAUSED_VALUE = 2; + /** + *
+     * The queue is disabled.
+     * A queue becomes `DISABLED` when
+     * [queue.yaml](/appengine/docs/python/config/queueref) or
+     * [queue.xml](appengine/docs/standard/java/config/queueref) is uploaded
+     * which does not contain the queue. You cannot directly disable a queue.
+     * When a queue is disabled, tasks can still be added to a queue
+     * but the tasks are not dispatched and
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls return a
+     * `FAILED_PRECONDITION` error.
+     * To permanently delete this queue and all of its tasks, call
+     * [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue].
+     * 
+ * + * DISABLED = 3; + */ + public static final int DISABLED_VALUE = 3; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static State valueOf(int value) { + return forNumber(value); + } + + public static State forNumber(int value) { + switch (value) { + case 0: return STATE_UNSPECIFIED; + case 1: return RUNNING; + case 2: return PAUSED; + case 3: return DISABLED; + 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() { + 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.tasks.v2beta2.Queue.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.tasks.v2beta2.Queue.State) + } + + private int targetTypeCase_ = 0; + private java.lang.Object targetType_; + public enum TargetTypeCase + implements com.google.protobuf.Internal.EnumLite { + APP_ENGINE_HTTP_TARGET(3), + PULL_TARGET(4), + TARGETTYPE_NOT_SET(0); + private final int value; + private TargetTypeCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static TargetTypeCase valueOf(int value) { + return forNumber(value); + } + + public static TargetTypeCase forNumber(int value) { + switch (value) { + case 3: return APP_ENGINE_HTTP_TARGET; + case 4: return PULL_TARGET; + case 0: return TARGETTYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public TargetTypeCase + getTargetTypeCase() { + return TargetTypeCase.forNumber( + targetTypeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue],
+   * after which it becomes output only.
+   * The queue name.
+   * The queue name must have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+   *    hyphens (-), colons (:), or periods (.).
+   *    For more information, see
+   *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+   * * `LOCATION_ID` is the canonical ID for the queue's location.
+   *    The list of available locations can be obtained by calling
+   *    [ListLocations][google.cloud.location.Locations.ListLocations].
+   *    For more information, see https://cloud.google.com/about/locations/.
+   * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+   *   hyphens (-). The maximum length is 100 characters.
+   * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+   * Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue],
+   * after which it becomes output only.
+   * The queue name.
+   * The queue name must have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+   *    hyphens (-), colons (:), or periods (.).
+   *    For more information, see
+   *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+   * * `LOCATION_ID` is the canonical ID for the queue's location.
+   *    The list of available locations can be obtained by calling
+   *    [ListLocations][google.cloud.location.Locations.ListLocations].
+   *    For more information, see https://cloud.google.com/about/locations/.
+   * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+   *   hyphens (-). The maximum length is 100 characters.
+   * 
+ * + * string name = 1; + */ + 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 APP_ENGINE_HTTP_TARGET_FIELD_NUMBER = 3; + /** + *
+   * App Engine HTTP target.
+   * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + public boolean hasAppEngineHttpTarget() { + return targetTypeCase_ == 3; + } + /** + *
+   * App Engine HTTP target.
+   * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + public com.google.cloud.tasks.v2beta2.AppEngineHttpTarget getAppEngineHttpTarget() { + if (targetTypeCase_ == 3) { + return (com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.getDefaultInstance(); + } + /** + *
+   * App Engine HTTP target.
+   * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + public com.google.cloud.tasks.v2beta2.AppEngineHttpTargetOrBuilder getAppEngineHttpTargetOrBuilder() { + if (targetTypeCase_ == 3) { + return (com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.getDefaultInstance(); + } + + public static final int PULL_TARGET_FIELD_NUMBER = 4; + /** + *
+   * Pull target.
+   * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + public boolean hasPullTarget() { + return targetTypeCase_ == 4; + } + /** + *
+   * Pull target.
+   * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + public com.google.cloud.tasks.v2beta2.PullTarget getPullTarget() { + if (targetTypeCase_ == 4) { + return (com.google.cloud.tasks.v2beta2.PullTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.PullTarget.getDefaultInstance(); + } + /** + *
+   * Pull target.
+   * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + public com.google.cloud.tasks.v2beta2.PullTargetOrBuilder getPullTargetOrBuilder() { + if (targetTypeCase_ == 4) { + return (com.google.cloud.tasks.v2beta2.PullTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.PullTarget.getDefaultInstance(); + } + + public static final int RATE_LIMITS_FIELD_NUMBER = 5; + private com.google.cloud.tasks.v2beta2.RateLimits rateLimits_; + /** + *
+   * Rate limits for task dispatches.
+   * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+   * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+   * control task attempts however they control how tasks are
+   * attempted in different ways:
+   * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+   *   dispatches from a queue (i.e. all traffic dispatched from the
+   *   queue, regardless of whether the dispatch is from a first
+   *   attempt or a retry).
+   * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+   *   particular a task after its first attempt fails. That is,
+   *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+   *   second attempt, third attempt, etc).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + public boolean hasRateLimits() { + return rateLimits_ != null; + } + /** + *
+   * Rate limits for task dispatches.
+   * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+   * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+   * control task attempts however they control how tasks are
+   * attempted in different ways:
+   * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+   *   dispatches from a queue (i.e. all traffic dispatched from the
+   *   queue, regardless of whether the dispatch is from a first
+   *   attempt or a retry).
+   * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+   *   particular a task after its first attempt fails. That is,
+   *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+   *   second attempt, third attempt, etc).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + public com.google.cloud.tasks.v2beta2.RateLimits getRateLimits() { + return rateLimits_ == null ? com.google.cloud.tasks.v2beta2.RateLimits.getDefaultInstance() : rateLimits_; + } + /** + *
+   * Rate limits for task dispatches.
+   * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+   * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+   * control task attempts however they control how tasks are
+   * attempted in different ways:
+   * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+   *   dispatches from a queue (i.e. all traffic dispatched from the
+   *   queue, regardless of whether the dispatch is from a first
+   *   attempt or a retry).
+   * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+   *   particular a task after its first attempt fails. That is,
+   *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+   *   second attempt, third attempt, etc).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + public com.google.cloud.tasks.v2beta2.RateLimitsOrBuilder getRateLimitsOrBuilder() { + return getRateLimits(); + } + + public static final int RETRY_CONFIG_FIELD_NUMBER = 6; + private com.google.cloud.tasks.v2beta2.RetryConfig retryConfig_; + /** + *
+   * Settings that determine the retry behavior.
+   * * For tasks created using Cloud Tasks: the queue-level retry settings
+   *   apply to all tasks in the queue that were created using Cloud Tasks.
+   *   Retry settings cannot be set on individual tasks.
+   * * For tasks created using the App Engine SDK: the queue-level retry
+   *   settings apply to all tasks in the queue which do not have retry settings
+   *   explicitly set on the task and were created by the App Engine SDK. See
+   *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + public boolean hasRetryConfig() { + return retryConfig_ != null; + } + /** + *
+   * Settings that determine the retry behavior.
+   * * For tasks created using Cloud Tasks: the queue-level retry settings
+   *   apply to all tasks in the queue that were created using Cloud Tasks.
+   *   Retry settings cannot be set on individual tasks.
+   * * For tasks created using the App Engine SDK: the queue-level retry
+   *   settings apply to all tasks in the queue which do not have retry settings
+   *   explicitly set on the task and were created by the App Engine SDK. See
+   *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + public com.google.cloud.tasks.v2beta2.RetryConfig getRetryConfig() { + return retryConfig_ == null ? com.google.cloud.tasks.v2beta2.RetryConfig.getDefaultInstance() : retryConfig_; + } + /** + *
+   * Settings that determine the retry behavior.
+   * * For tasks created using Cloud Tasks: the queue-level retry settings
+   *   apply to all tasks in the queue that were created using Cloud Tasks.
+   *   Retry settings cannot be set on individual tasks.
+   * * For tasks created using the App Engine SDK: the queue-level retry
+   *   settings apply to all tasks in the queue which do not have retry settings
+   *   explicitly set on the task and were created by the App Engine SDK. See
+   *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + public com.google.cloud.tasks.v2beta2.RetryConfigOrBuilder getRetryConfigOrBuilder() { + return getRetryConfig(); + } + + public static final int STATE_FIELD_NUMBER = 7; + private int state_; + /** + *
+   * Output only. The state of the queue.
+   * `state` can only be changed by called
+   * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
+   * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading
+   * [queue.yaml/xml](/appengine/docs/python/config/queueref).
+   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue.State state = 7; + */ + public int getStateValue() { + return state_; + } + /** + *
+   * Output only. The state of the queue.
+   * `state` can only be changed by called
+   * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
+   * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading
+   * [queue.yaml/xml](/appengine/docs/python/config/queueref).
+   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue.State state = 7; + */ + public com.google.cloud.tasks.v2beta2.Queue.State getState() { + com.google.cloud.tasks.v2beta2.Queue.State result = com.google.cloud.tasks.v2beta2.Queue.State.valueOf(state_); + return result == null ? com.google.cloud.tasks.v2beta2.Queue.State.UNRECOGNIZED : result; + } + + public static final int PURGE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp purgeTime_; + /** + *
+   * Output only. The last time this queue was purged.
+   * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+   * were purged.
+   * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+   * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+   * Purge time will be truncated to the nearest microsecond. Purge
+   * time will be unset if the queue has never been purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + public boolean hasPurgeTime() { + return purgeTime_ != null; + } + /** + *
+   * Output only. The last time this queue was purged.
+   * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+   * were purged.
+   * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+   * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+   * Purge time will be truncated to the nearest microsecond. Purge
+   * time will be unset if the queue has never been purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + public com.google.protobuf.Timestamp getPurgeTime() { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } + /** + *
+   * Output only. The last time this queue was purged.
+   * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+   * were purged.
+   * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+   * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+   * Purge time will be truncated to the nearest microsecond. Purge
+   * time will be unset if the queue has never been purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { + return getPurgeTime(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (targetTypeCase_ == 3) { + output.writeMessage(3, (com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) targetType_); + } + if (targetTypeCase_ == 4) { + output.writeMessage(4, (com.google.cloud.tasks.v2beta2.PullTarget) targetType_); + } + if (rateLimits_ != null) { + output.writeMessage(5, getRateLimits()); + } + if (retryConfig_ != null) { + output.writeMessage(6, getRetryConfig()); + } + if (state_ != com.google.cloud.tasks.v2beta2.Queue.State.STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(7, state_); + } + if (purgeTime_ != null) { + output.writeMessage(8, getPurgeTime()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (targetTypeCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) targetType_); + } + if (targetTypeCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.cloud.tasks.v2beta2.PullTarget) targetType_); + } + if (rateLimits_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getRateLimits()); + } + if (retryConfig_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getRetryConfig()); + } + if (state_ != com.google.cloud.tasks.v2beta2.Queue.State.STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(7, state_); + } + if (purgeTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getPurgeTime()); + } + size += unknownFields.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.tasks.v2beta2.Queue)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.Queue other = (com.google.cloud.tasks.v2beta2.Queue) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && (hasRateLimits() == other.hasRateLimits()); + if (hasRateLimits()) { + result = result && getRateLimits() + .equals(other.getRateLimits()); + } + result = result && (hasRetryConfig() == other.hasRetryConfig()); + if (hasRetryConfig()) { + result = result && getRetryConfig() + .equals(other.getRetryConfig()); + } + result = result && state_ == other.state_; + result = result && (hasPurgeTime() == other.hasPurgeTime()); + if (hasPurgeTime()) { + result = result && getPurgeTime() + .equals(other.getPurgeTime()); + } + result = result && getTargetTypeCase().equals( + other.getTargetTypeCase()); + if (!result) return false; + switch (targetTypeCase_) { + case 3: + result = result && getAppEngineHttpTarget() + .equals(other.getAppEngineHttpTarget()); + break; + case 4: + result = result && getPullTarget() + .equals(other.getPullTarget()); + break; + case 0: + default: + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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 (hasRateLimits()) { + hash = (37 * hash) + RATE_LIMITS_FIELD_NUMBER; + hash = (53 * hash) + getRateLimits().hashCode(); + } + if (hasRetryConfig()) { + hash = (37 * hash) + RETRY_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getRetryConfig().hashCode(); + } + hash = (37 * hash) + STATE_FIELD_NUMBER; + hash = (53 * hash) + state_; + if (hasPurgeTime()) { + hash = (37 * hash) + PURGE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getPurgeTime().hashCode(); + } + switch (targetTypeCase_) { + case 3: + hash = (37 * hash) + APP_ENGINE_HTTP_TARGET_FIELD_NUMBER; + hash = (53 * hash) + getAppEngineHttpTarget().hashCode(); + break; + case 4: + hash = (37 * hash) + PULL_TARGET_FIELD_NUMBER; + hash = (53 * hash) + getPullTarget().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.Queue parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.Queue 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.tasks.v2beta2.Queue parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.Queue 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.tasks.v2beta2.Queue parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.Queue parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.Queue parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.Queue 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.tasks.v2beta2.Queue parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.Queue 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.tasks.v2beta2.Queue parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.Queue parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.Queue prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 queue is a container of related tasks. Queues are configured to manage
+   * how those tasks are dispatched. Configurable properties include rate limits,
+   * retry options, target types, and others.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.Queue} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.Queue) + com.google.cloud.tasks.v2beta2.QueueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_Queue_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_Queue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.Queue.class, com.google.cloud.tasks.v2beta2.Queue.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.Queue.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (rateLimitsBuilder_ == null) { + rateLimits_ = null; + } else { + rateLimits_ = null; + rateLimitsBuilder_ = null; + } + if (retryConfigBuilder_ == null) { + retryConfig_ = null; + } else { + retryConfig_ = null; + retryConfigBuilder_ = null; + } + state_ = 0; + + if (purgeTimeBuilder_ == null) { + purgeTime_ = null; + } else { + purgeTime_ = null; + purgeTimeBuilder_ = null; + } + targetTypeCase_ = 0; + targetType_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_Queue_descriptor; + } + + public com.google.cloud.tasks.v2beta2.Queue getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.Queue build() { + com.google.cloud.tasks.v2beta2.Queue result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.Queue buildPartial() { + com.google.cloud.tasks.v2beta2.Queue result = new com.google.cloud.tasks.v2beta2.Queue(this); + result.name_ = name_; + if (targetTypeCase_ == 3) { + if (appEngineHttpTargetBuilder_ == null) { + result.targetType_ = targetType_; + } else { + result.targetType_ = appEngineHttpTargetBuilder_.build(); + } + } + if (targetTypeCase_ == 4) { + if (pullTargetBuilder_ == null) { + result.targetType_ = targetType_; + } else { + result.targetType_ = pullTargetBuilder_.build(); + } + } + if (rateLimitsBuilder_ == null) { + result.rateLimits_ = rateLimits_; + } else { + result.rateLimits_ = rateLimitsBuilder_.build(); + } + if (retryConfigBuilder_ == null) { + result.retryConfig_ = retryConfig_; + } else { + result.retryConfig_ = retryConfigBuilder_.build(); + } + result.state_ = state_; + if (purgeTimeBuilder_ == null) { + result.purgeTime_ = purgeTime_; + } else { + result.purgeTime_ = purgeTimeBuilder_.build(); + } + result.targetTypeCase_ = targetTypeCase_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.Queue) { + return mergeFrom((com.google.cloud.tasks.v2beta2.Queue)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.Queue other) { + if (other == com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasRateLimits()) { + mergeRateLimits(other.getRateLimits()); + } + if (other.hasRetryConfig()) { + mergeRetryConfig(other.getRetryConfig()); + } + if (other.state_ != 0) { + setStateValue(other.getStateValue()); + } + if (other.hasPurgeTime()) { + mergePurgeTime(other.getPurgeTime()); + } + switch (other.getTargetTypeCase()) { + case APP_ENGINE_HTTP_TARGET: { + mergeAppEngineHttpTarget(other.getAppEngineHttpTarget()); + break; + } + case PULL_TARGET: { + mergePullTarget(other.getPullTarget()); + break; + } + case TARGETTYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.Queue parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.Queue) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int targetTypeCase_ = 0; + private java.lang.Object targetType_; + public TargetTypeCase + getTargetTypeCase() { + return TargetTypeCase.forNumber( + targetTypeCase_); + } + + public Builder clearTargetType() { + targetTypeCase_ = 0; + targetType_ = null; + onChanged(); + return this; + } + + + private java.lang.Object name_ = ""; + /** + *
+     * Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue],
+     * after which it becomes output only.
+     * The queue name.
+     * The queue name must have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+     *    hyphens (-), colons (:), or periods (.).
+     *    For more information, see
+     *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+     * * `LOCATION_ID` is the canonical ID for the queue's location.
+     *    The list of available locations can be obtained by calling
+     *    [ListLocations][google.cloud.location.Locations.ListLocations].
+     *    For more information, see https://cloud.google.com/about/locations/.
+     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+     *   hyphens (-). The maximum length is 100 characters.
+     * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+     * Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue],
+     * after which it becomes output only.
+     * The queue name.
+     * The queue name must have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+     *    hyphens (-), colons (:), or periods (.).
+     *    For more information, see
+     *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+     * * `LOCATION_ID` is the canonical ID for the queue's location.
+     *    The list of available locations can be obtained by calling
+     *    [ListLocations][google.cloud.location.Locations.ListLocations].
+     *    For more information, see https://cloud.google.com/about/locations/.
+     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+     *   hyphens (-). The maximum length is 100 characters.
+     * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+     * Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue],
+     * after which it becomes output only.
+     * The queue name.
+     * The queue name must have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+     *    hyphens (-), colons (:), or periods (.).
+     *    For more information, see
+     *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+     * * `LOCATION_ID` is the canonical ID for the queue's location.
+     *    The list of available locations can be obtained by calling
+     *    [ListLocations][google.cloud.location.Locations.ListLocations].
+     *    For more information, see https://cloud.google.com/about/locations/.
+     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+     *   hyphens (-). The maximum length is 100 characters.
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue],
+     * after which it becomes output only.
+     * The queue name.
+     * The queue name must have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+     *    hyphens (-), colons (:), or periods (.).
+     *    For more information, see
+     *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+     * * `LOCATION_ID` is the canonical ID for the queue's location.
+     *    The list of available locations can be obtained by calling
+     *    [ListLocations][google.cloud.location.Locations.ListLocations].
+     *    For more information, see https://cloud.google.com/about/locations/.
+     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+     *   hyphens (-). The maximum length is 100 characters.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue],
+     * after which it becomes output only.
+     * The queue name.
+     * The queue name must have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+     *    hyphens (-), colons (:), or periods (.).
+     *    For more information, see
+     *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+     * * `LOCATION_ID` is the canonical ID for the queue's location.
+     *    The list of available locations can be obtained by calling
+     *    [ListLocations][google.cloud.location.Locations.ListLocations].
+     *    For more information, see https://cloud.google.com/about/locations/.
+     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+     *   hyphens (-). The maximum length is 100 characters.
+     * 
+ * + * string name = 1; + */ + 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.tasks.v2beta2.AppEngineHttpTarget, com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.Builder, com.google.cloud.tasks.v2beta2.AppEngineHttpTargetOrBuilder> appEngineHttpTargetBuilder_; + /** + *
+     * App Engine HTTP target.
+     * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + public boolean hasAppEngineHttpTarget() { + return targetTypeCase_ == 3; + } + /** + *
+     * App Engine HTTP target.
+     * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + public com.google.cloud.tasks.v2beta2.AppEngineHttpTarget getAppEngineHttpTarget() { + if (appEngineHttpTargetBuilder_ == null) { + if (targetTypeCase_ == 3) { + return (com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.getDefaultInstance(); + } else { + if (targetTypeCase_ == 3) { + return appEngineHttpTargetBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.getDefaultInstance(); + } + } + /** + *
+     * App Engine HTTP target.
+     * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + public Builder setAppEngineHttpTarget(com.google.cloud.tasks.v2beta2.AppEngineHttpTarget value) { + if (appEngineHttpTargetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetType_ = value; + onChanged(); + } else { + appEngineHttpTargetBuilder_.setMessage(value); + } + targetTypeCase_ = 3; + return this; + } + /** + *
+     * App Engine HTTP target.
+     * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + public Builder setAppEngineHttpTarget( + com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.Builder builderForValue) { + if (appEngineHttpTargetBuilder_ == null) { + targetType_ = builderForValue.build(); + onChanged(); + } else { + appEngineHttpTargetBuilder_.setMessage(builderForValue.build()); + } + targetTypeCase_ = 3; + return this; + } + /** + *
+     * App Engine HTTP target.
+     * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + public Builder mergeAppEngineHttpTarget(com.google.cloud.tasks.v2beta2.AppEngineHttpTarget value) { + if (appEngineHttpTargetBuilder_ == null) { + if (targetTypeCase_ == 3 && + targetType_ != com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.getDefaultInstance()) { + targetType_ = com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.newBuilder((com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) targetType_) + .mergeFrom(value).buildPartial(); + } else { + targetType_ = value; + } + onChanged(); + } else { + if (targetTypeCase_ == 3) { + appEngineHttpTargetBuilder_.mergeFrom(value); + } + appEngineHttpTargetBuilder_.setMessage(value); + } + targetTypeCase_ = 3; + return this; + } + /** + *
+     * App Engine HTTP target.
+     * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + public Builder clearAppEngineHttpTarget() { + if (appEngineHttpTargetBuilder_ == null) { + if (targetTypeCase_ == 3) { + targetTypeCase_ = 0; + targetType_ = null; + onChanged(); + } + } else { + if (targetTypeCase_ == 3) { + targetTypeCase_ = 0; + targetType_ = null; + } + appEngineHttpTargetBuilder_.clear(); + } + return this; + } + /** + *
+     * App Engine HTTP target.
+     * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + public com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.Builder getAppEngineHttpTargetBuilder() { + return getAppEngineHttpTargetFieldBuilder().getBuilder(); + } + /** + *
+     * App Engine HTTP target.
+     * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + public com.google.cloud.tasks.v2beta2.AppEngineHttpTargetOrBuilder getAppEngineHttpTargetOrBuilder() { + if ((targetTypeCase_ == 3) && (appEngineHttpTargetBuilder_ != null)) { + return appEngineHttpTargetBuilder_.getMessageOrBuilder(); + } else { + if (targetTypeCase_ == 3) { + return (com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.getDefaultInstance(); + } + } + /** + *
+     * App Engine HTTP target.
+     * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AppEngineHttpTarget, com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.Builder, com.google.cloud.tasks.v2beta2.AppEngineHttpTargetOrBuilder> + getAppEngineHttpTargetFieldBuilder() { + if (appEngineHttpTargetBuilder_ == null) { + if (!(targetTypeCase_ == 3)) { + targetType_ = com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.getDefaultInstance(); + } + appEngineHttpTargetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AppEngineHttpTarget, com.google.cloud.tasks.v2beta2.AppEngineHttpTarget.Builder, com.google.cloud.tasks.v2beta2.AppEngineHttpTargetOrBuilder>( + (com.google.cloud.tasks.v2beta2.AppEngineHttpTarget) targetType_, + getParentForChildren(), + isClean()); + targetType_ = null; + } + targetTypeCase_ = 3; + onChanged();; + return appEngineHttpTargetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.PullTarget, com.google.cloud.tasks.v2beta2.PullTarget.Builder, com.google.cloud.tasks.v2beta2.PullTargetOrBuilder> pullTargetBuilder_; + /** + *
+     * Pull target.
+     * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + public boolean hasPullTarget() { + return targetTypeCase_ == 4; + } + /** + *
+     * Pull target.
+     * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + public com.google.cloud.tasks.v2beta2.PullTarget getPullTarget() { + if (pullTargetBuilder_ == null) { + if (targetTypeCase_ == 4) { + return (com.google.cloud.tasks.v2beta2.PullTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.PullTarget.getDefaultInstance(); + } else { + if (targetTypeCase_ == 4) { + return pullTargetBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta2.PullTarget.getDefaultInstance(); + } + } + /** + *
+     * Pull target.
+     * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + public Builder setPullTarget(com.google.cloud.tasks.v2beta2.PullTarget value) { + if (pullTargetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + targetType_ = value; + onChanged(); + } else { + pullTargetBuilder_.setMessage(value); + } + targetTypeCase_ = 4; + return this; + } + /** + *
+     * Pull target.
+     * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + public Builder setPullTarget( + com.google.cloud.tasks.v2beta2.PullTarget.Builder builderForValue) { + if (pullTargetBuilder_ == null) { + targetType_ = builderForValue.build(); + onChanged(); + } else { + pullTargetBuilder_.setMessage(builderForValue.build()); + } + targetTypeCase_ = 4; + return this; + } + /** + *
+     * Pull target.
+     * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + public Builder mergePullTarget(com.google.cloud.tasks.v2beta2.PullTarget value) { + if (pullTargetBuilder_ == null) { + if (targetTypeCase_ == 4 && + targetType_ != com.google.cloud.tasks.v2beta2.PullTarget.getDefaultInstance()) { + targetType_ = com.google.cloud.tasks.v2beta2.PullTarget.newBuilder((com.google.cloud.tasks.v2beta2.PullTarget) targetType_) + .mergeFrom(value).buildPartial(); + } else { + targetType_ = value; + } + onChanged(); + } else { + if (targetTypeCase_ == 4) { + pullTargetBuilder_.mergeFrom(value); + } + pullTargetBuilder_.setMessage(value); + } + targetTypeCase_ = 4; + return this; + } + /** + *
+     * Pull target.
+     * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + public Builder clearPullTarget() { + if (pullTargetBuilder_ == null) { + if (targetTypeCase_ == 4) { + targetTypeCase_ = 0; + targetType_ = null; + onChanged(); + } + } else { + if (targetTypeCase_ == 4) { + targetTypeCase_ = 0; + targetType_ = null; + } + pullTargetBuilder_.clear(); + } + return this; + } + /** + *
+     * Pull target.
+     * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + public com.google.cloud.tasks.v2beta2.PullTarget.Builder getPullTargetBuilder() { + return getPullTargetFieldBuilder().getBuilder(); + } + /** + *
+     * Pull target.
+     * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + public com.google.cloud.tasks.v2beta2.PullTargetOrBuilder getPullTargetOrBuilder() { + if ((targetTypeCase_ == 4) && (pullTargetBuilder_ != null)) { + return pullTargetBuilder_.getMessageOrBuilder(); + } else { + if (targetTypeCase_ == 4) { + return (com.google.cloud.tasks.v2beta2.PullTarget) targetType_; + } + return com.google.cloud.tasks.v2beta2.PullTarget.getDefaultInstance(); + } + } + /** + *
+     * Pull target.
+     * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.PullTarget, com.google.cloud.tasks.v2beta2.PullTarget.Builder, com.google.cloud.tasks.v2beta2.PullTargetOrBuilder> + getPullTargetFieldBuilder() { + if (pullTargetBuilder_ == null) { + if (!(targetTypeCase_ == 4)) { + targetType_ = com.google.cloud.tasks.v2beta2.PullTarget.getDefaultInstance(); + } + pullTargetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.PullTarget, com.google.cloud.tasks.v2beta2.PullTarget.Builder, com.google.cloud.tasks.v2beta2.PullTargetOrBuilder>( + (com.google.cloud.tasks.v2beta2.PullTarget) targetType_, + getParentForChildren(), + isClean()); + targetType_ = null; + } + targetTypeCase_ = 4; + onChanged();; + return pullTargetBuilder_; + } + + private com.google.cloud.tasks.v2beta2.RateLimits rateLimits_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.RateLimits, com.google.cloud.tasks.v2beta2.RateLimits.Builder, com.google.cloud.tasks.v2beta2.RateLimitsOrBuilder> rateLimitsBuilder_; + /** + *
+     * Rate limits for task dispatches.
+     * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+     * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+     * control task attempts however they control how tasks are
+     * attempted in different ways:
+     * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+     *   dispatches from a queue (i.e. all traffic dispatched from the
+     *   queue, regardless of whether the dispatch is from a first
+     *   attempt or a retry).
+     * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+     *   particular a task after its first attempt fails. That is,
+     *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+     *   second attempt, third attempt, etc).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + public boolean hasRateLimits() { + return rateLimitsBuilder_ != null || rateLimits_ != null; + } + /** + *
+     * Rate limits for task dispatches.
+     * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+     * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+     * control task attempts however they control how tasks are
+     * attempted in different ways:
+     * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+     *   dispatches from a queue (i.e. all traffic dispatched from the
+     *   queue, regardless of whether the dispatch is from a first
+     *   attempt or a retry).
+     * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+     *   particular a task after its first attempt fails. That is,
+     *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+     *   second attempt, third attempt, etc).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + public com.google.cloud.tasks.v2beta2.RateLimits getRateLimits() { + if (rateLimitsBuilder_ == null) { + return rateLimits_ == null ? com.google.cloud.tasks.v2beta2.RateLimits.getDefaultInstance() : rateLimits_; + } else { + return rateLimitsBuilder_.getMessage(); + } + } + /** + *
+     * Rate limits for task dispatches.
+     * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+     * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+     * control task attempts however they control how tasks are
+     * attempted in different ways:
+     * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+     *   dispatches from a queue (i.e. all traffic dispatched from the
+     *   queue, regardless of whether the dispatch is from a first
+     *   attempt or a retry).
+     * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+     *   particular a task after its first attempt fails. That is,
+     *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+     *   second attempt, third attempt, etc).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + public Builder setRateLimits(com.google.cloud.tasks.v2beta2.RateLimits value) { + if (rateLimitsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rateLimits_ = value; + onChanged(); + } else { + rateLimitsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Rate limits for task dispatches.
+     * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+     * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+     * control task attempts however they control how tasks are
+     * attempted in different ways:
+     * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+     *   dispatches from a queue (i.e. all traffic dispatched from the
+     *   queue, regardless of whether the dispatch is from a first
+     *   attempt or a retry).
+     * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+     *   particular a task after its first attempt fails. That is,
+     *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+     *   second attempt, third attempt, etc).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + public Builder setRateLimits( + com.google.cloud.tasks.v2beta2.RateLimits.Builder builderForValue) { + if (rateLimitsBuilder_ == null) { + rateLimits_ = builderForValue.build(); + onChanged(); + } else { + rateLimitsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Rate limits for task dispatches.
+     * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+     * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+     * control task attempts however they control how tasks are
+     * attempted in different ways:
+     * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+     *   dispatches from a queue (i.e. all traffic dispatched from the
+     *   queue, regardless of whether the dispatch is from a first
+     *   attempt or a retry).
+     * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+     *   particular a task after its first attempt fails. That is,
+     *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+     *   second attempt, third attempt, etc).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + public Builder mergeRateLimits(com.google.cloud.tasks.v2beta2.RateLimits value) { + if (rateLimitsBuilder_ == null) { + if (rateLimits_ != null) { + rateLimits_ = + com.google.cloud.tasks.v2beta2.RateLimits.newBuilder(rateLimits_).mergeFrom(value).buildPartial(); + } else { + rateLimits_ = value; + } + onChanged(); + } else { + rateLimitsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Rate limits for task dispatches.
+     * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+     * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+     * control task attempts however they control how tasks are
+     * attempted in different ways:
+     * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+     *   dispatches from a queue (i.e. all traffic dispatched from the
+     *   queue, regardless of whether the dispatch is from a first
+     *   attempt or a retry).
+     * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+     *   particular a task after its first attempt fails. That is,
+     *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+     *   second attempt, third attempt, etc).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + public Builder clearRateLimits() { + if (rateLimitsBuilder_ == null) { + rateLimits_ = null; + onChanged(); + } else { + rateLimits_ = null; + rateLimitsBuilder_ = null; + } + + return this; + } + /** + *
+     * Rate limits for task dispatches.
+     * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+     * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+     * control task attempts however they control how tasks are
+     * attempted in different ways:
+     * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+     *   dispatches from a queue (i.e. all traffic dispatched from the
+     *   queue, regardless of whether the dispatch is from a first
+     *   attempt or a retry).
+     * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+     *   particular a task after its first attempt fails. That is,
+     *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+     *   second attempt, third attempt, etc).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + public com.google.cloud.tasks.v2beta2.RateLimits.Builder getRateLimitsBuilder() { + + onChanged(); + return getRateLimitsFieldBuilder().getBuilder(); + } + /** + *
+     * Rate limits for task dispatches.
+     * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+     * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+     * control task attempts however they control how tasks are
+     * attempted in different ways:
+     * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+     *   dispatches from a queue (i.e. all traffic dispatched from the
+     *   queue, regardless of whether the dispatch is from a first
+     *   attempt or a retry).
+     * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+     *   particular a task after its first attempt fails. That is,
+     *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+     *   second attempt, third attempt, etc).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + public com.google.cloud.tasks.v2beta2.RateLimitsOrBuilder getRateLimitsOrBuilder() { + if (rateLimitsBuilder_ != null) { + return rateLimitsBuilder_.getMessageOrBuilder(); + } else { + return rateLimits_ == null ? + com.google.cloud.tasks.v2beta2.RateLimits.getDefaultInstance() : rateLimits_; + } + } + /** + *
+     * Rate limits for task dispatches.
+     * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+     * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+     * control task attempts however they control how tasks are
+     * attempted in different ways:
+     * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+     *   dispatches from a queue (i.e. all traffic dispatched from the
+     *   queue, regardless of whether the dispatch is from a first
+     *   attempt or a retry).
+     * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+     *   particular a task after its first attempt fails. That is,
+     *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+     *   second attempt, third attempt, etc).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.RateLimits, com.google.cloud.tasks.v2beta2.RateLimits.Builder, com.google.cloud.tasks.v2beta2.RateLimitsOrBuilder> + getRateLimitsFieldBuilder() { + if (rateLimitsBuilder_ == null) { + rateLimitsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.RateLimits, com.google.cloud.tasks.v2beta2.RateLimits.Builder, com.google.cloud.tasks.v2beta2.RateLimitsOrBuilder>( + getRateLimits(), + getParentForChildren(), + isClean()); + rateLimits_ = null; + } + return rateLimitsBuilder_; + } + + private com.google.cloud.tasks.v2beta2.RetryConfig retryConfig_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.RetryConfig, com.google.cloud.tasks.v2beta2.RetryConfig.Builder, com.google.cloud.tasks.v2beta2.RetryConfigOrBuilder> retryConfigBuilder_; + /** + *
+     * Settings that determine the retry behavior.
+     * * For tasks created using Cloud Tasks: the queue-level retry settings
+     *   apply to all tasks in the queue that were created using Cloud Tasks.
+     *   Retry settings cannot be set on individual tasks.
+     * * For tasks created using the App Engine SDK: the queue-level retry
+     *   settings apply to all tasks in the queue which do not have retry settings
+     *   explicitly set on the task and were created by the App Engine SDK. See
+     *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + public boolean hasRetryConfig() { + return retryConfigBuilder_ != null || retryConfig_ != null; + } + /** + *
+     * Settings that determine the retry behavior.
+     * * For tasks created using Cloud Tasks: the queue-level retry settings
+     *   apply to all tasks in the queue that were created using Cloud Tasks.
+     *   Retry settings cannot be set on individual tasks.
+     * * For tasks created using the App Engine SDK: the queue-level retry
+     *   settings apply to all tasks in the queue which do not have retry settings
+     *   explicitly set on the task and were created by the App Engine SDK. See
+     *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + public com.google.cloud.tasks.v2beta2.RetryConfig getRetryConfig() { + if (retryConfigBuilder_ == null) { + return retryConfig_ == null ? com.google.cloud.tasks.v2beta2.RetryConfig.getDefaultInstance() : retryConfig_; + } else { + return retryConfigBuilder_.getMessage(); + } + } + /** + *
+     * Settings that determine the retry behavior.
+     * * For tasks created using Cloud Tasks: the queue-level retry settings
+     *   apply to all tasks in the queue that were created using Cloud Tasks.
+     *   Retry settings cannot be set on individual tasks.
+     * * For tasks created using the App Engine SDK: the queue-level retry
+     *   settings apply to all tasks in the queue which do not have retry settings
+     *   explicitly set on the task and were created by the App Engine SDK. See
+     *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + public Builder setRetryConfig(com.google.cloud.tasks.v2beta2.RetryConfig value) { + if (retryConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + retryConfig_ = value; + onChanged(); + } else { + retryConfigBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Settings that determine the retry behavior.
+     * * For tasks created using Cloud Tasks: the queue-level retry settings
+     *   apply to all tasks in the queue that were created using Cloud Tasks.
+     *   Retry settings cannot be set on individual tasks.
+     * * For tasks created using the App Engine SDK: the queue-level retry
+     *   settings apply to all tasks in the queue which do not have retry settings
+     *   explicitly set on the task and were created by the App Engine SDK. See
+     *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + public Builder setRetryConfig( + com.google.cloud.tasks.v2beta2.RetryConfig.Builder builderForValue) { + if (retryConfigBuilder_ == null) { + retryConfig_ = builderForValue.build(); + onChanged(); + } else { + retryConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Settings that determine the retry behavior.
+     * * For tasks created using Cloud Tasks: the queue-level retry settings
+     *   apply to all tasks in the queue that were created using Cloud Tasks.
+     *   Retry settings cannot be set on individual tasks.
+     * * For tasks created using the App Engine SDK: the queue-level retry
+     *   settings apply to all tasks in the queue which do not have retry settings
+     *   explicitly set on the task and were created by the App Engine SDK. See
+     *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + public Builder mergeRetryConfig(com.google.cloud.tasks.v2beta2.RetryConfig value) { + if (retryConfigBuilder_ == null) { + if (retryConfig_ != null) { + retryConfig_ = + com.google.cloud.tasks.v2beta2.RetryConfig.newBuilder(retryConfig_).mergeFrom(value).buildPartial(); + } else { + retryConfig_ = value; + } + onChanged(); + } else { + retryConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Settings that determine the retry behavior.
+     * * For tasks created using Cloud Tasks: the queue-level retry settings
+     *   apply to all tasks in the queue that were created using Cloud Tasks.
+     *   Retry settings cannot be set on individual tasks.
+     * * For tasks created using the App Engine SDK: the queue-level retry
+     *   settings apply to all tasks in the queue which do not have retry settings
+     *   explicitly set on the task and were created by the App Engine SDK. See
+     *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + public Builder clearRetryConfig() { + if (retryConfigBuilder_ == null) { + retryConfig_ = null; + onChanged(); + } else { + retryConfig_ = null; + retryConfigBuilder_ = null; + } + + return this; + } + /** + *
+     * Settings that determine the retry behavior.
+     * * For tasks created using Cloud Tasks: the queue-level retry settings
+     *   apply to all tasks in the queue that were created using Cloud Tasks.
+     *   Retry settings cannot be set on individual tasks.
+     * * For tasks created using the App Engine SDK: the queue-level retry
+     *   settings apply to all tasks in the queue which do not have retry settings
+     *   explicitly set on the task and were created by the App Engine SDK. See
+     *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + public com.google.cloud.tasks.v2beta2.RetryConfig.Builder getRetryConfigBuilder() { + + onChanged(); + return getRetryConfigFieldBuilder().getBuilder(); + } + /** + *
+     * Settings that determine the retry behavior.
+     * * For tasks created using Cloud Tasks: the queue-level retry settings
+     *   apply to all tasks in the queue that were created using Cloud Tasks.
+     *   Retry settings cannot be set on individual tasks.
+     * * For tasks created using the App Engine SDK: the queue-level retry
+     *   settings apply to all tasks in the queue which do not have retry settings
+     *   explicitly set on the task and were created by the App Engine SDK. See
+     *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + public com.google.cloud.tasks.v2beta2.RetryConfigOrBuilder getRetryConfigOrBuilder() { + if (retryConfigBuilder_ != null) { + return retryConfigBuilder_.getMessageOrBuilder(); + } else { + return retryConfig_ == null ? + com.google.cloud.tasks.v2beta2.RetryConfig.getDefaultInstance() : retryConfig_; + } + } + /** + *
+     * Settings that determine the retry behavior.
+     * * For tasks created using Cloud Tasks: the queue-level retry settings
+     *   apply to all tasks in the queue that were created using Cloud Tasks.
+     *   Retry settings cannot be set on individual tasks.
+     * * For tasks created using the App Engine SDK: the queue-level retry
+     *   settings apply to all tasks in the queue which do not have retry settings
+     *   explicitly set on the task and were created by the App Engine SDK. See
+     *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+     * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.RetryConfig, com.google.cloud.tasks.v2beta2.RetryConfig.Builder, com.google.cloud.tasks.v2beta2.RetryConfigOrBuilder> + getRetryConfigFieldBuilder() { + if (retryConfigBuilder_ == null) { + retryConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.RetryConfig, com.google.cloud.tasks.v2beta2.RetryConfig.Builder, com.google.cloud.tasks.v2beta2.RetryConfigOrBuilder>( + getRetryConfig(), + getParentForChildren(), + isClean()); + retryConfig_ = null; + } + return retryConfigBuilder_; + } + + private int state_ = 0; + /** + *
+     * Output only. The state of the queue.
+     * `state` can only be changed by called
+     * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
+     * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading
+     * [queue.yaml/xml](/appengine/docs/python/config/queueref).
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue.State state = 7; + */ + public int getStateValue() { + return state_; + } + /** + *
+     * Output only. The state of the queue.
+     * `state` can only be changed by called
+     * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
+     * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading
+     * [queue.yaml/xml](/appengine/docs/python/config/queueref).
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue.State state = 7; + */ + public Builder setStateValue(int value) { + state_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The state of the queue.
+     * `state` can only be changed by called
+     * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
+     * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading
+     * [queue.yaml/xml](/appengine/docs/python/config/queueref).
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue.State state = 7; + */ + public com.google.cloud.tasks.v2beta2.Queue.State getState() { + com.google.cloud.tasks.v2beta2.Queue.State result = com.google.cloud.tasks.v2beta2.Queue.State.valueOf(state_); + return result == null ? com.google.cloud.tasks.v2beta2.Queue.State.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The state of the queue.
+     * `state` can only be changed by called
+     * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
+     * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading
+     * [queue.yaml/xml](/appengine/docs/python/config/queueref).
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue.State state = 7; + */ + public Builder setState(com.google.cloud.tasks.v2beta2.Queue.State value) { + if (value == null) { + throw new NullPointerException(); + } + + state_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The state of the queue.
+     * `state` can only be changed by called
+     * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
+     * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading
+     * [queue.yaml/xml](/appengine/docs/python/config/queueref).
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue.State state = 7; + */ + public Builder clearState() { + + state_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp purgeTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> purgeTimeBuilder_; + /** + *
+     * Output only. The last time this queue was purged.
+     * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+     * were purged.
+     * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+     * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+     * Purge time will be truncated to the nearest microsecond. Purge
+     * time will be unset if the queue has never been purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + public boolean hasPurgeTime() { + return purgeTimeBuilder_ != null || purgeTime_ != null; + } + /** + *
+     * Output only. The last time this queue was purged.
+     * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+     * were purged.
+     * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+     * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+     * Purge time will be truncated to the nearest microsecond. Purge
+     * time will be unset if the queue has never been purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + public com.google.protobuf.Timestamp getPurgeTime() { + if (purgeTimeBuilder_ == null) { + return purgeTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } else { + return purgeTimeBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The last time this queue was purged.
+     * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+     * were purged.
+     * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+     * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+     * Purge time will be truncated to the nearest microsecond. Purge
+     * time will be unset if the queue has never been purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + public Builder setPurgeTime(com.google.protobuf.Timestamp value) { + if (purgeTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + purgeTime_ = value; + onChanged(); + } else { + purgeTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The last time this queue was purged.
+     * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+     * were purged.
+     * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+     * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+     * Purge time will be truncated to the nearest microsecond. Purge
+     * time will be unset if the queue has never been purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + public Builder setPurgeTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (purgeTimeBuilder_ == null) { + purgeTime_ = builderForValue.build(); + onChanged(); + } else { + purgeTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The last time this queue was purged.
+     * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+     * were purged.
+     * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+     * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+     * Purge time will be truncated to the nearest microsecond. Purge
+     * time will be unset if the queue has never been purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + public Builder mergePurgeTime(com.google.protobuf.Timestamp value) { + if (purgeTimeBuilder_ == null) { + if (purgeTime_ != null) { + purgeTime_ = + com.google.protobuf.Timestamp.newBuilder(purgeTime_).mergeFrom(value).buildPartial(); + } else { + purgeTime_ = value; + } + onChanged(); + } else { + purgeTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The last time this queue was purged.
+     * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+     * were purged.
+     * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+     * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+     * Purge time will be truncated to the nearest microsecond. Purge
+     * time will be unset if the queue has never been purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + public Builder clearPurgeTime() { + if (purgeTimeBuilder_ == null) { + purgeTime_ = null; + onChanged(); + } else { + purgeTime_ = null; + purgeTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The last time this queue was purged.
+     * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+     * were purged.
+     * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+     * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+     * Purge time will be truncated to the nearest microsecond. Purge
+     * time will be unset if the queue has never been purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + public com.google.protobuf.Timestamp.Builder getPurgeTimeBuilder() { + + onChanged(); + return getPurgeTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The last time this queue was purged.
+     * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+     * were purged.
+     * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+     * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+     * Purge time will be truncated to the nearest microsecond. Purge
+     * time will be unset if the queue has never been purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + public com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder() { + if (purgeTimeBuilder_ != null) { + return purgeTimeBuilder_.getMessageOrBuilder(); + } else { + return purgeTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : purgeTime_; + } + } + /** + *
+     * Output only. The last time this queue was purged.
+     * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+     * were purged.
+     * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+     * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+     * Purge time will be truncated to the nearest microsecond. Purge
+     * time will be unset if the queue has never been purged.
+     * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getPurgeTimeFieldBuilder() { + if (purgeTimeBuilder_ == null) { + purgeTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getPurgeTime(), + getParentForChildren(), + isClean()); + purgeTime_ = null; + } + return purgeTimeBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.Queue) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.Queue) + private static final com.google.cloud.tasks.v2beta2.Queue DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.Queue(); + } + + public static com.google.cloud.tasks.v2beta2.Queue getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Queue parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Queue(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.Queue getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueName.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueName.java new file mode 100644 index 000000000000..0eff5996ee0a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueName.java @@ -0,0 +1,212 @@ +/* + * Copyright 2018 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. + */ + +package com.google.cloud.tasks.v2beta2; + +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import java.util.Map; +import java.util.ArrayList; +import java.util.List; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +@javax.annotation.Generated("by GAPIC protoc plugin") +public class QueueName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/queues/{queue}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String queue; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getQueue() { + return queue; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private QueueName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + queue = Preconditions.checkNotNull(builder.getQueue()); + } + + public static QueueName of(String project, String location, String queue) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setQueue(queue) + .build(); + } + + public static String format(String project, String location, String queue) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setQueue(queue) + .build() + .toString(); + } + + public static QueueName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch(formattedString, "QueueName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("queue")); + } + + 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 (QueueName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("queue", queue); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "location", location, "queue", queue); + } + + /** Builder for QueueName. */ + public static class Builder { + + private String project; + private String location; + private String queue; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getQueue() { + return queue; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setQueue(String queue) { + this.queue = queue; + return this; + } + + private Builder() { + } + + private Builder(QueueName queueName) { + project = queueName.project; + location = queueName.location; + queue = queueName.queue; + } + + public QueueName build() { + return new QueueName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof QueueName) { + QueueName that = (QueueName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.queue.equals(that.queue)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= queue.hashCode(); + return h; + } +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java new file mode 100644 index 000000000000..a2bd5be30b07 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueOrBuilder.java @@ -0,0 +1,290 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/queue.proto + +package com.google.cloud.tasks.v2beta2; + +public interface QueueOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.Queue) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue],
+   * after which it becomes output only.
+   * The queue name.
+   * The queue name must have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+   *    hyphens (-), colons (:), or periods (.).
+   *    For more information, see
+   *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+   * * `LOCATION_ID` is the canonical ID for the queue's location.
+   *    The list of available locations can be obtained by calling
+   *    [ListLocations][google.cloud.location.Locations.ListLocations].
+   *    For more information, see https://cloud.google.com/about/locations/.
+   * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+   *   hyphens (-). The maximum length is 100 characters.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue],
+   * after which it becomes output only.
+   * The queue name.
+   * The queue name must have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
+   * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+   *    hyphens (-), colons (:), or periods (.).
+   *    For more information, see
+   *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+   * * `LOCATION_ID` is the canonical ID for the queue's location.
+   *    The list of available locations can be obtained by calling
+   *    [ListLocations][google.cloud.location.Locations.ListLocations].
+   *    For more information, see https://cloud.google.com/about/locations/.
+   * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+   *   hyphens (-). The maximum length is 100 characters.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * App Engine HTTP target.
+   * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + boolean hasAppEngineHttpTarget(); + /** + *
+   * App Engine HTTP target.
+   * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + com.google.cloud.tasks.v2beta2.AppEngineHttpTarget getAppEngineHttpTarget(); + /** + *
+   * App Engine HTTP target.
+   * An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpTarget app_engine_http_target = 3; + */ + com.google.cloud.tasks.v2beta2.AppEngineHttpTargetOrBuilder getAppEngineHttpTargetOrBuilder(); + + /** + *
+   * Pull target.
+   * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + boolean hasPullTarget(); + /** + *
+   * Pull target.
+   * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + com.google.cloud.tasks.v2beta2.PullTarget getPullTarget(); + /** + *
+   * Pull target.
+   * A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget].
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullTarget pull_target = 4; + */ + com.google.cloud.tasks.v2beta2.PullTargetOrBuilder getPullTargetOrBuilder(); + + /** + *
+   * Rate limits for task dispatches.
+   * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+   * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+   * control task attempts however they control how tasks are
+   * attempted in different ways:
+   * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+   *   dispatches from a queue (i.e. all traffic dispatched from the
+   *   queue, regardless of whether the dispatch is from a first
+   *   attempt or a retry).
+   * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+   *   particular a task after its first attempt fails. That is,
+   *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+   *   second attempt, third attempt, etc).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + boolean hasRateLimits(); + /** + *
+   * Rate limits for task dispatches.
+   * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+   * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+   * control task attempts however they control how tasks are
+   * attempted in different ways:
+   * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+   *   dispatches from a queue (i.e. all traffic dispatched from the
+   *   queue, regardless of whether the dispatch is from a first
+   *   attempt or a retry).
+   * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+   *   particular a task after its first attempt fails. That is,
+   *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+   *   second attempt, third attempt, etc).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + com.google.cloud.tasks.v2beta2.RateLimits getRateLimits(); + /** + *
+   * Rate limits for task dispatches.
+   * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
+   * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
+   * control task attempts however they control how tasks are
+   * attempted in different ways:
+   * * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
+   *   dispatches from a queue (i.e. all traffic dispatched from the
+   *   queue, regardless of whether the dispatch is from a first
+   *   attempt or a retry).
+   * * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
+   *   particular a task after its first attempt fails. That is,
+   *   [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
+   *   second attempt, third attempt, etc).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RateLimits rate_limits = 5; + */ + com.google.cloud.tasks.v2beta2.RateLimitsOrBuilder getRateLimitsOrBuilder(); + + /** + *
+   * Settings that determine the retry behavior.
+   * * For tasks created using Cloud Tasks: the queue-level retry settings
+   *   apply to all tasks in the queue that were created using Cloud Tasks.
+   *   Retry settings cannot be set on individual tasks.
+   * * For tasks created using the App Engine SDK: the queue-level retry
+   *   settings apply to all tasks in the queue which do not have retry settings
+   *   explicitly set on the task and were created by the App Engine SDK. See
+   *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + boolean hasRetryConfig(); + /** + *
+   * Settings that determine the retry behavior.
+   * * For tasks created using Cloud Tasks: the queue-level retry settings
+   *   apply to all tasks in the queue that were created using Cloud Tasks.
+   *   Retry settings cannot be set on individual tasks.
+   * * For tasks created using the App Engine SDK: the queue-level retry
+   *   settings apply to all tasks in the queue which do not have retry settings
+   *   explicitly set on the task and were created by the App Engine SDK. See
+   *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + com.google.cloud.tasks.v2beta2.RetryConfig getRetryConfig(); + /** + *
+   * Settings that determine the retry behavior.
+   * * For tasks created using Cloud Tasks: the queue-level retry settings
+   *   apply to all tasks in the queue that were created using Cloud Tasks.
+   *   Retry settings cannot be set on individual tasks.
+   * * For tasks created using the App Engine SDK: the queue-level retry
+   *   settings apply to all tasks in the queue which do not have retry settings
+   *   explicitly set on the task and were created by the App Engine SDK. See
+   *   [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
+   * 
+ * + * .google.cloud.tasks.v2beta2.RetryConfig retry_config = 6; + */ + com.google.cloud.tasks.v2beta2.RetryConfigOrBuilder getRetryConfigOrBuilder(); + + /** + *
+   * Output only. The state of the queue.
+   * `state` can only be changed by called
+   * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
+   * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading
+   * [queue.yaml/xml](/appengine/docs/python/config/queueref).
+   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue.State state = 7; + */ + int getStateValue(); + /** + *
+   * Output only. The state of the queue.
+   * `state` can only be changed by called
+   * [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
+   * [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading
+   * [queue.yaml/xml](/appengine/docs/python/config/queueref).
+   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue.State state = 7; + */ + com.google.cloud.tasks.v2beta2.Queue.State getState(); + + /** + *
+   * Output only. The last time this queue was purged.
+   * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+   * were purged.
+   * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+   * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+   * Purge time will be truncated to the nearest microsecond. Purge
+   * time will be unset if the queue has never been purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + boolean hasPurgeTime(); + /** + *
+   * Output only. The last time this queue was purged.
+   * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+   * were purged.
+   * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+   * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+   * Purge time will be truncated to the nearest microsecond. Purge
+   * time will be unset if the queue has never been purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + com.google.protobuf.Timestamp getPurgeTime(); + /** + *
+   * Output only. The last time this queue was purged.
+   * All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
+   * were purged.
+   * A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
+   * [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
+   * Purge time will be truncated to the nearest microsecond. Purge
+   * time will be unset if the queue has never been purged.
+   * 
+ * + * .google.protobuf.Timestamp purge_time = 8; + */ + com.google.protobuf.TimestampOrBuilder getPurgeTimeOrBuilder(); + + public com.google.cloud.tasks.v2beta2.Queue.TargetTypeCase getTargetTypeCase(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java new file mode 100644 index 000000000000..07983a792c74 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/QueueProto.java @@ -0,0 +1,113 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/queue.proto + +package com.google.cloud.tasks.v2beta2; + +public final class QueueProto { + private QueueProto() {} + 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_tasks_v2beta2_Queue_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_Queue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_RateLimits_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_RateLimits_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_RetryConfig_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_RetryConfig_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/tasks/v2beta2/queue.proto" + + "\022\032google.cloud.tasks.v2beta2\032\034google/api" + + "/annotations.proto\032\'google/cloud/tasks/v" + + "2beta2/target.proto\032\036google/protobuf/dur" + + "ation.proto\032\037google/protobuf/timestamp.p" + + "roto\"\341\003\n\005Queue\022\014\n\004name\030\001 \001(\t\022Q\n\026app_engi" + + "ne_http_target\030\003 \001(\0132/.google.cloud.task" + + "s.v2beta2.AppEngineHttpTargetH\000\022=\n\013pull_" + + "target\030\004 \001(\0132&.google.cloud.tasks.v2beta" + + "2.PullTargetH\000\022;\n\013rate_limits\030\005 \001(\0132&.go" + + "ogle.cloud.tasks.v2beta2.RateLimits\022=\n\014r" + + "etry_config\030\006 \001(\0132\'.google.cloud.tasks.v" + + "2beta2.RetryConfig\0226\n\005state\030\007 \001(\0162\'.goog" + + "le.cloud.tasks.v2beta2.Queue.State\022.\n\npu" + + "rge_time\030\010 \001(\0132\032.google.protobuf.Timesta" + + "mp\"E\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000\022\013\n\007RU" + + "NNING\020\001\022\n\n\006PAUSED\020\002\022\014\n\010DISABLED\020\003B\r\n\013tar" + + "get_type\"k\n\nRateLimits\022\'\n\037max_tasks_disp" + + "atched_per_second\030\001 \001(\001\022\026\n\016max_burst_siz" + + "e\030\002 \001(\005\022\034\n\024max_concurrent_tasks\030\003 \001(\005\"\201\002" + + "\n\013RetryConfig\022\026\n\014max_attempts\030\001 \001(\005H\000\022\034\n" + + "\022unlimited_attempts\030\002 \001(\010H\000\0225\n\022max_retry" + + "_duration\030\003 \001(\0132\031.google.protobuf.Durati" + + "on\022.\n\013min_backoff\030\004 \001(\0132\031.google.protobu" + + "f.Duration\022.\n\013max_backoff\030\005 \001(\0132\031.google" + + ".protobuf.Duration\022\025\n\rmax_doublings\030\006 \001(" + + "\005B\016\n\014num_attemptsBo\n\036com.google.cloud.ta" + + "sks.v2beta2B\nQueueProtoP\001Z?google.golang" + + ".org/genproto/googleapis/cloud/tasks/v2b" + + "eta2;tasksb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.cloud.tasks.v2beta2.TargetProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }, assigner); + internal_static_google_cloud_tasks_v2beta2_Queue_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_tasks_v2beta2_Queue_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_Queue_descriptor, + new java.lang.String[] { "Name", "AppEngineHttpTarget", "PullTarget", "RateLimits", "RetryConfig", "State", "PurgeTime", "TargetType", }); + internal_static_google_cloud_tasks_v2beta2_RateLimits_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_tasks_v2beta2_RateLimits_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_RateLimits_descriptor, + new java.lang.String[] { "MaxTasksDispatchedPerSecond", "MaxBurstSize", "MaxConcurrentTasks", }); + internal_static_google_cloud_tasks_v2beta2_RetryConfig_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_tasks_v2beta2_RetryConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_RetryConfig_descriptor, + new java.lang.String[] { "MaxAttempts", "UnlimitedAttempts", "MaxRetryDuration", "MinBackoff", "MaxBackoff", "MaxDoublings", "NumAttempts", }); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.cloud.tasks.v2beta2.TargetProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimits.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimits.java new file mode 100644 index 000000000000..10606d00683b --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimits.java @@ -0,0 +1,822 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/queue.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Rate limits.
+ * This message determines the maximum rate that tasks can be dispatched by a
+ * queue, regardless of whether the dispatch is a first task attempt or a retry.
+ * Note: The debugging command, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task
+ * even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.RateLimits} + */ +public final class RateLimits extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.RateLimits) + RateLimitsOrBuilder { +private static final long serialVersionUID = 0L; + // Use RateLimits.newBuilder() to construct. + private RateLimits(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RateLimits() { + maxTasksDispatchedPerSecond_ = 0D; + maxBurstSize_ = 0; + maxConcurrentTasks_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RateLimits( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 9: { + + maxTasksDispatchedPerSecond_ = input.readDouble(); + break; + } + case 16: { + + maxBurstSize_ = input.readInt32(); + break; + } + case 24: { + + maxConcurrentTasks_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_RateLimits_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_RateLimits_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.RateLimits.class, com.google.cloud.tasks.v2beta2.RateLimits.Builder.class); + } + + public static final int MAX_TASKS_DISPATCHED_PER_SECOND_FIELD_NUMBER = 1; + private double maxTasksDispatchedPerSecond_; + /** + *
+   * The maximum rate at which tasks are dispatched from this queue.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * * For App Engine queues, the maximum allowed value is 500.
+   * * This field is output only   for [pull queues](google.cloud.tasks.v2beta2.PullTarget). In
+   *   addition to the `max_tasks_dispatched_per_second` limit, a
+   *   maximum of 10 QPS of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
+   *   requests are allowed per pull queue.
+   * This field has the same meaning as
+   * [rate in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#rate).
+   * 
+ * + * double max_tasks_dispatched_per_second = 1; + */ + public double getMaxTasksDispatchedPerSecond() { + return maxTasksDispatchedPerSecond_; + } + + public static final int MAX_BURST_SIZE_FIELD_NUMBER = 2; + private int maxBurstSize_; + /** + *
+   * Output only. The max burst size.
+   * Max burst size limits how fast tasks in queue are processed when
+   * many tasks are in the queue and the rate is high. This field
+   * allows the queue to have a high rate so processing starts shortly
+   * after a task is enqueued, but still limits resource usage when
+   * many tasks are enqueued in a short period of time.
+   * The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
+   * algorithm is used to control the rate of task dispatches. Each
+   * queue has a token bucket that holds tokens, up to the maximum
+   * specified by `max_burst_size`. Each time a task is dispatched, a
+   * token is removed from the bucket. Tasks will be dispatched until
+   * the queue's bucket runs out of tokens. The bucket will be
+   * continuously refilled with new tokens based on
+   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+   * Cloud Tasks will pick the value of `max_burst_size` based on the
+   * value of
+   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+   * For App Engine queues that were created or updated using
+   * `queue.yaml/xml`, `max_burst_size` is equal to
+   * [bucket_size](/appengine/docs/standard/python/config/queueref#bucket_size).
+   * Since `max_burst_size` is output only, if
+   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue
+   * created by `queue.yaml/xml`, `max_burst_size` will be reset based
+   * on the value of
+   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
+   * regardless of whether
+   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+   * is updated.
+   * 
+ * + * int32 max_burst_size = 2; + */ + public int getMaxBurstSize() { + return maxBurstSize_; + } + + public static final int MAX_CONCURRENT_TASKS_FIELD_NUMBER = 3; + private int maxConcurrentTasks_; + /** + *
+   * The maximum number of concurrent tasks that Cloud Tasks allows
+   * to be dispatched for this queue. After this threshold has been
+   * reached, Cloud Tasks stops dispatching tasks until the number of
+   * concurrent requests decreases.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * The maximum allowed value is 5,000.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget) and always -1, which
+   * indicates no limit. No other queue types can have `max_concurrent_tasks`
+   * set to -1.
+   * This field has the same meaning as
+   * [max_concurrent_requests in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
+   * 
+ * + * int32 max_concurrent_tasks = 3; + */ + public int getMaxConcurrentTasks() { + return maxConcurrentTasks_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (maxTasksDispatchedPerSecond_ != 0D) { + output.writeDouble(1, maxTasksDispatchedPerSecond_); + } + if (maxBurstSize_ != 0) { + output.writeInt32(2, maxBurstSize_); + } + if (maxConcurrentTasks_ != 0) { + output.writeInt32(3, maxConcurrentTasks_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (maxTasksDispatchedPerSecond_ != 0D) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, maxTasksDispatchedPerSecond_); + } + if (maxBurstSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, maxBurstSize_); + } + if (maxConcurrentTasks_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, maxConcurrentTasks_); + } + size += unknownFields.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.tasks.v2beta2.RateLimits)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.RateLimits other = (com.google.cloud.tasks.v2beta2.RateLimits) obj; + + boolean result = true; + result = result && ( + java.lang.Double.doubleToLongBits(getMaxTasksDispatchedPerSecond()) + == java.lang.Double.doubleToLongBits( + other.getMaxTasksDispatchedPerSecond())); + result = result && (getMaxBurstSize() + == other.getMaxBurstSize()); + result = result && (getMaxConcurrentTasks() + == other.getMaxConcurrentTasks()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MAX_TASKS_DISPATCHED_PER_SECOND_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMaxTasksDispatchedPerSecond())); + hash = (37 * hash) + MAX_BURST_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getMaxBurstSize(); + hash = (37 * hash) + MAX_CONCURRENT_TASKS_FIELD_NUMBER; + hash = (53 * hash) + getMaxConcurrentTasks(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.RateLimits parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RateLimits 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.tasks.v2beta2.RateLimits parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RateLimits 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.tasks.v2beta2.RateLimits parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RateLimits parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.RateLimits parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RateLimits 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.tasks.v2beta2.RateLimits parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RateLimits 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.tasks.v2beta2.RateLimits parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RateLimits parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.RateLimits prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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; + } + /** + *
+   * Rate limits.
+   * This message determines the maximum rate that tasks can be dispatched by a
+   * queue, regardless of whether the dispatch is a first task attempt or a retry.
+   * Note: The debugging command, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task
+   * even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.RateLimits} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.RateLimits) + com.google.cloud.tasks.v2beta2.RateLimitsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_RateLimits_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_RateLimits_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.RateLimits.class, com.google.cloud.tasks.v2beta2.RateLimits.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.RateLimits.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + maxTasksDispatchedPerSecond_ = 0D; + + maxBurstSize_ = 0; + + maxConcurrentTasks_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_RateLimits_descriptor; + } + + public com.google.cloud.tasks.v2beta2.RateLimits getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.RateLimits.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.RateLimits build() { + com.google.cloud.tasks.v2beta2.RateLimits result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.RateLimits buildPartial() { + com.google.cloud.tasks.v2beta2.RateLimits result = new com.google.cloud.tasks.v2beta2.RateLimits(this); + result.maxTasksDispatchedPerSecond_ = maxTasksDispatchedPerSecond_; + result.maxBurstSize_ = maxBurstSize_; + result.maxConcurrentTasks_ = maxConcurrentTasks_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.RateLimits) { + return mergeFrom((com.google.cloud.tasks.v2beta2.RateLimits)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.RateLimits other) { + if (other == com.google.cloud.tasks.v2beta2.RateLimits.getDefaultInstance()) return this; + if (other.getMaxTasksDispatchedPerSecond() != 0D) { + setMaxTasksDispatchedPerSecond(other.getMaxTasksDispatchedPerSecond()); + } + if (other.getMaxBurstSize() != 0) { + setMaxBurstSize(other.getMaxBurstSize()); + } + if (other.getMaxConcurrentTasks() != 0) { + setMaxConcurrentTasks(other.getMaxConcurrentTasks()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.RateLimits parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.RateLimits) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private double maxTasksDispatchedPerSecond_ ; + /** + *
+     * The maximum rate at which tasks are dispatched from this queue.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * * For App Engine queues, the maximum allowed value is 500.
+     * * This field is output only   for [pull queues](google.cloud.tasks.v2beta2.PullTarget). In
+     *   addition to the `max_tasks_dispatched_per_second` limit, a
+     *   maximum of 10 QPS of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
+     *   requests are allowed per pull queue.
+     * This field has the same meaning as
+     * [rate in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#rate).
+     * 
+ * + * double max_tasks_dispatched_per_second = 1; + */ + public double getMaxTasksDispatchedPerSecond() { + return maxTasksDispatchedPerSecond_; + } + /** + *
+     * The maximum rate at which tasks are dispatched from this queue.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * * For App Engine queues, the maximum allowed value is 500.
+     * * This field is output only   for [pull queues](google.cloud.tasks.v2beta2.PullTarget). In
+     *   addition to the `max_tasks_dispatched_per_second` limit, a
+     *   maximum of 10 QPS of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
+     *   requests are allowed per pull queue.
+     * This field has the same meaning as
+     * [rate in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#rate).
+     * 
+ * + * double max_tasks_dispatched_per_second = 1; + */ + public Builder setMaxTasksDispatchedPerSecond(double value) { + + maxTasksDispatchedPerSecond_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum rate at which tasks are dispatched from this queue.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * * For App Engine queues, the maximum allowed value is 500.
+     * * This field is output only   for [pull queues](google.cloud.tasks.v2beta2.PullTarget). In
+     *   addition to the `max_tasks_dispatched_per_second` limit, a
+     *   maximum of 10 QPS of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
+     *   requests are allowed per pull queue.
+     * This field has the same meaning as
+     * [rate in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#rate).
+     * 
+ * + * double max_tasks_dispatched_per_second = 1; + */ + public Builder clearMaxTasksDispatchedPerSecond() { + + maxTasksDispatchedPerSecond_ = 0D; + onChanged(); + return this; + } + + private int maxBurstSize_ ; + /** + *
+     * Output only. The max burst size.
+     * Max burst size limits how fast tasks in queue are processed when
+     * many tasks are in the queue and the rate is high. This field
+     * allows the queue to have a high rate so processing starts shortly
+     * after a task is enqueued, but still limits resource usage when
+     * many tasks are enqueued in a short period of time.
+     * The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
+     * algorithm is used to control the rate of task dispatches. Each
+     * queue has a token bucket that holds tokens, up to the maximum
+     * specified by `max_burst_size`. Each time a task is dispatched, a
+     * token is removed from the bucket. Tasks will be dispatched until
+     * the queue's bucket runs out of tokens. The bucket will be
+     * continuously refilled with new tokens based on
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+     * Cloud Tasks will pick the value of `max_burst_size` based on the
+     * value of
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+     * For App Engine queues that were created or updated using
+     * `queue.yaml/xml`, `max_burst_size` is equal to
+     * [bucket_size](/appengine/docs/standard/python/config/queueref#bucket_size).
+     * Since `max_burst_size` is output only, if
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue
+     * created by `queue.yaml/xml`, `max_burst_size` will be reset based
+     * on the value of
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
+     * regardless of whether
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+     * is updated.
+     * 
+ * + * int32 max_burst_size = 2; + */ + public int getMaxBurstSize() { + return maxBurstSize_; + } + /** + *
+     * Output only. The max burst size.
+     * Max burst size limits how fast tasks in queue are processed when
+     * many tasks are in the queue and the rate is high. This field
+     * allows the queue to have a high rate so processing starts shortly
+     * after a task is enqueued, but still limits resource usage when
+     * many tasks are enqueued in a short period of time.
+     * The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
+     * algorithm is used to control the rate of task dispatches. Each
+     * queue has a token bucket that holds tokens, up to the maximum
+     * specified by `max_burst_size`. Each time a task is dispatched, a
+     * token is removed from the bucket. Tasks will be dispatched until
+     * the queue's bucket runs out of tokens. The bucket will be
+     * continuously refilled with new tokens based on
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+     * Cloud Tasks will pick the value of `max_burst_size` based on the
+     * value of
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+     * For App Engine queues that were created or updated using
+     * `queue.yaml/xml`, `max_burst_size` is equal to
+     * [bucket_size](/appengine/docs/standard/python/config/queueref#bucket_size).
+     * Since `max_burst_size` is output only, if
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue
+     * created by `queue.yaml/xml`, `max_burst_size` will be reset based
+     * on the value of
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
+     * regardless of whether
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+     * is updated.
+     * 
+ * + * int32 max_burst_size = 2; + */ + public Builder setMaxBurstSize(int value) { + + maxBurstSize_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The max burst size.
+     * Max burst size limits how fast tasks in queue are processed when
+     * many tasks are in the queue and the rate is high. This field
+     * allows the queue to have a high rate so processing starts shortly
+     * after a task is enqueued, but still limits resource usage when
+     * many tasks are enqueued in a short period of time.
+     * The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
+     * algorithm is used to control the rate of task dispatches. Each
+     * queue has a token bucket that holds tokens, up to the maximum
+     * specified by `max_burst_size`. Each time a task is dispatched, a
+     * token is removed from the bucket. Tasks will be dispatched until
+     * the queue's bucket runs out of tokens. The bucket will be
+     * continuously refilled with new tokens based on
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+     * Cloud Tasks will pick the value of `max_burst_size` based on the
+     * value of
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+     * For App Engine queues that were created or updated using
+     * `queue.yaml/xml`, `max_burst_size` is equal to
+     * [bucket_size](/appengine/docs/standard/python/config/queueref#bucket_size).
+     * Since `max_burst_size` is output only, if
+     * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue
+     * created by `queue.yaml/xml`, `max_burst_size` will be reset based
+     * on the value of
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
+     * regardless of whether
+     * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+     * is updated.
+     * 
+ * + * int32 max_burst_size = 2; + */ + public Builder clearMaxBurstSize() { + + maxBurstSize_ = 0; + onChanged(); + return this; + } + + private int maxConcurrentTasks_ ; + /** + *
+     * The maximum number of concurrent tasks that Cloud Tasks allows
+     * to be dispatched for this queue. After this threshold has been
+     * reached, Cloud Tasks stops dispatching tasks until the number of
+     * concurrent requests decreases.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * The maximum allowed value is 5,000.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget) and always -1, which
+     * indicates no limit. No other queue types can have `max_concurrent_tasks`
+     * set to -1.
+     * This field has the same meaning as
+     * [max_concurrent_requests in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
+     * 
+ * + * int32 max_concurrent_tasks = 3; + */ + public int getMaxConcurrentTasks() { + return maxConcurrentTasks_; + } + /** + *
+     * The maximum number of concurrent tasks that Cloud Tasks allows
+     * to be dispatched for this queue. After this threshold has been
+     * reached, Cloud Tasks stops dispatching tasks until the number of
+     * concurrent requests decreases.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * The maximum allowed value is 5,000.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget) and always -1, which
+     * indicates no limit. No other queue types can have `max_concurrent_tasks`
+     * set to -1.
+     * This field has the same meaning as
+     * [max_concurrent_requests in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
+     * 
+ * + * int32 max_concurrent_tasks = 3; + */ + public Builder setMaxConcurrentTasks(int value) { + + maxConcurrentTasks_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of concurrent tasks that Cloud Tasks allows
+     * to be dispatched for this queue. After this threshold has been
+     * reached, Cloud Tasks stops dispatching tasks until the number of
+     * concurrent requests decreases.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * The maximum allowed value is 5,000.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget) and always -1, which
+     * indicates no limit. No other queue types can have `max_concurrent_tasks`
+     * set to -1.
+     * This field has the same meaning as
+     * [max_concurrent_requests in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
+     * 
+ * + * int32 max_concurrent_tasks = 3; + */ + public Builder clearMaxConcurrentTasks() { + + maxConcurrentTasks_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.RateLimits) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.RateLimits) + private static final com.google.cloud.tasks.v2beta2.RateLimits DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.RateLimits(); + } + + public static com.google.cloud.tasks.v2beta2.RateLimits getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public RateLimits parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RateLimits(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.RateLimits getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimitsOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimitsOrBuilder.java new file mode 100644 index 000000000000..5a56336984cb --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RateLimitsOrBuilder.java @@ -0,0 +1,84 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/queue.proto + +package com.google.cloud.tasks.v2beta2; + +public interface RateLimitsOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.RateLimits) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The maximum rate at which tasks are dispatched from this queue.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * * For App Engine queues, the maximum allowed value is 500.
+   * * This field is output only   for [pull queues](google.cloud.tasks.v2beta2.PullTarget). In
+   *   addition to the `max_tasks_dispatched_per_second` limit, a
+   *   maximum of 10 QPS of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]
+   *   requests are allowed per pull queue.
+   * This field has the same meaning as
+   * [rate in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#rate).
+   * 
+ * + * double max_tasks_dispatched_per_second = 1; + */ + double getMaxTasksDispatchedPerSecond(); + + /** + *
+   * Output only. The max burst size.
+   * Max burst size limits how fast tasks in queue are processed when
+   * many tasks are in the queue and the rate is high. This field
+   * allows the queue to have a high rate so processing starts shortly
+   * after a task is enqueued, but still limits resource usage when
+   * many tasks are enqueued in a short period of time.
+   * The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
+   * algorithm is used to control the rate of task dispatches. Each
+   * queue has a token bucket that holds tokens, up to the maximum
+   * specified by `max_burst_size`. Each time a task is dispatched, a
+   * token is removed from the bucket. Tasks will be dispatched until
+   * the queue's bucket runs out of tokens. The bucket will be
+   * continuously refilled with new tokens based on
+   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+   * Cloud Tasks will pick the value of `max_burst_size` based on the
+   * value of
+   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
+   * For App Engine queues that were created or updated using
+   * `queue.yaml/xml`, `max_burst_size` is equal to
+   * [bucket_size](/appengine/docs/standard/python/config/queueref#bucket_size).
+   * Since `max_burst_size` is output only, if
+   * [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue
+   * created by `queue.yaml/xml`, `max_burst_size` will be reset based
+   * on the value of
+   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
+   * regardless of whether
+   * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
+   * is updated.
+   * 
+ * + * int32 max_burst_size = 2; + */ + int getMaxBurstSize(); + + /** + *
+   * The maximum number of concurrent tasks that Cloud Tasks allows
+   * to be dispatched for this queue. After this threshold has been
+   * reached, Cloud Tasks stops dispatching tasks until the number of
+   * concurrent requests decreases.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * The maximum allowed value is 5,000.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget) and always -1, which
+   * indicates no limit. No other queue types can have `max_concurrent_tasks`
+   * set to -1.
+   * This field has the same meaning as
+   * [max_concurrent_requests in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
+   * 
+ * + * int32 max_concurrent_tasks = 3; + */ + int getMaxConcurrentTasks(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RenewLeaseRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RenewLeaseRequest.java new file mode 100644 index 000000000000..7babde2408d8 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RenewLeaseRequest.java @@ -0,0 +1,1296 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for renewing a lease using
+ * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.RenewLeaseRequest} + */ +public final class RenewLeaseRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.RenewLeaseRequest) + RenewLeaseRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RenewLeaseRequest.newBuilder() to construct. + private RenewLeaseRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RenewLeaseRequest() { + name_ = ""; + responseView_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RenewLeaseRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (scheduleTime_ != null) { + subBuilder = scheduleTime_.toBuilder(); + } + scheduleTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scheduleTime_); + scheduleTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (leaseDuration_ != null) { + subBuilder = leaseDuration_.toBuilder(); + } + leaseDuration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(leaseDuration_); + leaseDuration_ = subBuilder.buildPartial(); + } + + break; + } + case 32: { + int rawValue = input.readEnum(); + + responseView_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.RenewLeaseRequest.class, com.google.cloud.tasks.v2beta2.RenewLeaseRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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 task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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 SCHEDULE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp scheduleTime_; + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public boolean hasScheduleTime() { + return scheduleTime_ != null; + } + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.Timestamp getScheduleTime() { + return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() { + return getScheduleTime(); + } + + public static final int LEASE_DURATION_FIELD_NUMBER = 3; + private com.google.protobuf.Duration leaseDuration_; + /** + *
+   * Required.
+   * The desired new lease duration, starting from now.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public boolean hasLeaseDuration() { + return leaseDuration_ != null; + } + /** + *
+   * Required.
+   * The desired new lease duration, starting from now.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public com.google.protobuf.Duration getLeaseDuration() { + return leaseDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : leaseDuration_; + } + /** + *
+   * Required.
+   * The desired new lease duration, starting from now.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public com.google.protobuf.DurationOrBuilder getLeaseDurationOrBuilder() { + return getLeaseDuration(); + } + + public static final int RESPONSE_VIEW_FIELD_NUMBER = 4; + private int responseView_; + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (scheduleTime_ != null) { + output.writeMessage(2, getScheduleTime()); + } + if (leaseDuration_ != null) { + output.writeMessage(3, getLeaseDuration()); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(4, responseView_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (scheduleTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getScheduleTime()); + } + if (leaseDuration_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getLeaseDuration()); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(4, responseView_); + } + size += unknownFields.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.tasks.v2beta2.RenewLeaseRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.RenewLeaseRequest other = (com.google.cloud.tasks.v2beta2.RenewLeaseRequest) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && (hasScheduleTime() == other.hasScheduleTime()); + if (hasScheduleTime()) { + result = result && getScheduleTime() + .equals(other.getScheduleTime()); + } + result = result && (hasLeaseDuration() == other.hasLeaseDuration()); + if (hasLeaseDuration()) { + result = result && getLeaseDuration() + .equals(other.getLeaseDuration()); + } + result = result && responseView_ == other.responseView_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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 (hasScheduleTime()) { + hash = (37 * hash) + SCHEDULE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getScheduleTime().hashCode(); + } + if (hasLeaseDuration()) { + hash = (37 * hash) + LEASE_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getLeaseDuration().hashCode(); + } + hash = (37 * hash) + RESPONSE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + responseView_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.RenewLeaseRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RenewLeaseRequest 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.tasks.v2beta2.RenewLeaseRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RenewLeaseRequest 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.tasks.v2beta2.RenewLeaseRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RenewLeaseRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.RenewLeaseRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RenewLeaseRequest 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.tasks.v2beta2.RenewLeaseRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RenewLeaseRequest 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.tasks.v2beta2.RenewLeaseRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RenewLeaseRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.RenewLeaseRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for renewing a lease using
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.RenewLeaseRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.RenewLeaseRequest) + com.google.cloud.tasks.v2beta2.RenewLeaseRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.RenewLeaseRequest.class, com.google.cloud.tasks.v2beta2.RenewLeaseRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.RenewLeaseRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = null; + } else { + scheduleTime_ = null; + scheduleTimeBuilder_ = null; + } + if (leaseDurationBuilder_ == null) { + leaseDuration_ = null; + } else { + leaseDuration_ = null; + leaseDurationBuilder_ = null; + } + responseView_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_RenewLeaseRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.RenewLeaseRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.RenewLeaseRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.RenewLeaseRequest build() { + com.google.cloud.tasks.v2beta2.RenewLeaseRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.RenewLeaseRequest buildPartial() { + com.google.cloud.tasks.v2beta2.RenewLeaseRequest result = new com.google.cloud.tasks.v2beta2.RenewLeaseRequest(this); + result.name_ = name_; + if (scheduleTimeBuilder_ == null) { + result.scheduleTime_ = scheduleTime_; + } else { + result.scheduleTime_ = scheduleTimeBuilder_.build(); + } + if (leaseDurationBuilder_ == null) { + result.leaseDuration_ = leaseDuration_; + } else { + result.leaseDuration_ = leaseDurationBuilder_.build(); + } + result.responseView_ = responseView_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.RenewLeaseRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.RenewLeaseRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.RenewLeaseRequest other) { + if (other == com.google.cloud.tasks.v2beta2.RenewLeaseRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasScheduleTime()) { + mergeScheduleTime(other.getScheduleTime()); + } + if (other.hasLeaseDuration()) { + mergeLeaseDuration(other.getLeaseDuration()); + } + if (other.responseView_ != 0) { + setResponseViewValue(other.getResponseViewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.RenewLeaseRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.RenewLeaseRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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.Timestamp scheduleTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> scheduleTimeBuilder_; + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public boolean hasScheduleTime() { + return scheduleTimeBuilder_ != null || scheduleTime_ != null; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.Timestamp getScheduleTime() { + if (scheduleTimeBuilder_ == null) { + return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } else { + return scheduleTimeBuilder_.getMessage(); + } + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder setScheduleTime(com.google.protobuf.Timestamp value) { + if (scheduleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduleTime_ = value; + onChanged(); + } else { + scheduleTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder setScheduleTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = builderForValue.build(); + onChanged(); + } else { + scheduleTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder mergeScheduleTime(com.google.protobuf.Timestamp value) { + if (scheduleTimeBuilder_ == null) { + if (scheduleTime_ != null) { + scheduleTime_ = + com.google.protobuf.Timestamp.newBuilder(scheduleTime_).mergeFrom(value).buildPartial(); + } else { + scheduleTime_ = value; + } + onChanged(); + } else { + scheduleTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public Builder clearScheduleTime() { + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = null; + onChanged(); + } else { + scheduleTime_ = null; + scheduleTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getScheduleTimeBuilder() { + + onChanged(); + return getScheduleTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() { + if (scheduleTimeBuilder_ != null) { + return scheduleTimeBuilder_.getMessageOrBuilder(); + } else { + return scheduleTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } + } + /** + *
+     * Required.
+     * The task's current schedule time, available in the
+     * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+     * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+     * to ensure that your worker currently holds the lease.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getScheduleTimeFieldBuilder() { + if (scheduleTimeBuilder_ == null) { + scheduleTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getScheduleTime(), + getParentForChildren(), + isClean()); + scheduleTime_ = null; + } + return scheduleTimeBuilder_; + } + + private com.google.protobuf.Duration leaseDuration_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> leaseDurationBuilder_; + /** + *
+     * Required.
+     * The desired new lease duration, starting from now.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public boolean hasLeaseDuration() { + return leaseDurationBuilder_ != null || leaseDuration_ != null; + } + /** + *
+     * Required.
+     * The desired new lease duration, starting from now.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public com.google.protobuf.Duration getLeaseDuration() { + if (leaseDurationBuilder_ == null) { + return leaseDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : leaseDuration_; + } else { + return leaseDurationBuilder_.getMessage(); + } + } + /** + *
+     * Required.
+     * The desired new lease duration, starting from now.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public Builder setLeaseDuration(com.google.protobuf.Duration value) { + if (leaseDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + leaseDuration_ = value; + onChanged(); + } else { + leaseDurationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required.
+     * The desired new lease duration, starting from now.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public Builder setLeaseDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (leaseDurationBuilder_ == null) { + leaseDuration_ = builderForValue.build(); + onChanged(); + } else { + leaseDurationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required.
+     * The desired new lease duration, starting from now.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public Builder mergeLeaseDuration(com.google.protobuf.Duration value) { + if (leaseDurationBuilder_ == null) { + if (leaseDuration_ != null) { + leaseDuration_ = + com.google.protobuf.Duration.newBuilder(leaseDuration_).mergeFrom(value).buildPartial(); + } else { + leaseDuration_ = value; + } + onChanged(); + } else { + leaseDurationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required.
+     * The desired new lease duration, starting from now.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public Builder clearLeaseDuration() { + if (leaseDurationBuilder_ == null) { + leaseDuration_ = null; + onChanged(); + } else { + leaseDuration_ = null; + leaseDurationBuilder_ = null; + } + + return this; + } + /** + *
+     * Required.
+     * The desired new lease duration, starting from now.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public com.google.protobuf.Duration.Builder getLeaseDurationBuilder() { + + onChanged(); + return getLeaseDurationFieldBuilder().getBuilder(); + } + /** + *
+     * Required.
+     * The desired new lease duration, starting from now.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + public com.google.protobuf.DurationOrBuilder getLeaseDurationOrBuilder() { + if (leaseDurationBuilder_ != null) { + return leaseDurationBuilder_.getMessageOrBuilder(); + } else { + return leaseDuration_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : leaseDuration_; + } + } + /** + *
+     * Required.
+     * The desired new lease duration, starting from now.
+     * The maximum lease duration is 1 week.
+     * `lease_duration` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getLeaseDurationFieldBuilder() { + if (leaseDurationBuilder_ == null) { + leaseDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getLeaseDuration(), + getParentForChildren(), + isClean()); + leaseDuration_ = null; + } + return leaseDurationBuilder_; + } + + private int responseView_ = 0; + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public Builder setResponseViewValue(int value) { + responseView_ = value; + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public Builder setResponseView(com.google.cloud.tasks.v2beta2.Task.View value) { + if (value == null) { + throw new NullPointerException(); + } + + responseView_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + public Builder clearResponseView() { + + responseView_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.RenewLeaseRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.RenewLeaseRequest) + private static final com.google.cloud.tasks.v2beta2.RenewLeaseRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.RenewLeaseRequest(); + } + + public static com.google.cloud.tasks.v2beta2.RenewLeaseRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public RenewLeaseRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RenewLeaseRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.RenewLeaseRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RenewLeaseRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RenewLeaseRequestOrBuilder.java new file mode 100644 index 000000000000..6d11e02a0e75 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RenewLeaseRequestOrBuilder.java @@ -0,0 +1,140 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface RenewLeaseRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.RenewLeaseRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + boolean hasScheduleTime(); + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + com.google.protobuf.Timestamp getScheduleTime(); + /** + *
+   * Required.
+   * The task's current schedule time, available in the
+   * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or
+   * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is
+   * to ensure that your worker currently holds the lease.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder(); + + /** + *
+   * Required.
+   * The desired new lease duration, starting from now.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + boolean hasLeaseDuration(); + /** + *
+   * Required.
+   * The desired new lease duration, starting from now.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + com.google.protobuf.Duration getLeaseDuration(); + /** + *
+   * Required.
+   * The desired new lease duration, starting from now.
+   * The maximum lease duration is 1 week.
+   * `lease_duration` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Duration lease_duration = 3; + */ + com.google.protobuf.DurationOrBuilder getLeaseDurationOrBuilder(); + + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + int getResponseViewValue(); + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 4; + */ + com.google.cloud.tasks.v2beta2.Task.View getResponseView(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ResumeQueueRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ResumeQueueRequest.java new file mode 100644 index 000000000000..3ab73f1da36f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ResumeQueueRequest.java @@ -0,0 +1,566 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.ResumeQueueRequest} + */ +public final class ResumeQueueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.ResumeQueueRequest) + ResumeQueueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use ResumeQueueRequest.newBuilder() to construct. + private ResumeQueueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ResumeQueueRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ResumeQueueRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.ResumeQueueRequest.class, com.google.cloud.tasks.v2beta2.ResumeQueueRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + 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; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.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.tasks.v2beta2.ResumeQueueRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.ResumeQueueRequest other = (com.google.cloud.tasks.v2beta2.ResumeQueueRequest) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.ResumeQueueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ResumeQueueRequest 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.tasks.v2beta2.ResumeQueueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ResumeQueueRequest 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.tasks.v2beta2.ResumeQueueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.ResumeQueueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.ResumeQueueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ResumeQueueRequest 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.tasks.v2beta2.ResumeQueueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ResumeQueueRequest 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.tasks.v2beta2.ResumeQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.ResumeQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.ResumeQueueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.ResumeQueueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.ResumeQueueRequest) + com.google.cloud.tasks.v2beta2.ResumeQueueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.ResumeQueueRequest.class, com.google.cloud.tasks.v2beta2.ResumeQueueRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.ResumeQueueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_ResumeQueueRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.ResumeQueueRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.ResumeQueueRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.ResumeQueueRequest build() { + com.google.cloud.tasks.v2beta2.ResumeQueueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.ResumeQueueRequest buildPartial() { + com.google.cloud.tasks.v2beta2.ResumeQueueRequest result = new com.google.cloud.tasks.v2beta2.ResumeQueueRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.ResumeQueueRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.ResumeQueueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.ResumeQueueRequest other) { + if (other == com.google.cloud.tasks.v2beta2.ResumeQueueRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.ResumeQueueRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.ResumeQueueRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + 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 queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The queue name. For example:
+     * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.ResumeQueueRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.ResumeQueueRequest) + private static final com.google.cloud.tasks.v2beta2.ResumeQueueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.ResumeQueueRequest(); + } + + public static com.google.cloud.tasks.v2beta2.ResumeQueueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public ResumeQueueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ResumeQueueRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.ResumeQueueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ResumeQueueRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ResumeQueueRequestOrBuilder.java new file mode 100644 index 000000000000..ef3d683ffd5a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/ResumeQueueRequestOrBuilder.java @@ -0,0 +1,31 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface ResumeQueueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.ResumeQueueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Required.
+   * The queue name. For example:
+   * `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfig.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfig.java new file mode 100644 index 000000000000..c87da6608638 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfig.java @@ -0,0 +1,1921 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/queue.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Retry config.
+ * These settings determine how a failed task attempt is retried.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.RetryConfig} + */ +public final class RetryConfig extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.RetryConfig) + RetryConfigOrBuilder { +private static final long serialVersionUID = 0L; + // Use RetryConfig.newBuilder() to construct. + private RetryConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RetryConfig() { + maxDoublings_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RetryConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + numAttemptsCase_ = 1; + numAttempts_ = input.readInt32(); + break; + } + case 16: { + numAttemptsCase_ = 2; + numAttempts_ = input.readBool(); + break; + } + case 26: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (maxRetryDuration_ != null) { + subBuilder = maxRetryDuration_.toBuilder(); + } + maxRetryDuration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxRetryDuration_); + maxRetryDuration_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (minBackoff_ != null) { + subBuilder = minBackoff_.toBuilder(); + } + minBackoff_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minBackoff_); + minBackoff_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + com.google.protobuf.Duration.Builder subBuilder = null; + if (maxBackoff_ != null) { + subBuilder = maxBackoff_.toBuilder(); + } + maxBackoff_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxBackoff_); + maxBackoff_ = subBuilder.buildPartial(); + } + + break; + } + case 48: { + + maxDoublings_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_RetryConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_RetryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.RetryConfig.class, com.google.cloud.tasks.v2beta2.RetryConfig.Builder.class); + } + + private int numAttemptsCase_ = 0; + private java.lang.Object numAttempts_; + public enum NumAttemptsCase + implements com.google.protobuf.Internal.EnumLite { + MAX_ATTEMPTS(1), + UNLIMITED_ATTEMPTS(2), + NUMATTEMPTS_NOT_SET(0); + private final int value; + private NumAttemptsCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static NumAttemptsCase valueOf(int value) { + return forNumber(value); + } + + public static NumAttemptsCase forNumber(int value) { + switch (value) { + case 1: return MAX_ATTEMPTS; + case 2: return UNLIMITED_ATTEMPTS; + case 0: return NUMATTEMPTS_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public NumAttemptsCase + getNumAttemptsCase() { + return NumAttemptsCase.forNumber( + numAttemptsCase_); + } + + public static final int MAX_ATTEMPTS_FIELD_NUMBER = 1; + /** + *
+   * The maximum number of attempts for a task.
+   * Cloud Tasks will attempt the task `max_attempts` times (that
+   * is, if the first attempt fails, then there will be
+   * `max_attempts - 1` retries).  Must be > 0.
+   * 
+ * + * int32 max_attempts = 1; + */ + public int getMaxAttempts() { + if (numAttemptsCase_ == 1) { + return (java.lang.Integer) numAttempts_; + } + return 0; + } + + public static final int UNLIMITED_ATTEMPTS_FIELD_NUMBER = 2; + /** + *
+   * If true, then the number of attempts is unlimited.
+   * 
+ * + * bool unlimited_attempts = 2; + */ + public boolean getUnlimitedAttempts() { + if (numAttemptsCase_ == 2) { + return (java.lang.Boolean) numAttempts_; + } + return false; + } + + public static final int MAX_RETRY_DURATION_FIELD_NUMBER = 3; + private com.google.protobuf.Duration maxRetryDuration_; + /** + *
+   * If positive, `max_retry_duration` specifies the time limit for
+   * retrying a failed task, measured from when the task was first
+   * attempted. Once `max_retry_duration` time has passed *and* the
+   * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+   * times, no further attempts will be made and the task will be
+   * deleted.
+   * If zero, then the task age is unlimited.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_retry_duration` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + public boolean hasMaxRetryDuration() { + return maxRetryDuration_ != null; + } + /** + *
+   * If positive, `max_retry_duration` specifies the time limit for
+   * retrying a failed task, measured from when the task was first
+   * attempted. Once `max_retry_duration` time has passed *and* the
+   * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+   * times, no further attempts will be made and the task will be
+   * deleted.
+   * If zero, then the task age is unlimited.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_retry_duration` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + public com.google.protobuf.Duration getMaxRetryDuration() { + return maxRetryDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxRetryDuration_; + } + /** + *
+   * If positive, `max_retry_duration` specifies the time limit for
+   * retrying a failed task, measured from when the task was first
+   * attempted. Once `max_retry_duration` time has passed *and* the
+   * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+   * times, no further attempts will be made and the task will be
+   * deleted.
+   * If zero, then the task age is unlimited.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_retry_duration` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + public com.google.protobuf.DurationOrBuilder getMaxRetryDurationOrBuilder() { + return getMaxRetryDuration(); + } + + public static final int MIN_BACKOFF_FIELD_NUMBER = 4; + private com.google.protobuf.Duration minBackoff_; + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `min_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + public boolean hasMinBackoff() { + return minBackoff_ != null; + } + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `min_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + public com.google.protobuf.Duration getMinBackoff() { + return minBackoff_ == null ? com.google.protobuf.Duration.getDefaultInstance() : minBackoff_; + } + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `min_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + public com.google.protobuf.DurationOrBuilder getMinBackoffOrBuilder() { + return getMinBackoff(); + } + + public static final int MAX_BACKOFF_FIELD_NUMBER = 5; + private com.google.protobuf.Duration maxBackoff_; + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + public boolean hasMaxBackoff() { + return maxBackoff_ != null; + } + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + public com.google.protobuf.Duration getMaxBackoff() { + return maxBackoff_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxBackoff_; + } + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + public com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder() { + return getMaxBackoff(); + } + + public static final int MAX_DOUBLINGS_FIELD_NUMBER = 6; + private int maxDoublings_; + /** + *
+   * The time between retries will double `max_doublings` times.
+   * A task's retry interval starts at
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles
+   * `max_doublings` times, then increases linearly, and finally
+   * retries retries at intervals of
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to
+   * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times.
+   * For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s,
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, and
+   * `max_doublings` is 3, then the a task will first be retried in
+   * 10s. The retry interval will double three times, and then
+   * increase linearly by 2^3 * 10s.  Finally, the task will retry at
+   * intervals of [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the
+   * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+   * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
+   * 240s, 300s, 300s, ....
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * This field has the same meaning as
+   * [max_doublings in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * int32 max_doublings = 6; + */ + public int getMaxDoublings() { + return maxDoublings_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (numAttemptsCase_ == 1) { + output.writeInt32( + 1, (int)((java.lang.Integer) numAttempts_)); + } + if (numAttemptsCase_ == 2) { + output.writeBool( + 2, (boolean)((java.lang.Boolean) numAttempts_)); + } + if (maxRetryDuration_ != null) { + output.writeMessage(3, getMaxRetryDuration()); + } + if (minBackoff_ != null) { + output.writeMessage(4, getMinBackoff()); + } + if (maxBackoff_ != null) { + output.writeMessage(5, getMaxBackoff()); + } + if (maxDoublings_ != 0) { + output.writeInt32(6, maxDoublings_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (numAttemptsCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size( + 1, (int)((java.lang.Integer) numAttempts_)); + } + if (numAttemptsCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize( + 2, (boolean)((java.lang.Boolean) numAttempts_)); + } + if (maxRetryDuration_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getMaxRetryDuration()); + } + if (minBackoff_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getMinBackoff()); + } + if (maxBackoff_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getMaxBackoff()); + } + if (maxDoublings_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, maxDoublings_); + } + size += unknownFields.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.tasks.v2beta2.RetryConfig)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.RetryConfig other = (com.google.cloud.tasks.v2beta2.RetryConfig) obj; + + boolean result = true; + result = result && (hasMaxRetryDuration() == other.hasMaxRetryDuration()); + if (hasMaxRetryDuration()) { + result = result && getMaxRetryDuration() + .equals(other.getMaxRetryDuration()); + } + result = result && (hasMinBackoff() == other.hasMinBackoff()); + if (hasMinBackoff()) { + result = result && getMinBackoff() + .equals(other.getMinBackoff()); + } + result = result && (hasMaxBackoff() == other.hasMaxBackoff()); + if (hasMaxBackoff()) { + result = result && getMaxBackoff() + .equals(other.getMaxBackoff()); + } + result = result && (getMaxDoublings() + == other.getMaxDoublings()); + result = result && getNumAttemptsCase().equals( + other.getNumAttemptsCase()); + if (!result) return false; + switch (numAttemptsCase_) { + case 1: + result = result && (getMaxAttempts() + == other.getMaxAttempts()); + break; + case 2: + result = result && (getUnlimitedAttempts() + == other.getUnlimitedAttempts()); + break; + case 0: + default: + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMaxRetryDuration()) { + hash = (37 * hash) + MAX_RETRY_DURATION_FIELD_NUMBER; + hash = (53 * hash) + getMaxRetryDuration().hashCode(); + } + if (hasMinBackoff()) { + hash = (37 * hash) + MIN_BACKOFF_FIELD_NUMBER; + hash = (53 * hash) + getMinBackoff().hashCode(); + } + if (hasMaxBackoff()) { + hash = (37 * hash) + MAX_BACKOFF_FIELD_NUMBER; + hash = (53 * hash) + getMaxBackoff().hashCode(); + } + hash = (37 * hash) + MAX_DOUBLINGS_FIELD_NUMBER; + hash = (53 * hash) + getMaxDoublings(); + switch (numAttemptsCase_) { + case 1: + hash = (37 * hash) + MAX_ATTEMPTS_FIELD_NUMBER; + hash = (53 * hash) + getMaxAttempts(); + break; + case 2: + hash = (37 * hash) + UNLIMITED_ATTEMPTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getUnlimitedAttempts()); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.RetryConfig parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RetryConfig 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.tasks.v2beta2.RetryConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RetryConfig 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.tasks.v2beta2.RetryConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RetryConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.RetryConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RetryConfig 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.tasks.v2beta2.RetryConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RetryConfig 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.tasks.v2beta2.RetryConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RetryConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.RetryConfig prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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; + } + /** + *
+   * Retry config.
+   * These settings determine how a failed task attempt is retried.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.RetryConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.RetryConfig) + com.google.cloud.tasks.v2beta2.RetryConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_RetryConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_RetryConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.RetryConfig.class, com.google.cloud.tasks.v2beta2.RetryConfig.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.RetryConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (maxRetryDurationBuilder_ == null) { + maxRetryDuration_ = null; + } else { + maxRetryDuration_ = null; + maxRetryDurationBuilder_ = null; + } + if (minBackoffBuilder_ == null) { + minBackoff_ = null; + } else { + minBackoff_ = null; + minBackoffBuilder_ = null; + } + if (maxBackoffBuilder_ == null) { + maxBackoff_ = null; + } else { + maxBackoff_ = null; + maxBackoffBuilder_ = null; + } + maxDoublings_ = 0; + + numAttemptsCase_ = 0; + numAttempts_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.QueueProto.internal_static_google_cloud_tasks_v2beta2_RetryConfig_descriptor; + } + + public com.google.cloud.tasks.v2beta2.RetryConfig getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.RetryConfig.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.RetryConfig build() { + com.google.cloud.tasks.v2beta2.RetryConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.RetryConfig buildPartial() { + com.google.cloud.tasks.v2beta2.RetryConfig result = new com.google.cloud.tasks.v2beta2.RetryConfig(this); + if (numAttemptsCase_ == 1) { + result.numAttempts_ = numAttempts_; + } + if (numAttemptsCase_ == 2) { + result.numAttempts_ = numAttempts_; + } + if (maxRetryDurationBuilder_ == null) { + result.maxRetryDuration_ = maxRetryDuration_; + } else { + result.maxRetryDuration_ = maxRetryDurationBuilder_.build(); + } + if (minBackoffBuilder_ == null) { + result.minBackoff_ = minBackoff_; + } else { + result.minBackoff_ = minBackoffBuilder_.build(); + } + if (maxBackoffBuilder_ == null) { + result.maxBackoff_ = maxBackoff_; + } else { + result.maxBackoff_ = maxBackoffBuilder_.build(); + } + result.maxDoublings_ = maxDoublings_; + result.numAttemptsCase_ = numAttemptsCase_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.RetryConfig) { + return mergeFrom((com.google.cloud.tasks.v2beta2.RetryConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.RetryConfig other) { + if (other == com.google.cloud.tasks.v2beta2.RetryConfig.getDefaultInstance()) return this; + if (other.hasMaxRetryDuration()) { + mergeMaxRetryDuration(other.getMaxRetryDuration()); + } + if (other.hasMinBackoff()) { + mergeMinBackoff(other.getMinBackoff()); + } + if (other.hasMaxBackoff()) { + mergeMaxBackoff(other.getMaxBackoff()); + } + if (other.getMaxDoublings() != 0) { + setMaxDoublings(other.getMaxDoublings()); + } + switch (other.getNumAttemptsCase()) { + case MAX_ATTEMPTS: { + setMaxAttempts(other.getMaxAttempts()); + break; + } + case UNLIMITED_ATTEMPTS: { + setUnlimitedAttempts(other.getUnlimitedAttempts()); + break; + } + case NUMATTEMPTS_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.RetryConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.RetryConfig) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int numAttemptsCase_ = 0; + private java.lang.Object numAttempts_; + public NumAttemptsCase + getNumAttemptsCase() { + return NumAttemptsCase.forNumber( + numAttemptsCase_); + } + + public Builder clearNumAttempts() { + numAttemptsCase_ = 0; + numAttempts_ = null; + onChanged(); + return this; + } + + + /** + *
+     * The maximum number of attempts for a task.
+     * Cloud Tasks will attempt the task `max_attempts` times (that
+     * is, if the first attempt fails, then there will be
+     * `max_attempts - 1` retries).  Must be > 0.
+     * 
+ * + * int32 max_attempts = 1; + */ + public int getMaxAttempts() { + if (numAttemptsCase_ == 1) { + return (java.lang.Integer) numAttempts_; + } + return 0; + } + /** + *
+     * The maximum number of attempts for a task.
+     * Cloud Tasks will attempt the task `max_attempts` times (that
+     * is, if the first attempt fails, then there will be
+     * `max_attempts - 1` retries).  Must be > 0.
+     * 
+ * + * int32 max_attempts = 1; + */ + public Builder setMaxAttempts(int value) { + numAttemptsCase_ = 1; + numAttempts_ = value; + onChanged(); + return this; + } + /** + *
+     * The maximum number of attempts for a task.
+     * Cloud Tasks will attempt the task `max_attempts` times (that
+     * is, if the first attempt fails, then there will be
+     * `max_attempts - 1` retries).  Must be > 0.
+     * 
+ * + * int32 max_attempts = 1; + */ + public Builder clearMaxAttempts() { + if (numAttemptsCase_ == 1) { + numAttemptsCase_ = 0; + numAttempts_ = null; + onChanged(); + } + return this; + } + + /** + *
+     * If true, then the number of attempts is unlimited.
+     * 
+ * + * bool unlimited_attempts = 2; + */ + public boolean getUnlimitedAttempts() { + if (numAttemptsCase_ == 2) { + return (java.lang.Boolean) numAttempts_; + } + return false; + } + /** + *
+     * If true, then the number of attempts is unlimited.
+     * 
+ * + * bool unlimited_attempts = 2; + */ + public Builder setUnlimitedAttempts(boolean value) { + numAttemptsCase_ = 2; + numAttempts_ = value; + onChanged(); + return this; + } + /** + *
+     * If true, then the number of attempts is unlimited.
+     * 
+ * + * bool unlimited_attempts = 2; + */ + public Builder clearUnlimitedAttempts() { + if (numAttemptsCase_ == 2) { + numAttemptsCase_ = 0; + numAttempts_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.Duration maxRetryDuration_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maxRetryDurationBuilder_; + /** + *
+     * If positive, `max_retry_duration` specifies the time limit for
+     * retrying a failed task, measured from when the task was first
+     * attempted. Once `max_retry_duration` time has passed *and* the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times, no further attempts will be made and the task will be
+     * deleted.
+     * If zero, then the task age is unlimited.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_retry_duration` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + public boolean hasMaxRetryDuration() { + return maxRetryDurationBuilder_ != null || maxRetryDuration_ != null; + } + /** + *
+     * If positive, `max_retry_duration` specifies the time limit for
+     * retrying a failed task, measured from when the task was first
+     * attempted. Once `max_retry_duration` time has passed *and* the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times, no further attempts will be made and the task will be
+     * deleted.
+     * If zero, then the task age is unlimited.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_retry_duration` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + public com.google.protobuf.Duration getMaxRetryDuration() { + if (maxRetryDurationBuilder_ == null) { + return maxRetryDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxRetryDuration_; + } else { + return maxRetryDurationBuilder_.getMessage(); + } + } + /** + *
+     * If positive, `max_retry_duration` specifies the time limit for
+     * retrying a failed task, measured from when the task was first
+     * attempted. Once `max_retry_duration` time has passed *and* the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times, no further attempts will be made and the task will be
+     * deleted.
+     * If zero, then the task age is unlimited.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_retry_duration` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + public Builder setMaxRetryDuration(com.google.protobuf.Duration value) { + if (maxRetryDurationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxRetryDuration_ = value; + onChanged(); + } else { + maxRetryDurationBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * If positive, `max_retry_duration` specifies the time limit for
+     * retrying a failed task, measured from when the task was first
+     * attempted. Once `max_retry_duration` time has passed *and* the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times, no further attempts will be made and the task will be
+     * deleted.
+     * If zero, then the task age is unlimited.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_retry_duration` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + public Builder setMaxRetryDuration( + com.google.protobuf.Duration.Builder builderForValue) { + if (maxRetryDurationBuilder_ == null) { + maxRetryDuration_ = builderForValue.build(); + onChanged(); + } else { + maxRetryDurationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * If positive, `max_retry_duration` specifies the time limit for
+     * retrying a failed task, measured from when the task was first
+     * attempted. Once `max_retry_duration` time has passed *and* the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times, no further attempts will be made and the task will be
+     * deleted.
+     * If zero, then the task age is unlimited.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_retry_duration` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + public Builder mergeMaxRetryDuration(com.google.protobuf.Duration value) { + if (maxRetryDurationBuilder_ == null) { + if (maxRetryDuration_ != null) { + maxRetryDuration_ = + com.google.protobuf.Duration.newBuilder(maxRetryDuration_).mergeFrom(value).buildPartial(); + } else { + maxRetryDuration_ = value; + } + onChanged(); + } else { + maxRetryDurationBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * If positive, `max_retry_duration` specifies the time limit for
+     * retrying a failed task, measured from when the task was first
+     * attempted. Once `max_retry_duration` time has passed *and* the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times, no further attempts will be made and the task will be
+     * deleted.
+     * If zero, then the task age is unlimited.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_retry_duration` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + public Builder clearMaxRetryDuration() { + if (maxRetryDurationBuilder_ == null) { + maxRetryDuration_ = null; + onChanged(); + } else { + maxRetryDuration_ = null; + maxRetryDurationBuilder_ = null; + } + + return this; + } + /** + *
+     * If positive, `max_retry_duration` specifies the time limit for
+     * retrying a failed task, measured from when the task was first
+     * attempted. Once `max_retry_duration` time has passed *and* the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times, no further attempts will be made and the task will be
+     * deleted.
+     * If zero, then the task age is unlimited.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_retry_duration` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + public com.google.protobuf.Duration.Builder getMaxRetryDurationBuilder() { + + onChanged(); + return getMaxRetryDurationFieldBuilder().getBuilder(); + } + /** + *
+     * If positive, `max_retry_duration` specifies the time limit for
+     * retrying a failed task, measured from when the task was first
+     * attempted. Once `max_retry_duration` time has passed *and* the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times, no further attempts will be made and the task will be
+     * deleted.
+     * If zero, then the task age is unlimited.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_retry_duration` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + public com.google.protobuf.DurationOrBuilder getMaxRetryDurationOrBuilder() { + if (maxRetryDurationBuilder_ != null) { + return maxRetryDurationBuilder_.getMessageOrBuilder(); + } else { + return maxRetryDuration_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : maxRetryDuration_; + } + } + /** + *
+     * If positive, `max_retry_duration` specifies the time limit for
+     * retrying a failed task, measured from when the task was first
+     * attempted. Once `max_retry_duration` time has passed *and* the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times, no further attempts will be made and the task will be
+     * deleted.
+     * If zero, then the task age is unlimited.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_retry_duration` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getMaxRetryDurationFieldBuilder() { + if (maxRetryDurationBuilder_ == null) { + maxRetryDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getMaxRetryDuration(), + getParentForChildren(), + isClean()); + maxRetryDuration_ = null; + } + return maxRetryDurationBuilder_; + } + + private com.google.protobuf.Duration minBackoff_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> minBackoffBuilder_; + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `min_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + public boolean hasMinBackoff() { + return minBackoffBuilder_ != null || minBackoff_ != null; + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `min_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + public com.google.protobuf.Duration getMinBackoff() { + if (minBackoffBuilder_ == null) { + return minBackoff_ == null ? com.google.protobuf.Duration.getDefaultInstance() : minBackoff_; + } else { + return minBackoffBuilder_.getMessage(); + } + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `min_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + public Builder setMinBackoff(com.google.protobuf.Duration value) { + if (minBackoffBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minBackoff_ = value; + onChanged(); + } else { + minBackoffBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `min_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + public Builder setMinBackoff( + com.google.protobuf.Duration.Builder builderForValue) { + if (minBackoffBuilder_ == null) { + minBackoff_ = builderForValue.build(); + onChanged(); + } else { + minBackoffBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `min_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + public Builder mergeMinBackoff(com.google.protobuf.Duration value) { + if (minBackoffBuilder_ == null) { + if (minBackoff_ != null) { + minBackoff_ = + com.google.protobuf.Duration.newBuilder(minBackoff_).mergeFrom(value).buildPartial(); + } else { + minBackoff_ = value; + } + onChanged(); + } else { + minBackoffBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `min_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + public Builder clearMinBackoff() { + if (minBackoffBuilder_ == null) { + minBackoff_ = null; + onChanged(); + } else { + minBackoff_ = null; + minBackoffBuilder_ = null; + } + + return this; + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `min_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + public com.google.protobuf.Duration.Builder getMinBackoffBuilder() { + + onChanged(); + return getMinBackoffFieldBuilder().getBuilder(); + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `min_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + public com.google.protobuf.DurationOrBuilder getMinBackoffOrBuilder() { + if (minBackoffBuilder_ != null) { + return minBackoffBuilder_.getMessageOrBuilder(); + } else { + return minBackoff_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : minBackoff_; + } + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `min_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getMinBackoffFieldBuilder() { + if (minBackoffBuilder_ == null) { + minBackoffBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getMinBackoff(), + getParentForChildren(), + isClean()); + minBackoff_ = null; + } + return minBackoffBuilder_; + } + + private com.google.protobuf.Duration maxBackoff_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> maxBackoffBuilder_; + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + public boolean hasMaxBackoff() { + return maxBackoffBuilder_ != null || maxBackoff_ != null; + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + public com.google.protobuf.Duration getMaxBackoff() { + if (maxBackoffBuilder_ == null) { + return maxBackoff_ == null ? com.google.protobuf.Duration.getDefaultInstance() : maxBackoff_; + } else { + return maxBackoffBuilder_.getMessage(); + } + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + public Builder setMaxBackoff(com.google.protobuf.Duration value) { + if (maxBackoffBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxBackoff_ = value; + onChanged(); + } else { + maxBackoffBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + public Builder setMaxBackoff( + com.google.protobuf.Duration.Builder builderForValue) { + if (maxBackoffBuilder_ == null) { + maxBackoff_ = builderForValue.build(); + onChanged(); + } else { + maxBackoffBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + public Builder mergeMaxBackoff(com.google.protobuf.Duration value) { + if (maxBackoffBuilder_ == null) { + if (maxBackoff_ != null) { + maxBackoff_ = + com.google.protobuf.Duration.newBuilder(maxBackoff_).mergeFrom(value).buildPartial(); + } else { + maxBackoff_ = value; + } + onChanged(); + } else { + maxBackoffBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + public Builder clearMaxBackoff() { + if (maxBackoffBuilder_ == null) { + maxBackoff_ = null; + onChanged(); + } else { + maxBackoff_ = null; + maxBackoffBuilder_ = null; + } + + return this; + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + public com.google.protobuf.Duration.Builder getMaxBackoffBuilder() { + + onChanged(); + return getMaxBackoffFieldBuilder().getBuilder(); + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + public com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder() { + if (maxBackoffBuilder_ != null) { + return maxBackoffBuilder_.getMessageOrBuilder(); + } else { + return maxBackoff_ == null ? + com.google.protobuf.Duration.getDefaultInstance() : maxBackoff_; + } + } + /** + *
+     * A task will be [scheduled](Task.schedule_time) for retry between
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+     * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+     * retried.
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * `max_backoff` will be truncated to the nearest second.
+     * This field has the same meaning as
+     * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> + getMaxBackoffFieldBuilder() { + if (maxBackoffBuilder_ == null) { + maxBackoffBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>( + getMaxBackoff(), + getParentForChildren(), + isClean()); + maxBackoff_ = null; + } + return maxBackoffBuilder_; + } + + private int maxDoublings_ ; + /** + *
+     * The time between retries will double `max_doublings` times.
+     * A task's retry interval starts at
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles
+     * `max_doublings` times, then increases linearly, and finally
+     * retries retries at intervals of
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to
+     * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times.
+     * For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s,
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, and
+     * `max_doublings` is 3, then the a task will first be retried in
+     * 10s. The retry interval will double three times, and then
+     * increase linearly by 2^3 * 10s.  Finally, the task will retry at
+     * intervals of [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
+     * 240s, 300s, 300s, ....
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * This field has the same meaning as
+     * [max_doublings in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * int32 max_doublings = 6; + */ + public int getMaxDoublings() { + return maxDoublings_; + } + /** + *
+     * The time between retries will double `max_doublings` times.
+     * A task's retry interval starts at
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles
+     * `max_doublings` times, then increases linearly, and finally
+     * retries retries at intervals of
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to
+     * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times.
+     * For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s,
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, and
+     * `max_doublings` is 3, then the a task will first be retried in
+     * 10s. The retry interval will double three times, and then
+     * increase linearly by 2^3 * 10s.  Finally, the task will retry at
+     * intervals of [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
+     * 240s, 300s, 300s, ....
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * This field has the same meaning as
+     * [max_doublings in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * int32 max_doublings = 6; + */ + public Builder setMaxDoublings(int value) { + + maxDoublings_ = value; + onChanged(); + return this; + } + /** + *
+     * The time between retries will double `max_doublings` times.
+     * A task's retry interval starts at
+     * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles
+     * `max_doublings` times, then increases linearly, and finally
+     * retries retries at intervals of
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to
+     * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times.
+     * For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s,
+     * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, and
+     * `max_doublings` is 3, then the a task will first be retried in
+     * 10s. The retry interval will double three times, and then
+     * increase linearly by 2^3 * 10s.  Finally, the task will retry at
+     * intervals of [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the
+     * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+     * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
+     * 240s, 300s, 300s, ....
+     * If unspecified when the queue is created, Cloud Tasks will pick the
+     * default.
+     * This field is output only for
+     * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+     * This field has the same meaning as
+     * [max_doublings in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+     * 
+ * + * int32 max_doublings = 6; + */ + public Builder clearMaxDoublings() { + + maxDoublings_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.RetryConfig) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.RetryConfig) + private static final com.google.cloud.tasks.v2beta2.RetryConfig DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.RetryConfig(); + } + + public static com.google.cloud.tasks.v2beta2.RetryConfig getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public RetryConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RetryConfig(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.RetryConfig getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfigOrBuilder.java new file mode 100644 index 000000000000..227377073b1d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RetryConfigOrBuilder.java @@ -0,0 +1,242 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/queue.proto + +package com.google.cloud.tasks.v2beta2; + +public interface RetryConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.RetryConfig) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * The maximum number of attempts for a task.
+   * Cloud Tasks will attempt the task `max_attempts` times (that
+   * is, if the first attempt fails, then there will be
+   * `max_attempts - 1` retries).  Must be > 0.
+   * 
+ * + * int32 max_attempts = 1; + */ + int getMaxAttempts(); + + /** + *
+   * If true, then the number of attempts is unlimited.
+   * 
+ * + * bool unlimited_attempts = 2; + */ + boolean getUnlimitedAttempts(); + + /** + *
+   * If positive, `max_retry_duration` specifies the time limit for
+   * retrying a failed task, measured from when the task was first
+   * attempted. Once `max_retry_duration` time has passed *and* the
+   * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+   * times, no further attempts will be made and the task will be
+   * deleted.
+   * If zero, then the task age is unlimited.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_retry_duration` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + boolean hasMaxRetryDuration(); + /** + *
+   * If positive, `max_retry_duration` specifies the time limit for
+   * retrying a failed task, measured from when the task was first
+   * attempted. Once `max_retry_duration` time has passed *and* the
+   * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+   * times, no further attempts will be made and the task will be
+   * deleted.
+   * If zero, then the task age is unlimited.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_retry_duration` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + com.google.protobuf.Duration getMaxRetryDuration(); + /** + *
+   * If positive, `max_retry_duration` specifies the time limit for
+   * retrying a failed task, measured from when the task was first
+   * attempted. Once `max_retry_duration` time has passed *and* the
+   * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+   * times, no further attempts will be made and the task will be
+   * deleted.
+   * If zero, then the task age is unlimited.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_retry_duration` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_retry_duration = 3; + */ + com.google.protobuf.DurationOrBuilder getMaxRetryDurationOrBuilder(); + + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `min_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + boolean hasMinBackoff(); + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `min_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + com.google.protobuf.Duration getMinBackoff(); + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `min_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration min_backoff = 4; + */ + com.google.protobuf.DurationOrBuilder getMinBackoffOrBuilder(); + + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + boolean hasMaxBackoff(); + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + com.google.protobuf.Duration getMaxBackoff(); + /** + *
+   * A task will be [scheduled](Task.schedule_time) for retry between
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
+   * if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
+   * retried.
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * `max_backoff` will be truncated to the nearest second.
+   * This field has the same meaning as
+   * [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * .google.protobuf.Duration max_backoff = 5; + */ + com.google.protobuf.DurationOrBuilder getMaxBackoffOrBuilder(); + + /** + *
+   * The time between retries will double `max_doublings` times.
+   * A task's retry interval starts at
+   * [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles
+   * `max_doublings` times, then increases linearly, and finally
+   * retries retries at intervals of
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to
+   * [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times.
+   * For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s,
+   * [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, and
+   * `max_doublings` is 3, then the a task will first be retried in
+   * 10s. The retry interval will double three times, and then
+   * increase linearly by 2^3 * 10s.  Finally, the task will retry at
+   * intervals of [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the
+   * task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
+   * times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
+   * 240s, 300s, 300s, ....
+   * If unspecified when the queue is created, Cloud Tasks will pick the
+   * default.
+   * This field is output only for
+   * [pull queues](google.cloud.tasks.v2beta2.PullTarget).
+   * This field has the same meaning as
+   * [max_doublings in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters).
+   * 
+ * + * int32 max_doublings = 6; + */ + int getMaxDoublings(); + + public com.google.cloud.tasks.v2beta2.RetryConfig.NumAttemptsCase getNumAttemptsCase(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RunTaskRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RunTaskRequest.java new file mode 100644 index 000000000000..b60cd76c8586 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RunTaskRequest.java @@ -0,0 +1,742 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for forcing a task to run now using
+ * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.RunTaskRequest} + */ +public final class RunTaskRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.RunTaskRequest) + RunTaskRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use RunTaskRequest.newBuilder() to construct. + private RunTaskRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private RunTaskRequest() { + name_ = ""; + responseView_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private RunTaskRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: { + int rawValue = input.readEnum(); + + responseView_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.RunTaskRequest.class, com.google.cloud.tasks.v2beta2.RunTaskRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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 task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + 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 RESPONSE_VIEW_FIELD_NUMBER = 2; + private int responseView_; + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(2, responseView_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (responseView_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, responseView_); + } + size += unknownFields.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.tasks.v2beta2.RunTaskRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.RunTaskRequest other = (com.google.cloud.tasks.v2beta2.RunTaskRequest) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && responseView_ == other.responseView_; + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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) + RESPONSE_VIEW_FIELD_NUMBER; + hash = (53 * hash) + responseView_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.RunTaskRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RunTaskRequest 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.tasks.v2beta2.RunTaskRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RunTaskRequest 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.tasks.v2beta2.RunTaskRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.RunTaskRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.RunTaskRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RunTaskRequest 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.tasks.v2beta2.RunTaskRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RunTaskRequest 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.tasks.v2beta2.RunTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.RunTaskRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.RunTaskRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for forcing a task to run now using
+   * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.RunTaskRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.RunTaskRequest) + com.google.cloud.tasks.v2beta2.RunTaskRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.RunTaskRequest.class, com.google.cloud.tasks.v2beta2.RunTaskRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.RunTaskRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + responseView_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_RunTaskRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.RunTaskRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.RunTaskRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.RunTaskRequest build() { + com.google.cloud.tasks.v2beta2.RunTaskRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.RunTaskRequest buildPartial() { + com.google.cloud.tasks.v2beta2.RunTaskRequest result = new com.google.cloud.tasks.v2beta2.RunTaskRequest(this); + result.name_ = name_; + result.responseView_ = responseView_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.RunTaskRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.RunTaskRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.RunTaskRequest other) { + if (other == com.google.cloud.tasks.v2beta2.RunTaskRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.responseView_ != 0) { + setResponseViewValue(other.getResponseViewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.RunTaskRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.RunTaskRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + 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 task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Required.
+     * The task name. For example:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int responseView_ = 0; + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public int getResponseViewValue() { + return responseView_; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public Builder setResponseViewValue(int value) { + responseView_ = value; + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public com.google.cloud.tasks.v2beta2.Task.View getResponseView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(responseView_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public Builder setResponseView(com.google.cloud.tasks.v2beta2.Task.View value) { + if (value == null) { + throw new NullPointerException(); + } + + responseView_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+     * returned.
+     * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+     * information is retrieved by default because some data, such as
+     * payloads, might be desirable to return only when needed because
+     * of its large size or because of the sensitivity of data that it
+     * contains.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+     * [Task][google.cloud.tasks.v2beta2.Task] resource.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + public Builder clearResponseView() { + + responseView_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.RunTaskRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.RunTaskRequest) + private static final com.google.cloud.tasks.v2beta2.RunTaskRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.RunTaskRequest(); + } + + public static com.google.cloud.tasks.v2beta2.RunTaskRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public RunTaskRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RunTaskRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.RunTaskRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RunTaskRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RunTaskRequestOrBuilder.java new file mode 100644 index 000000000000..2707c423dc66 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/RunTaskRequestOrBuilder.java @@ -0,0 +1,66 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface RunTaskRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.RunTaskRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Required.
+   * The task name. For example:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + int getResponseViewValue(); + /** + *
+   * The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be
+   * returned.
+   * By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+   * `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the
+   * [Task][google.cloud.tasks.v2beta2.Task] resource.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View response_view = 2; + */ + com.google.cloud.tasks.v2beta2.Task.View getResponseView(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TargetProto.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TargetProto.java new file mode 100644 index 000000000000..4323c5aa95e9 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TargetProto.java @@ -0,0 +1,136 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/target.proto + +package com.google.cloud.tasks.v2beta2; + +public final class TargetProto { + private TargetProto() {} + 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_tasks_v2beta2_PullTarget_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_PullTarget_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_PullMessage_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_PullMessage_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpTarget_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpTarget_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_HeadersEntry_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_HeadersEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_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/tasks/v2beta2/target.prot" + + "o\022\032google.cloud.tasks.v2beta2\032\034google/ap" + + "i/annotations.proto\032\036google/protobuf/dur" + + "ation.proto\"\014\n\nPullTarget\"+\n\013PullMessage" + + "\022\017\n\007payload\030\001 \001(\014\022\013\n\003tag\030\002 \001(\t\"h\n\023AppEng" + + "ineHttpTarget\022Q\n\033app_engine_routing_over" + + "ride\030\001 \001(\0132,.google.cloud.tasks.v2beta2." + + "AppEngineRouting\"\304\002\n\024AppEngineHttpReques" + + "t\022;\n\013http_method\030\001 \001(\0162&.google.cloud.ta" + + "sks.v2beta2.HttpMethod\022H\n\022app_engine_rou" + + "ting\030\002 \001(\0132,.google.cloud.tasks.v2beta2." + + "AppEngineRouting\022\024\n\014relative_url\030\003 \001(\t\022N" + + "\n\007headers\030\004 \003(\0132=.google.cloud.tasks.v2b" + + "eta2.AppEngineHttpRequest.HeadersEntry\022\017" + + "\n\007payload\030\005 \001(\014\032.\n\014HeadersEntry\022\013\n\003key\030\001" + + " \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"T\n\020AppEngineRout" + + "ing\022\017\n\007service\030\001 \001(\t\022\017\n\007version\030\002 \001(\t\022\020\n" + + "\010instance\030\003 \001(\t\022\014\n\004host\030\004 \001(\t*[\n\nHttpMet" + + "hod\022\033\n\027HTTP_METHOD_UNSPECIFIED\020\000\022\010\n\004POST" + + "\020\001\022\007\n\003GET\020\002\022\010\n\004HEAD\020\003\022\007\n\003PUT\020\004\022\n\n\006DELETE" + + "\020\005Bp\n\036com.google.cloud.tasks.v2beta2B\013Ta" + + "rgetProtoP\001Z?google.golang.org/genproto/" + + "googleapis/cloud/tasks/v2beta2;tasksb\006pr" + + "oto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.protobuf.DurationProto.getDescriptor(), + }, assigner); + internal_static_google_cloud_tasks_v2beta2_PullTarget_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_tasks_v2beta2_PullTarget_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_PullTarget_descriptor, + new java.lang.String[] { }); + internal_static_google_cloud_tasks_v2beta2_PullMessage_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_tasks_v2beta2_PullMessage_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_PullMessage_descriptor, + new java.lang.String[] { "Payload", "Tag", }); + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpTarget_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpTarget_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpTarget_descriptor, + new java.lang.String[] { "AppEngineRoutingOverride", }); + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_descriptor, + new java.lang.String[] { "HttpMethod", "AppEngineRouting", "RelativeUrl", "Headers", "Payload", }); + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_HeadersEntry_descriptor = + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_HeadersEntry_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_AppEngineHttpRequest_HeadersEntry_descriptor, + new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_AppEngineRouting_descriptor, + new java.lang.String[] { "Service", "Version", "Instance", "Host", }); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.protobuf.DurationProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Task.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Task.java new file mode 100644 index 000000000000..8bc62875a16f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/Task.java @@ -0,0 +1,2350 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/task.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * A unit of scheduled work.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.Task} + */ +public final class Task extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.Task) + TaskOrBuilder { +private static final long serialVersionUID = 0L; + // Use Task.newBuilder() to construct. + private Task(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Task() { + name_ = ""; + view_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Task( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: { + com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.Builder subBuilder = null; + if (payloadTypeCase_ == 3) { + subBuilder = ((com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) payloadType_).toBuilder(); + } + payloadType_ = + input.readMessage(com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) payloadType_); + payloadType_ = subBuilder.buildPartial(); + } + payloadTypeCase_ = 3; + break; + } + case 34: { + com.google.cloud.tasks.v2beta2.PullMessage.Builder subBuilder = null; + if (payloadTypeCase_ == 4) { + subBuilder = ((com.google.cloud.tasks.v2beta2.PullMessage) payloadType_).toBuilder(); + } + payloadType_ = + input.readMessage(com.google.cloud.tasks.v2beta2.PullMessage.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.cloud.tasks.v2beta2.PullMessage) payloadType_); + payloadType_ = subBuilder.buildPartial(); + } + payloadTypeCase_ = 4; + break; + } + case 42: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (scheduleTime_ != null) { + subBuilder = scheduleTime_.toBuilder(); + } + scheduleTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(scheduleTime_); + scheduleTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + com.google.cloud.tasks.v2beta2.TaskStatus.Builder subBuilder = null; + if (status_ != null) { + subBuilder = status_.toBuilder(); + } + status_ = input.readMessage(com.google.cloud.tasks.v2beta2.TaskStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(status_); + status_ = subBuilder.buildPartial(); + } + + break; + } + case 64: { + int rawValue = input.readEnum(); + + view_ = rawValue; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_Task_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_Task_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.Task.class, com.google.cloud.tasks.v2beta2.Task.Builder.class); + } + + /** + *
+   * The view specifies a subset of [Task][google.cloud.tasks.v2beta2.Task] data.
+   * When a task is returned in a response, not all
+   * information is retrieved by default because some data, such as
+   * payloads, might be desirable to return only when needed because
+   * of its large size or because of the sensitivity of data that it
+   * contains.
+   * 
+ * + * Protobuf enum {@code google.cloud.tasks.v2beta2.Task.View} + */ + public enum View + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+     * Unspecified. Defaults to BASIC.
+     * 
+ * + * VIEW_UNSPECIFIED = 0; + */ + VIEW_UNSPECIFIED(0), + /** + *
+     * The basic view omits fields which can be large or can contain
+     * sensitive data.
+     * This view does not include the
+     * ([payload in AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] and
+     * [payload in PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These payloads are
+     * desirable to return only when needed, because they can be large
+     * and because of the sensitivity of the data that you choose to
+     * store in it.
+     * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + *
+     * All information is returned.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+     * permission on the [Queue][google.cloud.tasks.v2beta2.Queue] resource.
+     * 
+ * + * FULL = 2; + */ + FULL(2), + UNRECOGNIZED(-1), + ; + + /** + *
+     * Unspecified. Defaults to BASIC.
+     * 
+ * + * VIEW_UNSPECIFIED = 0; + */ + public static final int VIEW_UNSPECIFIED_VALUE = 0; + /** + *
+     * The basic view omits fields which can be large or can contain
+     * sensitive data.
+     * This view does not include the
+     * ([payload in AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] and
+     * [payload in PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These payloads are
+     * desirable to return only when needed, because they can be large
+     * and because of the sensitivity of the data that you choose to
+     * store in it.
+     * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + /** + *
+     * All information is returned.
+     * Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
+     * `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
+     * permission on the [Queue][google.cloud.tasks.v2beta2.Queue] resource.
+     * 
+ * + * FULL = 2; + */ + public static final int FULL_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; + } + + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static View valueOf(int value) { + return forNumber(value); + } + + public static View forNumber(int value) { + switch (value) { + case 0: return VIEW_UNSPECIFIED; + case 1: return BASIC; + case 2: return FULL; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + View> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public View findValueByNumber(int number) { + return View.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + 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.tasks.v2beta2.Task.getDescriptor().getEnumTypes().get(0); + } + + private static final View[] VALUES = values(); + + public static View 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 View(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.tasks.v2beta2.Task.View) + } + + private int payloadTypeCase_ = 0; + private java.lang.Object payloadType_; + public enum PayloadTypeCase + implements com.google.protobuf.Internal.EnumLite { + APP_ENGINE_HTTP_REQUEST(3), + PULL_MESSAGE(4), + PAYLOADTYPE_NOT_SET(0); + private final int value; + private PayloadTypeCase(int value) { + this.value = value; + } + /** + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PayloadTypeCase valueOf(int value) { + return forNumber(value); + } + + public static PayloadTypeCase forNumber(int value) { + switch (value) { + case 3: return APP_ENGINE_HTTP_REQUEST; + case 4: return PULL_MESSAGE; + case 0: return PAYLOADTYPE_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public PayloadTypeCase + getPayloadTypeCase() { + return PayloadTypeCase.forNumber( + payloadTypeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+   * The task name.
+   * The task name must have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+   *    hyphens (-), colons (:), or periods (.).
+   *    For more information, see
+   *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+   * * `LOCATION_ID` is the canonical ID for the task's location.
+   *    The list of available locations can be obtained by calling
+   *    [ListLocations][google.cloud.location.Locations.ListLocations].
+   *    For more information, see https://cloud.google.com/about/locations/.
+   * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+   *   hyphens (-). The maximum length is 100 characters.
+   * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+   *   hyphens (-), or underscores (_). The maximum length is 500 characters.
+   * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+   * Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+   * The task name.
+   * The task name must have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+   *    hyphens (-), colons (:), or periods (.).
+   *    For more information, see
+   *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+   * * `LOCATION_ID` is the canonical ID for the task's location.
+   *    The list of available locations can be obtained by calling
+   *    [ListLocations][google.cloud.location.Locations.ListLocations].
+   *    For more information, see https://cloud.google.com/about/locations/.
+   * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+   *   hyphens (-). The maximum length is 100 characters.
+   * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+   *   hyphens (-), or underscores (_). The maximum length is 500 characters.
+   * 
+ * + * string name = 1; + */ + 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 APP_ENGINE_HTTP_REQUEST_FIELD_NUMBER = 3; + /** + *
+   * App Engine HTTP request that is sent to the task's target. Can
+   * be set only if
+   * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+   * on the queue.
+   * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + public boolean hasAppEngineHttpRequest() { + return payloadTypeCase_ == 3; + } + /** + *
+   * App Engine HTTP request that is sent to the task's target. Can
+   * be set only if
+   * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+   * on the queue.
+   * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + public com.google.cloud.tasks.v2beta2.AppEngineHttpRequest getAppEngineHttpRequest() { + if (payloadTypeCase_ == 3) { + return (com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.getDefaultInstance(); + } + /** + *
+   * App Engine HTTP request that is sent to the task's target. Can
+   * be set only if
+   * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+   * on the queue.
+   * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + public com.google.cloud.tasks.v2beta2.AppEngineHttpRequestOrBuilder getAppEngineHttpRequestOrBuilder() { + if (payloadTypeCase_ == 3) { + return (com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.getDefaultInstance(); + } + + public static final int PULL_MESSAGE_FIELD_NUMBER = 4; + /** + *
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+   * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+   * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + public boolean hasPullMessage() { + return payloadTypeCase_ == 4; + } + /** + *
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+   * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+   * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + public com.google.cloud.tasks.v2beta2.PullMessage getPullMessage() { + if (payloadTypeCase_ == 4) { + return (com.google.cloud.tasks.v2beta2.PullMessage) payloadType_; + } + return com.google.cloud.tasks.v2beta2.PullMessage.getDefaultInstance(); + } + /** + *
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+   * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+   * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + public com.google.cloud.tasks.v2beta2.PullMessageOrBuilder getPullMessageOrBuilder() { + if (payloadTypeCase_ == 4) { + return (com.google.cloud.tasks.v2beta2.PullMessage) payloadType_; + } + return com.google.cloud.tasks.v2beta2.PullMessage.getDefaultInstance(); + } + + public static final int SCHEDULE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp scheduleTime_; + /** + *
+   * The time when the task is scheduled to be attempted.
+   * For App Engine queues, this is when the task will be attempted or retried.
+   * For pull queues, this is the time when the task is available to
+   * be leased; if a task is currently leased, this is the time when
+   * the current lease expires, that is, the time that the task was
+   * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + public boolean hasScheduleTime() { + return scheduleTime_ != null; + } + /** + *
+   * The time when the task is scheduled to be attempted.
+   * For App Engine queues, this is when the task will be attempted or retried.
+   * For pull queues, this is the time when the task is available to
+   * be leased; if a task is currently leased, this is the time when
+   * the current lease expires, that is, the time that the task was
+   * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + public com.google.protobuf.Timestamp getScheduleTime() { + return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } + /** + *
+   * The time when the task is scheduled to be attempted.
+   * For App Engine queues, this is when the task will be attempted or retried.
+   * For pull queues, this is the time when the task is available to
+   * be leased; if a task is currently leased, this is the time when
+   * the current lease expires, that is, the time that the task was
+   * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() { + return getScheduleTime(); + } + + public static final int CREATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp createTime_; + /** + *
+   * Output only. The time that the task was created.
+   * `create_time` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + *
+   * Output only. The time that the task was created.
+   * `create_time` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + *
+   * Output only. The time that the task was created.
+   * `create_time` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int STATUS_FIELD_NUMBER = 7; + private com.google.cloud.tasks.v2beta2.TaskStatus status_; + /** + *
+   * Output only. The task status.
+   * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + public boolean hasStatus() { + return status_ != null; + } + /** + *
+   * Output only. The task status.
+   * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + public com.google.cloud.tasks.v2beta2.TaskStatus getStatus() { + return status_ == null ? com.google.cloud.tasks.v2beta2.TaskStatus.getDefaultInstance() : status_; + } + /** + *
+   * Output only. The task status.
+   * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + public com.google.cloud.tasks.v2beta2.TaskStatusOrBuilder getStatusOrBuilder() { + return getStatus(); + } + + public static final int VIEW_FIELD_NUMBER = 8; + private int view_; + /** + *
+   * Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has
+   * been returned.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View view = 8; + */ + public int getViewValue() { + return view_; + } + /** + *
+   * Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has
+   * been returned.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View view = 8; + */ + public com.google.cloud.tasks.v2beta2.Task.View getView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(view_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (payloadTypeCase_ == 3) { + output.writeMessage(3, (com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) payloadType_); + } + if (payloadTypeCase_ == 4) { + output.writeMessage(4, (com.google.cloud.tasks.v2beta2.PullMessage) payloadType_); + } + if (scheduleTime_ != null) { + output.writeMessage(5, getScheduleTime()); + } + if (createTime_ != null) { + output.writeMessage(6, getCreateTime()); + } + if (status_ != null) { + output.writeMessage(7, getStatus()); + } + if (view_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + output.writeEnum(8, view_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (payloadTypeCase_ == 3) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, (com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) payloadType_); + } + if (payloadTypeCase_ == 4) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, (com.google.cloud.tasks.v2beta2.PullMessage) payloadType_); + } + if (scheduleTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getScheduleTime()); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getCreateTime()); + } + if (status_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getStatus()); + } + if (view_ != com.google.cloud.tasks.v2beta2.Task.View.VIEW_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, view_); + } + size += unknownFields.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.tasks.v2beta2.Task)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.Task other = (com.google.cloud.tasks.v2beta2.Task) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + result = result && (hasScheduleTime() == other.hasScheduleTime()); + if (hasScheduleTime()) { + result = result && getScheduleTime() + .equals(other.getScheduleTime()); + } + result = result && (hasCreateTime() == other.hasCreateTime()); + if (hasCreateTime()) { + result = result && getCreateTime() + .equals(other.getCreateTime()); + } + result = result && (hasStatus() == other.hasStatus()); + if (hasStatus()) { + result = result && getStatus() + .equals(other.getStatus()); + } + result = result && view_ == other.view_; + result = result && getPayloadTypeCase().equals( + other.getPayloadTypeCase()); + if (!result) return false; + switch (payloadTypeCase_) { + case 3: + result = result && getAppEngineHttpRequest() + .equals(other.getAppEngineHttpRequest()); + break; + case 4: + result = result && getPullMessage() + .equals(other.getPullMessage()); + break; + case 0: + default: + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @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 (hasScheduleTime()) { + hash = (37 * hash) + SCHEDULE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getScheduleTime().hashCode(); + } + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasStatus()) { + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + getStatus().hashCode(); + } + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + switch (payloadTypeCase_) { + case 3: + hash = (37 * hash) + APP_ENGINE_HTTP_REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getAppEngineHttpRequest().hashCode(); + break; + case 4: + hash = (37 * hash) + PULL_MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getPullMessage().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.Task parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.Task 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.tasks.v2beta2.Task parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.Task 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.tasks.v2beta2.Task parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.Task parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.Task parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.Task 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.tasks.v2beta2.Task parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.Task 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.tasks.v2beta2.Task parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.Task parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.Task prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 unit of scheduled work.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.Task} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.Task) + com.google.cloud.tasks.v2beta2.TaskOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_Task_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_Task_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.Task.class, com.google.cloud.tasks.v2beta2.Task.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.Task.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = null; + } else { + scheduleTime_ = null; + scheduleTimeBuilder_ = null; + } + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (statusBuilder_ == null) { + status_ = null; + } else { + status_ = null; + statusBuilder_ = null; + } + view_ = 0; + + payloadTypeCase_ = 0; + payloadType_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_Task_descriptor; + } + + public com.google.cloud.tasks.v2beta2.Task getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.Task.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.Task build() { + com.google.cloud.tasks.v2beta2.Task result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.Task buildPartial() { + com.google.cloud.tasks.v2beta2.Task result = new com.google.cloud.tasks.v2beta2.Task(this); + result.name_ = name_; + if (payloadTypeCase_ == 3) { + if (appEngineHttpRequestBuilder_ == null) { + result.payloadType_ = payloadType_; + } else { + result.payloadType_ = appEngineHttpRequestBuilder_.build(); + } + } + if (payloadTypeCase_ == 4) { + if (pullMessageBuilder_ == null) { + result.payloadType_ = payloadType_; + } else { + result.payloadType_ = pullMessageBuilder_.build(); + } + } + if (scheduleTimeBuilder_ == null) { + result.scheduleTime_ = scheduleTime_; + } else { + result.scheduleTime_ = scheduleTimeBuilder_.build(); + } + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (statusBuilder_ == null) { + result.status_ = status_; + } else { + result.status_ = statusBuilder_.build(); + } + result.view_ = view_; + result.payloadTypeCase_ = payloadTypeCase_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.Task) { + return mergeFrom((com.google.cloud.tasks.v2beta2.Task)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.Task other) { + if (other == com.google.cloud.tasks.v2beta2.Task.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasScheduleTime()) { + mergeScheduleTime(other.getScheduleTime()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasStatus()) { + mergeStatus(other.getStatus()); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + switch (other.getPayloadTypeCase()) { + case APP_ENGINE_HTTP_REQUEST: { + mergeAppEngineHttpRequest(other.getAppEngineHttpRequest()); + break; + } + case PULL_MESSAGE: { + mergePullMessage(other.getPullMessage()); + break; + } + case PAYLOADTYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.Task parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.Task) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int payloadTypeCase_ = 0; + private java.lang.Object payloadType_; + public PayloadTypeCase + getPayloadTypeCase() { + return PayloadTypeCase.forNumber( + payloadTypeCase_); + } + + public Builder clearPayloadType() { + payloadTypeCase_ = 0; + payloadType_ = null; + onChanged(); + return this; + } + + + private java.lang.Object name_ = ""; + /** + *
+     * Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+     * The task name.
+     * The task name must have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+     *    hyphens (-), colons (:), or periods (.).
+     *    For more information, see
+     *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+     * * `LOCATION_ID` is the canonical ID for the task's location.
+     *    The list of available locations can be obtained by calling
+     *    [ListLocations][google.cloud.location.Locations.ListLocations].
+     *    For more information, see https://cloud.google.com/about/locations/.
+     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+     *   hyphens (-). The maximum length is 100 characters.
+     * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+     *   hyphens (-), or underscores (_). The maximum length is 500 characters.
+     * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+     * Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+     * The task name.
+     * The task name must have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+     *    hyphens (-), colons (:), or periods (.).
+     *    For more information, see
+     *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+     * * `LOCATION_ID` is the canonical ID for the task's location.
+     *    The list of available locations can be obtained by calling
+     *    [ListLocations][google.cloud.location.Locations.ListLocations].
+     *    For more information, see https://cloud.google.com/about/locations/.
+     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+     *   hyphens (-). The maximum length is 100 characters.
+     * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+     *   hyphens (-), or underscores (_). The maximum length is 500 characters.
+     * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+     * Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+     * The task name.
+     * The task name must have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+     *    hyphens (-), colons (:), or periods (.).
+     *    For more information, see
+     *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+     * * `LOCATION_ID` is the canonical ID for the task's location.
+     *    The list of available locations can be obtained by calling
+     *    [ListLocations][google.cloud.location.Locations.ListLocations].
+     *    For more information, see https://cloud.google.com/about/locations/.
+     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+     *   hyphens (-). The maximum length is 100 characters.
+     * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+     *   hyphens (-), or underscores (_). The maximum length is 500 characters.
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+     * The task name.
+     * The task name must have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+     *    hyphens (-), colons (:), or periods (.).
+     *    For more information, see
+     *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+     * * `LOCATION_ID` is the canonical ID for the task's location.
+     *    The list of available locations can be obtained by calling
+     *    [ListLocations][google.cloud.location.Locations.ListLocations].
+     *    For more information, see https://cloud.google.com/about/locations/.
+     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+     *   hyphens (-). The maximum length is 100 characters.
+     * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+     *   hyphens (-), or underscores (_). The maximum length is 500 characters.
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+     * The task name.
+     * The task name must have the following format:
+     * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+     * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+     *    hyphens (-), colons (:), or periods (.).
+     *    For more information, see
+     *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+     * * `LOCATION_ID` is the canonical ID for the task's location.
+     *    The list of available locations can be obtained by calling
+     *    [ListLocations][google.cloud.location.Locations.ListLocations].
+     *    For more information, see https://cloud.google.com/about/locations/.
+     * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+     *   hyphens (-). The maximum length is 100 characters.
+     * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+     *   hyphens (-), or underscores (_). The maximum length is 500 characters.
+     * 
+ * + * string name = 1; + */ + 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.tasks.v2beta2.AppEngineHttpRequest, com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.Builder, com.google.cloud.tasks.v2beta2.AppEngineHttpRequestOrBuilder> appEngineHttpRequestBuilder_; + /** + *
+     * App Engine HTTP request that is sent to the task's target. Can
+     * be set only if
+     * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+     * on the queue.
+     * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + public boolean hasAppEngineHttpRequest() { + return payloadTypeCase_ == 3; + } + /** + *
+     * App Engine HTTP request that is sent to the task's target. Can
+     * be set only if
+     * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+     * on the queue.
+     * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + public com.google.cloud.tasks.v2beta2.AppEngineHttpRequest getAppEngineHttpRequest() { + if (appEngineHttpRequestBuilder_ == null) { + if (payloadTypeCase_ == 3) { + return (com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.getDefaultInstance(); + } else { + if (payloadTypeCase_ == 3) { + return appEngineHttpRequestBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.getDefaultInstance(); + } + } + /** + *
+     * App Engine HTTP request that is sent to the task's target. Can
+     * be set only if
+     * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+     * on the queue.
+     * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + public Builder setAppEngineHttpRequest(com.google.cloud.tasks.v2beta2.AppEngineHttpRequest value) { + if (appEngineHttpRequestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payloadType_ = value; + onChanged(); + } else { + appEngineHttpRequestBuilder_.setMessage(value); + } + payloadTypeCase_ = 3; + return this; + } + /** + *
+     * App Engine HTTP request that is sent to the task's target. Can
+     * be set only if
+     * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+     * on the queue.
+     * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + public Builder setAppEngineHttpRequest( + com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.Builder builderForValue) { + if (appEngineHttpRequestBuilder_ == null) { + payloadType_ = builderForValue.build(); + onChanged(); + } else { + appEngineHttpRequestBuilder_.setMessage(builderForValue.build()); + } + payloadTypeCase_ = 3; + return this; + } + /** + *
+     * App Engine HTTP request that is sent to the task's target. Can
+     * be set only if
+     * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+     * on the queue.
+     * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + public Builder mergeAppEngineHttpRequest(com.google.cloud.tasks.v2beta2.AppEngineHttpRequest value) { + if (appEngineHttpRequestBuilder_ == null) { + if (payloadTypeCase_ == 3 && + payloadType_ != com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.getDefaultInstance()) { + payloadType_ = com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.newBuilder((com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) payloadType_) + .mergeFrom(value).buildPartial(); + } else { + payloadType_ = value; + } + onChanged(); + } else { + if (payloadTypeCase_ == 3) { + appEngineHttpRequestBuilder_.mergeFrom(value); + } + appEngineHttpRequestBuilder_.setMessage(value); + } + payloadTypeCase_ = 3; + return this; + } + /** + *
+     * App Engine HTTP request that is sent to the task's target. Can
+     * be set only if
+     * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+     * on the queue.
+     * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + public Builder clearAppEngineHttpRequest() { + if (appEngineHttpRequestBuilder_ == null) { + if (payloadTypeCase_ == 3) { + payloadTypeCase_ = 0; + payloadType_ = null; + onChanged(); + } + } else { + if (payloadTypeCase_ == 3) { + payloadTypeCase_ = 0; + payloadType_ = null; + } + appEngineHttpRequestBuilder_.clear(); + } + return this; + } + /** + *
+     * App Engine HTTP request that is sent to the task's target. Can
+     * be set only if
+     * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+     * on the queue.
+     * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + public com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.Builder getAppEngineHttpRequestBuilder() { + return getAppEngineHttpRequestFieldBuilder().getBuilder(); + } + /** + *
+     * App Engine HTTP request that is sent to the task's target. Can
+     * be set only if
+     * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+     * on the queue.
+     * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + public com.google.cloud.tasks.v2beta2.AppEngineHttpRequestOrBuilder getAppEngineHttpRequestOrBuilder() { + if ((payloadTypeCase_ == 3) && (appEngineHttpRequestBuilder_ != null)) { + return appEngineHttpRequestBuilder_.getMessageOrBuilder(); + } else { + if (payloadTypeCase_ == 3) { + return (com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) payloadType_; + } + return com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.getDefaultInstance(); + } + } + /** + *
+     * App Engine HTTP request that is sent to the task's target. Can
+     * be set only if
+     * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+     * on the queue.
+     * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AppEngineHttpRequest, com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.Builder, com.google.cloud.tasks.v2beta2.AppEngineHttpRequestOrBuilder> + getAppEngineHttpRequestFieldBuilder() { + if (appEngineHttpRequestBuilder_ == null) { + if (!(payloadTypeCase_ == 3)) { + payloadType_ = com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.getDefaultInstance(); + } + appEngineHttpRequestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AppEngineHttpRequest, com.google.cloud.tasks.v2beta2.AppEngineHttpRequest.Builder, com.google.cloud.tasks.v2beta2.AppEngineHttpRequestOrBuilder>( + (com.google.cloud.tasks.v2beta2.AppEngineHttpRequest) payloadType_, + getParentForChildren(), + isClean()); + payloadType_ = null; + } + payloadTypeCase_ = 3; + onChanged();; + return appEngineHttpRequestBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.PullMessage, com.google.cloud.tasks.v2beta2.PullMessage.Builder, com.google.cloud.tasks.v2beta2.PullMessageOrBuilder> pullMessageBuilder_; + /** + *
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+     * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+     * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + public boolean hasPullMessage() { + return payloadTypeCase_ == 4; + } + /** + *
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+     * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+     * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + public com.google.cloud.tasks.v2beta2.PullMessage getPullMessage() { + if (pullMessageBuilder_ == null) { + if (payloadTypeCase_ == 4) { + return (com.google.cloud.tasks.v2beta2.PullMessage) payloadType_; + } + return com.google.cloud.tasks.v2beta2.PullMessage.getDefaultInstance(); + } else { + if (payloadTypeCase_ == 4) { + return pullMessageBuilder_.getMessage(); + } + return com.google.cloud.tasks.v2beta2.PullMessage.getDefaultInstance(); + } + } + /** + *
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+     * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+     * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + public Builder setPullMessage(com.google.cloud.tasks.v2beta2.PullMessage value) { + if (pullMessageBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payloadType_ = value; + onChanged(); + } else { + pullMessageBuilder_.setMessage(value); + } + payloadTypeCase_ = 4; + return this; + } + /** + *
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+     * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+     * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + public Builder setPullMessage( + com.google.cloud.tasks.v2beta2.PullMessage.Builder builderForValue) { + if (pullMessageBuilder_ == null) { + payloadType_ = builderForValue.build(); + onChanged(); + } else { + pullMessageBuilder_.setMessage(builderForValue.build()); + } + payloadTypeCase_ = 4; + return this; + } + /** + *
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+     * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+     * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + public Builder mergePullMessage(com.google.cloud.tasks.v2beta2.PullMessage value) { + if (pullMessageBuilder_ == null) { + if (payloadTypeCase_ == 4 && + payloadType_ != com.google.cloud.tasks.v2beta2.PullMessage.getDefaultInstance()) { + payloadType_ = com.google.cloud.tasks.v2beta2.PullMessage.newBuilder((com.google.cloud.tasks.v2beta2.PullMessage) payloadType_) + .mergeFrom(value).buildPartial(); + } else { + payloadType_ = value; + } + onChanged(); + } else { + if (payloadTypeCase_ == 4) { + pullMessageBuilder_.mergeFrom(value); + } + pullMessageBuilder_.setMessage(value); + } + payloadTypeCase_ = 4; + return this; + } + /** + *
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+     * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+     * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + public Builder clearPullMessage() { + if (pullMessageBuilder_ == null) { + if (payloadTypeCase_ == 4) { + payloadTypeCase_ = 0; + payloadType_ = null; + onChanged(); + } + } else { + if (payloadTypeCase_ == 4) { + payloadTypeCase_ = 0; + payloadType_ = null; + } + pullMessageBuilder_.clear(); + } + return this; + } + /** + *
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+     * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+     * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + public com.google.cloud.tasks.v2beta2.PullMessage.Builder getPullMessageBuilder() { + return getPullMessageFieldBuilder().getBuilder(); + } + /** + *
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+     * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+     * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + public com.google.cloud.tasks.v2beta2.PullMessageOrBuilder getPullMessageOrBuilder() { + if ((payloadTypeCase_ == 4) && (pullMessageBuilder_ != null)) { + return pullMessageBuilder_.getMessageOrBuilder(); + } else { + if (payloadTypeCase_ == 4) { + return (com.google.cloud.tasks.v2beta2.PullMessage) payloadType_; + } + return com.google.cloud.tasks.v2beta2.PullMessage.getDefaultInstance(); + } + } + /** + *
+     * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+     * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+     * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+     * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.PullMessage, com.google.cloud.tasks.v2beta2.PullMessage.Builder, com.google.cloud.tasks.v2beta2.PullMessageOrBuilder> + getPullMessageFieldBuilder() { + if (pullMessageBuilder_ == null) { + if (!(payloadTypeCase_ == 4)) { + payloadType_ = com.google.cloud.tasks.v2beta2.PullMessage.getDefaultInstance(); + } + pullMessageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.PullMessage, com.google.cloud.tasks.v2beta2.PullMessage.Builder, com.google.cloud.tasks.v2beta2.PullMessageOrBuilder>( + (com.google.cloud.tasks.v2beta2.PullMessage) payloadType_, + getParentForChildren(), + isClean()); + payloadType_ = null; + } + payloadTypeCase_ = 4; + onChanged();; + return pullMessageBuilder_; + } + + private com.google.protobuf.Timestamp scheduleTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> scheduleTimeBuilder_; + /** + *
+     * The time when the task is scheduled to be attempted.
+     * For App Engine queues, this is when the task will be attempted or retried.
+     * For pull queues, this is the time when the task is available to
+     * be leased; if a task is currently leased, this is the time when
+     * the current lease expires, that is, the time that the task was
+     * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + public boolean hasScheduleTime() { + return scheduleTimeBuilder_ != null || scheduleTime_ != null; + } + /** + *
+     * The time when the task is scheduled to be attempted.
+     * For App Engine queues, this is when the task will be attempted or retried.
+     * For pull queues, this is the time when the task is available to
+     * be leased; if a task is currently leased, this is the time when
+     * the current lease expires, that is, the time that the task was
+     * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + public com.google.protobuf.Timestamp getScheduleTime() { + if (scheduleTimeBuilder_ == null) { + return scheduleTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } else { + return scheduleTimeBuilder_.getMessage(); + } + } + /** + *
+     * The time when the task is scheduled to be attempted.
+     * For App Engine queues, this is when the task will be attempted or retried.
+     * For pull queues, this is the time when the task is available to
+     * be leased; if a task is currently leased, this is the time when
+     * the current lease expires, that is, the time that the task was
+     * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + public Builder setScheduleTime(com.google.protobuf.Timestamp value) { + if (scheduleTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + scheduleTime_ = value; + onChanged(); + } else { + scheduleTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * The time when the task is scheduled to be attempted.
+     * For App Engine queues, this is when the task will be attempted or retried.
+     * For pull queues, this is the time when the task is available to
+     * be leased; if a task is currently leased, this is the time when
+     * the current lease expires, that is, the time that the task was
+     * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + public Builder setScheduleTime( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = builderForValue.build(); + onChanged(); + } else { + scheduleTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * The time when the task is scheduled to be attempted.
+     * For App Engine queues, this is when the task will be attempted or retried.
+     * For pull queues, this is the time when the task is available to
+     * be leased; if a task is currently leased, this is the time when
+     * the current lease expires, that is, the time that the task was
+     * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + public Builder mergeScheduleTime(com.google.protobuf.Timestamp value) { + if (scheduleTimeBuilder_ == null) { + if (scheduleTime_ != null) { + scheduleTime_ = + com.google.protobuf.Timestamp.newBuilder(scheduleTime_).mergeFrom(value).buildPartial(); + } else { + scheduleTime_ = value; + } + onChanged(); + } else { + scheduleTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * The time when the task is scheduled to be attempted.
+     * For App Engine queues, this is when the task will be attempted or retried.
+     * For pull queues, this is the time when the task is available to
+     * be leased; if a task is currently leased, this is the time when
+     * the current lease expires, that is, the time that the task was
+     * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + public Builder clearScheduleTime() { + if (scheduleTimeBuilder_ == null) { + scheduleTime_ = null; + onChanged(); + } else { + scheduleTime_ = null; + scheduleTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * The time when the task is scheduled to be attempted.
+     * For App Engine queues, this is when the task will be attempted or retried.
+     * For pull queues, this is the time when the task is available to
+     * be leased; if a task is currently leased, this is the time when
+     * the current lease expires, that is, the time that the task was
+     * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + public com.google.protobuf.Timestamp.Builder getScheduleTimeBuilder() { + + onChanged(); + return getScheduleTimeFieldBuilder().getBuilder(); + } + /** + *
+     * The time when the task is scheduled to be attempted.
+     * For App Engine queues, this is when the task will be attempted or retried.
+     * For pull queues, this is the time when the task is available to
+     * be leased; if a task is currently leased, this is the time when
+     * the current lease expires, that is, the time that the task was
+     * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + public com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder() { + if (scheduleTimeBuilder_ != null) { + return scheduleTimeBuilder_.getMessageOrBuilder(); + } else { + return scheduleTime_ == null ? + com.google.protobuf.Timestamp.getDefaultInstance() : scheduleTime_; + } + } + /** + *
+     * The time when the task is scheduled to be attempted.
+     * For App Engine queues, this is when the task will be attempted or retried.
+     * For pull queues, this is the time when the task is available to
+     * be leased; if a task is currently leased, this is the time when
+     * the current lease expires, that is, the time that the task was
+     * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+     * `schedule_time` will be truncated to the nearest microsecond.
+     * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> + getScheduleTimeFieldBuilder() { + if (scheduleTimeBuilder_ == null) { + scheduleTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( + getScheduleTime(), + getParentForChildren(), + isClean()); + scheduleTime_ = null; + } + return scheduleTimeBuilder_; + } + + private com.google.protobuf.Timestamp createTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; + /** + *
+     * Output only. The time that the task was created.
+     * `create_time` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + *
+     * Output only. The time that the task was created.
+     * `create_time` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + 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 that the task was created.
+     * `create_time` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + 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 that the task was created.
+     * `create_time` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + 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 that the task was created.
+     * `create_time` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + 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 that the task was created.
+     * `create_time` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The time that the task was created.
+     * `create_time` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The time that the task was created.
+     * `create_time` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + 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 that the task was created.
+     * `create_time` will be truncated to the nearest second.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + 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.tasks.v2beta2.TaskStatus status_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.TaskStatus, com.google.cloud.tasks.v2beta2.TaskStatus.Builder, com.google.cloud.tasks.v2beta2.TaskStatusOrBuilder> statusBuilder_; + /** + *
+     * Output only. The task status.
+     * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + public boolean hasStatus() { + return statusBuilder_ != null || status_ != null; + } + /** + *
+     * Output only. The task status.
+     * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + public com.google.cloud.tasks.v2beta2.TaskStatus getStatus() { + if (statusBuilder_ == null) { + return status_ == null ? com.google.cloud.tasks.v2beta2.TaskStatus.getDefaultInstance() : status_; + } else { + return statusBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The task status.
+     * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + public Builder setStatus(com.google.cloud.tasks.v2beta2.TaskStatus value) { + if (statusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + status_ = value; + onChanged(); + } else { + statusBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The task status.
+     * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + public Builder setStatus( + com.google.cloud.tasks.v2beta2.TaskStatus.Builder builderForValue) { + if (statusBuilder_ == null) { + status_ = builderForValue.build(); + onChanged(); + } else { + statusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The task status.
+     * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + public Builder mergeStatus(com.google.cloud.tasks.v2beta2.TaskStatus value) { + if (statusBuilder_ == null) { + if (status_ != null) { + status_ = + com.google.cloud.tasks.v2beta2.TaskStatus.newBuilder(status_).mergeFrom(value).buildPartial(); + } else { + status_ = value; + } + onChanged(); + } else { + statusBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The task status.
+     * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + public Builder clearStatus() { + if (statusBuilder_ == null) { + status_ = null; + onChanged(); + } else { + status_ = null; + statusBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The task status.
+     * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + public com.google.cloud.tasks.v2beta2.TaskStatus.Builder getStatusBuilder() { + + onChanged(); + return getStatusFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The task status.
+     * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + public com.google.cloud.tasks.v2beta2.TaskStatusOrBuilder getStatusOrBuilder() { + if (statusBuilder_ != null) { + return statusBuilder_.getMessageOrBuilder(); + } else { + return status_ == null ? + com.google.cloud.tasks.v2beta2.TaskStatus.getDefaultInstance() : status_; + } + } + /** + *
+     * Output only. The task status.
+     * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.TaskStatus, com.google.cloud.tasks.v2beta2.TaskStatus.Builder, com.google.cloud.tasks.v2beta2.TaskStatusOrBuilder> + getStatusFieldBuilder() { + if (statusBuilder_ == null) { + statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.TaskStatus, com.google.cloud.tasks.v2beta2.TaskStatus.Builder, com.google.cloud.tasks.v2beta2.TaskStatusOrBuilder>( + getStatus(), + getParentForChildren(), + isClean()); + status_ = null; + } + return statusBuilder_; + } + + private int view_ = 0; + /** + *
+     * Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has
+     * been returned.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View view = 8; + */ + public int getViewValue() { + return view_; + } + /** + *
+     * Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has
+     * been returned.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View view = 8; + */ + public Builder setViewValue(int value) { + view_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has
+     * been returned.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View view = 8; + */ + public com.google.cloud.tasks.v2beta2.Task.View getView() { + com.google.cloud.tasks.v2beta2.Task.View result = com.google.cloud.tasks.v2beta2.Task.View.valueOf(view_); + return result == null ? com.google.cloud.tasks.v2beta2.Task.View.UNRECOGNIZED : result; + } + /** + *
+     * Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has
+     * been returned.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View view = 8; + */ + public Builder setView(com.google.cloud.tasks.v2beta2.Task.View value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + *
+     * Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has
+     * been returned.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Task.View view = 8; + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.Task) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.Task) + private static final com.google.cloud.tasks.v2beta2.Task DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.Task(); + } + + public static com.google.cloud.tasks.v2beta2.Task getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public Task parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Task(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.Task getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskName.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskName.java new file mode 100644 index 000000000000..45699415e5cf --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskName.java @@ -0,0 +1,235 @@ +/* + * Copyright 2018 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. + */ + +package com.google.cloud.tasks.v2beta2; + +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import java.util.Map; +import java.util.ArrayList; +import java.util.List; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +@javax.annotation.Generated("by GAPIC protoc plugin") +public class TaskName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding("projects/{project}/locations/{location}/queues/{queue}/tasks/{task}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String queue; + private final String task; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getQueue() { + return queue; + } + + public String getTask() { + return task; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private TaskName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + queue = Preconditions.checkNotNull(builder.getQueue()); + task = Preconditions.checkNotNull(builder.getTask()); + } + + public static TaskName of(String project, String location, String queue, String task) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setQueue(queue) + .setTask(task) + .build(); + } + + public static String format(String project, String location, String queue, String task) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setQueue(queue) + .setTask(task) + .build() + .toString(); + } + + public static TaskName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch(formattedString, "TaskName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("location"), matchMap.get("queue"), matchMap.get("task")); + } + + 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 (TaskName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("queue", queue); + fieldMapBuilder.put("task", task); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate("project", project, "location", location, "queue", queue, "task", task); + } + + /** Builder for TaskName. */ + public static class Builder { + + private String project; + private String location; + private String queue; + private String task; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getQueue() { + return queue; + } + + public String getTask() { + return task; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setQueue(String queue) { + this.queue = queue; + return this; + } + + public Builder setTask(String task) { + this.task = task; + return this; + } + + private Builder() { + } + + private Builder(TaskName taskName) { + project = taskName.project; + location = taskName.location; + queue = taskName.queue; + task = taskName.task; + } + + public TaskName build() { + return new TaskName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof TaskName) { + TaskName that = (TaskName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.queue.equals(that.queue)) + && (this.task.equals(that.task)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= queue.hashCode(); + h *= 1000003; + h ^= task.hashCode(); + return h; + } +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskOrBuilder.java new file mode 100644 index 000000000000..d69894617fbe --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskOrBuilder.java @@ -0,0 +1,242 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/task.proto + +package com.google.cloud.tasks.v2beta2; + +public interface TaskOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.Task) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+   * The task name.
+   * The task name must have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+   *    hyphens (-), colons (:), or periods (.).
+   *    For more information, see
+   *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+   * * `LOCATION_ID` is the canonical ID for the task's location.
+   *    The list of available locations can be obtained by calling
+   *    [ListLocations][google.cloud.location.Locations.ListLocations].
+   *    For more information, see https://cloud.google.com/about/locations/.
+   * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+   *   hyphens (-). The maximum length is 100 characters.
+   * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+   *   hyphens (-), or underscores (_). The maximum length is 500 characters.
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
+   * The task name.
+   * The task name must have the following format:
+   * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
+   * * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
+   *    hyphens (-), colons (:), or periods (.).
+   *    For more information, see
+   *    [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects)
+   * * `LOCATION_ID` is the canonical ID for the task's location.
+   *    The list of available locations can be obtained by calling
+   *    [ListLocations][google.cloud.location.Locations.ListLocations].
+   *    For more information, see https://cloud.google.com/about/locations/.
+   * * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
+   *   hyphens (-). The maximum length is 100 characters.
+   * * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
+   *   hyphens (-), or underscores (_). The maximum length is 500 characters.
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+   * App Engine HTTP request that is sent to the task's target. Can
+   * be set only if
+   * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+   * on the queue.
+   * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + boolean hasAppEngineHttpRequest(); + /** + *
+   * App Engine HTTP request that is sent to the task's target. Can
+   * be set only if
+   * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+   * on the queue.
+   * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + com.google.cloud.tasks.v2beta2.AppEngineHttpRequest getAppEngineHttpRequest(); + /** + *
+   * App Engine HTTP request that is sent to the task's target. Can
+   * be set only if
+   * [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set
+   * on the queue.
+   * An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.AppEngineHttpRequest app_engine_http_request = 3; + */ + com.google.cloud.tasks.v2beta2.AppEngineHttpRequestOrBuilder getAppEngineHttpRequestOrBuilder(); + + /** + *
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+   * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+   * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + boolean hasPullMessage(); + /** + *
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+   * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+   * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + com.google.cloud.tasks.v2beta2.PullMessage getPullMessage(); + /** + *
+   * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be
+   * set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue.
+   * A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set.
+   * 
+ * + * .google.cloud.tasks.v2beta2.PullMessage pull_message = 4; + */ + com.google.cloud.tasks.v2beta2.PullMessageOrBuilder getPullMessageOrBuilder(); + + /** + *
+   * The time when the task is scheduled to be attempted.
+   * For App Engine queues, this is when the task will be attempted or retried.
+   * For pull queues, this is the time when the task is available to
+   * be leased; if a task is currently leased, this is the time when
+   * the current lease expires, that is, the time that the task was
+   * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + boolean hasScheduleTime(); + /** + *
+   * The time when the task is scheduled to be attempted.
+   * For App Engine queues, this is when the task will be attempted or retried.
+   * For pull queues, this is the time when the task is available to
+   * be leased; if a task is currently leased, this is the time when
+   * the current lease expires, that is, the time that the task was
+   * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + com.google.protobuf.Timestamp getScheduleTime(); + /** + *
+   * The time when the task is scheduled to be attempted.
+   * For App Engine queues, this is when the task will be attempted or retried.
+   * For pull queues, this is the time when the task is available to
+   * be leased; if a task is currently leased, this is the time when
+   * the current lease expires, that is, the time that the task was
+   * leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
+   * `schedule_time` will be truncated to the nearest microsecond.
+   * 
+ * + * .google.protobuf.Timestamp schedule_time = 5; + */ + com.google.protobuf.TimestampOrBuilder getScheduleTimeOrBuilder(); + + /** + *
+   * Output only. The time that the task was created.
+   * `create_time` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + boolean hasCreateTime(); + /** + *
+   * Output only. The time that the task was created.
+   * `create_time` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + *
+   * Output only. The time that the task was created.
+   * `create_time` will be truncated to the nearest second.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 6; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + *
+   * Output only. The task status.
+   * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + boolean hasStatus(); + /** + *
+   * Output only. The task status.
+   * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + com.google.cloud.tasks.v2beta2.TaskStatus getStatus(); + /** + *
+   * Output only. The task status.
+   * 
+ * + * .google.cloud.tasks.v2beta2.TaskStatus status = 7; + */ + com.google.cloud.tasks.v2beta2.TaskStatusOrBuilder getStatusOrBuilder(); + + /** + *
+   * Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has
+   * been returned.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View view = 8; + */ + int getViewValue(); + /** + *
+   * Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has
+   * been returned.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Task.View view = 8; + */ + com.google.cloud.tasks.v2beta2.Task.View getView(); + + public com.google.cloud.tasks.v2beta2.Task.PayloadTypeCase getPayloadTypeCase(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskProto.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskProto.java new file mode 100644 index 000000000000..856f5efe5178 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskProto.java @@ -0,0 +1,114 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/task.proto + +package com.google.cloud.tasks.v2beta2; + +public final class TaskProto { + private TaskProto() {} + 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_tasks_v2beta2_Task_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_Task_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_TaskStatus_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_TaskStatus_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_tasks_v2beta2_AttemptStatus_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_tasks_v2beta2_AttemptStatus_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/tasks/v2beta2/task.proto\022" + + "\032google.cloud.tasks.v2beta2\032\034google/api/" + + "annotations.proto\032\'google/cloud/tasks/v2" + + "beta2/target.proto\032\037google/protobuf/time" + + "stamp.proto\032\027google/rpc/status.proto\"\276\003\n" + + "\004Task\022\014\n\004name\030\001 \001(\t\022S\n\027app_engine_http_r" + + "equest\030\003 \001(\01320.google.cloud.tasks.v2beta" + + "2.AppEngineHttpRequestH\000\022?\n\014pull_message" + + "\030\004 \001(\0132\'.google.cloud.tasks.v2beta2.Pull" + + "MessageH\000\0221\n\rschedule_time\030\005 \001(\0132\032.googl" + + "e.protobuf.Timestamp\022/\n\013create_time\030\006 \001(" + + "\0132\032.google.protobuf.Timestamp\0226\n\006status\030" + + "\007 \001(\0132&.google.cloud.tasks.v2beta2.TaskS" + + "tatus\0223\n\004view\030\010 \001(\0162%.google.cloud.tasks" + + ".v2beta2.Task.View\"1\n\004View\022\024\n\020VIEW_UNSPE" + + "CIFIED\020\000\022\t\n\005BASIC\020\001\022\010\n\004FULL\020\002B\016\n\014payload" + + "_type\"\335\001\n\nTaskStatus\022\036\n\026attempt_dispatch" + + "_count\030\001 \001(\005\022\036\n\026attempt_response_count\030\002" + + " \001(\005\022G\n\024first_attempt_status\030\003 \001(\0132).goo" + + "gle.cloud.tasks.v2beta2.AttemptStatus\022F\n" + + "\023last_attempt_status\030\004 \001(\0132).google.clou" + + "d.tasks.v2beta2.AttemptStatus\"\325\001\n\rAttemp" + + "tStatus\0221\n\rschedule_time\030\001 \001(\0132\032.google." + + "protobuf.Timestamp\0221\n\rdispatch_time\030\002 \001(" + + "\0132\032.google.protobuf.Timestamp\0221\n\rrespons" + + "e_time\030\003 \001(\0132\032.google.protobuf.Timestamp" + + "\022+\n\017response_status\030\004 \001(\0132\022.google.rpc.S" + + "tatusBn\n\036com.google.cloud.tasks.v2beta2B" + + "\tTaskProtoP\001Z?google.golang.org/genproto" + + "/googleapis/cloud/tasks/v2beta2;tasksb\006p" + + "roto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.cloud.tasks.v2beta2.TargetProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }, assigner); + internal_static_google_cloud_tasks_v2beta2_Task_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_tasks_v2beta2_Task_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_Task_descriptor, + new java.lang.String[] { "Name", "AppEngineHttpRequest", "PullMessage", "ScheduleTime", "CreateTime", "Status", "View", "PayloadType", }); + internal_static_google_cloud_tasks_v2beta2_TaskStatus_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_tasks_v2beta2_TaskStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_TaskStatus_descriptor, + new java.lang.String[] { "AttemptDispatchCount", "AttemptResponseCount", "FirstAttemptStatus", "LastAttemptStatus", }); + internal_static_google_cloud_tasks_v2beta2_AttemptStatus_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_tasks_v2beta2_AttemptStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_tasks_v2beta2_AttemptStatus_descriptor, + new java.lang.String[] { "ScheduleTime", "DispatchTime", "ResponseTime", "ResponseStatus", }); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.cloud.tasks.v2beta2.TargetProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskStatus.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskStatus.java new file mode 100644 index 000000000000..de651d7575b6 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskStatus.java @@ -0,0 +1,1091 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/task.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Status of the task.
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.TaskStatus} + */ +public final class TaskStatus extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.TaskStatus) + TaskStatusOrBuilder { +private static final long serialVersionUID = 0L; + // Use TaskStatus.newBuilder() to construct. + private TaskStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TaskStatus() { + attemptDispatchCount_ = 0; + attemptResponseCount_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private TaskStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + attemptDispatchCount_ = input.readInt32(); + break; + } + case 16: { + + attemptResponseCount_ = input.readInt32(); + break; + } + case 26: { + com.google.cloud.tasks.v2beta2.AttemptStatus.Builder subBuilder = null; + if (firstAttemptStatus_ != null) { + subBuilder = firstAttemptStatus_.toBuilder(); + } + firstAttemptStatus_ = input.readMessage(com.google.cloud.tasks.v2beta2.AttemptStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(firstAttemptStatus_); + firstAttemptStatus_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + com.google.cloud.tasks.v2beta2.AttemptStatus.Builder subBuilder = null; + if (lastAttemptStatus_ != null) { + subBuilder = lastAttemptStatus_.toBuilder(); + } + lastAttemptStatus_ = input.readMessage(com.google.cloud.tasks.v2beta2.AttemptStatus.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lastAttemptStatus_); + lastAttemptStatus_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_TaskStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_TaskStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.TaskStatus.class, com.google.cloud.tasks.v2beta2.TaskStatus.Builder.class); + } + + public static final int ATTEMPT_DISPATCH_COUNT_FIELD_NUMBER = 1; + private int attemptDispatchCount_; + /** + *
+   * Output only. The number of attempts dispatched.
+   * This count includes tasks which have been dispatched but haven't
+   * received a response.
+   * 
+ * + * int32 attempt_dispatch_count = 1; + */ + public int getAttemptDispatchCount() { + return attemptDispatchCount_; + } + + public static final int ATTEMPT_RESPONSE_COUNT_FIELD_NUMBER = 2; + private int attemptResponseCount_; + /** + *
+   * Output only. The number of attempts which have received a response.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * int32 attempt_response_count = 2; + */ + public int getAttemptResponseCount() { + return attemptResponseCount_; + } + + public static final int FIRST_ATTEMPT_STATUS_FIELD_NUMBER = 3; + private com.google.cloud.tasks.v2beta2.AttemptStatus firstAttemptStatus_; + /** + *
+   * Output only. The status of the task's first attempt.
+   * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+   * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + public boolean hasFirstAttemptStatus() { + return firstAttemptStatus_ != null; + } + /** + *
+   * Output only. The status of the task's first attempt.
+   * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+   * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + public com.google.cloud.tasks.v2beta2.AttemptStatus getFirstAttemptStatus() { + return firstAttemptStatus_ == null ? com.google.cloud.tasks.v2beta2.AttemptStatus.getDefaultInstance() : firstAttemptStatus_; + } + /** + *
+   * Output only. The status of the task's first attempt.
+   * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+   * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + public com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder getFirstAttemptStatusOrBuilder() { + return getFirstAttemptStatus(); + } + + public static final int LAST_ATTEMPT_STATUS_FIELD_NUMBER = 4; + private com.google.cloud.tasks.v2beta2.AttemptStatus lastAttemptStatus_; + /** + *
+   * Output only. The status of the task's last attempt.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + public boolean hasLastAttemptStatus() { + return lastAttemptStatus_ != null; + } + /** + *
+   * Output only. The status of the task's last attempt.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + public com.google.cloud.tasks.v2beta2.AttemptStatus getLastAttemptStatus() { + return lastAttemptStatus_ == null ? com.google.cloud.tasks.v2beta2.AttemptStatus.getDefaultInstance() : lastAttemptStatus_; + } + /** + *
+   * Output only. The status of the task's last attempt.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + public com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder getLastAttemptStatusOrBuilder() { + return getLastAttemptStatus(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (attemptDispatchCount_ != 0) { + output.writeInt32(1, attemptDispatchCount_); + } + if (attemptResponseCount_ != 0) { + output.writeInt32(2, attemptResponseCount_); + } + if (firstAttemptStatus_ != null) { + output.writeMessage(3, getFirstAttemptStatus()); + } + if (lastAttemptStatus_ != null) { + output.writeMessage(4, getLastAttemptStatus()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (attemptDispatchCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, attemptDispatchCount_); + } + if (attemptResponseCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, attemptResponseCount_); + } + if (firstAttemptStatus_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getFirstAttemptStatus()); + } + if (lastAttemptStatus_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getLastAttemptStatus()); + } + size += unknownFields.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.tasks.v2beta2.TaskStatus)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.TaskStatus other = (com.google.cloud.tasks.v2beta2.TaskStatus) obj; + + boolean result = true; + result = result && (getAttemptDispatchCount() + == other.getAttemptDispatchCount()); + result = result && (getAttemptResponseCount() + == other.getAttemptResponseCount()); + result = result && (hasFirstAttemptStatus() == other.hasFirstAttemptStatus()); + if (hasFirstAttemptStatus()) { + result = result && getFirstAttemptStatus() + .equals(other.getFirstAttemptStatus()); + } + result = result && (hasLastAttemptStatus() == other.hasLastAttemptStatus()); + if (hasLastAttemptStatus()) { + result = result && getLastAttemptStatus() + .equals(other.getLastAttemptStatus()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ATTEMPT_DISPATCH_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getAttemptDispatchCount(); + hash = (37 * hash) + ATTEMPT_RESPONSE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getAttemptResponseCount(); + if (hasFirstAttemptStatus()) { + hash = (37 * hash) + FIRST_ATTEMPT_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getFirstAttemptStatus().hashCode(); + } + if (hasLastAttemptStatus()) { + hash = (37 * hash) + LAST_ATTEMPT_STATUS_FIELD_NUMBER; + hash = (53 * hash) + getLastAttemptStatus().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.TaskStatus parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.TaskStatus 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.tasks.v2beta2.TaskStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.TaskStatus 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.tasks.v2beta2.TaskStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.TaskStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.TaskStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.TaskStatus 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.tasks.v2beta2.TaskStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.TaskStatus 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.tasks.v2beta2.TaskStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.TaskStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.TaskStatus prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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; + } + /** + *
+   * Status of the task.
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.TaskStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.TaskStatus) + com.google.cloud.tasks.v2beta2.TaskStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_TaskStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_TaskStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.TaskStatus.class, com.google.cloud.tasks.v2beta2.TaskStatus.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.TaskStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + attemptDispatchCount_ = 0; + + attemptResponseCount_ = 0; + + if (firstAttemptStatusBuilder_ == null) { + firstAttemptStatus_ = null; + } else { + firstAttemptStatus_ = null; + firstAttemptStatusBuilder_ = null; + } + if (lastAttemptStatusBuilder_ == null) { + lastAttemptStatus_ = null; + } else { + lastAttemptStatus_ = null; + lastAttemptStatusBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.TaskProto.internal_static_google_cloud_tasks_v2beta2_TaskStatus_descriptor; + } + + public com.google.cloud.tasks.v2beta2.TaskStatus getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.TaskStatus.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.TaskStatus build() { + com.google.cloud.tasks.v2beta2.TaskStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.TaskStatus buildPartial() { + com.google.cloud.tasks.v2beta2.TaskStatus result = new com.google.cloud.tasks.v2beta2.TaskStatus(this); + result.attemptDispatchCount_ = attemptDispatchCount_; + result.attemptResponseCount_ = attemptResponseCount_; + if (firstAttemptStatusBuilder_ == null) { + result.firstAttemptStatus_ = firstAttemptStatus_; + } else { + result.firstAttemptStatus_ = firstAttemptStatusBuilder_.build(); + } + if (lastAttemptStatusBuilder_ == null) { + result.lastAttemptStatus_ = lastAttemptStatus_; + } else { + result.lastAttemptStatus_ = lastAttemptStatusBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.TaskStatus) { + return mergeFrom((com.google.cloud.tasks.v2beta2.TaskStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.TaskStatus other) { + if (other == com.google.cloud.tasks.v2beta2.TaskStatus.getDefaultInstance()) return this; + if (other.getAttemptDispatchCount() != 0) { + setAttemptDispatchCount(other.getAttemptDispatchCount()); + } + if (other.getAttemptResponseCount() != 0) { + setAttemptResponseCount(other.getAttemptResponseCount()); + } + if (other.hasFirstAttemptStatus()) { + mergeFirstAttemptStatus(other.getFirstAttemptStatus()); + } + if (other.hasLastAttemptStatus()) { + mergeLastAttemptStatus(other.getLastAttemptStatus()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.TaskStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.TaskStatus) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int attemptDispatchCount_ ; + /** + *
+     * Output only. The number of attempts dispatched.
+     * This count includes tasks which have been dispatched but haven't
+     * received a response.
+     * 
+ * + * int32 attempt_dispatch_count = 1; + */ + public int getAttemptDispatchCount() { + return attemptDispatchCount_; + } + /** + *
+     * Output only. The number of attempts dispatched.
+     * This count includes tasks which have been dispatched but haven't
+     * received a response.
+     * 
+ * + * int32 attempt_dispatch_count = 1; + */ + public Builder setAttemptDispatchCount(int value) { + + attemptDispatchCount_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The number of attempts dispatched.
+     * This count includes tasks which have been dispatched but haven't
+     * received a response.
+     * 
+ * + * int32 attempt_dispatch_count = 1; + */ + public Builder clearAttemptDispatchCount() { + + attemptDispatchCount_ = 0; + onChanged(); + return this; + } + + private int attemptResponseCount_ ; + /** + *
+     * Output only. The number of attempts which have received a response.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * int32 attempt_response_count = 2; + */ + public int getAttemptResponseCount() { + return attemptResponseCount_; + } + /** + *
+     * Output only. The number of attempts which have received a response.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * int32 attempt_response_count = 2; + */ + public Builder setAttemptResponseCount(int value) { + + attemptResponseCount_ = value; + onChanged(); + return this; + } + /** + *
+     * Output only. The number of attempts which have received a response.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * int32 attempt_response_count = 2; + */ + public Builder clearAttemptResponseCount() { + + attemptResponseCount_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.tasks.v2beta2.AttemptStatus firstAttemptStatus_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AttemptStatus, com.google.cloud.tasks.v2beta2.AttemptStatus.Builder, com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder> firstAttemptStatusBuilder_; + /** + *
+     * Output only. The status of the task's first attempt.
+     * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+     * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + public boolean hasFirstAttemptStatus() { + return firstAttemptStatusBuilder_ != null || firstAttemptStatus_ != null; + } + /** + *
+     * Output only. The status of the task's first attempt.
+     * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+     * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + public com.google.cloud.tasks.v2beta2.AttemptStatus getFirstAttemptStatus() { + if (firstAttemptStatusBuilder_ == null) { + return firstAttemptStatus_ == null ? com.google.cloud.tasks.v2beta2.AttemptStatus.getDefaultInstance() : firstAttemptStatus_; + } else { + return firstAttemptStatusBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The status of the task's first attempt.
+     * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+     * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + public Builder setFirstAttemptStatus(com.google.cloud.tasks.v2beta2.AttemptStatus value) { + if (firstAttemptStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + firstAttemptStatus_ = value; + onChanged(); + } else { + firstAttemptStatusBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The status of the task's first attempt.
+     * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+     * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + public Builder setFirstAttemptStatus( + com.google.cloud.tasks.v2beta2.AttemptStatus.Builder builderForValue) { + if (firstAttemptStatusBuilder_ == null) { + firstAttemptStatus_ = builderForValue.build(); + onChanged(); + } else { + firstAttemptStatusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The status of the task's first attempt.
+     * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+     * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + public Builder mergeFirstAttemptStatus(com.google.cloud.tasks.v2beta2.AttemptStatus value) { + if (firstAttemptStatusBuilder_ == null) { + if (firstAttemptStatus_ != null) { + firstAttemptStatus_ = + com.google.cloud.tasks.v2beta2.AttemptStatus.newBuilder(firstAttemptStatus_).mergeFrom(value).buildPartial(); + } else { + firstAttemptStatus_ = value; + } + onChanged(); + } else { + firstAttemptStatusBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The status of the task's first attempt.
+     * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+     * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + public Builder clearFirstAttemptStatus() { + if (firstAttemptStatusBuilder_ == null) { + firstAttemptStatus_ = null; + onChanged(); + } else { + firstAttemptStatus_ = null; + firstAttemptStatusBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The status of the task's first attempt.
+     * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+     * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + public com.google.cloud.tasks.v2beta2.AttemptStatus.Builder getFirstAttemptStatusBuilder() { + + onChanged(); + return getFirstAttemptStatusFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The status of the task's first attempt.
+     * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+     * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + public com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder getFirstAttemptStatusOrBuilder() { + if (firstAttemptStatusBuilder_ != null) { + return firstAttemptStatusBuilder_.getMessageOrBuilder(); + } else { + return firstAttemptStatus_ == null ? + com.google.cloud.tasks.v2beta2.AttemptStatus.getDefaultInstance() : firstAttemptStatus_; + } + } + /** + *
+     * Output only. The status of the task's first attempt.
+     * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+     * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AttemptStatus, com.google.cloud.tasks.v2beta2.AttemptStatus.Builder, com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder> + getFirstAttemptStatusFieldBuilder() { + if (firstAttemptStatusBuilder_ == null) { + firstAttemptStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AttemptStatus, com.google.cloud.tasks.v2beta2.AttemptStatus.Builder, com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder>( + getFirstAttemptStatus(), + getParentForChildren(), + isClean()); + firstAttemptStatus_ = null; + } + return firstAttemptStatusBuilder_; + } + + private com.google.cloud.tasks.v2beta2.AttemptStatus lastAttemptStatus_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AttemptStatus, com.google.cloud.tasks.v2beta2.AttemptStatus.Builder, com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder> lastAttemptStatusBuilder_; + /** + *
+     * Output only. The status of the task's last attempt.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + public boolean hasLastAttemptStatus() { + return lastAttemptStatusBuilder_ != null || lastAttemptStatus_ != null; + } + /** + *
+     * Output only. The status of the task's last attempt.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + public com.google.cloud.tasks.v2beta2.AttemptStatus getLastAttemptStatus() { + if (lastAttemptStatusBuilder_ == null) { + return lastAttemptStatus_ == null ? com.google.cloud.tasks.v2beta2.AttemptStatus.getDefaultInstance() : lastAttemptStatus_; + } else { + return lastAttemptStatusBuilder_.getMessage(); + } + } + /** + *
+     * Output only. The status of the task's last attempt.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + public Builder setLastAttemptStatus(com.google.cloud.tasks.v2beta2.AttemptStatus value) { + if (lastAttemptStatusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastAttemptStatus_ = value; + onChanged(); + } else { + lastAttemptStatusBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Output only. The status of the task's last attempt.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + public Builder setLastAttemptStatus( + com.google.cloud.tasks.v2beta2.AttemptStatus.Builder builderForValue) { + if (lastAttemptStatusBuilder_ == null) { + lastAttemptStatus_ = builderForValue.build(); + onChanged(); + } else { + lastAttemptStatusBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Output only. The status of the task's last attempt.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + public Builder mergeLastAttemptStatus(com.google.cloud.tasks.v2beta2.AttemptStatus value) { + if (lastAttemptStatusBuilder_ == null) { + if (lastAttemptStatus_ != null) { + lastAttemptStatus_ = + com.google.cloud.tasks.v2beta2.AttemptStatus.newBuilder(lastAttemptStatus_).mergeFrom(value).buildPartial(); + } else { + lastAttemptStatus_ = value; + } + onChanged(); + } else { + lastAttemptStatusBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Output only. The status of the task's last attempt.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + public Builder clearLastAttemptStatus() { + if (lastAttemptStatusBuilder_ == null) { + lastAttemptStatus_ = null; + onChanged(); + } else { + lastAttemptStatus_ = null; + lastAttemptStatusBuilder_ = null; + } + + return this; + } + /** + *
+     * Output only. The status of the task's last attempt.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + public com.google.cloud.tasks.v2beta2.AttemptStatus.Builder getLastAttemptStatusBuilder() { + + onChanged(); + return getLastAttemptStatusFieldBuilder().getBuilder(); + } + /** + *
+     * Output only. The status of the task's last attempt.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + public com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder getLastAttemptStatusOrBuilder() { + if (lastAttemptStatusBuilder_ != null) { + return lastAttemptStatusBuilder_.getMessageOrBuilder(); + } else { + return lastAttemptStatus_ == null ? + com.google.cloud.tasks.v2beta2.AttemptStatus.getDefaultInstance() : lastAttemptStatus_; + } + } + /** + *
+     * Output only. The status of the task's last attempt.
+     * This field is not calculated for
+     * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+     * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AttemptStatus, com.google.cloud.tasks.v2beta2.AttemptStatus.Builder, com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder> + getLastAttemptStatusFieldBuilder() { + if (lastAttemptStatusBuilder_ == null) { + lastAttemptStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.AttemptStatus, com.google.cloud.tasks.v2beta2.AttemptStatus.Builder, com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder>( + getLastAttemptStatus(), + getParentForChildren(), + isClean()); + lastAttemptStatus_ = null; + } + return lastAttemptStatusBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.TaskStatus) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.TaskStatus) + private static final com.google.cloud.tasks.v2beta2.TaskStatus DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.TaskStatus(); + } + + public static com.google.cloud.tasks.v2beta2.TaskStatus getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public TaskStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TaskStatus(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.TaskStatus getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskStatusOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskStatusOrBuilder.java new file mode 100644 index 000000000000..ff9da749b36d --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/TaskStatusOrBuilder.java @@ -0,0 +1,99 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/task.proto + +package com.google.cloud.tasks.v2beta2; + +public interface TaskStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.TaskStatus) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Output only. The number of attempts dispatched.
+   * This count includes tasks which have been dispatched but haven't
+   * received a response.
+   * 
+ * + * int32 attempt_dispatch_count = 1; + */ + int getAttemptDispatchCount(); + + /** + *
+   * Output only. The number of attempts which have received a response.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * int32 attempt_response_count = 2; + */ + int getAttemptResponseCount(); + + /** + *
+   * Output only. The status of the task's first attempt.
+   * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+   * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + boolean hasFirstAttemptStatus(); + /** + *
+   * Output only. The status of the task's first attempt.
+   * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+   * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + com.google.cloud.tasks.v2beta2.AttemptStatus getFirstAttemptStatus(); + /** + *
+   * Output only. The status of the task's first attempt.
+   * Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
+   * The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus first_attempt_status = 3; + */ + com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder getFirstAttemptStatusOrBuilder(); + + /** + *
+   * Output only. The status of the task's last attempt.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + boolean hasLastAttemptStatus(); + /** + *
+   * Output only. The status of the task's last attempt.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + com.google.cloud.tasks.v2beta2.AttemptStatus getLastAttemptStatus(); + /** + *
+   * Output only. The status of the task's last attempt.
+   * This field is not calculated for
+   * [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget).
+   * 
+ * + * .google.cloud.tasks.v2beta2.AttemptStatus last_attempt_status = 4; + */ + com.google.cloud.tasks.v2beta2.AttemptStatusOrBuilder getLastAttemptStatusOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UpdateQueueRequest.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UpdateQueueRequest.java new file mode 100644 index 000000000000..89fdc6481d44 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UpdateQueueRequest.java @@ -0,0 +1,927 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +/** + *
+ * Request message for [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue].
+ * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.UpdateQueueRequest} + */ +public final class UpdateQueueRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:google.cloud.tasks.v2beta2.UpdateQueueRequest) + UpdateQueueRequestOrBuilder { +private static final long serialVersionUID = 0L; + // Use UpdateQueueRequest.newBuilder() to construct. + private UpdateQueueRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private UpdateQueueRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private UpdateQueueRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.google.cloud.tasks.v2beta2.Queue.Builder subBuilder = null; + if (queue_ != null) { + subBuilder = queue_.toBuilder(); + } + queue_ = input.readMessage(com.google.cloud.tasks.v2beta2.Queue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(queue_); + queue_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_UpdateQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_UpdateQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.UpdateQueueRequest.class, com.google.cloud.tasks.v2beta2.UpdateQueueRequest.Builder.class); + } + + public static final int QUEUE_FIELD_NUMBER = 1; + private com.google.cloud.tasks.v2beta2.Queue queue_; + /** + *
+   * Required.
+   * The queue to create or update.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+   * Output only fields cannot be modified using UpdateQueue.
+   * Any value specified for an output only field will be ignored.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + public boolean hasQueue() { + return queue_ != null; + } + /** + *
+   * Required.
+   * The queue to create or update.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+   * Output only fields cannot be modified using UpdateQueue.
+   * Any value specified for an output only field will be ignored.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + public com.google.cloud.tasks.v2beta2.Queue getQueue() { + return queue_ == null ? com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance() : queue_; + } + /** + *
+   * Required.
+   * The queue to create or update.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+   * Output only fields cannot be modified using UpdateQueue.
+   * Any value specified for an output only field will be ignored.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + public com.google.cloud.tasks.v2beta2.QueueOrBuilder getQueueOrBuilder() { + return getQueue(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + *
+   * A mask used to specify which fields of the queue are being updated.
+   * If empty, then all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + *
+   * A mask used to specify which fields of the queue are being updated.
+   * If empty, then all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + *
+   * A mask used to specify which fields of the queue are being updated.
+   * If empty, then all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (queue_ != null) { + output.writeMessage(1, getQueue()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (queue_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getQueue()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getUpdateMask()); + } + size += unknownFields.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.tasks.v2beta2.UpdateQueueRequest)) { + return super.equals(obj); + } + com.google.cloud.tasks.v2beta2.UpdateQueueRequest other = (com.google.cloud.tasks.v2beta2.UpdateQueueRequest) obj; + + boolean result = true; + result = result && (hasQueue() == other.hasQueue()); + if (hasQueue()) { + result = result && getQueue() + .equals(other.getQueue()); + } + result = result && (hasUpdateMask() == other.hasUpdateMask()); + if (hasUpdateMask()) { + result = result && getUpdateMask() + .equals(other.getUpdateMask()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasQueue()) { + hash = (37 * hash) + QUEUE_FIELD_NUMBER; + hash = (53 * hash) + getQueue().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.tasks.v2beta2.UpdateQueueRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.UpdateQueueRequest 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.tasks.v2beta2.UpdateQueueRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.UpdateQueueRequest 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.tasks.v2beta2.UpdateQueueRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.google.cloud.tasks.v2beta2.UpdateQueueRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.google.cloud.tasks.v2beta2.UpdateQueueRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.UpdateQueueRequest 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.tasks.v2beta2.UpdateQueueRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.UpdateQueueRequest 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.tasks.v2beta2.UpdateQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.google.cloud.tasks.v2beta2.UpdateQueueRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.google.cloud.tasks.v2beta2.UpdateQueueRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + 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 message for [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue].
+   * 
+ * + * Protobuf type {@code google.cloud.tasks.v2beta2.UpdateQueueRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:google.cloud.tasks.v2beta2.UpdateQueueRequest) + com.google.cloud.tasks.v2beta2.UpdateQueueRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_UpdateQueueRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_UpdateQueueRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.tasks.v2beta2.UpdateQueueRequest.class, com.google.cloud.tasks.v2beta2.UpdateQueueRequest.Builder.class); + } + + // Construct using com.google.cloud.tasks.v2beta2.UpdateQueueRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (queueBuilder_ == null) { + queue_ = null; + } else { + queue_ = null; + queueBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.google.cloud.tasks.v2beta2.CloudTasksProto.internal_static_google_cloud_tasks_v2beta2_UpdateQueueRequest_descriptor; + } + + public com.google.cloud.tasks.v2beta2.UpdateQueueRequest getDefaultInstanceForType() { + return com.google.cloud.tasks.v2beta2.UpdateQueueRequest.getDefaultInstance(); + } + + public com.google.cloud.tasks.v2beta2.UpdateQueueRequest build() { + com.google.cloud.tasks.v2beta2.UpdateQueueRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.google.cloud.tasks.v2beta2.UpdateQueueRequest buildPartial() { + com.google.cloud.tasks.v2beta2.UpdateQueueRequest result = new com.google.cloud.tasks.v2beta2.UpdateQueueRequest(this); + if (queueBuilder_ == null) { + result.queue_ = queue_; + } else { + result.queue_ = queueBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.tasks.v2beta2.UpdateQueueRequest) { + return mergeFrom((com.google.cloud.tasks.v2beta2.UpdateQueueRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.tasks.v2beta2.UpdateQueueRequest other) { + if (other == com.google.cloud.tasks.v2beta2.UpdateQueueRequest.getDefaultInstance()) return this; + if (other.hasQueue()) { + mergeQueue(other.getQueue()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.tasks.v2beta2.UpdateQueueRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.tasks.v2beta2.UpdateQueueRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.tasks.v2beta2.Queue queue_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Queue, com.google.cloud.tasks.v2beta2.Queue.Builder, com.google.cloud.tasks.v2beta2.QueueOrBuilder> queueBuilder_; + /** + *
+     * Required.
+     * The queue to create or update.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+     * Output only fields cannot be modified using UpdateQueue.
+     * Any value specified for an output only field will be ignored.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + public boolean hasQueue() { + return queueBuilder_ != null || queue_ != null; + } + /** + *
+     * Required.
+     * The queue to create or update.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+     * Output only fields cannot be modified using UpdateQueue.
+     * Any value specified for an output only field will be ignored.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + public com.google.cloud.tasks.v2beta2.Queue getQueue() { + if (queueBuilder_ == null) { + return queue_ == null ? com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance() : queue_; + } else { + return queueBuilder_.getMessage(); + } + } + /** + *
+     * Required.
+     * The queue to create or update.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+     * Output only fields cannot be modified using UpdateQueue.
+     * Any value specified for an output only field will be ignored.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + public Builder setQueue(com.google.cloud.tasks.v2beta2.Queue value) { + if (queueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + queue_ = value; + onChanged(); + } else { + queueBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * Required.
+     * The queue to create or update.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+     * Output only fields cannot be modified using UpdateQueue.
+     * Any value specified for an output only field will be ignored.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + public Builder setQueue( + com.google.cloud.tasks.v2beta2.Queue.Builder builderForValue) { + if (queueBuilder_ == null) { + queue_ = builderForValue.build(); + onChanged(); + } else { + queueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * Required.
+     * The queue to create or update.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+     * Output only fields cannot be modified using UpdateQueue.
+     * Any value specified for an output only field will be ignored.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + public Builder mergeQueue(com.google.cloud.tasks.v2beta2.Queue value) { + if (queueBuilder_ == null) { + if (queue_ != null) { + queue_ = + com.google.cloud.tasks.v2beta2.Queue.newBuilder(queue_).mergeFrom(value).buildPartial(); + } else { + queue_ = value; + } + onChanged(); + } else { + queueBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * Required.
+     * The queue to create or update.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+     * Output only fields cannot be modified using UpdateQueue.
+     * Any value specified for an output only field will be ignored.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + public Builder clearQueue() { + if (queueBuilder_ == null) { + queue_ = null; + onChanged(); + } else { + queue_ = null; + queueBuilder_ = null; + } + + return this; + } + /** + *
+     * Required.
+     * The queue to create or update.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+     * Output only fields cannot be modified using UpdateQueue.
+     * Any value specified for an output only field will be ignored.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + public com.google.cloud.tasks.v2beta2.Queue.Builder getQueueBuilder() { + + onChanged(); + return getQueueFieldBuilder().getBuilder(); + } + /** + *
+     * Required.
+     * The queue to create or update.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+     * Output only fields cannot be modified using UpdateQueue.
+     * Any value specified for an output only field will be ignored.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + public com.google.cloud.tasks.v2beta2.QueueOrBuilder getQueueOrBuilder() { + if (queueBuilder_ != null) { + return queueBuilder_.getMessageOrBuilder(); + } else { + return queue_ == null ? + com.google.cloud.tasks.v2beta2.Queue.getDefaultInstance() : queue_; + } + } + /** + *
+     * Required.
+     * The queue to create or update.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+     * Output only fields cannot be modified using UpdateQueue.
+     * Any value specified for an output only field will be ignored.
+     * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+     * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Queue, com.google.cloud.tasks.v2beta2.Queue.Builder, com.google.cloud.tasks.v2beta2.QueueOrBuilder> + getQueueFieldBuilder() { + if (queueBuilder_ == null) { + queueBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.tasks.v2beta2.Queue, com.google.cloud.tasks.v2beta2.Queue.Builder, com.google.cloud.tasks.v2beta2.QueueOrBuilder>( + getQueue(), + getParentForChildren(), + isClean()); + queue_ = null; + } + return queueBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, com.google.protobuf.FieldMaskOrBuilder> updateMaskBuilder_; + /** + *
+     * A mask used to specify which fields of the queue are being updated.
+     * If empty, then all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + *
+     * A mask used to specify which fields of the queue are being updated.
+     * If empty, then all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + *
+     * A mask used to specify which fields of the queue are being updated.
+     * If empty, then all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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; + } + /** + *
+     * A mask used to specify which fields of the queue are being updated.
+     * If empty, then all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder setUpdateMask( + com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * A mask used to specify which fields of the queue are being updated.
+     * If empty, then all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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; + } + /** + *
+     * A mask used to specify which fields of the queue are being updated.
+     * If empty, then all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + *
+     * A mask used to specify which fields of the queue are being updated.
+     * If empty, then all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + *
+     * A mask used to specify which fields of the queue are being updated.
+     * If empty, then all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null ? + com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + } + /** + *
+     * A mask used to specify which fields of the queue are being updated.
+     * If empty, then all fields will be updated.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + 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_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:google.cloud.tasks.v2beta2.UpdateQueueRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.tasks.v2beta2.UpdateQueueRequest) + private static final com.google.cloud.tasks.v2beta2.UpdateQueueRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.google.cloud.tasks.v2beta2.UpdateQueueRequest(); + } + + public static com.google.cloud.tasks.v2beta2.UpdateQueueRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public UpdateQueueRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateQueueRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public com.google.cloud.tasks.v2beta2.UpdateQueueRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UpdateQueueRequestOrBuilder.java b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UpdateQueueRequestOrBuilder.java new file mode 100644 index 000000000000..03d450217feb --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/java/com/google/cloud/tasks/v2beta2/UpdateQueueRequestOrBuilder.java @@ -0,0 +1,77 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package com.google.cloud.tasks.v2beta2; + +public interface UpdateQueueRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:google.cloud.tasks.v2beta2.UpdateQueueRequest) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * Required.
+   * The queue to create or update.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+   * Output only fields cannot be modified using UpdateQueue.
+   * Any value specified for an output only field will be ignored.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + boolean hasQueue(); + /** + *
+   * Required.
+   * The queue to create or update.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+   * Output only fields cannot be modified using UpdateQueue.
+   * Any value specified for an output only field will be ignored.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + com.google.cloud.tasks.v2beta2.Queue getQueue(); + /** + *
+   * Required.
+   * The queue to create or update.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified.
+   * Output only fields cannot be modified using UpdateQueue.
+   * Any value specified for an output only field will be ignored.
+   * The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed.
+   * 
+ * + * .google.cloud.tasks.v2beta2.Queue queue = 1; + */ + com.google.cloud.tasks.v2beta2.QueueOrBuilder getQueueOrBuilder(); + + /** + *
+   * A mask used to specify which fields of the queue are being updated.
+   * If empty, then all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + boolean hasUpdateMask(); + /** + *
+   * A mask used to specify which fields of the queue are being updated.
+   * If empty, then all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + *
+   * A mask used to specify which fields of the queue are being updated.
+   * If empty, then all fields will be updated.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto new file mode 100644 index 000000000000..06f1b65b9ad2 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/cloudtasks.proto @@ -0,0 +1,855 @@ +// Copyright 2018 Google Inc. +// +// 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.tasks.v2beta2; + +import "google/api/annotations.proto"; +import "google/cloud/tasks/v2beta2/queue.proto"; +import "google/cloud/tasks/v2beta2/task.proto"; +import "google/iam/v1/iam_policy.proto"; +import "google/iam/v1/policy.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/code.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks"; +option java_multiple_files = true; +option java_outer_classname = "CloudTasksProto"; +option java_package = "com.google.cloud.tasks.v2beta2"; +option objc_class_prefix = "TASKS"; + + +// Cloud Tasks allows developers to manage the execution of background +// work in their applications. +service CloudTasks { + // Lists queues. + // + // Queues are returned in lexicographical order. + rpc ListQueues(ListQueuesRequest) returns (ListQueuesResponse) { + option (google.api.http) = { + get: "/v2beta2/{parent=projects/*/locations/*}/queues" + }; + } + + // Gets a queue. + rpc GetQueue(GetQueueRequest) returns (Queue) { + option (google.api.http) = { + get: "/v2beta2/{name=projects/*/locations/*/queues/*}" + }; + } + + // Creates a queue. + // + // Queues created with this method allow tasks to live for a maximum of 31 + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml) + // before using this method. + rpc CreateQueue(CreateQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2beta2/{parent=projects/*/locations/*}/queues" + body: "queue" + }; + } + + // Updates a queue. + // + // This method creates the queue if it does not exist and updates + // the queue if it does exist. + // + // Queues created with this method allow tasks to live for a maximum of 31 + // days. After a task is 31 days old, the task will be deleted regardless of whether + // it was dispatched or not. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml) + // before using this method. + rpc UpdateQueue(UpdateQueueRequest) returns (Queue) { + option (google.api.http) = { + patch: "/v2beta2/{queue.name=projects/*/locations/*/queues/*}" + body: "queue" + }; + } + + // Deletes a queue. + // + // This command will delete the queue even if it has tasks in it. + // + // Note: If you delete a queue, a queue with the same name can't be created + // for 7 days. + // + // WARNING: Using this method may have unintended side effects if you are + // using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. + // Read + // [Overview of Queue Management and queue.yaml](/cloud-tasks/docs/queue-yaml) + // before using this method. + rpc DeleteQueue(DeleteQueueRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta2/{name=projects/*/locations/*/queues/*}" + }; + } + + // Purges a queue by deleting all of its tasks. + // + // All tasks created before this method is called are permanently deleted. + // + // Purge operations can take up to one minute to take effect. Tasks + // might be dispatched before the purge takes effect. A purge is irreversible. + rpc PurgeQueue(PurgeQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2beta2/{name=projects/*/locations/*/queues/*}:purge" + body: "*" + }; + } + + // Pauses the queue. + // + // If a queue is paused then the system will stop dispatching tasks + // until the queue is resumed via + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added + // when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + rpc PauseQueue(PauseQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2beta2/{name=projects/*/locations/*/queues/*}:pause" + body: "*" + }; + } + + // Resume a queue. + // + // This method resumes a queue after it has been + // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or + // [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored + // in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it + // will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. + // + // WARNING: Resuming many high-QPS queues at the same time can + // lead to target overloading. If you are resuming high-QPS + // queues, follow the 500/50/5 pattern described in + // [Managing Cloud Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf). + rpc ResumeQueue(ResumeQueueRequest) returns (Queue) { + option (google.api.http) = { + post: "/v2beta2/{name=projects/*/locations/*/queues/*}:resume" + body: "*" + }; + } + + // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. + // Returns an empty policy if the resource exists and does not have a policy + // set. + // + // Authorization requires the following [Google IAM](/iam) permission on the + // specified resource parent: + // + // * `cloudtasks.queues.getIamPolicy` + rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:getIamPolicy" + body: "*" + }; + } + + // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any existing + // policy. + // + // Note: The Cloud Console does not check queue-level IAM permissions yet. + // Project-level permissions are required to use the Cloud Console. + // + // Authorization requires the following [Google IAM](/iam) permission on the + // specified resource parent: + // + // * `cloudtasks.queues.setIamPolicy` + rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { + option (google.api.http) = { + post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:setIamPolicy" + body: "*" + }; + } + + // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue]. + // If the resource does not exist, this will return an empty set of + // permissions, not a [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + // + // Note: This operation is designed to be used for building permission-aware + // UIs and command-line tools, not for authorization checking. This operation + // may "fail open" without warning. + rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { + option (google.api.http) = { + post: "/v2beta2/{resource=projects/*/locations/*/queues/*}:testIamPermissions" + body: "*" + }; + } + + // Lists the tasks in a queue. + // + // By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved + // due to performance considerations; + // [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the + // subset of information which is returned. + rpc ListTasks(ListTasksRequest) returns (ListTasksResponse) { + option (google.api.http) = { + get: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks" + }; + } + + // Gets a task. + rpc GetTask(GetTaskRequest) returns (Task) { + option (google.api.http) = { + get: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}" + }; + } + + // Creates a task and adds it to a queue. + // + // Tasks cannot be updated after creation; there is no UpdateTask command. + // + // * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), + // the maximum task size is 100KB. + // * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this + // the maximum task size is 1MB. + rpc CreateTask(CreateTaskRequest) returns (Task) { + option (google.api.http) = { + post: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks" + body: "*" + }; + } + + // Deletes a task. + // + // A task can be deleted if it is scheduled or dispatched. A task + // cannot be deleted if it has completed successfully or permanently + // failed. + rpc DeleteTask(DeleteTaskRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}" + }; + } + + // Leases tasks from a pull queue for + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + // + // This method is invoked by the worker to obtain a lease. The + // worker must acknowledge the task via + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have + // performed the work associated with the task. + // + // The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that + // the worker needs to perform the work associated with the task. To + // return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set + // [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to + // [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. + // + // A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] + // requests are allowed per + // queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // is returned when this limit is + // exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // is also returned when + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] + // is exceeded. + rpc LeaseTasks(LeaseTasksRequest) returns (LeaseTasksResponse) { + option (google.api.http) = { + post: "/v2beta2/{parent=projects/*/locations/*/queues/*}/tasks:lease" + body: "*" + }; + } + + // Acknowledges a pull task. + // + // The worker, that is, the entity that + // [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method + // to indicate that the work associated with the task has finished. + // + // The worker must acknowledge a task within the + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease + // will expire and the task will become available to be leased + // again. After the task is acknowledged, it will not be returned + // by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], + // [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or + // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. + rpc AcknowledgeTask(AcknowledgeTaskRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:acknowledge" + body: "*" + }; + } + + // Renew the current lease of a pull task. + // + // The worker can use this method to extend the lease by a new + // duration, starting from now. The new task lease will be + // returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + rpc RenewLease(RenewLeaseRequest) returns (Task) { + option (google.api.http) = { + post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:renewLease" + body: "*" + }; + } + + // Cancel a pull task's lease. + // + // The worker can use this method to cancel a task's lease by + // setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will + // make the task available to be leased to the next caller of + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + rpc CancelLease(CancelLeaseRequest) returns (Task) { + option (google.api.http) = { + post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:cancelLease" + body: "*" + }; + } + + // Forces a task to run now. + // + // When this method is called, Cloud Tasks will dispatch the task, even if + // the task is already running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or + // is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + // + // This command is meant to be used for manual debugging. For + // example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed + // task after a fix has been made or to manually force a task to be + // dispatched now. + // + // The dispatched task is returned. That is, the task that is returned + // contains the [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but + // before the task is received by its target. + // + // If Cloud Tasks receives a successful response from the task's + // target, then the task will be deleted; otherwise the task's + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified + // in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + // + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + // task that has already succeeded or permanently failed. + // + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a + // [pull task][google.cloud.tasks.v2beta2.PullMessage]. + rpc RunTask(RunTaskRequest) returns (Task) { + option (google.api.http) = { + post: "/v2beta2/{name=projects/*/locations/*/queues/*/tasks/*}:run" + body: "*" + }; + } +} + +// Request message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. +message ListQueuesRequest { + // Required. + // + // The location name. + // For example: `projects/PROJECT_ID/locations/LOCATION_ID` + string parent = 1; + + // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue] + // field can be used as a filter and several operators as supported. + // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as + // described in + // [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters). + // + // Sample filter "app_engine_http_target: *". + // + // Note that using filters might cause fewer queues than the + // requested_page size to be returned. + string filter = 2; + + // Requested page size. + // + // The maximum page size is 9800. If unspecified, the page size will + // be the maximum. Fewer queues than requested might be returned, + // even if more queues exist; use the + // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] in the + // response to determine if more queues exist. + int32 page_size = 3; + + // A token identifying the page of results to return. + // + // To request the first page results, page_token must be empty. To + // request the next page of results, page_token must be the value of + // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned + // from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] + // method. It is an error to switch the value of the + // [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages. + string page_token = 4; +} + +// Response message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. +message ListQueuesResponse { + // The list of queues. + repeated Queue queues = 1; + + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the + // [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. + // + // If the next_page_token is empty, there are no more results. + // + // The page token is valid for only 2 hours. + string next_page_token = 2; +} + +// Request message for [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue]. +message GetQueueRequest { + // Required. + // + // The resource name of the queue. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue]. +message CreateQueueRequest { + // Required. + // + // The location name in which the queue will be created. + // For example: `projects/PROJECT_ID/locations/LOCATION_ID` + // + // The list of allowed locations can be obtained by calling Cloud + // Tasks' implementation of + // [ListLocations][google.cloud.location.Locations.ListLocations]. + string parent = 1; + + // Required. + // + // The queue to create. + // + // [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue. + Queue queue = 2; +} + +// Request message for [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue]. +message UpdateQueueRequest { + // Required. + // + // The queue to create or update. + // + // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified. + // + // Output only fields cannot be modified using UpdateQueue. + // Any value specified for an output only field will be ignored. + // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed. + Queue queue = 1; + + // A mask used to specify which fields of the queue are being updated. + // + // If empty, then all fields will be updated. + google.protobuf.FieldMask update_mask = 2; +} + +// Request message for [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. +message DeleteQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue]. +message PurgeQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue]. +message PauseQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. +message ResumeQueueRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + string name = 1; +} + +// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. +message ListTasksRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + string parent = 1; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + Task.View response_view = 2; + + // Sort order used for the query. The only fields supported for sorting + // are `schedule_time` and `pull_message.tag`. All results will be + // returned in approximately ascending order. The default ordering is by + // `schedule_time`. + string order_by = 3; + + // Requested page size. Fewer tasks than requested might be returned. + // + // The maximum page size is 1000. If unspecified, the page size will + // be the maximum. Fewer tasks than requested might be returned, + // even if more tasks exist; use + // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] in the + // response to determine if more tasks exist. + int32 page_size = 4; + + // A token identifying the page of results to return. + // + // To request the first page results, page_token must be empty. To + // request the next page of results, page_token must be the value of + // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned + // from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] + // method. + // + // The page token is valid for only 2 hours. + string page_token = 5; +} + +// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. +message ListTasksResponse { + // The list of tasks. + repeated Task tasks = 1; + + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the + // [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. + // + // If the next_page_token is empty, there are no more results. + string next_page_token = 2; +} + +// Request message for getting a task using [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask]. +message GetTaskRequest { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + string name = 1; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + Task.View response_view = 2; +} + +// Request message for [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. +message CreateTaskRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // The queue must already exist. + string parent = 1; + + // Required. + // + // The task to add. + // + // Task names have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + // The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a + // name is not specified then the system will generate a random + // unique task id, which will be set in the task returned in the + // [response][google.cloud.tasks.v2beta2.Task.name]. + // + // If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the + // past then Cloud Tasks will set it to the current time. + // + // Task De-duplication: + // + // Explicitly specifying a task ID enables task de-duplication. If + // a task's ID is identical to that of an existing task or a task + // that was deleted or completed recently then the call will fail + // with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + // If the task's queue was created using Cloud Tasks, then another task with + // the same name can't be created for ~1hour after the original task was + // deleted or completed. If the task's queue was created using queue.yaml or + // queue.xml, then another task with the same name can't be created + // for ~9days after the original task was deleted or completed. + // + // Because there is an extra lookup cost to identify duplicate task + // names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly + // increased latency. Using hashed strings for the task id or for + // the prefix of the task id is recommended. Choosing task ids that + // are sequential or have sequential prefixes, for example using a + // timestamp, causes an increase in latency and error rates in all + // task commands. The infrastructure relies on an approximately + // uniform distribution of task ids to store and serve tasks + // efficiently. + Task task = 2; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + Task.View response_view = 3; +} + +// Request message for deleting a task using +// [DeleteTask][google.cloud.tasks.v2beta2.CloudTasks.DeleteTask]. +message DeleteTaskRequest { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + string name = 1; +} + +// Request message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. +message LeaseTasksRequest { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + string parent = 1; + + // The maximum number of tasks to lease. + // + // The system will make a best effort to return as close to as + // `max_tasks` as possible. + // + // The largest that `max_tasks` can be is 1000. + int32 max_tasks = 2; + + // + // After the worker has successfully finished the work associated + // with the task, the worker must call via + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be + // returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so + // that another worker can retry it. + // + // The maximum lease duration is 1 week. + // `lease_duration` will be truncated to the nearest second. + google.protobuf.Duration lease_duration = 3; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + Task.View response_view = 4; + + // `filter` can be used to specify a subset of tasks to lease. + // + // When `filter` is set to `tag=` then the + // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose + // [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to ``. `` must be + // less than 500 characters. + // + // When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + // the same tag as the task with the oldest + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned. + // + // Grammar Syntax: + // + // * `filter = "tag=" tag | "tag_function=" function` + // + // * `tag = string` + // + // * `function = "oldest_tag()"` + // + // The `oldest_tag()` function returns tasks which have the same tag as the + // oldest task (ordered by schedule time). + // + // SDK compatibility: Although the SDK allows tags to be either + // string or + // [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + // only UTF-8 encoded tags can be used in Cloud Tasks. Tag which + // aren't UTF-8 encoded can't be used in the + // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's + // [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks. + string filter = 5; +} + +// Response message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. +message LeaseTasksResponse { + // The leased tasks. + repeated Task tasks = 1; +} + +// Request message for acknowledging a task using +// [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask]. +message AcknowledgeTaskRequest { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + string name = 1; + + // Required. + // + // The task's current schedule time, available in the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + google.protobuf.Timestamp schedule_time = 2; +} + +// Request message for renewing a lease using +// [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease]. +message RenewLeaseRequest { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + string name = 1; + + // Required. + // + // The task's current schedule time, available in the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + google.protobuf.Timestamp schedule_time = 2; + + // Required. + // + // The desired new lease duration, starting from now. + // + // + // The maximum lease duration is 1 week. + // `lease_duration` will be truncated to the nearest second. + google.protobuf.Duration lease_duration = 3; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + Task.View response_view = 4; +} + +// Request message for canceling a lease using +// [CancelLease][google.cloud.tasks.v2beta2.CloudTasks.CancelLease]. +message CancelLeaseRequest { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + string name = 1; + + // Required. + // + // The task's current schedule time, available in the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + google.protobuf.Timestamp schedule_time = 2; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + Task.View response_view = 3; +} + +// Request message for forcing a task to run now using +// [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask]. +message RunTaskRequest { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + string name = 1; + + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + Task.View response_view = 2; +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto new file mode 100644 index 000000000000..4495cade1522 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/queue.proto @@ -0,0 +1,357 @@ +// Copyright 2018 Google Inc. +// +// 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.tasks.v2beta2; + +import "google/api/annotations.proto"; +import "google/cloud/tasks/v2beta2/target.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks"; +option java_multiple_files = true; +option java_outer_classname = "QueueProto"; +option java_package = "com.google.cloud.tasks.v2beta2"; + + +// A queue is a container of related tasks. Queues are configured to manage +// how those tasks are dispatched. Configurable properties include rate limits, +// retry options, target types, and others. +message Queue { + // State of the queue. + enum State { + // Unspecified state. + STATE_UNSPECIFIED = 0; + + // The queue is running. Tasks can be dispatched. + // + // If the queue was created using Cloud Tasks and the queue has + // had no activity (method calls or task dispatches) for 30 days, + // the queue may take a few minutes to re-activate. Some method + // calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + // tasks may not be dispatched for a few minutes until the queue + // has been re-activated. + RUNNING = 1; + + // Tasks are paused by the user. If the queue is paused then Cloud + // Tasks will stop delivering tasks from it, but more tasks can + // still be added to it by the user. When a pull queue is paused, + // all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls will return a + // [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]. + PAUSED = 2; + + // The queue is disabled. + // + // A queue becomes `DISABLED` when + // [queue.yaml](/appengine/docs/python/config/queueref) or + // [queue.xml](appengine/docs/standard/java/config/queueref) is uploaded + // which does not contain the queue. You cannot directly disable a queue. + // + // When a queue is disabled, tasks can still be added to a queue + // but the tasks are not dispatched and + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls return a + // `FAILED_PRECONDITION` error. + // + // To permanently delete this queue and all of its tasks, call + // [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. + DISABLED = 3; + } + + // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], + // after which it becomes output only. + // + // The queue name. + // + // The queue name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects) + // * `LOCATION_ID` is the canonical ID for the queue's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + string name = 1; + + // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue][], + // after which the queue config type becomes output only, though fields within + // the config are mutable. + // + // The queue's target. + // + // The target applies to all tasks in the queue. + oneof target_type { + // App Engine HTTP target. + // + // An App Engine queue is a queue that has an [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget]. + AppEngineHttpTarget app_engine_http_target = 3; + + // Pull target. + // + // A pull queue is a queue that has a [PullTarget][google.cloud.tasks.v2beta2.PullTarget]. + PullTarget pull_target = 4; + } + + // Rate limits for task dispatches. + // + // [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and + // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both + // control task attempts however they control how tasks are + // attempted in different ways: + // + // * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of + // dispatches from a queue (i.e. all traffic dispatched from the + // queue, regardless of whether the dispatch is from a first + // attempt or a retry). + // * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to + // particular a task after its first attempt fails. That is, + // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the + // second attempt, third attempt, etc). + RateLimits rate_limits = 5; + + // Settings that determine the retry behavior. + // + // * For tasks created using Cloud Tasks: the queue-level retry settings + // apply to all tasks in the queue that were created using Cloud Tasks. + // Retry settings cannot be set on individual tasks. + // * For tasks created using the App Engine SDK: the queue-level retry + // settings apply to all tasks in the queue which do not have retry settings + // explicitly set on the task and were created by the App Engine SDK. See + // [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + RetryConfig retry_config = 6; + + // Output only. The state of the queue. + // + // `state` can only be changed by called + // [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading + // [queue.yaml/xml](/appengine/docs/python/config/queueref). + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`. + State state = 7; + + // Output only. The last time this queue was purged. + // + // All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time + // were purged. + // + // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the + // [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + // + // Purge time will be truncated to the nearest microsecond. Purge + // time will be unset if the queue has never been purged. + google.protobuf.Timestamp purge_time = 8; +} + +// Rate limits. +// +// This message determines the maximum rate that tasks can be dispatched by a +// queue, regardless of whether the dispatch is a first task attempt or a retry. +// +// Note: The debugging command, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task +// even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits]. +message RateLimits { + // The maximum rate at which tasks are dispatched from this queue. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // * For App Engine queues, the maximum allowed value is 500. + // * This field is output only for [pull queues](google.cloud.tasks.v2beta2.PullTarget). In + // addition to the `max_tasks_dispatched_per_second` limit, a + // maximum of 10 QPS of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] + // requests are allowed per pull queue. + // + // + // This field has the same meaning as + // [rate in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#rate). + double max_tasks_dispatched_per_second = 1; + + // Output only. The max burst size. + // + // Max burst size limits how fast tasks in queue are processed when + // many tasks are in the queue and the rate is high. This field + // allows the queue to have a high rate so processing starts shortly + // after a task is enqueued, but still limits resource usage when + // many tasks are enqueued in a short period of time. + // + // The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + // algorithm is used to control the rate of task dispatches. Each + // queue has a token bucket that holds tokens, up to the maximum + // specified by `max_burst_size`. Each time a task is dispatched, a + // token is removed from the bucket. Tasks will be dispatched until + // the queue's bucket runs out of tokens. The bucket will be + // continuously refilled with new tokens based on + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]. + // + // Cloud Tasks will pick the value of `max_burst_size` based on the + // value of + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]. + // + // For App Engine queues that were created or updated using + // `queue.yaml/xml`, `max_burst_size` is equal to + // [bucket_size](/appengine/docs/standard/python/config/queueref#bucket_size). + // Since `max_burst_size` is output only, if + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue + // created by `queue.yaml/xml`, `max_burst_size` will be reset based + // on the value of + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second], + // regardless of whether + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] + // is updated. + // + int32 max_burst_size = 2; + + // The maximum number of concurrent tasks that Cloud Tasks allows + // to be dispatched for this queue. After this threshold has been + // reached, Cloud Tasks stops dispatching tasks until the number of + // concurrent requests decreases. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // + // The maximum allowed value is 5,000. + // + // This field is output only for + // [pull queues](google.cloud.tasks.v2beta2.PullTarget) and always -1, which + // indicates no limit. No other queue types can have `max_concurrent_tasks` + // set to -1. + // + // + // This field has the same meaning as + // [max_concurrent_requests in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + int32 max_concurrent_tasks = 3; +} + +// Retry config. +// +// These settings determine how a failed task attempt is retried. +message RetryConfig { + // Number of attempts per task. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // + // + // This field has the same meaning as + // [task_retry_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + oneof num_attempts { + // The maximum number of attempts for a task. + // + // Cloud Tasks will attempt the task `max_attempts` times (that + // is, if the first attempt fails, then there will be + // `max_attempts - 1` retries). Must be > 0. + int32 max_attempts = 1; + + // If true, then the number of attempts is unlimited. + bool unlimited_attempts = 2; + } + + // If positive, `max_retry_duration` specifies the time limit for + // retrying a failed task, measured from when the task was first + // attempted. Once `max_retry_duration` time has passed *and* the + // task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] + // times, no further attempts will be made and the task will be + // deleted. + // + // If zero, then the task age is unlimited. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for + // [pull queues](google.cloud.tasks.v2beta2.PullTarget). + // + // + // `max_retry_duration` will be truncated to the nearest second. + // + // This field has the same meaning as + // [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + google.protobuf.Duration max_retry_duration = 3; + + // A task will be [scheduled](Task.schedule_time) for retry between + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for + // [pull queues](google.cloud.tasks.v2beta2.PullTarget). + // + // + // `min_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + google.protobuf.Duration min_backoff = 4; + + // A task will be [scheduled](Task.schedule_time) for retry between + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for + // [pull queues](google.cloud.tasks.v2beta2.PullTarget). + // + // + // `max_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + google.protobuf.Duration max_backoff = 5; + + // The time between retries will double `max_doublings` times. + // + // A task's retry interval starts at + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles + // `max_doublings` times, then increases linearly, and finally + // retries retries at intervals of + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to + // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + // + // For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, and + // `max_doublings` is 3, then the a task will first be retried in + // 10s. The retry interval will double three times, and then + // increase linearly by 2^3 * 10s. Finally, the task will retry at + // intervals of [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the + // task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] + // times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, + // 240s, 300s, 300s, .... + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for + // [pull queues](google.cloud.tasks.v2beta2.PullTarget). + // + // + // This field has the same meaning as + // [max_doublings in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + int32 max_doublings = 6; +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto new file mode 100644 index 000000000000..f259694c3a6a --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/target.proto @@ -0,0 +1,347 @@ +// Copyright 2018 Google Inc. +// +// 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.tasks.v2beta2; + +import "google/api/annotations.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks"; +option java_multiple_files = true; +option java_outer_classname = "TargetProto"; +option java_package = "com.google.cloud.tasks.v2beta2"; + + +// Pull target. +message PullTarget { + +} + +// The pull message contains data that can be used by the caller of +// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. +// +// This proto can only be used for tasks in a queue which has +// [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set. +message PullMessage { + // A data payload consumed by the worker to execute the task. + bytes payload = 1; + + // The task's tag. + // + // Tags allow similar tasks to be processed in a batch. If you label + // tasks with a tag, your worker can + // [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using + // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to + // aggregate the events associated with a specific user once a day, + // you could tag tasks with the user ID. + // + // The task's tag can only be set when the + // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + // + // The tag must be less than 500 characters. + // + // SDK compatibility: Although the SDK allows tags to be either + // string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + // only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + // encoded, the tag will be empty when the task is returned by Cloud Tasks. + string tag = 2; +} + +// App Engine HTTP target. +// +// The task will be delivered to the App Engine application hostname +// specified by its [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]. +// The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] explains how the +// task's host URL is constructed. +// +// Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] requires +// [`appengine.applications.get`](/appengine/docs/admin-api/access-control) +// Google IAM permission for the project +// and the following scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +message AppEngineHttpTarget { + // Overrides for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + // + // If set, `app_engine_routing_override` is used for all tasks in + // the queue, no matter what the setting is for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + AppEngineRouting app_engine_routing_override = 1; +} + +// App Engine HTTP request. +// +// The message defines the HTTP request that is sent to an App Engine app when +// the task is dispatched. +// +// This proto can only be used for tasks in a queue which has +// [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] set. +// +// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] requires +// [`appengine.applications.get`](/appengine/docs/admin-api/access-control) +// Google IAM permission for the project +// and the following scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +// +// The task will be delivered to the App Engine app which belongs to the same +// project as the queue. For more information, see +// [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed) +// and how routing is affected by +// [dispatch files](/appengine/docs/python/config/dispatchref). +// +// The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to construct the URL that the task is +// delivered to can be set at the queue-level or task-level: +// +// * If set, +// [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] +// is used for all tasks in the queue, no matter what the setting +// is for the +// [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. +// +// +// The `url` that the task will be sent to is: +// +// * `url =` [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] `+` +// [relative_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative_url] +// +// The task attempt has succeeded if the app's request handler returns +// an HTTP response code in the range [`200` - `299`]. `503` is +// considered an App Engine system error instead of an application +// error. Requests returning error `503` will be retried regardless of +// retry configuration and not counted against retry counts. +// Any other response code or a failure to receive a response before the +// deadline is a failed attempt. +message AppEngineHttpRequest { + // The HTTP method to use for the request. The default is POST. + // + // The app's request handler for the task's target URL must be able to handle + // HTTP requests with this http_method, otherwise the task attempt will fail + // with error code 405 (Method Not Allowed). See + // [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + // and the documentation for the request handlers in the language your app is + // written in e.g. + // [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass). + HttpMethod http_method = 1; + + // Task-level setting for App Engine routing. + // + // If set, + // [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] + // is used for all tasks in the queue, no matter what the setting is for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + AppEngineRouting app_engine_routing = 2; + + // The relative URL. + // + // The relative URL must begin with "/" and must be a valid HTTP relative URL. + // It can contain a path and query string arguments. + // If the relative URL is empty, then the root path "/" will be used. + // No spaces are allowed, and the maximum length allowed is 2083 characters. + string relative_url = 3; + + // HTTP request headers. + // + // This map contains the header field names and values. + // Headers can be set when the + // [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + // Repeated headers are not supported but a header value can contain commas. + // + // Cloud Tasks sets some headers to default values: + // + // * `User-Agent`: By default, this header is + // `"AppEngine-Google; (+http://code.google.com/appengine)"`. + // This header can be modified, but Cloud Tasks will append + // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + // modified `User-Agent`. + // + // If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud + // Tasks sets the following headers: + // + // * `Content-Type`: By default, the `Content-Type` header is set to + // `"application/octet-stream"`. The default can be overridden by explicitly + // setting `Content-Type` to a particular media type when the + // [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + // For example, `Content-Type` can be set to `"application/json"`. + // * `Content-Length`: This is computed by Cloud Tasks. This value is + // output only. It cannot be changed. + // + // The headers below cannot be set or overridden: + // + // * `Host` + // * `X-Google-*` + // * `X-AppEngine-*` + // + // In addition, Cloud Tasks sets some headers when the task is dispatched, + // such as headers containing information about the task; see + // [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + // These headers are set only when the task is dispatched, so they are not + // visible when the task is returned in a Cloud Tasks response. + // + // Although there is no specific limit for the maximum number of headers or + // the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more + // information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation. + map headers = 4; + + // Payload. + // + // The payload will be sent as the HTTP message body. A message + // body, and thus a payload, is allowed only if the HTTP method is + // POST or PUT. It is an error to set a data payload on a task with + // an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + bytes payload = 5; +} + +// App Engine Routing. +// +// For more information about services, versions, and instances see +// [An Overview of App Engine](/appengine/docs/python/an-overview-of-app-engine), +// [Microservices Architecture on Google App Engine](/appengine/docs/python/microservices-on-app-engine), +// [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed), +// and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed). +message AppEngineRouting { + // App service. + // + // By default, the task is sent to the service which is the default + // service when the task is attempted. + // + // For some queues or tasks which were created using the App Engine + // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks + // which were created using the App Engine SDK use a custom domain + // name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string. + string service = 1; + + // App version. + // + // By default, the task is sent to the version which is the default + // version when the task is attempted. + // + // For some queues or tasks which were created using the App Engine + // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks + // which were created using the App Engine SDK use a custom domain + // name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string. + string version = 2; + + // App instance. + // + // By default, the task is sent to an instance which is available when + // the task is attempted. + // + // Requests can only be sent to a specific instance if + // [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + // App Engine Flex does not support instances. For more information, see + // [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed) + // and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed). + string instance = 3; + + // Output only. The host that the task is sent to. + // + // For more information, see + // [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed). + // + // The host is constructed as: + // + // + // * `host = [application_domain_name]`
+ // `| [service] + '.' + [application_domain_name]`
+ // `| [version] + '.' + [application_domain_name]`
+ // `| [version_dot_service]+ '.' + [application_domain_name]`
+ // `| [instance] + '.' + [application_domain_name]`
+ // `| [instance_dot_service] + '.' + [application_domain_name]`
+ // `| [instance_dot_version] + '.' + [application_domain_name]`
+ // `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + // + // * `application_domain_name` = The domain name of the app, for + // example .appspot.com, which is associated with the + // queue's project ID. Some tasks which were created using the App Engine + // SDK use a custom domain name. + // + // * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + // + // * `version_dot_service =` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] + // + // * `instance_dot_service =` + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // * `instance_dot_version =` + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + // + // * `instance_dot_version_dot_service =` + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent + // to the service which is the default service when the task is attempted. + // + // If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent + // to the version which is the default version when the task is attempted. + // + // If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task + // will be sent to an instance which is available when the task is + // attempted. + // + // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task + // will be sent to the default version of the default service when + // the task is attempted. + string host = 4; +} + +// The HTTP method used to execute the task. +enum HttpMethod { + // HTTP method unspecified + HTTP_METHOD_UNSPECIFIED = 0; + + // HTTP Post + POST = 1; + + // HTTP Get + GET = 2; + + // HTTP Head + HEAD = 3; + + // HTTP Put + PUT = 4; + + // HTTP Delete + DELETE = 5; +} diff --git a/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto new file mode 100644 index 000000000000..6afd5895b33f --- /dev/null +++ b/google-api-grpc/proto-google-cloud-tasks-v2beta2/src/main/proto/google/cloud/tasks/v2beta2/task.proto @@ -0,0 +1,180 @@ +// Copyright 2018 Google Inc. +// +// 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.tasks.v2beta2; + +import "google/api/annotations.proto"; +import "google/cloud/tasks/v2beta2/target.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2;tasks"; +option java_multiple_files = true; +option java_outer_classname = "TaskProto"; +option java_package = "com.google.cloud.tasks.v2beta2"; + + +// A unit of scheduled work. +message Task { + // The view specifies a subset of [Task][google.cloud.tasks.v2beta2.Task] data. + // + // When a task is returned in a response, not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + enum View { + // Unspecified. Defaults to BASIC. + VIEW_UNSPECIFIED = 0; + + // The basic view omits fields which can be large or can contain + // sensitive data. + // + // This view does not include the + // ([payload in AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] and + // [payload in PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These payloads are + // desirable to return only when needed, because they can be large + // and because of the sensitivity of the data that you choose to + // store in it. + BASIC = 1; + + // All information is returned. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Queue][google.cloud.tasks.v2beta2.Queue] resource. + FULL = 2; + } + + // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + // + // The task name. + // + // The task name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + // + // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects) + // * `LOCATION_ID` is the canonical ID for the task's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + // * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), or underscores (_). The maximum length is 500 characters. + string name = 1; + + // Required. + // + // The task's payload is used by the task's target to process the task. + // A payload is valid only if it is compatible with the queue's target. + oneof payload_type { + // App Engine HTTP request that is sent to the task's target. Can + // be set only if + // [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] is set + // on the queue. + // + // An App Engine task is a task that has [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] set. + AppEngineHttpRequest app_engine_http_request = 3; + + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. Can be + // set only if [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] is set on the queue. + // + // A pull task is a task that has [PullMessage][google.cloud.tasks.v2beta2.PullMessage] set. + PullMessage pull_message = 4; + } + + // The time when the task is scheduled to be attempted. + // + // For App Engine queues, this is when the task will be attempted or retried. + // + // For pull queues, this is the time when the task is available to + // be leased; if a task is currently leased, this is the time when + // the current lease expires, that is, the time that the task was + // leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + // + // `schedule_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp schedule_time = 5; + + // Output only. The time that the task was created. + // + // `create_time` will be truncated to the nearest second. + google.protobuf.Timestamp create_time = 6; + + // Output only. The task status. + TaskStatus status = 7; + + // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has + // been returned. + View view = 8; +} + +// Status of the task. +message TaskStatus { + // Output only. The number of attempts dispatched. + // + // This count includes tasks which have been dispatched but haven't + // received a response. + int32 attempt_dispatch_count = 1; + + // Output only. The number of attempts which have received a response. + // + // This field is not calculated for + // [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + int32 attempt_response_count = 2; + + // Output only. The status of the task's first attempt. + // + // Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set. + // The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks. + // + // This field is not calculated for + // [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + AttemptStatus first_attempt_status = 3; + + // Output only. The status of the task's last attempt. + // + // This field is not calculated for + // [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + AttemptStatus last_attempt_status = 4; +} + +// The status of a task attempt. +message AttemptStatus { + // Output only. The time that this attempt was scheduled. + // + // `schedule_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp schedule_time = 1; + + // Output only. The time that this attempt was dispatched. + // + // `dispatch_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp dispatch_time = 2; + + // Output only. The time that this attempt response was received. + // + // `response_time` will be truncated to the nearest microsecond. + google.protobuf.Timestamp response_time = 3; + + // Output only. The response from the target for this attempt. + // + // If the task has not been attempted or the task is currently running + // then the response status is unset. + google.rpc.Status response_status = 4; +} diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java index 106c89d581aa..d6140a2dec70 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GeometryProto.java @@ -51,9 +51,10 @@ public static void registerAllExtensions( "rtex\022E\n\023normalized_vertices\030\002 \003(\0132(.goog" + "le.cloud.vision.v1.NormalizedVertex\"+\n\010P" + "osition\022\t\n\001x\030\001 \001(\002\022\t\n\001y\030\002 \001(\002\022\t\n\001z\030\003 \001(\002" + - "Bn\n\032com.google.cloud.vision.v1B\rGeometry" + + "Bu\n\032com.google.cloud.vision.v1B\rGeometry" + "ProtoP\001Z com.google.api.grpc proto-google-common-protos - 1.11.0 + 1.12.0
com.google.api.grpc grpc-google-common-protos - 1.11.0 + 1.12.0 com.google.api.grpc @@ -740,6 +740,27 @@ 1.35.1-SNAPSHOT test-jar + + com.google.cloud + google-cloud-tasks + >0.53.1-beta-SNAPSHOT + + + com.google.cloud + google-cloud-tasks + >0.53.1-beta-SNAPSHOT + test-jar + + + com.google.api.grpc + proto-google-cloud-tasks-v2beta2 + 0.18.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-tasks-v2beta2 + 0.18.1-SNAPSHOT + com.google.cloud google-cloud-texttospeech diff --git a/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java b/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java index 672aa5dc8def..78a1178c08c2 100644 --- a/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java +++ b/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/DlpServiceClient.java @@ -79,6 +79,8 @@ * includes methods for sensitive data redaction and scheduling of data scans on Google Cloud * Platform based data sets. * + *

To learn more about concepts and find how-to guides see https://cloud.google.com/dlp/docs/. + * *

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: * @@ -199,8 +201,14 @@ public DlpServiceStub getStub() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Finds potentially sensitive info in content. This method has limits on input size, processing - * time, and output size. [How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for - * images](/dlp/docs/inspecting-images) + * time, and output size. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and + * https://cloud.google.com/dlp/docs/inspecting-text, * *

Sample code: * @@ -224,8 +232,14 @@ public final InspectContentResponse inspectContent(InspectContentRequest request // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Finds potentially sensitive info in content. This method has limits on input size, processing - * time, and output size. [How-to guide for text](/dlp/docs/inspecting-text), [How-to guide for - * images](/dlp/docs/inspecting-images) + * time, and output size. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. + * + *

For how to guides, see https://cloud.google.com/dlp/docs/inspecting-images and + * https://cloud.google.com/dlp/docs/inspecting-text, * *

Sample code: * @@ -249,7 +263,12 @@ public final InspectContentResponse inspectContent(InspectContentRequest request // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Redacts potentially sensitive info from an image. This method has limits on input size, - * processing time, and output size. [How-to guide](/dlp/docs/redacting-sensitive-data-images) + * processing time, and output size. See + * https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. * *

Sample code: * @@ -273,7 +292,12 @@ public final RedactImageResponse redactImage(RedactImageRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Redacts potentially sensitive info from an image. This method has limits on input size, - * processing time, and output size. [How-to guide](/dlp/docs/redacting-sensitive-data-images) + * processing time, and output size. See + * https://cloud.google.com/dlp/docs/redacting-sensitive-data-images to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. * *

Sample code: * @@ -296,7 +320,12 @@ public final UnaryCallable redactImageC // AUTO-GENERATED DOCUMENTATION AND METHOD /** * De-identifies potentially sensitive info from a ContentItem. This method has limits on input - * size and output size. [How-to guide](/dlp/docs/deidentify-sensitive-data) + * size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn + * more. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. * *

Sample code: * @@ -320,7 +349,12 @@ public final DeidentifyContentResponse deidentifyContent(DeidentifyContentReques // AUTO-GENERATED DOCUMENTATION AND METHOD /** * De-identifies potentially sensitive info from a ContentItem. This method has limits on input - * size and output size. [How-to guide](/dlp/docs/deidentify-sensitive-data) + * size and output size. See https://cloud.google.com/dlp/docs/deidentify-sensitive-data to learn + * more. + * + *

When no InfoTypes or CustomInfoTypes are specified in this request, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. * *

Sample code: * @@ -343,7 +377,9 @@ public final DeidentifyContentResponse deidentifyContent(DeidentifyContentReques // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Re-identifies content that has been de-identified. + * Re-identifies content that has been de-identified. See + * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example + * to learn more. * *

Sample code: * @@ -366,7 +402,9 @@ public final ReidentifyContentResponse reidentifyContent(ReidentifyContentReques // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Re-identifies content that has been de-identified. + * Re-identifies content that has been de-identified. See + * https://cloud.google.com/dlp/docs/pseudonymization#re-identification_in_free_text_code_example + * to learn more. * *

Sample code: * @@ -389,8 +427,8 @@ public final ReidentifyContentResponse reidentifyContent(ReidentifyContentReques // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns a list of the sensitive information types that the DLP API supports. For more - * information, see [Listing supported predefined infoTypes](/dlp/docs/listing-infotypes). + * Returns a list of the sensitive information types that the DLP API supports. See + * https://cloud.google.com/dlp/docs/infotypes-reference to learn more. * *

Sample code: * @@ -410,8 +448,8 @@ public final ListInfoTypesResponse listInfoTypes(ListInfoTypesRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Returns a list of the sensitive information types that the DLP API supports. For more - * information, see [Listing supported predefined infoTypes](/dlp/docs/listing-infotypes). + * Returns a list of the sensitive information types that the DLP API supports. See + * https://cloud.google.com/dlp/docs/infotypes-reference to learn more. * *

Sample code: * @@ -431,7 +469,7 @@ public final UnaryCallable listInfo // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates an InspectTemplate for re-using frequently used configuration for inspecting content, - * images, and storage. + * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: * @@ -455,7 +493,7 @@ public final InspectTemplate createInspectTemplate(CreateInspectTemplateRequest // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates an InspectTemplate for re-using frequently used configuration for inspecting content, - * images, and storage. + * images, and storage. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: * @@ -478,7 +516,8 @@ public final InspectTemplate createInspectTemplate(CreateInspectTemplateRequest // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates the InspectTemplate. + * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. * *

Sample code: * @@ -501,7 +540,8 @@ public final InspectTemplate updateInspectTemplate(UpdateInspectTemplateRequest // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates the InspectTemplate. + * Updates the InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. * *

Sample code: * @@ -524,7 +564,8 @@ public final InspectTemplate updateInspectTemplate(UpdateInspectTemplateRequest // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets an InspectTemplate. + * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. * *

Sample code: * @@ -544,7 +585,8 @@ public final InspectTemplate getInspectTemplate(GetInspectTemplateRequest reques // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets an InspectTemplate. + * Gets an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. * *

Sample code: * @@ -564,7 +606,7 @@ public final InspectTemplate getInspectTemplate(GetInspectTemplateRequest reques // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists InspectTemplates. + * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: * @@ -590,7 +632,7 @@ public final ListInspectTemplatesPagedResponse listInspectTemplates( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists InspectTemplates. + * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: * @@ -615,7 +657,7 @@ public final ListInspectTemplatesPagedResponse listInspectTemplates( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists InspectTemplates. + * Lists InspectTemplates. See https://cloud.google.com/dlp/docs/creating-templates to learn more. * *

Sample code: * @@ -647,7 +689,8 @@ public final ListInspectTemplatesPagedResponse listInspectTemplates( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes an InspectTemplate. + * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. * *

Sample code: * @@ -670,7 +713,8 @@ public final void deleteInspectTemplate(DeleteInspectTemplateRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes an InspectTemplate. + * Deletes an InspectTemplate. See https://cloud.google.com/dlp/docs/creating-templates to learn + * more. * *

Sample code: * @@ -693,7 +737,8 @@ public final UnaryCallable deleteInspectTem // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying - * content, images, and storage. + * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. * *

Sample code: * @@ -718,7 +763,8 @@ public final DeidentifyTemplate createDeidentifyTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a DeidentifyTemplate for re-using frequently used configuration for de-identifying - * content, images, and storage. + * content, images, and storage. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. * *

Sample code: * @@ -741,7 +787,8 @@ public final DeidentifyTemplate createDeidentifyTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates the DeidentifyTemplate. + * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid + * to learn more. * *

Sample code: * @@ -765,7 +812,8 @@ public final DeidentifyTemplate updateDeidentifyTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates the DeidentifyTemplate. + * Updates the DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid + * to learn more. * *

Sample code: * @@ -788,7 +836,8 @@ public final DeidentifyTemplate updateDeidentifyTemplate( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a DeidentifyTemplate. + * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. * *

Sample code: * @@ -811,7 +860,8 @@ public final DeidentifyTemplate getDeidentifyTemplate(GetDeidentifyTemplateReque // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a DeidentifyTemplate. + * Gets a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. * *

Sample code: * @@ -834,7 +884,8 @@ public final DeidentifyTemplate getDeidentifyTemplate(GetDeidentifyTemplateReque // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists DeidentifyTemplates. + * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. * *

Sample code: * @@ -860,7 +911,8 @@ public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists DeidentifyTemplates. + * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. * *

Sample code: * @@ -885,7 +937,8 @@ public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists DeidentifyTemplates. + * Lists DeidentifyTemplates. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. * *

Sample code: * @@ -917,7 +970,8 @@ public final ListDeidentifyTemplatesPagedResponse listDeidentifyTemplates( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a DeidentifyTemplate. + * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. * *

Sample code: * @@ -940,7 +994,8 @@ public final void deleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest reque // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a DeidentifyTemplate. + * Deletes a DeidentifyTemplate. See https://cloud.google.com/dlp/docs/creating-templates-deid to + * learn more. * *

Sample code: * @@ -963,8 +1018,13 @@ public final void deleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest reque // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a new job to inspect storage or calculate risk metrics. [How-to - * guide](/dlp/docs/compute-risk-analysis). + * Creates a new job to inspect storage or calculate risk metrics. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. * *

Sample code: * @@ -987,8 +1047,13 @@ public final DlpJob createDlpJob(CreateDlpJobRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Creates a new job to inspect storage or calculate risk metrics. [How-to - * guide](/dlp/docs/compute-risk-analysis). + * Creates a new job to inspect storage or calculate risk metrics. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. + * + *

When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the system will + * automatically choose what detectors to run. By default this may be all types, but may change + * over time as detectors are updated. * *

Sample code: * @@ -1010,7 +1075,9 @@ public final UnaryCallable createDlpJobCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists DlpJobs that match the specified filter in the request. + * Lists DlpJobs that match the specified filter in the request. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * *

Sample code: * @@ -1035,7 +1102,9 @@ public final ListDlpJobsPagedResponse listDlpJobs(ListDlpJobsRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists DlpJobs that match the specified filter in the request. + * Lists DlpJobs that match the specified filter in the request. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * *

Sample code: * @@ -1060,7 +1129,9 @@ public final ListDlpJobsPagedResponse listDlpJobs(ListDlpJobsRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists DlpJobs that match the specified filter in the request. + * Lists DlpJobs that match the specified filter in the request. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * *

Sample code: * @@ -1091,7 +1162,9 @@ public final UnaryCallable listDlpJobsC // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets the latest state of a long-running DlpJob. + * Gets the latest state of a long-running DlpJob. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * *

Sample code: * @@ -1114,7 +1187,9 @@ public final DlpJob getDlpJob(GetDlpJobRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets the latest state of a long-running DlpJob. + * Gets the latest state of a long-running DlpJob. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * *

Sample code: * @@ -1137,7 +1212,9 @@ public final UnaryCallable getDlpJobCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in - * the DlpJob result. The job will be cancelled if possible. + * the DlpJob result. The job will be cancelled if possible. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * *

Sample code: * @@ -1161,7 +1238,9 @@ public final void deleteDlpJob(DeleteDlpJobRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Deletes a long-running DlpJob. This method indicates that the client is no longer interested in - * the DlpJob result. The job will be cancelled if possible. + * the DlpJob result. The job will be cancelled if possible. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * *

Sample code: * @@ -1184,7 +1263,9 @@ public final UnaryCallable deleteDlpJobCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to - * cancel the DlpJob, but success is not guaranteed. + * cancel the DlpJob, but success is not guaranteed. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * *

Sample code: * @@ -1208,7 +1289,9 @@ public final void cancelDlpJob(CancelDlpJobRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Starts asynchronous cancellation on a long-running DlpJob. The server makes a best effort to - * cancel the DlpJob, but success is not guaranteed. + * cancel the DlpJob, but success is not guaranteed. See + * https://cloud.google.com/dlp/docs/inspecting-storage and + * https://cloud.google.com/dlp/docs/compute-risk-analysis to learn more. * *

Sample code: * @@ -1230,7 +1313,7 @@ public final UnaryCallable cancelDlpJobCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists job triggers. + * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * *

Sample code: * @@ -1255,7 +1338,7 @@ public final ListJobTriggersPagedResponse listJobTriggers(ListJobTriggersRequest // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists job triggers. + * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * *

Sample code: * @@ -1280,7 +1363,7 @@ public final ListJobTriggersPagedResponse listJobTriggers(ListJobTriggersRequest // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists job triggers. + * Lists job triggers. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * *

Sample code: * @@ -1312,7 +1395,7 @@ public final ListJobTriggersPagedResponse listJobTriggers(ListJobTriggersRequest // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a job trigger. + * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * *

Sample code: * @@ -1335,7 +1418,7 @@ public final JobTrigger getJobTrigger(GetJobTriggerRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Gets a job trigger. + * Gets a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * *

Sample code: * @@ -1357,7 +1440,8 @@ public final UnaryCallable getJobTriggerCallab // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a job trigger. + * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. * *

Sample code: * @@ -1380,7 +1464,8 @@ public final void deleteJobTrigger(DeleteJobTriggerRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Deletes a job trigger. + * Deletes a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. * *

Sample code: * @@ -1402,7 +1487,8 @@ public final UnaryCallable deleteJobTriggerCalla // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a job trigger. + * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. * *

Sample code: * @@ -1425,7 +1511,8 @@ public final JobTrigger updateJobTrigger(UpdateJobTriggerRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a job trigger. + * Updates a job trigger. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn + * more. * *

Sample code: * @@ -1448,7 +1535,7 @@ public final UnaryCallable updateJobTrigger // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on - * a set schedule. + * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * *

Sample code: * @@ -1472,7 +1559,7 @@ public final JobTrigger createJobTrigger(CreateJobTriggerRequest request) { // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Creates a job trigger to run DLP actions such as scanning storage for sensitive information on - * a set schedule. + * a set schedule. See https://cloud.google.com/dlp/docs/creating-job-triggers to learn more. * *

Sample code: * diff --git a/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java b/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java index 3b2e5d890c52..8a9fa3b38e6c 100644 --- a/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java +++ b/google-cloud-clients/google-cloud-dlp/src/main/java/com/google/cloud/dlp/v2/package-info.java @@ -27,6 +27,8 @@ * includes methods for sensitive data redaction and scheduling of data scans on Google Cloud * Platform based data sets. * + *

To learn more about concepts and find how-to guides see https://cloud.google.com/dlp/docs/. + * *

Sample for DlpServiceClient: * *

diff --git a/google-cloud-clients/google-cloud-logging/pom.xml b/google-cloud-clients/google-cloud-logging/pom.xml
index ded60e475e7b..d361cc24c520 100644
--- a/google-cloud-clients/google-cloud-logging/pom.xml
+++ b/google-cloud-clients/google-cloud-logging/pom.xml
@@ -57,6 +57,11 @@
       truth
       test
     
+    
+      com.google.api.grpc
+      proto-google-common-protos
+      compile
+    
     
       com.google.api.grpc
       grpc-google-cloud-logging-v2
diff --git a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java
index c3e0ad838c80..b9bf9a233bc8 100644
--- a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java
+++ b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/ConfigClient.java
@@ -525,6 +525,102 @@ public final UnaryCallable createSinkCallable() {
     return stub.createSinkCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD
+  /**
+   * Updates a sink. This method replaces the following fields in the existing sink with values from
+   * the new sink: `destination`, and `filter`. The updated sink might also have a new
+   * `writer_identity`; see the `unique_writer_identity` field.
+   *
+   * 

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   LogSink response = configClient.updateSink(sinkName, sink, updateMask);
+   * }
+   * 
+ * + * @param sinkName Required. The full resource name of the sink to update, including the parent + * resource and the sink identifier: + *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + *

Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param sink Required. The updated sink, whose name is the same identifier that appears as part + * of `sink_name`. + * @param updateMask Optional. Field mask that specifies the fields in `sink` that need an update. + * A sink field will be overwritten if, and only if, it is in the update mask. `name` and + * output only fields cannot be updated. + *

An empty updateMask is temporarily treated as using the following mask for backwards + * compatibility purposes: destination,filter,includeChildren At some point in the future, + * behavior will be removed and specifying an empty updateMask will be an error. + *

For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + *

Example: `updateMask=filter`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogSink updateSink(SinkName sinkName, LogSink sink, FieldMask updateMask) { + + UpdateSinkRequest request = + UpdateSinkRequest.newBuilder() + .setSinkName(sinkName == null ? null : sinkName.toString()) + .setSink(sink) + .setUpdateMask(updateMask) + .build(); + return updateSink(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a sink. This method replaces the following fields in the existing sink with values from + * the new sink: `destination`, and `filter`. The updated sink might also have a new + * `writer_identity`; see the `unique_writer_identity` field. + * + *

Sample code: + * + *


+   * try (ConfigClient configClient = ConfigClient.create()) {
+   *   SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
+   *   LogSink sink = LogSink.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   LogSink response = configClient.updateSink(sinkName.toString(), sink, updateMask);
+   * }
+   * 
+ * + * @param sinkName Required. The full resource name of the sink to update, including the parent + * resource and the sink identifier: + *

"projects/[PROJECT_ID]/sinks/[SINK_ID]" + * "organizations/[ORGANIZATION_ID]/sinks/[SINK_ID]" + * "billingAccounts/[BILLING_ACCOUNT_ID]/sinks/[SINK_ID]" + * "folders/[FOLDER_ID]/sinks/[SINK_ID]" + *

Example: `"projects/my-project-id/sinks/my-sink-id"`. + * @param sink Required. The updated sink, whose name is the same identifier that appears as part + * of `sink_name`. + * @param updateMask Optional. Field mask that specifies the fields in `sink` that need an update. + * A sink field will be overwritten if, and only if, it is in the update mask. `name` and + * output only fields cannot be updated. + *

An empty updateMask is temporarily treated as using the following mask for backwards + * compatibility purposes: destination,filter,includeChildren At some point in the future, + * behavior will be removed and specifying an empty updateMask will be an error. + *

For a detailed `FieldMask` definition, see + * https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask + *

Example: `updateMask=filter`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final LogSink updateSink(String sinkName, LogSink sink, FieldMask updateMask) { + + UpdateSinkRequest request = + UpdateSinkRequest.newBuilder() + .setSinkName(sinkName) + .setSink(sink) + .setUpdateMask(updateMask) + .build(); + return updateSink(request); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Updates a sink. This method replaces the following fields in the existing sink with values from diff --git a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java index e7273a7b73a6..79df0e897089 100644 --- a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java +++ b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/LoggingClient.java @@ -274,11 +274,11 @@ public final UnaryCallable deleteLogCallable() { // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * ## Log entry resources - * - *

Writes log entries to Stackdriver Logging. This API method is the only way to send log - * entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver - * Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging. + * Writes log entries to Stackdriver Logging. This API method is the only way to send log entries + * to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging + * agent (fluentd) and all logging libraries configured to use Stackdriver Logging. A single + * request may contain log entries for a maximum of 1000 different resources (projects, + * organizations, billing accounts or folders) * *

Sample code: * @@ -319,8 +319,9 @@ public final UnaryCallable deleteLogCallable() { * earlier in the list will sort before the entries later in the list. See the `entries.list` * method. *

Log entries with timestamps that are more than the [logs retention - * period](/logging/quota-policy) in the past or more than 24 hours in the future might be - * discarded. Discarding does not return an error. + * period](/logging/quota-policy) in the past or more than 24 hours in the future will not be + * available when calling `entries.list`. However, those log entries can still be exported + * with [LogSinks](/logging/docs/api/tasks/exporting-logs). *

To improve throughput and to avoid exceeding the [quota limit](/logging/quota-policy) * for calls to `entries.write`, you should try to include several log entries in this list, * rather than calling this method for each individual log entry. @@ -344,11 +345,11 @@ public final WriteLogEntriesResponse writeLogEntries( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * ## Log entry resources - * - *

Writes log entries to Stackdriver Logging. This API method is the only way to send log - * entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver - * Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging. + * Writes log entries to Stackdriver Logging. This API method is the only way to send log entries + * to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging + * agent (fluentd) and all logging libraries configured to use Stackdriver Logging. A single + * request may contain log entries for a maximum of 1000 different resources (projects, + * organizations, billing accounts or folders) * *

Sample code: * @@ -389,8 +390,9 @@ public final WriteLogEntriesResponse writeLogEntries( * earlier in the list will sort before the entries later in the list. See the `entries.list` * method. *

Log entries with timestamps that are more than the [logs retention - * period](/logging/quota-policy) in the past or more than 24 hours in the future might be - * discarded. Discarding does not return an error. + * period](/logging/quota-policy) in the past or more than 24 hours in the future will not be + * available when calling `entries.list`. However, those log entries can still be exported + * with [LogSinks](/logging/docs/api/tasks/exporting-logs). *

To improve throughput and to avoid exceeding the [quota limit](/logging/quota-policy) * for calls to `entries.write`, you should try to include several log entries in this list, * rather than calling this method for each individual log entry. @@ -414,11 +416,11 @@ public final WriteLogEntriesResponse writeLogEntries( // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * ## Log entry resources - * - *

Writes log entries to Stackdriver Logging. This API method is the only way to send log - * entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver - * Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging. + * Writes log entries to Stackdriver Logging. This API method is the only way to send log entries + * to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging + * agent (fluentd) and all logging libraries configured to use Stackdriver Logging. A single + * request may contain log entries for a maximum of 1000 different resources (projects, + * organizations, billing accounts or folders) * *

Sample code: * @@ -441,11 +443,11 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * ## Log entry resources - * - *

Writes log entries to Stackdriver Logging. This API method is the only way to send log - * entries to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver - * Logging agent (fluentd) and all logging libraries configured to use Stackdriver Logging. + * Writes log entries to Stackdriver Logging. This API method is the only way to send log entries + * to Stackdriver Logging. This method is used, directly or indirectly, by the Stackdriver Logging + * agent (fluentd) and all logging libraries configured to use Stackdriver Logging. A single + * request may contain log entries for a maximum of 1000 different resources (projects, + * organizations, billing accounts or folders) * *

Sample code: * @@ -475,10 +477,10 @@ public final WriteLogEntriesResponse writeLogEntries(WriteLogEntriesRequest requ * *


    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   List<String> resourceNames = new ArrayList<>();
+   *   List<String> formattedResourceNames = new ArrayList<>();
    *   String filter = "";
    *   String orderBy = "";
-   *   for (LogEntry element : loggingClient.listLogEntries(resourceNames, filter, orderBy).iterateAll()) {
+   *   for (LogEntry element : loggingClient.listLogEntries(formattedResourceNames, filter, orderBy).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
@@ -522,9 +524,9 @@ public final ListLogEntriesPagedResponse listLogEntries(
    *
    * 

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   List<String> resourceNames = new ArrayList<>();
+   *   List<ParentName> resourceNames = new ArrayList<>();
    *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
-   *     .addAllResourceNames(resourceNames)
+   *     .addAllResourceNames(ParentName.toStringList(resourceNames))
    *     .build();
    *   for (LogEntry element : loggingClient.listLogEntries(request).iterateAll()) {
    *     // doThingsWith(element);
@@ -548,9 +550,9 @@ public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest re
    *
    * 

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   List<String> resourceNames = new ArrayList<>();
+   *   List<ParentName> resourceNames = new ArrayList<>();
    *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
-   *     .addAllResourceNames(resourceNames)
+   *     .addAllResourceNames(ParentName.toStringList(resourceNames))
    *     .build();
    *   ApiFuture<ListLogEntriesPagedResponse> future = loggingClient.listLogEntriesPagedCallable().futureCall(request);
    *   // Do something
@@ -574,9 +576,9 @@ public final ListLogEntriesPagedResponse listLogEntries(ListLogEntriesRequest re
    *
    * 

    * try (LoggingClient loggingClient = LoggingClient.create()) {
-   *   List<String> resourceNames = new ArrayList<>();
+   *   List<ParentName> resourceNames = new ArrayList<>();
    *   ListLogEntriesRequest request = ListLogEntriesRequest.newBuilder()
-   *     .addAllResourceNames(resourceNames)
+   *     .addAllResourceNames(ParentName.toStringList(resourceNames))
    *     .build();
    *   while (true) {
    *     ListLogEntriesResponse response = loggingClient.listLogEntriesCallable().call(request);
diff --git a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java
index 726dd7a11f77..8916f2ab8922 100644
--- a/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java
+++ b/google-cloud-clients/google-cloud-logging/src/main/java/com/google/cloud/logging/v2/stub/ConfigServiceV2StubSettings.java
@@ -400,23 +400,23 @@ public static class Builder extends StubSettings.Builder actualRequests = mockConfigServiceV2.getRequests();
@@ -287,6 +288,7 @@ public void updateSinkTest() {
 
     Assert.assertEquals(sinkName, SinkNames.parse(actualRequest.getSinkName()));
     Assert.assertEquals(sink, actualRequest.getSink());
+    Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
     Assert.assertTrue(
         channelProvider.isHeaderSent(
             ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
@@ -299,6 +301,60 @@ public void updateSinkExceptionTest() throws Exception {
     StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
     mockConfigServiceV2.addException(exception);
 
+    try {
+      SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
+      LogSink sink = LogSink.newBuilder().build();
+      FieldMask updateMask = FieldMask.newBuilder().build();
+
+      client.updateSink(sinkName, sink, updateMask);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void updateSinkTest2() {
+    String name = "name3373707";
+    ResourceName destination = ProjectName.of("[PROJECT]");
+    String filter = "filter-1274492040";
+    String writerIdentity = "writerIdentity775638794";
+    boolean includeChildren = true;
+    LogSink expectedResponse =
+        LogSink.newBuilder()
+            .setName(name)
+            .setDestination(destination.toString())
+            .setFilter(filter)
+            .setWriterIdentity(writerIdentity)
+            .setIncludeChildren(includeChildren)
+            .build();
+    mockConfigServiceV2.addResponse(expectedResponse);
+
+    SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
+    LogSink sink = LogSink.newBuilder().build();
+
+    LogSink actualResponse = client.updateSink(sinkName, sink);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockConfigServiceV2.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    UpdateSinkRequest actualRequest = (UpdateSinkRequest) actualRequests.get(0);
+
+    Assert.assertEquals(sinkName, SinkNames.parse(actualRequest.getSinkName()));
+    Assert.assertEquals(sink, actualRequest.getSink());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void updateSinkExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockConfigServiceV2.addException(exception);
+
     try {
       SinkName sinkName = ProjectSinkName.of("[PROJECT]", "[SINK]");
       LogSink sink = LogSink.newBuilder().build();
diff --git a/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java b/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java
index 42014c58f8cb..afa15355fe99 100644
--- a/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java
+++ b/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingClientTest.java
@@ -200,12 +200,12 @@ public void listLogEntriesTest() {
             .build();
     mockLoggingServiceV2.addResponse(expectedResponse);
 
-    List resourceNames = new ArrayList<>();
+    List formattedResourceNames = new ArrayList<>();
     String filter = "filter-1274492040";
     String orderBy = "orderBy1234304744";
 
     ListLogEntriesPagedResponse pagedListResponse =
-        client.listLogEntries(resourceNames, filter, orderBy);
+        client.listLogEntries(formattedResourceNames, filter, orderBy);
 
     List resources = Lists.newArrayList(pagedListResponse.iterateAll());
     Assert.assertEquals(1, resources.size());
@@ -215,7 +215,7 @@ public void listLogEntriesTest() {
     Assert.assertEquals(1, actualRequests.size());
     ListLogEntriesRequest actualRequest = (ListLogEntriesRequest) actualRequests.get(0);
 
-    Assert.assertEquals(resourceNames, actualRequest.getResourceNamesList());
+    Assert.assertEquals(formattedResourceNames, actualRequest.getResourceNamesList());
     Assert.assertEquals(filter, actualRequest.getFilter());
     Assert.assertEquals(orderBy, actualRequest.getOrderBy());
     Assert.assertTrue(
@@ -231,11 +231,11 @@ public void listLogEntriesExceptionTest() throws Exception {
     mockLoggingServiceV2.addException(exception);
 
     try {
-      List resourceNames = new ArrayList<>();
+      List formattedResourceNames = new ArrayList<>();
       String filter = "filter-1274492040";
       String orderBy = "orderBy1234304744";
 
-      client.listLogEntries(resourceNames, filter, orderBy);
+      client.listLogEntries(formattedResourceNames, filter, orderBy);
       Assert.fail("No exception raised");
     } catch (InvalidArgumentException e) {
       // Expected exception
diff --git a/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingSmokeTest.java b/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingSmokeTest.java
deleted file mode 100644
index 3f9d7db78003..000000000000
--- a/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/LoggingSmokeTest.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Copyright 2018 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.logging.v2;
-
-import com.google.api.MonitoredResource;
-import com.google.common.base.Preconditions;
-import com.google.logging.v2.LogEntry;
-import com.google.logging.v2.LogName;
-import com.google.logging.v2.ProjectLogName;
-import com.google.logging.v2.WriteLogEntriesResponse;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.junit.Test;
-
-@javax.annotation.Generated("by GAPIC")
-public class LoggingSmokeTest {
-  private static final String PROJECT_ENV_NAME = "GOOGLE_CLOUD_PROJECT";
-  private static final String LEGACY_PROJECT_ENV_NAME = "GCLOUD_PROJECT";
-
-  @Test
-  public void run() {
-    main(null);
-  }
-
-  public static void main(String args[]) {
-    Logger.getLogger("").setLevel(Level.WARNING);
-    try {
-      executeNoCatch(getProjectId());
-      System.out.println("OK");
-    } catch (Exception e) {
-      System.err.println("Failed with exception:");
-      e.printStackTrace(System.err);
-      System.exit(1);
-    }
-  }
-
-  public static void executeNoCatch(String projectId) throws Exception {
-    try (LoggingClient client = LoggingClient.create()) {
-      LogName logName = ProjectLogName.of(projectId, "test-" + System.currentTimeMillis());
-      MonitoredResource resource = MonitoredResource.newBuilder().build();
-      Map labels = new HashMap<>();
-      List entries = new ArrayList<>();
-
-      WriteLogEntriesResponse response = client.writeLogEntries(logName, resource, labels, entries);
-    }
-  }
-
-  private static String getProjectId() {
-    String projectId = System.getProperty(PROJECT_ENV_NAME, System.getenv(PROJECT_ENV_NAME));
-    if (projectId == null) {
-      projectId =
-          System.getProperty(LEGACY_PROJECT_ENV_NAME, System.getenv(LEGACY_PROJECT_ENV_NAME));
-    }
-    Preconditions.checkArgument(projectId != null, "A project ID is required.");
-    return projectId;
-  }
-}
diff --git a/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java b/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java
index 0b080d0291c4..bf14c826c624 100644
--- a/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java
+++ b/google-cloud-clients/google-cloud-logging/src/test/java/com/google/cloud/logging/v2/MetricsClientTest.java
@@ -147,13 +147,13 @@ public void listLogMetricsExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void getLogMetricTest() {
-    String name = "name3373707";
+    MetricName name = ProjectMetricName.of("[PROJECT]", "[METRIC]");
     String description = "description-1724546052";
     String filter = "filter-1274492040";
     String valueExtractor = "valueExtractor2047672534";
     LogMetric expectedResponse =
         LogMetric.newBuilder()
-            .setName(name)
+            .setName(name.toString())
             .setDescription(description)
             .setFilter(filter)
             .setValueExtractor(valueExtractor)
@@ -195,13 +195,13 @@ public void getLogMetricExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void createLogMetricTest() {
-    String name = "name3373707";
+    MetricName name = ProjectMetricName.of("[PROJECT]", "[METRIC]");
     String description = "description-1724546052";
     String filter = "filter-1274492040";
     String valueExtractor = "valueExtractor2047672534";
     LogMetric expectedResponse =
         LogMetric.newBuilder()
-            .setName(name)
+            .setName(name.toString())
             .setDescription(description)
             .setFilter(filter)
             .setValueExtractor(valueExtractor)
@@ -246,13 +246,13 @@ public void createLogMetricExceptionTest() throws Exception {
   @Test
   @SuppressWarnings("all")
   public void updateLogMetricTest() {
-    String name = "name3373707";
+    MetricName name = ProjectMetricName.of("[PROJECT]", "[METRIC]");
     String description = "description-1724546052";
     String filter = "filter-1274492040";
     String valueExtractor = "valueExtractor2047672534";
     LogMetric expectedResponse =
         LogMetric.newBuilder()
-            .setName(name)
+            .setName(name.toString())
             .setDescription(description)
             .setFilter(filter)
             .setValueExtractor(valueExtractor)
diff --git a/google-cloud-clients/google-cloud-tasks/README.md b/google-cloud-clients/google-cloud-tasks/README.md
new file mode 100644
index 000000000000..6dad59916ac3
--- /dev/null
+++ b/google-cloud-clients/google-cloud-tasks/README.md
@@ -0,0 +1,102 @@
+Google Cloud Java Client for Cloud Tasks
+======================================
+
+Java idiomatic client for [Cloud Tasks][cloud-tasks].
+
+[![CircleCI](https://circleci.com/gh/GoogleCloudPlatform/google-cloud-java/tree/master.svg?style=shield)](https://circleci.com/gh/GoogleCloudPlatform/google-cloud-java/tree/master)
+[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/google-cloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/google-cloud-java?branch=master)
+[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-tasks.svg)](https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-tasks.svg)
+[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/google-cloud-java)
+[![Dependency Status](https://www.versioneye.com/user/projects/58fe4c8d6ac171426c414772/badge.svg?style=flat)](https://www.versioneye.com/user/projects/58fe4c8d6ac171426c414772)
+
+- [Product Documentation][tasks]
+- [Client Library Documentation][tasks]
+
+> Note: This client is a work-in-progress, and may occasionally
+> make backwards-incompatible changes.
+
+Quickstart
+----------
+
+[//]: # ({x-version-update-start:google-cloud-tasks:released})
+If you are using Maven, add this to your pom.xml file
+```xml
+
+  com.google.cloud
+  google-cloud-tasks
+  0.53.0-beta
+
+```
+If you are using Gradle, add this to your dependencies
+```Groovy
+compile 'com.google.cloud:google-cloud-tasks:0.53.0-beta'
+```
+If you are using SBT, add this to your dependencies
+```Scala
+libraryDependencies += "com.google.cloud" % "google-cloud-tasks" % "0.53.0-beta"
+```
+[//]: # ({x-version-update-end})
+
+Authentication
+--------------
+
+See the [Authentication](https://github.com/GoogleCloudPlatform/google-cloud-java#authentication) section in the base directory's README.
+
+About Google Cloud Cloud Tasks
+----------------------------
+
+Google [Cloud Tasks API][cloud-tasks] manages Cloud Tasks queues and tasks.
+
+See the [Cloud Tasks client library docs][tasks] to learn how to use this Cloud Tasks API Client Library.
+
+Getting Started
+---------------
+#### Prerequisites
+You will need a [Google Developers Console](https://console.developers.google.com/) project with the Cloud Tasks API enabled. [Follow these instructions](https://cloud.google.com/docs/authentication#preparation) to get your project set up. You will also need to set up the local development environment by [installing the Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.
+
+#### Installation and setup
+You'll need to obtain the `google-cloud-tasks` library.  See the [Quickstart](#quickstart) section to add `google-cloud-tasks` as a dependency in your code.
+
+Troubleshooting
+---------------
+
+To get help, follow the instructions in the [shared Troubleshooting document](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/troubleshooting/readme.md#troubleshooting).
+
+Transport
+---------
+Cloud Tasks uses gRPC for the transport layer.
+
+Java Versions
+-------------
+
+Java 7 or above is required for using this client.
+
+Versioning
+----------
+
+This library follows [Semantic Versioning](http://semver.org/).
+
+It is currently in major version zero (``0.y.z``), which means that anything may change at any time and the public API should not be considered stable.
+
+Contributing
+------------
+
+Contributions to this library are always welcome and highly encouraged.
+
+See `google-cloud`'s [CONTRIBUTING] documentation and the [shared documentation](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started.
+
+Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information.
+
+License
+-------
+
+Apache 2.0 - See [LICENSE] for more information.
+
+
+[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/CONTRIBUTING.md
+[code-of-conduct]:https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct
+[LICENSE]: https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/LICENSE
+[cloud-platform]: https://cloud.google.com/
+[cloud-tasks]: https://cloud.google.com/tasks
+[tasks]: https://cloud.google.com/tasks/docs
+[tasks]: https://googlecloudplatform.github.io/google-cloud-java/google-cloud-clients/apidocs/index.html?com/google/cloud/tasks/v2beta2/package-summary.html
diff --git a/google-cloud-clients/google-cloud-tasks/pom.xml b/google-cloud-clients/google-cloud-tasks/pom.xml
new file mode 100644
index 000000000000..edd4d71e0d91
--- /dev/null
+++ b/google-cloud-clients/google-cloud-tasks/pom.xml
@@ -0,0 +1,87 @@
+
+
+  4.0.0
+  google-cloud-tasks
+  0.53.1-beta-SNAPSHOT
+  jar
+  Google Cloud Tasks
+  https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-tasks
+  
+    Java idiomatic client for Google Cloud Tasks
+  
+  
+    com.google.cloud
+    google-cloud-clients
+    0.53.1-alpha-SNAPSHOT
+  
+  
+    google-cloud-tasks-v2beta2
+  
+  
+    
+      ${project.groupId}
+      google-cloud-core
+    
+    
+      ${project.groupId}
+      google-cloud-core-grpc
+    
+    
+      com.google.api.grpc
+      proto-google-cloud-tasks-v2beta2
+    
+    
+      com.google.api.grpc
+      proto-google-cloud-tasks-v2beta2
+    
+    
+      io.grpc
+      grpc-netty-shaded
+    
+    
+      io.grpc
+      grpc-stub
+    
+    
+      io.grpc
+      grpc-auth
+    
+    
+      ${project.groupId}
+      google-cloud-core
+      test-jar
+      test
+    
+    
+      junit
+      junit
+      test
+    
+    
+      org.easymock
+      easymock
+      test
+    
+    
+      org.objenesis
+      objenesis
+      test
+    
+    
+      com.google.api.grpc
+      grpc-google-cloud-tasks-v2beta2
+      test
+    
+    
+      com.google.api.grpc
+      grpc-google-cloud-tasks-v2beta2
+      test
+    
+    
+      com.google.api
+      gax-grpc
+      testlib
+      test
+    
+  
+
diff --git a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java
new file mode 100644
index 000000000000..8b580081cb2c
--- /dev/null
+++ b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksClient.java
@@ -0,0 +1,2966 @@
+/*
+ * Copyright 2018 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.tasks.v2beta2;
+
+import com.google.api.core.ApiFunction;
+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.paging.AbstractFixedSizeCollection;
+import com.google.api.gax.paging.AbstractPage;
+import com.google.api.gax.paging.AbstractPagedListResponse;
+import com.google.api.gax.rpc.PageContext;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.tasks.v2beta2.stub.CloudTasksStub;
+import com.google.cloud.tasks.v2beta2.stub.CloudTasksStubSettings;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
+import com.google.protobuf.Duration;
+import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
+import com.google.protobuf.Timestamp;
+import java.io.IOException;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND SERVICE
+/**
+ * Service Description: Cloud Tasks allows developers to manage the execution of background work in
+ * their applications.
+ *
+ * 

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: + * + *

+ * 
+ * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+ *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+ *   Queue response = cloudTasksClient.getQueue(name);
+ * }
+ * 
+ * 
+ * + *

Note: close() needs to be called on the cloudTasksClient 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 CloudTasksSettings to + * create(). For example: + * + *

To customize credentials: + * + *

+ * 
+ * CloudTasksSettings cloudTasksSettings =
+ *     CloudTasksSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CloudTasksClient cloudTasksClient =
+ *     CloudTasksClient.create(cloudTasksSettings);
+ * 
+ * 
+ * + * To customize the endpoint: + * + *
+ * 
+ * CloudTasksSettings cloudTasksSettings =
+ *     CloudTasksSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CloudTasksClient cloudTasksClient =
+ *     CloudTasksClient.create(cloudTasksSettings);
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CloudTasksClient implements BackgroundResource { + private final CloudTasksSettings settings; + private final CloudTasksStub stub; + + /** Constructs an instance of CloudTasksClient with default settings. */ + public static final CloudTasksClient create() throws IOException { + return create(CloudTasksSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CloudTasksClient, 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 CloudTasksClient create(CloudTasksSettings settings) throws IOException { + return new CloudTasksClient(settings); + } + + /** + * Constructs an instance of CloudTasksClient, using the given stub for making calls. This is for + * advanced usage - prefer to use CloudTasksSettings}. + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final CloudTasksClient create(CloudTasksStub stub) { + return new CloudTasksClient(stub); + } + + /** + * Constructs an instance of CloudTasksClient, 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 CloudTasksClient(CloudTasksSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CloudTasksStubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected CloudTasksClient(CloudTasksStub stub) { + this.settings = null; + this.stub = stub; + } + + public final CloudTasksSettings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CloudTasksStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists queues. + * + *

Queues are returned in lexicographical order. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Queue element : cloudTasksClient.listQueues(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. + *

The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListQueuesPagedResponse listQueues(LocationName parent) { + ListQueuesRequest request = + ListQueuesRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listQueues(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists queues. + * + *

Queues are returned in lexicographical order. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   for (Queue element : cloudTasksClient.listQueues(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. + *

The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListQueuesPagedResponse listQueues(String parent) { + ListQueuesRequest request = ListQueuesRequest.newBuilder().setParent(parent).build(); + return listQueues(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists queues. + * + *

Queues are returned in lexicographical order. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListQueuesRequest request = ListQueuesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (Queue element : cloudTasksClient.listQueues(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 ListQueuesPagedResponse listQueues(ListQueuesRequest request) { + return listQueuesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists queues. + * + *

Queues are returned in lexicographical order. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListQueuesRequest request = ListQueuesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListQueuesPagedResponse> future = cloudTasksClient.listQueuesPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Queue element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listQueuesPagedCallable() { + return stub.listQueuesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists queues. + * + *

Queues are returned in lexicographical order. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   ListQueuesRequest request = ListQueuesRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListQueuesResponse response = cloudTasksClient.listQueuesCallable().call(request);
+   *     for (Queue element : response.getQueuesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listQueuesCallable() { + return stub.listQueuesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a queue. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Queue response = cloudTasksClient.getQueue(name);
+   * }
+   * 
+ * + * @param name Required. + *

The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Queue getQueue(QueueName name) { + + GetQueueRequest request = + GetQueueRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a queue. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Queue response = cloudTasksClient.getQueue(name.toString());
+   * }
+   * 
+ * + * @param name Required. + *

The resource name of the queue. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Queue getQueue(String name) { + + GetQueueRequest request = GetQueueRequest.newBuilder().setName(name).build(); + return getQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a queue. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   GetQueueRequest request = GetQueueRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Queue response = cloudTasksClient.getQueue(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 + */ + private final Queue getQueue(GetQueueRequest request) { + return getQueueCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a queue. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   GetQueueRequest request = GetQueueRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Queue> future = cloudTasksClient.getQueueCallable().futureCall(request);
+   *   // Do something
+   *   Queue response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getQueueCallable() { + return stub.getQueueCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a queue. + * + *

Queues created with this method allow tasks to live for a maximum of 31 days. After a task + * is 31 days old, the task will be deleted regardless of whether it was dispatched or not. + * + *

WARNING: Using this method may have unintended side effects if you are using an App Engine + * `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and + * queue.yaml](/cloud-tasks/docs/queue-yaml) before using this method. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Queue queue = Queue.newBuilder().build();
+   *   Queue response = cloudTasksClient.createQueue(parent, queue);
+   * }
+   * 
+ * + * @param parent Required. + *

The location name in which the queue will be created. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID` + *

The list of allowed locations can be obtained by calling Cloud Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * @param queue Required. + *

The queue to create. + *

[Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing + * queue. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Queue createQueue(LocationName parent, Queue queue) { + + CreateQueueRequest request = + CreateQueueRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setQueue(queue) + .build(); + return createQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a queue. + * + *

Queues created with this method allow tasks to live for a maximum of 31 days. After a task + * is 31 days old, the task will be deleted regardless of whether it was dispatched or not. + * + *

WARNING: Using this method may have unintended side effects if you are using an App Engine + * `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and + * queue.yaml](/cloud-tasks/docs/queue-yaml) before using this method. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Queue queue = Queue.newBuilder().build();
+   *   Queue response = cloudTasksClient.createQueue(parent.toString(), queue);
+   * }
+   * 
+ * + * @param parent Required. + *

The location name in which the queue will be created. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID` + *

The list of allowed locations can be obtained by calling Cloud Tasks' implementation of + * [ListLocations][google.cloud.location.Locations.ListLocations]. + * @param queue Required. + *

The queue to create. + *

[Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing + * queue. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Queue createQueue(String parent, Queue queue) { + + CreateQueueRequest request = + CreateQueueRequest.newBuilder().setParent(parent).setQueue(queue).build(); + return createQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a queue. + * + *

Queues created with this method allow tasks to live for a maximum of 31 days. After a task + * is 31 days old, the task will be deleted regardless of whether it was dispatched or not. + * + *

WARNING: Using this method may have unintended side effects if you are using an App Engine + * `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and + * queue.yaml](/cloud-tasks/docs/queue-yaml) before using this method. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Queue queue = Queue.newBuilder().build();
+   *   CreateQueueRequest request = CreateQueueRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setQueue(queue)
+   *     .build();
+   *   Queue response = cloudTasksClient.createQueue(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 Queue createQueue(CreateQueueRequest request) { + return createQueueCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a queue. + * + *

Queues created with this method allow tasks to live for a maximum of 31 days. After a task + * is 31 days old, the task will be deleted regardless of whether it was dispatched or not. + * + *

WARNING: Using this method may have unintended side effects if you are using an App Engine + * `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and + * queue.yaml](/cloud-tasks/docs/queue-yaml) before using this method. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   Queue queue = Queue.newBuilder().build();
+   *   CreateQueueRequest request = CreateQueueRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setQueue(queue)
+   *     .build();
+   *   ApiFuture<Queue> future = cloudTasksClient.createQueueCallable().futureCall(request);
+   *   // Do something
+   *   Queue response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createQueueCallable() { + return stub.createQueueCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a queue. + * + *

This method creates the queue if it does not exist and updates the queue if it does exist. + * + *

Queues created with this method allow tasks to live for a maximum of 31 days. After a task + * is 31 days old, the task will be deleted regardless of whether it was dispatched or not. + * + *

WARNING: Using this method may have unintended side effects if you are using an App Engine + * `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and + * queue.yaml](/cloud-tasks/docs/queue-yaml) before using this method. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   Queue queue = Queue.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Queue response = cloudTasksClient.updateQueue(queue, updateMask);
+   * }
+   * 
+ * + * @param queue Required. + *

The queue to create or update. + *

The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified. + *

Output only fields cannot be modified using UpdateQueue. Any value specified for an + * output only field will be ignored. The queue's + * [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed. + * @param updateMask A mask used to specify which fields of the queue are being updated. + *

If empty, then all fields will be updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Queue updateQueue(Queue queue, FieldMask updateMask) { + + UpdateQueueRequest request = + UpdateQueueRequest.newBuilder().setQueue(queue).setUpdateMask(updateMask).build(); + return updateQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a queue. + * + *

This method creates the queue if it does not exist and updates the queue if it does exist. + * + *

Queues created with this method allow tasks to live for a maximum of 31 days. After a task + * is 31 days old, the task will be deleted regardless of whether it was dispatched or not. + * + *

WARNING: Using this method may have unintended side effects if you are using an App Engine + * `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and + * queue.yaml](/cloud-tasks/docs/queue-yaml) before using this method. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   Queue queue = Queue.newBuilder().build();
+   *   UpdateQueueRequest request = UpdateQueueRequest.newBuilder()
+   *     .setQueue(queue)
+   *     .build();
+   *   Queue response = cloudTasksClient.updateQueue(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 Queue updateQueue(UpdateQueueRequest request) { + return updateQueueCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a queue. + * + *

This method creates the queue if it does not exist and updates the queue if it does exist. + * + *

Queues created with this method allow tasks to live for a maximum of 31 days. After a task + * is 31 days old, the task will be deleted regardless of whether it was dispatched or not. + * + *

WARNING: Using this method may have unintended side effects if you are using an App Engine + * `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and + * queue.yaml](/cloud-tasks/docs/queue-yaml) before using this method. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   Queue queue = Queue.newBuilder().build();
+   *   UpdateQueueRequest request = UpdateQueueRequest.newBuilder()
+   *     .setQueue(queue)
+   *     .build();
+   *   ApiFuture<Queue> future = cloudTasksClient.updateQueueCallable().futureCall(request);
+   *   // Do something
+   *   Queue response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateQueueCallable() { + return stub.updateQueueCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a queue. + * + *

This command will delete the queue even if it has tasks in it. + * + *

Note: If you delete a queue, a queue with the same name can't be created for 7 days. + * + *

WARNING: Using this method may have unintended side effects if you are using an App Engine + * `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and + * queue.yaml](/cloud-tasks/docs/queue-yaml) before using this method. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   cloudTasksClient.deleteQueue(name);
+   * }
+   * 
+ * + * @param name Required. + *

The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteQueue(QueueName name) { + + DeleteQueueRequest request = + DeleteQueueRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a queue. + * + *

This command will delete the queue even if it has tasks in it. + * + *

Note: If you delete a queue, a queue with the same name can't be created for 7 days. + * + *

WARNING: Using this method may have unintended side effects if you are using an App Engine + * `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and + * queue.yaml](/cloud-tasks/docs/queue-yaml) before using this method. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   cloudTasksClient.deleteQueue(name.toString());
+   * }
+   * 
+ * + * @param name Required. + *

The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteQueue(String name) { + + DeleteQueueRequest request = DeleteQueueRequest.newBuilder().setName(name).build(); + deleteQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a queue. + * + *

This command will delete the queue even if it has tasks in it. + * + *

Note: If you delete a queue, a queue with the same name can't be created for 7 days. + * + *

WARNING: Using this method may have unintended side effects if you are using an App Engine + * `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and + * queue.yaml](/cloud-tasks/docs/queue-yaml) before using this method. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   DeleteQueueRequest request = DeleteQueueRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   cloudTasksClient.deleteQueue(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 + */ + private final void deleteQueue(DeleteQueueRequest request) { + deleteQueueCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a queue. + * + *

This command will delete the queue even if it has tasks in it. + * + *

Note: If you delete a queue, a queue with the same name can't be created for 7 days. + * + *

WARNING: Using this method may have unintended side effects if you are using an App Engine + * `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and + * queue.yaml](/cloud-tasks/docs/queue-yaml) before using this method. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   DeleteQueueRequest request = DeleteQueueRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = cloudTasksClient.deleteQueueCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteQueueCallable() { + return stub.deleteQueueCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Purges a queue by deleting all of its tasks. + * + *

All tasks created before this method is called are permanently deleted. + * + *

Purge operations can take up to one minute to take effect. Tasks might be dispatched before + * the purge takes effect. A purge is irreversible. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Queue response = cloudTasksClient.purgeQueue(name);
+   * }
+   * 
+ * + * @param name Required. + *

The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Queue purgeQueue(QueueName name) { + + PurgeQueueRequest request = + PurgeQueueRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return purgeQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Purges a queue by deleting all of its tasks. + * + *

All tasks created before this method is called are permanently deleted. + * + *

Purge operations can take up to one minute to take effect. Tasks might be dispatched before + * the purge takes effect. A purge is irreversible. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Queue response = cloudTasksClient.purgeQueue(name.toString());
+   * }
+   * 
+ * + * @param name Required. + *

The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Queue purgeQueue(String name) { + + PurgeQueueRequest request = PurgeQueueRequest.newBuilder().setName(name).build(); + return purgeQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Purges a queue by deleting all of its tasks. + * + *

All tasks created before this method is called are permanently deleted. + * + *

Purge operations can take up to one minute to take effect. Tasks might be dispatched before + * the purge takes effect. A purge is irreversible. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   PurgeQueueRequest request = PurgeQueueRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Queue response = cloudTasksClient.purgeQueue(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 + */ + private final Queue purgeQueue(PurgeQueueRequest request) { + return purgeQueueCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Purges a queue by deleting all of its tasks. + * + *

All tasks created before this method is called are permanently deleted. + * + *

Purge operations can take up to one minute to take effect. Tasks might be dispatched before + * the purge takes effect. A purge is irreversible. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   PurgeQueueRequest request = PurgeQueueRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Queue> future = cloudTasksClient.purgeQueueCallable().futureCall(request);
+   *   // Do something
+   *   Queue response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable purgeQueueCallable() { + return stub.purgeQueueCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Pauses the queue. + * + *

If a queue is paused then the system will stop dispatching tasks until the queue is resumed + * via [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added + * when the queue is paused. A queue is paused if its + * [state][google.cloud.tasks.v2beta2.Queue.state] is + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Queue response = cloudTasksClient.pauseQueue(name);
+   * }
+   * 
+ * + * @param name Required. + *

The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Queue pauseQueue(QueueName name) { + + PauseQueueRequest request = + PauseQueueRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return pauseQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Pauses the queue. + * + *

If a queue is paused then the system will stop dispatching tasks until the queue is resumed + * via [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added + * when the queue is paused. A queue is paused if its + * [state][google.cloud.tasks.v2beta2.Queue.state] is + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Queue response = cloudTasksClient.pauseQueue(name.toString());
+   * }
+   * 
+ * + * @param name Required. + *

The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Queue pauseQueue(String name) { + + PauseQueueRequest request = PauseQueueRequest.newBuilder().setName(name).build(); + return pauseQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Pauses the queue. + * + *

If a queue is paused then the system will stop dispatching tasks until the queue is resumed + * via [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added + * when the queue is paused. A queue is paused if its + * [state][google.cloud.tasks.v2beta2.Queue.state] is + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   PauseQueueRequest request = PauseQueueRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Queue response = cloudTasksClient.pauseQueue(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 + */ + private final Queue pauseQueue(PauseQueueRequest request) { + return pauseQueueCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Pauses the queue. + * + *

If a queue is paused then the system will stop dispatching tasks until the queue is resumed + * via [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added + * when the queue is paused. A queue is paused if its + * [state][google.cloud.tasks.v2beta2.Queue.state] is + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   PauseQueueRequest request = PauseQueueRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Queue> future = cloudTasksClient.pauseQueueCallable().futureCall(request);
+   *   // Do something
+   *   Queue response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable pauseQueueCallable() { + return stub.pauseQueueCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Resume a queue. + * + *

This method resumes a queue after it has been + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or + * [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored in + * the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it will + * be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. + * + *

WARNING: Resuming many high-QPS queues at the same time can lead to target overloading. If + * you are resuming high-QPS queues, follow the 500/50/5 pattern described in [Managing Cloud + * Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf). + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Queue response = cloudTasksClient.resumeQueue(name);
+   * }
+   * 
+ * + * @param name Required. + *

The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Queue resumeQueue(QueueName name) { + + ResumeQueueRequest request = + ResumeQueueRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return resumeQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Resume a queue. + * + *

This method resumes a queue after it has been + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or + * [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored in + * the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it will + * be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. + * + *

WARNING: Resuming many high-QPS queues at the same time can lead to target overloading. If + * you are resuming high-QPS queues, follow the 500/50/5 pattern described in [Managing Cloud + * Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf). + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Queue response = cloudTasksClient.resumeQueue(name.toString());
+   * }
+   * 
+ * + * @param name Required. + *

The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Queue resumeQueue(String name) { + + ResumeQueueRequest request = ResumeQueueRequest.newBuilder().setName(name).build(); + return resumeQueue(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Resume a queue. + * + *

This method resumes a queue after it has been + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or + * [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored in + * the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it will + * be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. + * + *

WARNING: Resuming many high-QPS queues at the same time can lead to target overloading. If + * you are resuming high-QPS queues, follow the 500/50/5 pattern described in [Managing Cloud + * Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf). + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   ResumeQueueRequest request = ResumeQueueRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Queue response = cloudTasksClient.resumeQueue(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 + */ + private final Queue resumeQueue(ResumeQueueRequest request) { + return resumeQueueCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Resume a queue. + * + *

This method resumes a queue after it has been + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or + * [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored in + * the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it will + * be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.RUNNING]. + * + *

WARNING: Resuming many high-QPS queues at the same time can lead to target overloading. If + * you are resuming high-QPS queues, follow the 500/50/5 pattern described in [Managing Cloud + * Tasks Scaling Risks](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf). + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   ResumeQueueRequest request = ResumeQueueRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Queue> future = cloudTasksClient.resumeQueueCallable().futureCall(request);
+   *   // Do something
+   *   Queue response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable resumeQueueCallable() { + return stub.resumeQueueCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an + * empty policy if the resource exists and does not have a policy set. + * + *

Authorization requires the following [Google IAM](/iam) permission on the specified resource + * parent: + * + *

* `cloudtasks.queues.getIamPolicy` + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Policy response = cloudTasksClient.getIamPolicy(resource);
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy is being requested. `resource` is + * usually specified as a path. For example, a Project resource is specified as + * `projects/{project}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(QueueName resource) { + + GetIamPolicyRequest request = + GetIamPolicyRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .build(); + return getIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an + * empty policy if the resource exists and does not have a policy set. + * + *

Authorization requires the following [Google IAM](/iam) permission on the specified resource + * parent: + * + *

* `cloudtasks.queues.getIamPolicy` + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Policy response = cloudTasksClient.getIamPolicy(resource.toString());
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy is being requested. `resource` is + * usually specified as a path. For example, a Project resource is specified as + * `projects/{project}`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(String resource) { + + GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build(); + return getIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an + * empty policy if the resource exists and does not have a policy set. + * + *

Authorization requires the following [Google IAM](/iam) permission on the specified resource + * parent: + * + *

* `cloudtasks.queues.getIamPolicy` + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .build();
+   *   Policy response = cloudTasksClient.getIamPolicy(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 + */ + private final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Returns an + * empty policy if the resource exists and does not have a policy set. + * + *

Authorization requires the following [Google IAM](/iam) permission on the specified resource + * parent: + * + *

* `cloudtasks.queues.getIamPolicy` + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .build();
+   *   ApiFuture<Policy> future = cloudTasksClient.getIamPolicyCallable().futureCall(request);
+   *   // Do something
+   *   Policy response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getIamPolicyCallable() { + return stub.getIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any + * existing policy. + * + *

Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level + * permissions are required to use the Cloud Console. + * + *

Authorization requires the following [Google IAM](/iam) permission on the specified resource + * parent: + * + *

* `cloudtasks.queues.setIamPolicy` + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Policy policy = Policy.newBuilder().build();
+   *   Policy response = cloudTasksClient.setIamPolicy(resource, policy);
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy is being specified. `resource` is + * usually specified as a path. For example, a Project resource is specified as + * `projects/{project}`. + * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the + * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud + * Platform services (such as Projects) might reject them. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(QueueName resource, Policy policy) { + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .setPolicy(policy) + .build(); + return setIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any + * existing policy. + * + *

Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level + * permissions are required to use the Cloud Console. + * + *

Authorization requires the following [Google IAM](/iam) permission on the specified resource + * parent: + * + *

* `cloudtasks.queues.setIamPolicy` + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Policy policy = Policy.newBuilder().build();
+   *   Policy response = cloudTasksClient.setIamPolicy(resource.toString(), policy);
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy is being specified. `resource` is + * usually specified as a path. For example, a Project resource is specified as + * `projects/{project}`. + * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the + * policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud + * Platform services (such as Projects) might reject them. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(String resource, Policy policy) { + + SetIamPolicyRequest request = + SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build(); + return setIamPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any + * existing policy. + * + *

Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level + * permissions are required to use the Cloud Console. + * + *

Authorization requires the following [Google IAM](/iam) permission on the specified resource + * parent: + * + *

* `cloudtasks.queues.setIamPolicy` + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Policy policy = Policy.newBuilder().build();
+   *   SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .setPolicy(policy)
+   *     .build();
+   *   Policy response = cloudTasksClient.setIamPolicy(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 Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. Replaces any + * existing policy. + * + *

Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level + * permissions are required to use the Cloud Console. + * + *

Authorization requires the following [Google IAM](/iam) permission on the specified resource + * parent: + * + *

* `cloudtasks.queues.setIamPolicy` + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Policy policy = Policy.newBuilder().build();
+   *   SetIamPolicyRequest request = SetIamPolicyRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .setPolicy(policy)
+   *     .build();
+   *   ApiFuture<Policy> future = cloudTasksClient.setIamPolicyCallable().futureCall(request);
+   *   // Do something
+   *   Policy response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable setIamPolicyCallable() { + return stub.setIamPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue]. If the + * resource does not exist, this will return an empty set of permissions, not a + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + * + *

Note: This operation is designed to be used for building permission-aware UIs and + * command-line tools, not for authorization checking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsResponse response = cloudTasksClient.testIamPermissions(resource, permissions);
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy detail is being requested. + * `resource` is usually specified as a path. For example, a Project resource is specified as + * `projects/{project}`. + * @param permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions( + QueueName resource, List permissions) { + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource == null ? null : resource.toString()) + .addAllPermissions(permissions) + .build(); + return testIamPermissions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue]. If the + * resource does not exist, this will return an empty set of permissions, not a + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + * + *

Note: This operation is designed to be used for building permission-aware UIs and + * command-line tools, not for authorization checking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsResponse response = cloudTasksClient.testIamPermissions(resource.toString(), permissions);
+   * }
+   * 
+ * + * @param resource REQUIRED: The resource for which the policy detail is being requested. + * `resource` is usually specified as a path. For example, a Project resource is specified as + * `projects/{project}`. + * @param permissions The set of permissions to check for the `resource`. Permissions with + * wildcards (such as '*' or 'storage.*') are not allowed. For more information see + * [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions). + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions( + String resource, List permissions) { + + TestIamPermissionsRequest request = + TestIamPermissionsRequest.newBuilder() + .setResource(resource) + .addAllPermissions(permissions) + .build(); + return testIamPermissions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue]. If the + * resource does not exist, this will return an empty set of permissions, not a + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + * + *

Note: This operation is designed to be used for building permission-aware UIs and + * command-line tools, not for authorization checking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .addAllPermissions(permissions)
+   *     .build();
+   *   TestIamPermissionsResponse response = cloudTasksClient.testIamPermissions(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 TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue]. If the + * resource does not exist, this will return an empty set of permissions, not a + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] error. + * + *

Note: This operation is designed to be used for building permission-aware UIs and + * command-line tools, not for authorization checking. This operation may "fail open" without + * warning. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   ResourceName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   List<String> permissions = new ArrayList<>();
+   *   TestIamPermissionsRequest request = TestIamPermissionsRequest.newBuilder()
+   *     .setResource(resource.toString())
+   *     .addAllPermissions(permissions)
+   *     .build();
+   *   ApiFuture<TestIamPermissionsResponse> future = cloudTasksClient.testIamPermissionsCallable().futureCall(request);
+   *   // Do something
+   *   TestIamPermissionsResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + testIamPermissionsCallable() { + return stub.testIamPermissionsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the tasks in a queue. + * + *

By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved + * due to performance considerations; + * [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the subset + * of information which is returned. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   for (Task element : cloudTasksClient.listTasks(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. + *

The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTasksPagedResponse listTasks(QueueName parent) { + ListTasksRequest request = + ListTasksRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listTasks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the tasks in a queue. + * + *

By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved + * due to performance considerations; + * [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the subset + * of information which is returned. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   for (Task element : cloudTasksClient.listTasks(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Required. + *

The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTasksPagedResponse listTasks(String parent) { + ListTasksRequest request = ListTasksRequest.newBuilder().setParent(parent).build(); + return listTasks(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the tasks in a queue. + * + *

By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved + * due to performance considerations; + * [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the subset + * of information which is returned. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   ListTasksRequest request = ListTasksRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (Task element : cloudTasksClient.listTasks(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 ListTasksPagedResponse listTasks(ListTasksRequest request) { + return listTasksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the tasks in a queue. + * + *

By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved + * due to performance considerations; + * [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the subset + * of information which is returned. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   ListTasksRequest request = ListTasksRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListTasksPagedResponse> future = cloudTasksClient.listTasksPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (Task element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listTasksPagedCallable() { + return stub.listTasksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists the tasks in a queue. + * + *

By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved + * due to performance considerations; + * [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the subset + * of information which is returned. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   ListTasksRequest request = ListTasksRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListTasksResponse response = cloudTasksClient.listTasksCallable().call(request);
+   *     for (Task element : response.getTasksList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable listTasksCallable() { + return stub.listTasksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a task. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Task response = cloudTasksClient.getTask(name);
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task getTask(TaskName name) { + + GetTaskRequest request = + GetTaskRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a task. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Task response = cloudTasksClient.getTask(name.toString());
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task getTask(String name) { + + GetTaskRequest request = GetTaskRequest.newBuilder().setName(name).build(); + return getTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a task. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   GetTaskRequest request = GetTaskRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Task response = cloudTasksClient.getTask(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 Task getTask(GetTaskRequest request) { + return getTaskCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a task. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   GetTaskRequest request = GetTaskRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Task> future = cloudTasksClient.getTaskCallable().futureCall(request);
+   *   // Do something
+   *   Task response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getTaskCallable() { + return stub.getTaskCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a task and adds it to a queue. + * + *

Tasks cannot be updated after creation; there is no UpdateTask command. + * + *

* For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), the maximum + * task size is 100KB. * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this the + * maximum task size is 1MB. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Task task = Task.newBuilder().build();
+   *   Task response = cloudTasksClient.createTask(parent, task);
+   * }
+   * 
+ * + * @param parent Required. + *

The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + *

The queue must already exist. + * @param task Required. + *

The task to add. + *

Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. The user can + * optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not + * specified then the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. + *

If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in + * the past then Cloud Tasks will set it to the current time. + *

Task De-duplication: + *

Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical + * to that of an existing task or a task that was deleted or completed recently then the call + * will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was + * created using Cloud Tasks, then another task with the same name can't be created for ~1hour + * after the original task was deleted or completed. If the task's queue was created using + * queue.yaml or queue.xml, then another task with the same name can't be created for ~9days + * after the original task was deleted or completed. + *

Because there is an extra lookup cost to identify duplicate task names, these + * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly + * increased latency. Using hashed strings for the task id or for the prefix of the task id is + * recommended. Choosing task ids that are sequential or have sequential prefixes, for example + * using a timestamp, causes an increase in latency and error rates in all task commands. The + * infrastructure relies on an approximately uniform distribution of task ids to store and + * serve tasks efficiently. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task createTask(QueueName parent, Task task) { + + CreateTaskRequest request = + CreateTaskRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setTask(task) + .build(); + return createTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a task and adds it to a queue. + * + *

Tasks cannot be updated after creation; there is no UpdateTask command. + * + *

* For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), the maximum + * task size is 100KB. * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this the + * maximum task size is 1MB. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Task task = Task.newBuilder().build();
+   *   Task response = cloudTasksClient.createTask(parent.toString(), task);
+   * }
+   * 
+ * + * @param parent Required. + *

The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + *

The queue must already exist. + * @param task Required. + *

The task to add. + *

Task names have the following format: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. The user can + * optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a name is not + * specified then the system will generate a random unique task id, which will be set in the + * task returned in the [response][google.cloud.tasks.v2beta2.Task.name]. + *

If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in + * the past then Cloud Tasks will set it to the current time. + *

Task De-duplication: + *

Explicitly specifying a task ID enables task de-duplication. If a task's ID is identical + * to that of an existing task or a task that was deleted or completed recently then the call + * will fail with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. If the task's queue was + * created using Cloud Tasks, then another task with the same name can't be created for ~1hour + * after the original task was deleted or completed. If the task's queue was created using + * queue.yaml or queue.xml, then another task with the same name can't be created for ~9days + * after the original task was deleted or completed. + *

Because there is an extra lookup cost to identify duplicate task names, these + * [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly + * increased latency. Using hashed strings for the task id or for the prefix of the task id is + * recommended. Choosing task ids that are sequential or have sequential prefixes, for example + * using a timestamp, causes an increase in latency and error rates in all task commands. The + * infrastructure relies on an approximately uniform distribution of task ids to store and + * serve tasks efficiently. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task createTask(String parent, Task task) { + + CreateTaskRequest request = + CreateTaskRequest.newBuilder().setParent(parent).setTask(task).build(); + return createTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a task and adds it to a queue. + * + *

Tasks cannot be updated after creation; there is no UpdateTask command. + * + *

* For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), the maximum + * task size is 100KB. * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this the + * maximum task size is 1MB. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Task task = Task.newBuilder().build();
+   *   CreateTaskRequest request = CreateTaskRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTask(task)
+   *     .build();
+   *   Task response = cloudTasksClient.createTask(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 Task createTask(CreateTaskRequest request) { + return createTaskCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Creates a task and adds it to a queue. + * + *

Tasks cannot be updated after creation; there is no UpdateTask command. + * + *

* For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), the maximum + * task size is 100KB. * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this the + * maximum task size is 1MB. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Task task = Task.newBuilder().build();
+   *   CreateTaskRequest request = CreateTaskRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setTask(task)
+   *     .build();
+   *   ApiFuture<Task> future = cloudTasksClient.createTaskCallable().futureCall(request);
+   *   // Do something
+   *   Task response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable createTaskCallable() { + return stub.createTaskCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a task. + * + *

A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has + * completed successfully or permanently failed. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   cloudTasksClient.deleteTask(name);
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTask(TaskName name) { + + DeleteTaskRequest request = + DeleteTaskRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a task. + * + *

A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has + * completed successfully or permanently failed. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   cloudTasksClient.deleteTask(name.toString());
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteTask(String name) { + + DeleteTaskRequest request = DeleteTaskRequest.newBuilder().setName(name).build(); + deleteTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a task. + * + *

A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has + * completed successfully or permanently failed. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   DeleteTaskRequest request = DeleteTaskRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   cloudTasksClient.deleteTask(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 + */ + private final void deleteTask(DeleteTaskRequest request) { + deleteTaskCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deletes a task. + * + *

A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has + * completed successfully or permanently failed. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   DeleteTaskRequest request = DeleteTaskRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Void> future = cloudTasksClient.deleteTaskCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable deleteTaskCallable() { + return stub.deleteTaskCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Leases tasks from a pull queue for + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + * + *

This method is invoked by the worker to obtain a lease. The worker must acknowledge the task + * via [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have + * performed the work associated with the task. + * + *

The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that + * the worker needs to perform the work associated with the task. To return the payloads in the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set + * [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to + * [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. + * + *

A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] + * requests are allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] is + * returned when this limit is exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + * is also returned when + * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] + * is exceeded. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Duration leaseDuration = Duration.newBuilder().build();
+   *   LeaseTasksRequest request = LeaseTasksRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setLeaseDuration(leaseDuration)
+   *     .build();
+   *   LeaseTasksResponse response = cloudTasksClient.leaseTasks(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 LeaseTasksResponse leaseTasks(LeaseTasksRequest request) { + return leaseTasksCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Leases tasks from a pull queue for + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + * + *

This method is invoked by the worker to obtain a lease. The worker must acknowledge the task + * via [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have + * performed the work associated with the task. + * + *

The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that + * the worker needs to perform the work associated with the task. To return the payloads in the + * [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set + * [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to + * [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. + * + *

A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] + * requests are allowed per queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] is + * returned when this limit is exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + * is also returned when + * [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] + * is exceeded. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+   *   Duration leaseDuration = Duration.newBuilder().build();
+   *   LeaseTasksRequest request = LeaseTasksRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .setLeaseDuration(leaseDuration)
+   *     .build();
+   *   ApiFuture<LeaseTasksResponse> future = cloudTasksClient.leaseTasksCallable().futureCall(request);
+   *   // Do something
+   *   LeaseTasksResponse response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable leaseTasksCallable() { + return stub.leaseTasksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Acknowledges a pull task. + * + *

The worker, that is, the entity that + * [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method to + * indicate that the work associated with the task has finished. + * + *

The worker must acknowledge a task within the + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease will + * expire and the task will become available to be leased again. After the task is acknowledged, + * it will not be returned by a later + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], + * [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   cloudTasksClient.acknowledgeTask(name, scheduleTime);
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param scheduleTime Required. + *

The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction + * is to ensure that your worker currently holds the lease. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void acknowledgeTask(TaskName name, Timestamp scheduleTime) { + + AcknowledgeTaskRequest request = + AcknowledgeTaskRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setScheduleTime(scheduleTime) + .build(); + acknowledgeTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Acknowledges a pull task. + * + *

The worker, that is, the entity that + * [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method to + * indicate that the work associated with the task has finished. + * + *

The worker must acknowledge a task within the + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease will + * expire and the task will become available to be leased again. After the task is acknowledged, + * it will not be returned by a later + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], + * [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   cloudTasksClient.acknowledgeTask(name.toString(), scheduleTime);
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param scheduleTime Required. + *

The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction + * is to ensure that your worker currently holds the lease. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void acknowledgeTask(String name, Timestamp scheduleTime) { + + AcknowledgeTaskRequest request = + AcknowledgeTaskRequest.newBuilder().setName(name).setScheduleTime(scheduleTime).build(); + acknowledgeTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Acknowledges a pull task. + * + *

The worker, that is, the entity that + * [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method to + * indicate that the work associated with the task has finished. + * + *

The worker must acknowledge a task within the + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease will + * expire and the task will become available to be leased again. After the task is acknowledged, + * it will not be returned by a later + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], + * [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   AcknowledgeTaskRequest request = AcknowledgeTaskRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setScheduleTime(scheduleTime)
+   *     .build();
+   *   cloudTasksClient.acknowledgeTask(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 void acknowledgeTask(AcknowledgeTaskRequest request) { + acknowledgeTaskCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Acknowledges a pull task. + * + *

The worker, that is, the entity that + * [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method to + * indicate that the work associated with the task has finished. + * + *

The worker must acknowledge a task within the + * [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease will + * expire and the task will become available to be leased again. After the task is acknowledged, + * it will not be returned by a later + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], + * [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or + * [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   AcknowledgeTaskRequest request = AcknowledgeTaskRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setScheduleTime(scheduleTime)
+   *     .build();
+   *   ApiFuture<Void> future = cloudTasksClient.acknowledgeTaskCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable acknowledgeTaskCallable() { + return stub.acknowledgeTaskCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Renew the current lease of a pull task. + * + *

The worker can use this method to extend the lease by a new duration, starting from now. The + * new task lease will be returned in the task's + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   Duration leaseDuration = Duration.newBuilder().build();
+   *   Task response = cloudTasksClient.renewLease(name, scheduleTime, leaseDuration);
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param scheduleTime Required. + *

The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction + * is to ensure that your worker currently holds the lease. + * @param leaseDuration Required. + *

The desired new lease duration, starting from now. + *

The maximum lease duration is 1 week. `lease_duration` will be truncated to the nearest + * second. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task renewLease(TaskName name, Timestamp scheduleTime, Duration leaseDuration) { + + RenewLeaseRequest request = + RenewLeaseRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setScheduleTime(scheduleTime) + .setLeaseDuration(leaseDuration) + .build(); + return renewLease(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Renew the current lease of a pull task. + * + *

The worker can use this method to extend the lease by a new duration, starting from now. The + * new task lease will be returned in the task's + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   Duration leaseDuration = Duration.newBuilder().build();
+   *   Task response = cloudTasksClient.renewLease(name.toString(), scheduleTime, leaseDuration);
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param scheduleTime Required. + *

The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction + * is to ensure that your worker currently holds the lease. + * @param leaseDuration Required. + *

The desired new lease duration, starting from now. + *

The maximum lease duration is 1 week. `lease_duration` will be truncated to the nearest + * second. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task renewLease(String name, Timestamp scheduleTime, Duration leaseDuration) { + + RenewLeaseRequest request = + RenewLeaseRequest.newBuilder() + .setName(name) + .setScheduleTime(scheduleTime) + .setLeaseDuration(leaseDuration) + .build(); + return renewLease(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Renew the current lease of a pull task. + * + *

The worker can use this method to extend the lease by a new duration, starting from now. The + * new task lease will be returned in the task's + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   Duration leaseDuration = Duration.newBuilder().build();
+   *   RenewLeaseRequest request = RenewLeaseRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setScheduleTime(scheduleTime)
+   *     .setLeaseDuration(leaseDuration)
+   *     .build();
+   *   Task response = cloudTasksClient.renewLease(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 Task renewLease(RenewLeaseRequest request) { + return renewLeaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Renew the current lease of a pull task. + * + *

The worker can use this method to extend the lease by a new duration, starting from now. The + * new task lease will be returned in the task's + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   Duration leaseDuration = Duration.newBuilder().build();
+   *   RenewLeaseRequest request = RenewLeaseRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setScheduleTime(scheduleTime)
+   *     .setLeaseDuration(leaseDuration)
+   *     .build();
+   *   ApiFuture<Task> future = cloudTasksClient.renewLeaseCallable().futureCall(request);
+   *   // Do something
+   *   Task response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable renewLeaseCallable() { + return stub.renewLeaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Cancel a pull task's lease. + * + *

The worker can use this method to cancel a task's lease by setting its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will make the task + * available to be leased to the next caller of + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   Task response = cloudTasksClient.cancelLease(name, scheduleTime);
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param scheduleTime Required. + *

The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction + * is to ensure that your worker currently holds the lease. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task cancelLease(TaskName name, Timestamp scheduleTime) { + + CancelLeaseRequest request = + CancelLeaseRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setScheduleTime(scheduleTime) + .build(); + return cancelLease(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Cancel a pull task's lease. + * + *

The worker can use this method to cancel a task's lease by setting its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will make the task + * available to be leased to the next caller of + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   Task response = cloudTasksClient.cancelLease(name.toString(), scheduleTime);
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @param scheduleTime Required. + *

The task's current schedule time, available in the + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + * [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction + * is to ensure that your worker currently holds the lease. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task cancelLease(String name, Timestamp scheduleTime) { + + CancelLeaseRequest request = + CancelLeaseRequest.newBuilder().setName(name).setScheduleTime(scheduleTime).build(); + return cancelLease(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Cancel a pull task's lease. + * + *

The worker can use this method to cancel a task's lease by setting its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will make the task + * available to be leased to the next caller of + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   CancelLeaseRequest request = CancelLeaseRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setScheduleTime(scheduleTime)
+   *     .build();
+   *   Task response = cloudTasksClient.cancelLease(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 Task cancelLease(CancelLeaseRequest request) { + return cancelLeaseCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Cancel a pull task's lease. + * + *

The worker can use this method to cancel a task's lease by setting its + * [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will make the task + * available to be leased to the next caller of + * [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Timestamp scheduleTime = Timestamp.newBuilder().build();
+   *   CancelLeaseRequest request = CancelLeaseRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setScheduleTime(scheduleTime)
+   *     .build();
+   *   ApiFuture<Task> future = cloudTasksClient.cancelLeaseCallable().futureCall(request);
+   *   // Do something
+   *   Task response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable cancelLeaseCallable() { + return stub.cancelLeaseCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Forces a task to run now. + * + *

When this method is called, Cloud Tasks will dispatch the task, even if the task is already + * running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + * + *

This command is meant to be used for manual debugging. For example, + * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed task + * after a fix has been made or to manually force a task to be dispatched now. + * + *

The dispatched task is returned. That is, the task that is returned contains the + * [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but before the + * task is received by its target. + * + *

If Cloud Tasks receives a successful response from the task's target, then the task will be + * deleted; otherwise the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] + * will be reset to the time that [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was + * called plus the retry delay specified in the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + * + *

[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a task that has already succeeded + * or permanently failed. + * + *

[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a [pull + * task][google.cloud.tasks.v2beta2.PullMessage]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Task response = cloudTasksClient.runTask(name);
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task runTask(TaskName name) { + + RunTaskRequest request = + RunTaskRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return runTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Forces a task to run now. + * + *

When this method is called, Cloud Tasks will dispatch the task, even if the task is already + * running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + * + *

This command is meant to be used for manual debugging. For example, + * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed task + * after a fix has been made or to manually force a task to be dispatched now. + * + *

The dispatched task is returned. That is, the task that is returned contains the + * [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but before the + * task is received by its target. + * + *

If Cloud Tasks receives a successful response from the task's target, then the task will be + * deleted; otherwise the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] + * will be reset to the time that [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was + * called plus the retry delay specified in the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + * + *

[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a task that has already succeeded + * or permanently failed. + * + *

[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a [pull + * task][google.cloud.tasks.v2beta2.PullMessage]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   Task response = cloudTasksClient.runTask(name.toString());
+   * }
+   * 
+ * + * @param name Required. + *

The task name. For example: + * `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Task runTask(String name) { + + RunTaskRequest request = RunTaskRequest.newBuilder().setName(name).build(); + return runTask(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Forces a task to run now. + * + *

When this method is called, Cloud Tasks will dispatch the task, even if the task is already + * running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + * + *

This command is meant to be used for manual debugging. For example, + * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed task + * after a fix has been made or to manually force a task to be dispatched now. + * + *

The dispatched task is returned. That is, the task that is returned contains the + * [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but before the + * task is received by its target. + * + *

If Cloud Tasks receives a successful response from the task's target, then the task will be + * deleted; otherwise the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] + * will be reset to the time that [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was + * called plus the retry delay specified in the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + * + *

[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a task that has already succeeded + * or permanently failed. + * + *

[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a [pull + * task][google.cloud.tasks.v2beta2.PullMessage]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   RunTaskRequest request = RunTaskRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   Task response = cloudTasksClient.runTask(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 Task runTask(RunTaskRequest request) { + return runTaskCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Forces a task to run now. + * + *

When this method is called, Cloud Tasks will dispatch the task, even if the task is already + * running, the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits] or is + * [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + * + *

This command is meant to be used for manual debugging. For example, + * [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] can be used to retry a failed task + * after a fix has been made or to manually force a task to be dispatched now. + * + *

The dispatched task is returned. That is, the task that is returned contains the + * [status][google.cloud.tasks.v2beta2.Task.status] after the task is dispatched but before the + * task is received by its target. + * + *

If Cloud Tasks receives a successful response from the task's target, then the task will be + * deleted; otherwise the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] + * will be reset to the time that [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was + * called plus the retry delay specified in the queue's + * [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + * + *

[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns + * [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a task that has already succeeded + * or permanently failed. + * + *

[RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a [pull + * task][google.cloud.tasks.v2beta2.PullMessage]. + * + *

Sample code: + * + *


+   * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+   *   TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]");
+   *   RunTaskRequest request = RunTaskRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<Task> future = cloudTasksClient.runTaskCallable().futureCall(request);
+   *   // Do something
+   *   Task response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable runTaskCallable() { + return stub.runTaskCallable(); + } + + @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 ListQueuesPagedResponse + extends AbstractPagedListResponse< + ListQueuesRequest, ListQueuesResponse, Queue, ListQueuesPage, + ListQueuesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListQueuesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListQueuesPagedResponse apply(ListQueuesPage input) { + return new ListQueuesPagedResponse(input); + } + }); + } + + private ListQueuesPagedResponse(ListQueuesPage page) { + super(page, ListQueuesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListQueuesPage + extends AbstractPage { + + private ListQueuesPage( + PageContext context, + ListQueuesResponse response) { + super(context, response); + } + + private static ListQueuesPage createEmptyPage() { + return new ListQueuesPage(null, null); + } + + @Override + protected ListQueuesPage createPage( + PageContext context, + ListQueuesResponse response) { + return new ListQueuesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListQueuesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListQueuesRequest, ListQueuesResponse, Queue, ListQueuesPage, + ListQueuesFixedSizeCollection> { + + private ListQueuesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListQueuesFixedSizeCollection createEmptyCollection() { + return new ListQueuesFixedSizeCollection(null, 0); + } + + @Override + protected ListQueuesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListQueuesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTasksPagedResponse + extends AbstractPagedListResponse< + ListTasksRequest, ListTasksResponse, Task, ListTasksPage, ListTasksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTasksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTasksPagedResponse apply(ListTasksPage input) { + return new ListTasksPagedResponse(input); + } + }); + } + + private ListTasksPagedResponse(ListTasksPage page) { + super(page, ListTasksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTasksPage + extends AbstractPage { + + private ListTasksPage( + PageContext context, + ListTasksResponse response) { + super(context, response); + } + + private static ListTasksPage createEmptyPage() { + return new ListTasksPage(null, null); + } + + @Override + protected ListTasksPage createPage( + PageContext context, + ListTasksResponse response) { + return new ListTasksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTasksFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTasksRequest, ListTasksResponse, Task, ListTasksPage, ListTasksFixedSizeCollection> { + + private ListTasksFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTasksFixedSizeCollection createEmptyCollection() { + return new ListTasksFixedSizeCollection(null, 0); + } + + @Override + protected ListTasksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTasksFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksSettings.java b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksSettings.java new file mode 100644 index 000000000000..81e13dc23e00 --- /dev/null +++ b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/CloudTasksSettings.java @@ -0,0 +1,379 @@ +/* + * Copyright 2018 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.tasks.v2beta2; + +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; + +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.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.tasks.v2beta2.stub.CloudTasksStubSettings; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 CloudTasksClient}. + * + *

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

    + *
  • The default service address (cloudtasks.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 getQueue to 30 seconds: + * + *

+ * 
+ * CloudTasksSettings.Builder cloudTasksSettingsBuilder =
+ *     CloudTasksSettings.newBuilder();
+ * cloudTasksSettingsBuilder.getQueueSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * CloudTasksSettings cloudTasksSettings = cloudTasksSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CloudTasksSettings extends ClientSettings { + /** Returns the object with the settings used for calls to listQueues. */ + public PagedCallSettings + listQueuesSettings() { + return ((CloudTasksStubSettings) getStubSettings()).listQueuesSettings(); + } + + /** Returns the object with the settings used for calls to getQueue. */ + public UnaryCallSettings getQueueSettings() { + return ((CloudTasksStubSettings) getStubSettings()).getQueueSettings(); + } + + /** Returns the object with the settings used for calls to createQueue. */ + public UnaryCallSettings createQueueSettings() { + return ((CloudTasksStubSettings) getStubSettings()).createQueueSettings(); + } + + /** Returns the object with the settings used for calls to updateQueue. */ + public UnaryCallSettings updateQueueSettings() { + return ((CloudTasksStubSettings) getStubSettings()).updateQueueSettings(); + } + + /** Returns the object with the settings used for calls to deleteQueue. */ + public UnaryCallSettings deleteQueueSettings() { + return ((CloudTasksStubSettings) getStubSettings()).deleteQueueSettings(); + } + + /** Returns the object with the settings used for calls to purgeQueue. */ + public UnaryCallSettings purgeQueueSettings() { + return ((CloudTasksStubSettings) getStubSettings()).purgeQueueSettings(); + } + + /** Returns the object with the settings used for calls to pauseQueue. */ + public UnaryCallSettings pauseQueueSettings() { + return ((CloudTasksStubSettings) getStubSettings()).pauseQueueSettings(); + } + + /** Returns the object with the settings used for calls to resumeQueue. */ + public UnaryCallSettings resumeQueueSettings() { + return ((CloudTasksStubSettings) getStubSettings()).resumeQueueSettings(); + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return ((CloudTasksStubSettings) getStubSettings()).getIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return ((CloudTasksStubSettings) getStubSettings()).setIamPolicySettings(); + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return ((CloudTasksStubSettings) getStubSettings()).testIamPermissionsSettings(); + } + + /** Returns the object with the settings used for calls to listTasks. */ + public PagedCallSettings + listTasksSettings() { + return ((CloudTasksStubSettings) getStubSettings()).listTasksSettings(); + } + + /** Returns the object with the settings used for calls to getTask. */ + public UnaryCallSettings getTaskSettings() { + return ((CloudTasksStubSettings) getStubSettings()).getTaskSettings(); + } + + /** Returns the object with the settings used for calls to createTask. */ + public UnaryCallSettings createTaskSettings() { + return ((CloudTasksStubSettings) getStubSettings()).createTaskSettings(); + } + + /** Returns the object with the settings used for calls to deleteTask. */ + public UnaryCallSettings deleteTaskSettings() { + return ((CloudTasksStubSettings) getStubSettings()).deleteTaskSettings(); + } + + /** Returns the object with the settings used for calls to leaseTasks. */ + public UnaryCallSettings leaseTasksSettings() { + return ((CloudTasksStubSettings) getStubSettings()).leaseTasksSettings(); + } + + /** Returns the object with the settings used for calls to acknowledgeTask. */ + public UnaryCallSettings acknowledgeTaskSettings() { + return ((CloudTasksStubSettings) getStubSettings()).acknowledgeTaskSettings(); + } + + /** Returns the object with the settings used for calls to renewLease. */ + public UnaryCallSettings renewLeaseSettings() { + return ((CloudTasksStubSettings) getStubSettings()).renewLeaseSettings(); + } + + /** Returns the object with the settings used for calls to cancelLease. */ + public UnaryCallSettings cancelLeaseSettings() { + return ((CloudTasksStubSettings) getStubSettings()).cancelLeaseSettings(); + } + + /** Returns the object with the settings used for calls to runTask. */ + public UnaryCallSettings runTaskSettings() { + return ((CloudTasksStubSettings) getStubSettings()).runTaskSettings(); + } + + public static final CloudTasksSettings create(CloudTasksStubSettings stub) throws IOException { + return new CloudTasksSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CloudTasksStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CloudTasksStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CloudTasksStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CloudTasksStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CloudTasksStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CloudTasksStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudTasksStubSettings.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 CloudTasksSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CloudTasksSettings. */ + public static class Builder extends ClientSettings.Builder { + protected Builder() throws IOException { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(CloudTasksStubSettings.newBuilder(clientContext)); + } + + private static Builder createDefault() { + return new Builder(CloudTasksStubSettings.newBuilder()); + } + + protected Builder(CloudTasksSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CloudTasksStubSettings.Builder stubSettings) { + super(stubSettings); + } + + public CloudTasksStubSettings.Builder getStubSettingsBuilder() { + return ((CloudTasksStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * 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) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listQueues. */ + public PagedCallSettings.Builder + listQueuesSettings() { + return getStubSettingsBuilder().listQueuesSettings(); + } + + /** Returns the builder for the settings used for calls to getQueue. */ + public UnaryCallSettings.Builder getQueueSettings() { + return getStubSettingsBuilder().getQueueSettings(); + } + + /** Returns the builder for the settings used for calls to createQueue. */ + public UnaryCallSettings.Builder createQueueSettings() { + return getStubSettingsBuilder().createQueueSettings(); + } + + /** Returns the builder for the settings used for calls to updateQueue. */ + public UnaryCallSettings.Builder updateQueueSettings() { + return getStubSettingsBuilder().updateQueueSettings(); + } + + /** Returns the builder for the settings used for calls to deleteQueue. */ + public UnaryCallSettings.Builder deleteQueueSettings() { + return getStubSettingsBuilder().deleteQueueSettings(); + } + + /** Returns the builder for the settings used for calls to purgeQueue. */ + public UnaryCallSettings.Builder purgeQueueSettings() { + return getStubSettingsBuilder().purgeQueueSettings(); + } + + /** Returns the builder for the settings used for calls to pauseQueue. */ + public UnaryCallSettings.Builder pauseQueueSettings() { + return getStubSettingsBuilder().pauseQueueSettings(); + } + + /** Returns the builder for the settings used for calls to resumeQueue. */ + public UnaryCallSettings.Builder resumeQueueSettings() { + return getStubSettingsBuilder().resumeQueueSettings(); + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getStubSettingsBuilder().getIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return getStubSettingsBuilder().setIamPolicySettings(); + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return getStubSettingsBuilder().testIamPermissionsSettings(); + } + + /** Returns the builder for the settings used for calls to listTasks. */ + public PagedCallSettings.Builder + listTasksSettings() { + return getStubSettingsBuilder().listTasksSettings(); + } + + /** Returns the builder for the settings used for calls to getTask. */ + public UnaryCallSettings.Builder getTaskSettings() { + return getStubSettingsBuilder().getTaskSettings(); + } + + /** Returns the builder for the settings used for calls to createTask. */ + public UnaryCallSettings.Builder createTaskSettings() { + return getStubSettingsBuilder().createTaskSettings(); + } + + /** Returns the builder for the settings used for calls to deleteTask. */ + public UnaryCallSettings.Builder deleteTaskSettings() { + return getStubSettingsBuilder().deleteTaskSettings(); + } + + /** Returns the builder for the settings used for calls to leaseTasks. */ + public UnaryCallSettings.Builder leaseTasksSettings() { + return getStubSettingsBuilder().leaseTasksSettings(); + } + + /** Returns the builder for the settings used for calls to acknowledgeTask. */ + public UnaryCallSettings.Builder acknowledgeTaskSettings() { + return getStubSettingsBuilder().acknowledgeTaskSettings(); + } + + /** Returns the builder for the settings used for calls to renewLease. */ + public UnaryCallSettings.Builder renewLeaseSettings() { + return getStubSettingsBuilder().renewLeaseSettings(); + } + + /** Returns the builder for the settings used for calls to cancelLease. */ + public UnaryCallSettings.Builder cancelLeaseSettings() { + return getStubSettingsBuilder().cancelLeaseSettings(); + } + + /** Returns the builder for the settings used for calls to runTask. */ + public UnaryCallSettings.Builder runTaskSettings() { + return getStubSettingsBuilder().runTaskSettings(); + } + + @Override + public CloudTasksSettings build() throws IOException { + return new CloudTasksSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/package-info.java b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/package-info.java new file mode 100644 index 000000000000..fa544dc91c27 --- /dev/null +++ b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/package-info.java @@ -0,0 +1,38 @@ +/* + * Copyright 2018 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 Tasks API. + * + *

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

================ CloudTasksClient ================ + * + *

Service Description: Cloud Tasks allows developers to manage the execution of background work + * in their applications. + * + *

Sample for CloudTasksClient: + * + *

+ * 
+ * try (CloudTasksClient cloudTasksClient = CloudTasksClient.create()) {
+ *   QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]");
+ *   Queue response = cloudTasksClient.getQueue(name);
+ * }
+ * 
+ * 
+ */ +package com.google.cloud.tasks.v2beta2; diff --git a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStub.java b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStub.java new file mode 100644 index 000000000000..8ba54acd13d6 --- /dev/null +++ b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStub.java @@ -0,0 +1,155 @@ +/* + * Copyright 2018 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.tasks.v2beta2.stub; + +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest; +import com.google.cloud.tasks.v2beta2.CancelLeaseRequest; +import com.google.cloud.tasks.v2beta2.CreateQueueRequest; +import com.google.cloud.tasks.v2beta2.CreateTaskRequest; +import com.google.cloud.tasks.v2beta2.DeleteQueueRequest; +import com.google.cloud.tasks.v2beta2.DeleteTaskRequest; +import com.google.cloud.tasks.v2beta2.GetQueueRequest; +import com.google.cloud.tasks.v2beta2.GetTaskRequest; +import com.google.cloud.tasks.v2beta2.LeaseTasksRequest; +import com.google.cloud.tasks.v2beta2.LeaseTasksResponse; +import com.google.cloud.tasks.v2beta2.ListQueuesRequest; +import com.google.cloud.tasks.v2beta2.ListQueuesResponse; +import com.google.cloud.tasks.v2beta2.ListTasksRequest; +import com.google.cloud.tasks.v2beta2.ListTasksResponse; +import com.google.cloud.tasks.v2beta2.PauseQueueRequest; +import com.google.cloud.tasks.v2beta2.PurgeQueueRequest; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.RenewLeaseRequest; +import com.google.cloud.tasks.v2beta2.ResumeQueueRequest; +import com.google.cloud.tasks.v2beta2.RunTaskRequest; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.UpdateQueueRequest; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +/** + * Base stub class for Cloud Tasks API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public abstract class CloudTasksStub implements BackgroundResource { + + public UnaryCallable listQueuesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listQueuesPagedCallable()"); + } + + public UnaryCallable listQueuesCallable() { + throw new UnsupportedOperationException("Not implemented: listQueuesCallable()"); + } + + public UnaryCallable getQueueCallable() { + throw new UnsupportedOperationException("Not implemented: getQueueCallable()"); + } + + public UnaryCallable createQueueCallable() { + throw new UnsupportedOperationException("Not implemented: createQueueCallable()"); + } + + public UnaryCallable updateQueueCallable() { + throw new UnsupportedOperationException("Not implemented: updateQueueCallable()"); + } + + public UnaryCallable deleteQueueCallable() { + throw new UnsupportedOperationException("Not implemented: deleteQueueCallable()"); + } + + public UnaryCallable purgeQueueCallable() { + throw new UnsupportedOperationException("Not implemented: purgeQueueCallable()"); + } + + public UnaryCallable pauseQueueCallable() { + throw new UnsupportedOperationException("Not implemented: pauseQueueCallable()"); + } + + public UnaryCallable resumeQueueCallable() { + throw new UnsupportedOperationException("Not implemented: resumeQueueCallable()"); + } + + public UnaryCallable getIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getIamPolicyCallable()"); + } + + public UnaryCallable setIamPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: setIamPolicyCallable()"); + } + + public UnaryCallable + testIamPermissionsCallable() { + throw new UnsupportedOperationException("Not implemented: testIamPermissionsCallable()"); + } + + public UnaryCallable listTasksPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTasksPagedCallable()"); + } + + public UnaryCallable listTasksCallable() { + throw new UnsupportedOperationException("Not implemented: listTasksCallable()"); + } + + public UnaryCallable getTaskCallable() { + throw new UnsupportedOperationException("Not implemented: getTaskCallable()"); + } + + public UnaryCallable createTaskCallable() { + throw new UnsupportedOperationException("Not implemented: createTaskCallable()"); + } + + public UnaryCallable deleteTaskCallable() { + throw new UnsupportedOperationException("Not implemented: deleteTaskCallable()"); + } + + public UnaryCallable leaseTasksCallable() { + throw new UnsupportedOperationException("Not implemented: leaseTasksCallable()"); + } + + public UnaryCallable acknowledgeTaskCallable() { + throw new UnsupportedOperationException("Not implemented: acknowledgeTaskCallable()"); + } + + public UnaryCallable renewLeaseCallable() { + throw new UnsupportedOperationException("Not implemented: renewLeaseCallable()"); + } + + public UnaryCallable cancelLeaseCallable() { + throw new UnsupportedOperationException("Not implemented: cancelLeaseCallable()"); + } + + public UnaryCallable runTaskCallable() { + throw new UnsupportedOperationException("Not implemented: runTaskCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java new file mode 100644 index 000000000000..2889d1f92704 --- /dev/null +++ b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/CloudTasksStubSettings.java @@ -0,0 +1,856 @@ +/* + * Copyright 2018 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.tasks.v2beta2.stub; + +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; + +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.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.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.tasks.v2beta2.AcknowledgeTaskRequest; +import com.google.cloud.tasks.v2beta2.CancelLeaseRequest; +import com.google.cloud.tasks.v2beta2.CreateQueueRequest; +import com.google.cloud.tasks.v2beta2.CreateTaskRequest; +import com.google.cloud.tasks.v2beta2.DeleteQueueRequest; +import com.google.cloud.tasks.v2beta2.DeleteTaskRequest; +import com.google.cloud.tasks.v2beta2.GetQueueRequest; +import com.google.cloud.tasks.v2beta2.GetTaskRequest; +import com.google.cloud.tasks.v2beta2.LeaseTasksRequest; +import com.google.cloud.tasks.v2beta2.LeaseTasksResponse; +import com.google.cloud.tasks.v2beta2.ListQueuesRequest; +import com.google.cloud.tasks.v2beta2.ListQueuesResponse; +import com.google.cloud.tasks.v2beta2.ListTasksRequest; +import com.google.cloud.tasks.v2beta2.ListTasksResponse; +import com.google.cloud.tasks.v2beta2.PauseQueueRequest; +import com.google.cloud.tasks.v2beta2.PurgeQueueRequest; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.RenewLeaseRequest; +import com.google.cloud.tasks.v2beta2.ResumeQueueRequest; +import com.google.cloud.tasks.v2beta2.RunTaskRequest; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.UpdateQueueRequest; +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.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 CloudTasksStub}. + * + *

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

    + *
  • The default service address (cloudtasks.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 getQueue to 30 seconds: + * + *

+ * 
+ * CloudTasksStubSettings.Builder cloudTasksSettingsBuilder =
+ *     CloudTasksStubSettings.newBuilder();
+ * cloudTasksSettingsBuilder.getQueueSettings().getRetrySettings().toBuilder()
+ *     .setTotalTimeout(Duration.ofSeconds(30));
+ * CloudTasksStubSettings cloudTasksSettings = cloudTasksSettingsBuilder.build();
+ * 
+ * 
+ */ +@Generated("by gapic-generator") +@BetaApi +public class CloudTasksStubSettings 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 + listQueuesSettings; + private final UnaryCallSettings getQueueSettings; + private final UnaryCallSettings createQueueSettings; + private final UnaryCallSettings updateQueueSettings; + private final UnaryCallSettings deleteQueueSettings; + private final UnaryCallSettings purgeQueueSettings; + private final UnaryCallSettings pauseQueueSettings; + private final UnaryCallSettings resumeQueueSettings; + private final UnaryCallSettings getIamPolicySettings; + private final UnaryCallSettings setIamPolicySettings; + private final UnaryCallSettings + testIamPermissionsSettings; + private final PagedCallSettings + listTasksSettings; + private final UnaryCallSettings getTaskSettings; + private final UnaryCallSettings createTaskSettings; + private final UnaryCallSettings deleteTaskSettings; + private final UnaryCallSettings leaseTasksSettings; + private final UnaryCallSettings acknowledgeTaskSettings; + private final UnaryCallSettings renewLeaseSettings; + private final UnaryCallSettings cancelLeaseSettings; + private final UnaryCallSettings runTaskSettings; + + /** Returns the object with the settings used for calls to listQueues. */ + public PagedCallSettings + listQueuesSettings() { + return listQueuesSettings; + } + + /** Returns the object with the settings used for calls to getQueue. */ + public UnaryCallSettings getQueueSettings() { + return getQueueSettings; + } + + /** Returns the object with the settings used for calls to createQueue. */ + public UnaryCallSettings createQueueSettings() { + return createQueueSettings; + } + + /** Returns the object with the settings used for calls to updateQueue. */ + public UnaryCallSettings updateQueueSettings() { + return updateQueueSettings; + } + + /** Returns the object with the settings used for calls to deleteQueue. */ + public UnaryCallSettings deleteQueueSettings() { + return deleteQueueSettings; + } + + /** Returns the object with the settings used for calls to purgeQueue. */ + public UnaryCallSettings purgeQueueSettings() { + return purgeQueueSettings; + } + + /** Returns the object with the settings used for calls to pauseQueue. */ + public UnaryCallSettings pauseQueueSettings() { + return pauseQueueSettings; + } + + /** Returns the object with the settings used for calls to resumeQueue. */ + public UnaryCallSettings resumeQueueSettings() { + return resumeQueueSettings; + } + + /** Returns the object with the settings used for calls to getIamPolicy. */ + public UnaryCallSettings getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the object with the settings used for calls to setIamPolicy. */ + public UnaryCallSettings setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the object with the settings used for calls to testIamPermissions. */ + public UnaryCallSettings + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + /** Returns the object with the settings used for calls to listTasks. */ + public PagedCallSettings + listTasksSettings() { + return listTasksSettings; + } + + /** Returns the object with the settings used for calls to getTask. */ + public UnaryCallSettings getTaskSettings() { + return getTaskSettings; + } + + /** Returns the object with the settings used for calls to createTask. */ + public UnaryCallSettings createTaskSettings() { + return createTaskSettings; + } + + /** Returns the object with the settings used for calls to deleteTask. */ + public UnaryCallSettings deleteTaskSettings() { + return deleteTaskSettings; + } + + /** Returns the object with the settings used for calls to leaseTasks. */ + public UnaryCallSettings leaseTasksSettings() { + return leaseTasksSettings; + } + + /** Returns the object with the settings used for calls to acknowledgeTask. */ + public UnaryCallSettings acknowledgeTaskSettings() { + return acknowledgeTaskSettings; + } + + /** Returns the object with the settings used for calls to renewLease. */ + public UnaryCallSettings renewLeaseSettings() { + return renewLeaseSettings; + } + + /** Returns the object with the settings used for calls to cancelLease. */ + public UnaryCallSettings cancelLeaseSettings() { + return cancelLeaseSettings; + } + + /** Returns the object with the settings used for calls to runTask. */ + public UnaryCallSettings runTaskSettings() { + return runTaskSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CloudTasksStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCloudTasksStub.create(this); + } else { + throw new UnsupportedOperationException( + "Transport not supported: " + 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 "cloudtasks.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); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.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() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(CloudTasksStubSettings.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 CloudTasksStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listQueuesSettings = settingsBuilder.listQueuesSettings().build(); + getQueueSettings = settingsBuilder.getQueueSettings().build(); + createQueueSettings = settingsBuilder.createQueueSettings().build(); + updateQueueSettings = settingsBuilder.updateQueueSettings().build(); + deleteQueueSettings = settingsBuilder.deleteQueueSettings().build(); + purgeQueueSettings = settingsBuilder.purgeQueueSettings().build(); + pauseQueueSettings = settingsBuilder.pauseQueueSettings().build(); + resumeQueueSettings = settingsBuilder.resumeQueueSettings().build(); + getIamPolicySettings = settingsBuilder.getIamPolicySettings().build(); + setIamPolicySettings = settingsBuilder.setIamPolicySettings().build(); + testIamPermissionsSettings = settingsBuilder.testIamPermissionsSettings().build(); + listTasksSettings = settingsBuilder.listTasksSettings().build(); + getTaskSettings = settingsBuilder.getTaskSettings().build(); + createTaskSettings = settingsBuilder.createTaskSettings().build(); + deleteTaskSettings = settingsBuilder.deleteTaskSettings().build(); + leaseTasksSettings = settingsBuilder.leaseTasksSettings().build(); + acknowledgeTaskSettings = settingsBuilder.acknowledgeTaskSettings().build(); + renewLeaseSettings = settingsBuilder.renewLeaseSettings().build(); + cancelLeaseSettings = settingsBuilder.cancelLeaseSettings().build(); + runTaskSettings = settingsBuilder.runTaskSettings().build(); + } + + private static final PagedListDescriptor + LIST_QUEUES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListQueuesRequest injectToken(ListQueuesRequest payload, String token) { + return ListQueuesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListQueuesRequest injectPageSize(ListQueuesRequest payload, int pageSize) { + return ListQueuesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListQueuesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListQueuesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListQueuesResponse payload) { + return payload.getQueuesList(); + } + }; + + private static final PagedListDescriptor + LIST_TASKS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTasksRequest injectToken(ListTasksRequest payload, String token) { + return ListTasksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTasksRequest injectPageSize(ListTasksRequest payload, int pageSize) { + return ListTasksRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTasksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTasksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListTasksResponse payload) { + return payload.getTasksList(); + } + }; + + private static final PagedListResponseFactory< + ListQueuesRequest, ListQueuesResponse, ListQueuesPagedResponse> + LIST_QUEUES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListQueuesRequest, ListQueuesResponse, ListQueuesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListQueuesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_QUEUES_PAGE_STR_DESC, request, context); + return ListQueuesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTasksRequest, ListTasksResponse, ListTasksPagedResponse> + LIST_TASKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTasksRequest, ListTasksResponse, ListTasksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTasksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_TASKS_PAGE_STR_DESC, request, context); + return ListTasksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Builder for CloudTasksStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + + private final PagedCallSettings.Builder< + ListQueuesRequest, ListQueuesResponse, ListQueuesPagedResponse> + listQueuesSettings; + private final UnaryCallSettings.Builder getQueueSettings; + private final UnaryCallSettings.Builder createQueueSettings; + private final UnaryCallSettings.Builder updateQueueSettings; + private final UnaryCallSettings.Builder deleteQueueSettings; + private final UnaryCallSettings.Builder purgeQueueSettings; + private final UnaryCallSettings.Builder pauseQueueSettings; + private final UnaryCallSettings.Builder resumeQueueSettings; + private final UnaryCallSettings.Builder getIamPolicySettings; + private final UnaryCallSettings.Builder setIamPolicySettings; + private final UnaryCallSettings.Builder + testIamPermissionsSettings; + private final PagedCallSettings.Builder< + ListTasksRequest, ListTasksResponse, ListTasksPagedResponse> + listTasksSettings; + private final UnaryCallSettings.Builder getTaskSettings; + private final UnaryCallSettings.Builder createTaskSettings; + private final UnaryCallSettings.Builder deleteTaskSettings; + private final UnaryCallSettings.Builder + leaseTasksSettings; + private final UnaryCallSettings.Builder acknowledgeTaskSettings; + private final UnaryCallSettings.Builder renewLeaseSettings; + private final UnaryCallSettings.Builder cancelLeaseSettings; + private final UnaryCallSettings.Builder runTaskSettings; + + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "idempotent", + ImmutableSet.copyOf( + Lists.newArrayList( + StatusCode.Code.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put("non_idempotent", 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() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(20000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(20000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("default", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this((ClientContext) null); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listQueuesSettings = PagedCallSettings.newBuilder(LIST_QUEUES_PAGE_STR_FACT); + + getQueueSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createQueueSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + updateQueueSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteQueueSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + purgeQueueSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + pauseQueueSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + resumeQueueSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + getIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + setIamPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + testIamPermissionsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + listTasksSettings = PagedCallSettings.newBuilder(LIST_TASKS_PAGE_STR_FACT); + + getTaskSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + createTaskSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + deleteTaskSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + leaseTasksSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + acknowledgeTaskSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + renewLeaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + cancelLeaseSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + runTaskSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listQueuesSettings, + getQueueSettings, + createQueueSettings, + updateQueueSettings, + deleteQueueSettings, + purgeQueueSettings, + pauseQueueSettings, + resumeQueueSettings, + getIamPolicySettings, + setIamPolicySettings, + testIamPermissionsSettings, + listTasksSettings, + getTaskSettings, + createTaskSettings, + deleteTaskSettings, + leaseTasksSettings, + acknowledgeTaskSettings, + renewLeaseSettings, + cancelLeaseSettings, + runTaskSettings); + + initDefaults(this); + } + + private static Builder createDefault() { + Builder builder = new Builder((ClientContext) null); + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + + builder + .listQueuesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getQueueSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createQueueSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .updateQueueSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteQueueSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .purgeQueueSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .pauseQueueSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .resumeQueueSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .setIamPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .testIamPermissionsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .listTasksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .getTaskSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .createTaskSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .deleteTaskSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .leaseTasksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .acknowledgeTaskSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .renewLeaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .cancelLeaseSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + builder + .runTaskSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default")); + + return builder; + } + + protected Builder(CloudTasksStubSettings settings) { + super(settings); + + listQueuesSettings = settings.listQueuesSettings.toBuilder(); + getQueueSettings = settings.getQueueSettings.toBuilder(); + createQueueSettings = settings.createQueueSettings.toBuilder(); + updateQueueSettings = settings.updateQueueSettings.toBuilder(); + deleteQueueSettings = settings.deleteQueueSettings.toBuilder(); + purgeQueueSettings = settings.purgeQueueSettings.toBuilder(); + pauseQueueSettings = settings.pauseQueueSettings.toBuilder(); + resumeQueueSettings = settings.resumeQueueSettings.toBuilder(); + getIamPolicySettings = settings.getIamPolicySettings.toBuilder(); + setIamPolicySettings = settings.setIamPolicySettings.toBuilder(); + testIamPermissionsSettings = settings.testIamPermissionsSettings.toBuilder(); + listTasksSettings = settings.listTasksSettings.toBuilder(); + getTaskSettings = settings.getTaskSettings.toBuilder(); + createTaskSettings = settings.createTaskSettings.toBuilder(); + deleteTaskSettings = settings.deleteTaskSettings.toBuilder(); + leaseTasksSettings = settings.leaseTasksSettings.toBuilder(); + acknowledgeTaskSettings = settings.acknowledgeTaskSettings.toBuilder(); + renewLeaseSettings = settings.renewLeaseSettings.toBuilder(); + cancelLeaseSettings = settings.cancelLeaseSettings.toBuilder(); + runTaskSettings = settings.runTaskSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listQueuesSettings, + getQueueSettings, + createQueueSettings, + updateQueueSettings, + deleteQueueSettings, + purgeQueueSettings, + pauseQueueSettings, + resumeQueueSettings, + getIamPolicySettings, + setIamPolicySettings, + testIamPermissionsSettings, + listTasksSettings, + getTaskSettings, + createTaskSettings, + deleteTaskSettings, + leaseTasksSettings, + acknowledgeTaskSettings, + renewLeaseSettings, + cancelLeaseSettings, + runTaskSettings); + } + + // NEXT_MAJOR_VER: remove 'throws Exception' + /** + * 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) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listQueues. */ + public PagedCallSettings.Builder + listQueuesSettings() { + return listQueuesSettings; + } + + /** Returns the builder for the settings used for calls to getQueue. */ + public UnaryCallSettings.Builder getQueueSettings() { + return getQueueSettings; + } + + /** Returns the builder for the settings used for calls to createQueue. */ + public UnaryCallSettings.Builder createQueueSettings() { + return createQueueSettings; + } + + /** Returns the builder for the settings used for calls to updateQueue. */ + public UnaryCallSettings.Builder updateQueueSettings() { + return updateQueueSettings; + } + + /** Returns the builder for the settings used for calls to deleteQueue. */ + public UnaryCallSettings.Builder deleteQueueSettings() { + return deleteQueueSettings; + } + + /** Returns the builder for the settings used for calls to purgeQueue. */ + public UnaryCallSettings.Builder purgeQueueSettings() { + return purgeQueueSettings; + } + + /** Returns the builder for the settings used for calls to pauseQueue. */ + public UnaryCallSettings.Builder pauseQueueSettings() { + return pauseQueueSettings; + } + + /** Returns the builder for the settings used for calls to resumeQueue. */ + public UnaryCallSettings.Builder resumeQueueSettings() { + return resumeQueueSettings; + } + + /** Returns the builder for the settings used for calls to getIamPolicy. */ + public UnaryCallSettings.Builder getIamPolicySettings() { + return getIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to setIamPolicy. */ + public UnaryCallSettings.Builder setIamPolicySettings() { + return setIamPolicySettings; + } + + /** Returns the builder for the settings used for calls to testIamPermissions. */ + public UnaryCallSettings.Builder + testIamPermissionsSettings() { + return testIamPermissionsSettings; + } + + /** Returns the builder for the settings used for calls to listTasks. */ + public PagedCallSettings.Builder + listTasksSettings() { + return listTasksSettings; + } + + /** Returns the builder for the settings used for calls to getTask. */ + public UnaryCallSettings.Builder getTaskSettings() { + return getTaskSettings; + } + + /** Returns the builder for the settings used for calls to createTask. */ + public UnaryCallSettings.Builder createTaskSettings() { + return createTaskSettings; + } + + /** Returns the builder for the settings used for calls to deleteTask. */ + public UnaryCallSettings.Builder deleteTaskSettings() { + return deleteTaskSettings; + } + + /** Returns the builder for the settings used for calls to leaseTasks. */ + public UnaryCallSettings.Builder leaseTasksSettings() { + return leaseTasksSettings; + } + + /** Returns the builder for the settings used for calls to acknowledgeTask. */ + public UnaryCallSettings.Builder acknowledgeTaskSettings() { + return acknowledgeTaskSettings; + } + + /** Returns the builder for the settings used for calls to renewLease. */ + public UnaryCallSettings.Builder renewLeaseSettings() { + return renewLeaseSettings; + } + + /** Returns the builder for the settings used for calls to cancelLease. */ + public UnaryCallSettings.Builder cancelLeaseSettings() { + return cancelLeaseSettings; + } + + /** Returns the builder for the settings used for calls to runTask. */ + public UnaryCallSettings.Builder runTaskSettings() { + return runTaskSettings; + } + + @Override + public CloudTasksStubSettings build() throws IOException { + return new CloudTasksStubSettings(this); + } + } +} diff --git a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksCallableFactory.java b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksCallableFactory.java new file mode 100644 index 000000000000..74c259b16659 --- /dev/null +++ b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksCallableFactory.java @@ -0,0 +1,116 @@ +/* + * Copyright 2018 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.tasks.v2beta2.stub; + +import com.google.api.core.BetaApi; +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 Cloud Tasks API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator") +@BetaApi("The surface for use by generated code is not stable yet and may change in the future.") +public class GrpcCloudTasksCallableFactory 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 pagedCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createPagedCallable( + grpcCallSettings, pagedCallSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + GrpcCallSettings grpcCallSettings, + BatchingCallSettings batchingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBatchingCallable( + grpcCallSettings, batchingCallSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + GrpcCallSettings grpcCallSettings, + OperationCallSettings operationCallSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + return GrpcCallableFactory.createOperationCallable( + grpcCallSettings, operationCallSettings, clientContext, operationsStub); + } + + @Override + public + BidiStreamingCallable createBidiStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createBidiStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + GrpcCallSettings grpcCallSettings, + ServerStreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createServerStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } + + @Override + public + ClientStreamingCallable createClientStreamingCallable( + GrpcCallSettings grpcCallSettings, + StreamingCallSettings streamingCallSettings, + ClientContext clientContext) { + return GrpcCallableFactory.createClientStreamingCallable( + grpcCallSettings, streamingCallSettings, clientContext); + } +} diff --git a/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksStub.java b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksStub.java new file mode 100644 index 000000000000..b9d8ab0179ef --- /dev/null +++ b/google-cloud-clients/google-cloud-tasks/src/main/java/com/google/cloud/tasks/v2beta2/stub/GrpcCloudTasksStub.java @@ -0,0 +1,741 @@ +/* + * Copyright 2018 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.tasks.v2beta2.stub; + +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; + +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.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.tasks.v2beta2.AcknowledgeTaskRequest; +import com.google.cloud.tasks.v2beta2.CancelLeaseRequest; +import com.google.cloud.tasks.v2beta2.CreateQueueRequest; +import com.google.cloud.tasks.v2beta2.CreateTaskRequest; +import com.google.cloud.tasks.v2beta2.DeleteQueueRequest; +import com.google.cloud.tasks.v2beta2.DeleteTaskRequest; +import com.google.cloud.tasks.v2beta2.GetQueueRequest; +import com.google.cloud.tasks.v2beta2.GetTaskRequest; +import com.google.cloud.tasks.v2beta2.LeaseTasksRequest; +import com.google.cloud.tasks.v2beta2.LeaseTasksResponse; +import com.google.cloud.tasks.v2beta2.ListQueuesRequest; +import com.google.cloud.tasks.v2beta2.ListQueuesResponse; +import com.google.cloud.tasks.v2beta2.ListTasksRequest; +import com.google.cloud.tasks.v2beta2.ListTasksResponse; +import com.google.cloud.tasks.v2beta2.PauseQueueRequest; +import com.google.cloud.tasks.v2beta2.PurgeQueueRequest; +import com.google.cloud.tasks.v2beta2.Queue; +import com.google.cloud.tasks.v2beta2.RenewLeaseRequest; +import com.google.cloud.tasks.v2beta2.ResumeQueueRequest; +import com.google.cloud.tasks.v2beta2.RunTaskRequest; +import com.google.cloud.tasks.v2beta2.Task; +import com.google.cloud.tasks.v2beta2.UpdateQueueRequest; +import com.google.common.collect.ImmutableMap; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +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 Cloud Tasks API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator") +@BetaApi("A restructuring of stub classes is planned, so this may break in the future") +public class GrpcCloudTasksStub extends CloudTasksStub { + + private static final MethodDescriptor + listQueuesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/ListQueues") + .setRequestMarshaller(ProtoUtils.marshaller(ListQueuesRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListQueuesResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor getQueueMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/GetQueue") + .setRequestMarshaller(ProtoUtils.marshaller(GetQueueRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Queue.getDefaultInstance())) + .build(); + private static final MethodDescriptor createQueueMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/CreateQueue") + .setRequestMarshaller(ProtoUtils.marshaller(CreateQueueRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Queue.getDefaultInstance())) + .build(); + private static final MethodDescriptor updateQueueMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/UpdateQueue") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateQueueRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Queue.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteQueueMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/DeleteQueue") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteQueueRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor purgeQueueMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/PurgeQueue") + .setRequestMarshaller(ProtoUtils.marshaller(PurgeQueueRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Queue.getDefaultInstance())) + .build(); + private static final MethodDescriptor pauseQueueMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/PauseQueue") + .setRequestMarshaller(ProtoUtils.marshaller(PauseQueueRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Queue.getDefaultInstance())) + .build(); + private static final MethodDescriptor resumeQueueMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/ResumeQueue") + .setRequestMarshaller(ProtoUtils.marshaller(ResumeQueueRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Queue.getDefaultInstance())) + .build(); + private static final MethodDescriptor getIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/GetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + private static final MethodDescriptor setIamPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/SetIamPolicy") + .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + private static final MethodDescriptor + testIamPermissionsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/TestIamPermissions") + .setRequestMarshaller( + ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + listTasksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/ListTasks") + .setRequestMarshaller(ProtoUtils.marshaller(ListTasksRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListTasksResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor getTaskMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/GetTask") + .setRequestMarshaller(ProtoUtils.marshaller(GetTaskRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Task.getDefaultInstance())) + .build(); + private static final MethodDescriptor createTaskMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/CreateTask") + .setRequestMarshaller(ProtoUtils.marshaller(CreateTaskRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Task.getDefaultInstance())) + .build(); + private static final MethodDescriptor deleteTaskMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/DeleteTask") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteTaskRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor + leaseTasksMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/LeaseTasks") + .setRequestMarshaller(ProtoUtils.marshaller(LeaseTasksRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(LeaseTasksResponse.getDefaultInstance())) + .build(); + private static final MethodDescriptor + acknowledgeTaskMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/AcknowledgeTask") + .setRequestMarshaller( + ProtoUtils.marshaller(AcknowledgeTaskRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + private static final MethodDescriptor renewLeaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/RenewLease") + .setRequestMarshaller(ProtoUtils.marshaller(RenewLeaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Task.getDefaultInstance())) + .build(); + private static final MethodDescriptor cancelLeaseMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/CancelLease") + .setRequestMarshaller(ProtoUtils.marshaller(CancelLeaseRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Task.getDefaultInstance())) + .build(); + private static final MethodDescriptor runTaskMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.tasks.v2beta2.CloudTasks/RunTask") + .setRequestMarshaller(ProtoUtils.marshaller(RunTaskRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Task.getDefaultInstance())) + .build(); + + private final BackgroundResource backgroundResources; + + private final UnaryCallable listQueuesCallable; + private final UnaryCallable listQueuesPagedCallable; + private final UnaryCallable getQueueCallable; + private final UnaryCallable createQueueCallable; + private final UnaryCallable updateQueueCallable; + private final UnaryCallable deleteQueueCallable; + private final UnaryCallable purgeQueueCallable; + private final UnaryCallable pauseQueueCallable; + private final UnaryCallable resumeQueueCallable; + private final UnaryCallable getIamPolicyCallable; + private final UnaryCallable setIamPolicyCallable; + private final UnaryCallable + testIamPermissionsCallable; + private final UnaryCallable listTasksCallable; + private final UnaryCallable listTasksPagedCallable; + private final UnaryCallable getTaskCallable; + private final UnaryCallable createTaskCallable; + private final UnaryCallable deleteTaskCallable; + private final UnaryCallable leaseTasksCallable; + private final UnaryCallable acknowledgeTaskCallable; + private final UnaryCallable renewLeaseCallable; + private final UnaryCallable cancelLeaseCallable; + private final UnaryCallable runTaskCallable; + + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCloudTasksStub create(CloudTasksStubSettings settings) + throws IOException { + return new GrpcCloudTasksStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCloudTasksStub create(ClientContext clientContext) throws IOException { + return new GrpcCloudTasksStub(CloudTasksStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCloudTasksStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCloudTasksStub( + CloudTasksStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcCloudTasksStub, 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 GrpcCloudTasksStub(CloudTasksStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcCloudTasksCallableFactory()); + } + + /** + * Constructs an instance of GrpcCloudTasksStub, 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 GrpcCloudTasksStub( + CloudTasksStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + GrpcCallSettings listQueuesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listQueuesMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListQueuesRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getQueueTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getQueueMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetQueueRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createQueueTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createQueueMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateQueueRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateQueueTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateQueueMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateQueueRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("queue.name", String.valueOf(request.getQueue().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteQueueTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteQueueMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteQueueRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings purgeQueueTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(purgeQueueMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(PurgeQueueRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings pauseQueueTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(pauseQueueMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(PauseQueueRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings resumeQueueTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(resumeQueueMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ResumeQueueRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); + GrpcCallSettings setIamPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(setIamPolicyMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SetIamPolicyRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + testIamPermissionsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(testIamPermissionsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(TestIamPermissionsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("resource", String.valueOf(request.getResource())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listTasksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTasksMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTasksRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getTaskTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getTaskMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetTaskRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createTaskTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createTaskMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateTaskRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteTaskTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteTaskMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteTaskRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings leaseTasksTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(leaseTasksMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(LeaseTasksRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings acknowledgeTaskTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(acknowledgeTaskMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(AcknowledgeTaskRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings renewLeaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(renewLeaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RenewLeaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings cancelLeaseTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelLeaseMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CancelLeaseRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings runTaskTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(runTaskMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(RunTaskRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + + this.listQueuesCallable = + callableFactory.createUnaryCallable( + listQueuesTransportSettings, settings.listQueuesSettings(), clientContext); + this.listQueuesPagedCallable = + callableFactory.createPagedCallable( + listQueuesTransportSettings, settings.listQueuesSettings(), clientContext); + this.getQueueCallable = + callableFactory.createUnaryCallable( + getQueueTransportSettings, settings.getQueueSettings(), clientContext); + this.createQueueCallable = + callableFactory.createUnaryCallable( + createQueueTransportSettings, settings.createQueueSettings(), clientContext); + this.updateQueueCallable = + callableFactory.createUnaryCallable( + updateQueueTransportSettings, settings.updateQueueSettings(), clientContext); + this.deleteQueueCallable = + callableFactory.createUnaryCallable( + deleteQueueTransportSettings, settings.deleteQueueSettings(), clientContext); + this.purgeQueueCallable = + callableFactory.createUnaryCallable( + purgeQueueTransportSettings, settings.purgeQueueSettings(), clientContext); + this.pauseQueueCallable = + callableFactory.createUnaryCallable( + pauseQueueTransportSettings, settings.pauseQueueSettings(), clientContext); + this.resumeQueueCallable = + callableFactory.createUnaryCallable( + resumeQueueTransportSettings, settings.resumeQueueSettings(), clientContext); + this.getIamPolicyCallable = + callableFactory.createUnaryCallable( + getIamPolicyTransportSettings, settings.getIamPolicySettings(), clientContext); + this.setIamPolicyCallable = + callableFactory.createUnaryCallable( + setIamPolicyTransportSettings, settings.setIamPolicySettings(), clientContext); + this.testIamPermissionsCallable = + callableFactory.createUnaryCallable( + testIamPermissionsTransportSettings, + settings.testIamPermissionsSettings(), + clientContext); + this.listTasksCallable = + callableFactory.createUnaryCallable( + listTasksTransportSettings, settings.listTasksSettings(), clientContext); + this.listTasksPagedCallable = + callableFactory.createPagedCallable( + listTasksTransportSettings, settings.listTasksSettings(), clientContext); + this.getTaskCallable = + callableFactory.createUnaryCallable( + getTaskTransportSettings, settings.getTaskSettings(), clientContext); + this.createTaskCallable = + callableFactory.createUnaryCallable( + createTaskTransportSettings, settings.createTaskSettings(), clientContext); + this.deleteTaskCallable = + callableFactory.createUnaryCallable( + deleteTaskTransportSettings, settings.deleteTaskSettings(), clientContext); + this.leaseTasksCallable = + callableFactory.createUnaryCallable( + leaseTasksTransportSettings, settings.leaseTasksSettings(), clientContext); + this.acknowledgeTaskCallable = + callableFactory.createUnaryCallable( + acknowledgeTaskTransportSettings, settings.acknowledgeTaskSettings(), clientContext); + this.renewLeaseCallable = + callableFactory.createUnaryCallable( + renewLeaseTransportSettings, settings.renewLeaseSettings(), clientContext); + this.cancelLeaseCallable = + callableFactory.createUnaryCallable( + cancelLeaseTransportSettings, settings.cancelLeaseSettings(), clientContext); + this.runTaskCallable = + callableFactory.createUnaryCallable( + runTaskTransportSettings, settings.runTaskSettings(), clientContext); + + backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public UnaryCallable listQueuesPagedCallable() { + return listQueuesPagedCallable; + } + + public UnaryCallable listQueuesCallable() { + return listQueuesCallable; + } + + public UnaryCallable getQueueCallable() { + return getQueueCallable; + } + + public UnaryCallable createQueueCallable() { + return createQueueCallable; + } + + public UnaryCallable updateQueueCallable() { + return updateQueueCallable; + } + + public UnaryCallable deleteQueueCallable() { + return deleteQueueCallable; + } + + public UnaryCallable purgeQueueCallable() { + return purgeQueueCallable; + } + + public UnaryCallable pauseQueueCallable() { + return pauseQueueCallable; + } + + public UnaryCallable resumeQueueCallable() { + return resumeQueueCallable; + } + + public UnaryCallable getIamPolicyCallable() { + return getIamPolicyCallable; + } + + public UnaryCallable setIamPolicyCallable() { + return setIamPolicyCallable; + } + + public UnaryCallable + testIamPermissionsCallable() { + return testIamPermissionsCallable; + } + + public UnaryCallable listTasksPagedCallable() { + return listTasksPagedCallable; + } + + public UnaryCallable listTasksCallable() { + return listTasksCallable; + } + + public UnaryCallable getTaskCallable() { + return getTaskCallable; + } + + public UnaryCallable createTaskCallable() { + return createTaskCallable; + } + + public UnaryCallable deleteTaskCallable() { + return deleteTaskCallable; + } + + public UnaryCallable leaseTasksCallable() { + return leaseTasksCallable; + } + + public UnaryCallable acknowledgeTaskCallable() { + return acknowledgeTaskCallable; + } + + public UnaryCallable renewLeaseCallable() { + return renewLeaseCallable; + } + + public UnaryCallable cancelLeaseCallable() { + return cancelLeaseCallable; + } + + public UnaryCallable runTaskCallable() { + return runTaskCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @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/google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientTest.java b/google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientTest.java new file mode 100644 index 000000000000..18c73efe8c70 --- /dev/null +++ b/google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/CloudTasksClientTest.java @@ -0,0 +1,868 @@ +/* + * Copyright 2018 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.tasks.v2beta2; + +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListQueuesPagedResponse; +import static com.google.cloud.tasks.v2beta2.CloudTasksClient.ListTasksPagedResponse; + +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.common.collect.Lists; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.ByteString; +import com.google.protobuf.Duration; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.GeneratedMessageV3; +import com.google.protobuf.Timestamp; +import io.grpc.Status; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Objects; +import org.junit.After; +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +@javax.annotation.Generated("by GAPIC") +public class CloudTasksClientTest { + private static MockCloudTasks mockCloudTasks; + private static MockServiceHelper serviceHelper; + private CloudTasksClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockCloudTasks = new MockCloudTasks(); + serviceHelper = + new MockServiceHelper("in-process-1", Arrays.asList(mockCloudTasks)); + serviceHelper.start(); + } + + @AfterClass + public static void stopServer() { + serviceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + serviceHelper.reset(); + channelProvider = serviceHelper.createChannelProvider(); + CloudTasksSettings settings = + CloudTasksSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudTasksClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + @SuppressWarnings("all") + public void listQueuesTest() { + String nextPageToken = ""; + Queue queuesElement = Queue.newBuilder().build(); + List queues = Arrays.asList(queuesElement); + ListQueuesResponse expectedResponse = + ListQueuesResponse.newBuilder() + .setNextPageToken(nextPageToken) + .addAllQueues(queues) + .build(); + mockCloudTasks.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + ListQueuesPagedResponse pagedListResponse = client.listQueues(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getQueuesList().get(0), resources.get(0)); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListQueuesRequest actualRequest = (ListQueuesRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listQueuesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + + client.listQueues(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getQueueTest() { + QueueName name2 = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue expectedResponse = Queue.newBuilder().setName(name2.toString()).build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + Queue actualResponse = client.getQueue(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetQueueRequest actualRequest = (GetQueueRequest) actualRequests.get(0); + + Assert.assertEquals(name, QueueName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getQueueExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + client.getQueue(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createQueueTest() { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue expectedResponse = Queue.newBuilder().setName(name.toString()).build(); + mockCloudTasks.addResponse(expectedResponse); + + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Queue queue = Queue.newBuilder().build(); + + Queue actualResponse = client.createQueue(parent, queue); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateQueueRequest actualRequest = (CreateQueueRequest) actualRequests.get(0); + + Assert.assertEquals(parent, LocationName.parse(actualRequest.getParent())); + Assert.assertEquals(queue, actualRequest.getQueue()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createQueueExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + Queue queue = Queue.newBuilder().build(); + + client.createQueue(parent, queue); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void updateQueueTest() { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue expectedResponse = Queue.newBuilder().setName(name.toString()).build(); + mockCloudTasks.addResponse(expectedResponse); + + Queue queue = Queue.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + Queue actualResponse = client.updateQueue(queue, updateMask); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateQueueRequest actualRequest = (UpdateQueueRequest) actualRequests.get(0); + + Assert.assertEquals(queue, actualRequest.getQueue()); + Assert.assertEquals(updateMask, actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void updateQueueExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + Queue queue = Queue.newBuilder().build(); + FieldMask updateMask = FieldMask.newBuilder().build(); + + client.updateQueue(queue, updateMask); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteQueueTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + client.deleteQueue(name); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteQueueRequest actualRequest = (DeleteQueueRequest) actualRequests.get(0); + + Assert.assertEquals(name, QueueName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteQueueExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + client.deleteQueue(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void purgeQueueTest() { + QueueName name2 = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue expectedResponse = Queue.newBuilder().setName(name2.toString()).build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + Queue actualResponse = client.purgeQueue(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PurgeQueueRequest actualRequest = (PurgeQueueRequest) actualRequests.get(0); + + Assert.assertEquals(name, QueueName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void purgeQueueExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + client.purgeQueue(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void pauseQueueTest() { + QueueName name2 = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue expectedResponse = Queue.newBuilder().setName(name2.toString()).build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + Queue actualResponse = client.pauseQueue(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + PauseQueueRequest actualRequest = (PauseQueueRequest) actualRequests.get(0); + + Assert.assertEquals(name, QueueName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void pauseQueueExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + client.pauseQueue(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void resumeQueueTest() { + QueueName name2 = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Queue expectedResponse = Queue.newBuilder().setName(name2.toString()).build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + Queue actualResponse = client.resumeQueue(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ResumeQueueRequest actualRequest = (ResumeQueueRequest) actualRequests.get(0); + + Assert.assertEquals(name, QueueName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void resumeQueueExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName name = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + client.resumeQueue(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getIamPolicyTest() { + int version = 351608024; + ByteString etag = ByteString.copyFromUtf8("21"); + Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + Policy actualResponse = client.getIamPolicy(resource); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetIamPolicyRequest actualRequest = (GetIamPolicyRequest) actualRequests.get(0); + + Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + client.getIamPolicy(resource); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void setIamPolicyTest() { + int version = 351608024; + ByteString etag = ByteString.copyFromUtf8("21"); + Policy expectedResponse = Policy.newBuilder().setVersion(version).setEtag(etag).build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Policy policy = Policy.newBuilder().build(); + + Policy actualResponse = client.setIamPolicy(resource, policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SetIamPolicyRequest actualRequest = (SetIamPolicyRequest) actualRequests.get(0); + + Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource())); + Assert.assertEquals(policy, actualRequest.getPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void setIamPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Policy policy = Policy.newBuilder().build(); + + client.setIamPolicy(resource, policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void testIamPermissionsTest() { + TestIamPermissionsResponse expectedResponse = TestIamPermissionsResponse.newBuilder().build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + List permissions = new ArrayList<>(); + + TestIamPermissionsResponse actualResponse = client.testIamPermissions(resource, permissions); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TestIamPermissionsRequest actualRequest = (TestIamPermissionsRequest) actualRequests.get(0); + + Assert.assertEquals(Objects.toString(resource), Objects.toString(actualRequest.getResource())); + Assert.assertEquals(permissions, actualRequest.getPermissionsList()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void testIamPermissionsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName resource = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + List permissions = new ArrayList<>(); + + client.testIamPermissions(resource, permissions); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void listTasksTest() { + String nextPageToken = ""; + Task tasksElement = Task.newBuilder().build(); + List tasks = Arrays.asList(tasksElement); + ListTasksResponse expectedResponse = + ListTasksResponse.newBuilder().setNextPageToken(nextPageToken).addAllTasks(tasks).build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + ListTasksPagedResponse pagedListResponse = client.listTasks(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTasksList().get(0), resources.get(0)); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTasksRequest actualRequest = (ListTasksRequest) actualRequests.get(0); + + Assert.assertEquals(parent, QueueName.parse(actualRequest.getParent())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void listTasksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + + client.listTasks(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void getTaskTest() { + TaskName name2 = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Task expectedResponse = Task.newBuilder().setName(name2.toString()).build(); + mockCloudTasks.addResponse(expectedResponse); + + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + + Task actualResponse = client.getTask(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetTaskRequest actualRequest = (GetTaskRequest) actualRequests.get(0); + + Assert.assertEquals(name, TaskName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void getTaskExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + + client.getTask(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void createTaskTest() { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Task expectedResponse = Task.newBuilder().setName(name.toString()).build(); + mockCloudTasks.addResponse(expectedResponse); + + QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Task task = Task.newBuilder().build(); + + Task actualResponse = client.createTask(parent, task); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateTaskRequest actualRequest = (CreateTaskRequest) actualRequests.get(0); + + Assert.assertEquals(parent, QueueName.parse(actualRequest.getParent())); + Assert.assertEquals(task, actualRequest.getTask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void createTaskExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + QueueName parent = QueueName.of("[PROJECT]", "[LOCATION]", "[QUEUE]"); + Task task = Task.newBuilder().build(); + + client.createTask(parent, task); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void deleteTaskTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockCloudTasks.addResponse(expectedResponse); + + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + + client.deleteTask(name); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteTaskRequest actualRequest = (DeleteTaskRequest) actualRequests.get(0); + + Assert.assertEquals(name, TaskName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void deleteTaskExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + + client.deleteTask(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void acknowledgeTaskTest() { + Empty expectedResponse = Empty.newBuilder().build(); + mockCloudTasks.addResponse(expectedResponse); + + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + + client.acknowledgeTask(name, scheduleTime); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + AcknowledgeTaskRequest actualRequest = (AcknowledgeTaskRequest) actualRequests.get(0); + + Assert.assertEquals(name, TaskName.parse(actualRequest.getName())); + Assert.assertEquals(scheduleTime, actualRequest.getScheduleTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void acknowledgeTaskExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + + client.acknowledgeTask(name, scheduleTime); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void renewLeaseTest() { + TaskName name2 = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Task expectedResponse = Task.newBuilder().setName(name2.toString()).build(); + mockCloudTasks.addResponse(expectedResponse); + + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + Duration leaseDuration = Duration.newBuilder().build(); + + Task actualResponse = client.renewLease(name, scheduleTime, leaseDuration); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RenewLeaseRequest actualRequest = (RenewLeaseRequest) actualRequests.get(0); + + Assert.assertEquals(name, TaskName.parse(actualRequest.getName())); + Assert.assertEquals(scheduleTime, actualRequest.getScheduleTime()); + Assert.assertEquals(leaseDuration, actualRequest.getLeaseDuration()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void renewLeaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + Duration leaseDuration = Duration.newBuilder().build(); + + client.renewLease(name, scheduleTime, leaseDuration); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void cancelLeaseTest() { + TaskName name2 = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Task expectedResponse = Task.newBuilder().setName(name2.toString()).build(); + mockCloudTasks.addResponse(expectedResponse); + + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + + Task actualResponse = client.cancelLease(name, scheduleTime); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelLeaseRequest actualRequest = (CancelLeaseRequest) actualRequests.get(0); + + Assert.assertEquals(name, TaskName.parse(actualRequest.getName())); + Assert.assertEquals(scheduleTime, actualRequest.getScheduleTime()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void cancelLeaseExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Timestamp scheduleTime = Timestamp.newBuilder().build(); + + client.cancelLease(name, scheduleTime); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } + + @Test + @SuppressWarnings("all") + public void runTaskTest() { + TaskName name2 = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + Task expectedResponse = Task.newBuilder().setName(name2.toString()).build(); + mockCloudTasks.addResponse(expectedResponse); + + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + + Task actualResponse = client.runTask(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudTasks.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + RunTaskRequest actualRequest = (RunTaskRequest) actualRequests.get(0); + + Assert.assertEquals(name, TaskName.parse(actualRequest.getName())); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + @SuppressWarnings("all") + public void runTaskExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); + mockCloudTasks.addException(exception); + + try { + TaskName name = TaskName.of("[PROJECT]", "[LOCATION]", "[QUEUE]", "[TASK]"); + + client.runTask(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception + } + } +} diff --git a/google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasks.java b/google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasks.java new file mode 100644 index 000000000000..bcc7cb2a60f3 --- /dev/null +++ b/google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasks.java @@ -0,0 +1,57 @@ +/* + * Copyright 2018 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.tasks.v2beta2; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.ServerServiceDefinition; +import java.util.List; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockCloudTasks implements MockGrpcService { + private final MockCloudTasksImpl serviceImpl; + + public MockCloudTasks() { + serviceImpl = new MockCloudTasksImpl(); + } + + @Override + public List getRequests() { + return serviceImpl.getRequests(); + } + + @Override + public void addResponse(GeneratedMessageV3 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/google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasksImpl.java b/google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasksImpl.java new file mode 100644 index 000000000000..18702113fde9 --- /dev/null +++ b/google-cloud-clients/google-cloud-tasks/src/test/java/com/google/cloud/tasks/v2beta2/MockCloudTasksImpl.java @@ -0,0 +1,362 @@ +/* + * Copyright 2018 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.tasks.v2beta2; + +import com.google.api.core.BetaApi; +import com.google.cloud.tasks.v2beta2.CloudTasksGrpc.CloudTasksImplBase; +import com.google.iam.v1.GetIamPolicyRequest; +import com.google.iam.v1.Policy; +import com.google.iam.v1.SetIamPolicyRequest; +import com.google.iam.v1.TestIamPermissionsRequest; +import com.google.iam.v1.TestIamPermissionsResponse; +import com.google.protobuf.Empty; +import com.google.protobuf.GeneratedMessageV3; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; + +@javax.annotation.Generated("by GAPIC") +@BetaApi +public class MockCloudTasksImpl extends CloudTasksImplBase { + private ArrayList requests; + private Queue responses; + + public MockCloudTasksImpl() { + requests = new ArrayList<>(); + responses = new LinkedList<>(); + } + + public List getRequests() { + return requests; + } + + public void addResponse(GeneratedMessageV3 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 listQueues( + ListQueuesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListQueuesResponse) { + requests.add(request); + responseObserver.onNext((ListQueuesResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getQueue( + GetQueueRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof com.google.cloud.tasks.v2beta2.Queue) { + requests.add(request); + responseObserver.onNext((com.google.cloud.tasks.v2beta2.Queue) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createQueue( + CreateQueueRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof com.google.cloud.tasks.v2beta2.Queue) { + requests.add(request); + responseObserver.onNext((com.google.cloud.tasks.v2beta2.Queue) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateQueue( + UpdateQueueRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof com.google.cloud.tasks.v2beta2.Queue) { + requests.add(request); + responseObserver.onNext((com.google.cloud.tasks.v2beta2.Queue) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteQueue(DeleteQueueRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void purgeQueue( + PurgeQueueRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof com.google.cloud.tasks.v2beta2.Queue) { + requests.add(request); + responseObserver.onNext((com.google.cloud.tasks.v2beta2.Queue) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void pauseQueue( + PauseQueueRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof com.google.cloud.tasks.v2beta2.Queue) { + requests.add(request); + responseObserver.onNext((com.google.cloud.tasks.v2beta2.Queue) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void resumeQueue( + ResumeQueueRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof com.google.cloud.tasks.v2beta2.Queue) { + requests.add(request); + responseObserver.onNext((com.google.cloud.tasks.v2beta2.Queue) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getIamPolicy(GetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext((Policy) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void setIamPolicy(SetIamPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext((Policy) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void testIamPermissions( + TestIamPermissionsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof TestIamPermissionsResponse) { + requests.add(request); + responseObserver.onNext((TestIamPermissionsResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listTasks( + ListTasksRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTasksResponse) { + requests.add(request); + responseObserver.onNext((ListTasksResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getTask(GetTaskRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Task) { + requests.add(request); + responseObserver.onNext((Task) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createTask(CreateTaskRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Task) { + requests.add(request); + responseObserver.onNext((Task) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteTask(DeleteTaskRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void leaseTasks( + LeaseTasksRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof LeaseTasksResponse) { + requests.add(request); + responseObserver.onNext((LeaseTasksResponse) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void acknowledgeTask( + AcknowledgeTaskRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext((Empty) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void renewLease(RenewLeaseRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Task) { + requests.add(request); + responseObserver.onNext((Task) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void cancelLease(CancelLeaseRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Task) { + requests.add(request); + responseObserver.onNext((Task) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void runTask(RunTaskRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Task) { + requests.add(request); + responseObserver.onNext((Task) response); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError((Exception) response); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml index b8657ae097e2..05133701b10f 100644 --- a/google-cloud-clients/pom.xml +++ b/google-cloud-clients/pom.xml @@ -440,6 +440,7 @@ google-cloud-spanner google-cloud-speech google-cloud-storage + google-cloud-tasks google-cloud-texttospeech google-cloud-trace google-cloud-translate @@ -751,7 +752,7 @@ Stub packages - com.google.cloud.bigquerydatatransfer.v1.stub:com.google.cloud.container.v1.stub:com.google.cloud.dlp.v2beta1.stub:com.google.cloud.dlp.v2.stub:com.google.cloud.dialogflow.v2beta1.stub:com.google.cloud.dialogflow.v2.stub:com.google.cloud.errorreporting.v1beta1.stub:com.google.cloud.firestore.v1beta1.stub:com.google.cloud.language.v1beta2.stub:com.google.cloud.language.v1.stub:com.google.cloud.logging.v2.stub:com.google.cloud.monitoring.v3.stub:com.google.cloud.pubsub.v1.stub:com.google.cloud.speech.v1beta1.stub:com.google.cloud.speech.v1.stub:com.google.cloud.texttospeech.v1beta1.stub:com.google.cloud.texttospeech.v1.stub:com.google.cloud.trace.v1.stub:com.google.cloud.trace.v2.stub:com.google.cloud.videointelligence.v1beta1.stub:com.google.cloud.videointelligence.v1beta2.stub:com.google.cloud.videointelligence.v1.stub:com.google.cloud.videointelligence.v1p1beta1.stub:com.google.cloud.vision.v1.stub:com.google.cloud.vision.v1p1beta1.stub:com.google.cloud.vision.v1p2beta1.stub + com.google.cloud.bigquerydatatransfer.v1.stub:com.google.cloud.container.v1.stub:com.google.cloud.dlp.v2beta1.stub:com.google.cloud.dlp.v2.stub:com.google.cloud.dialogflow.v2beta1.stub:com.google.cloud.dialogflow.v2.stub:com.google.cloud.errorreporting.v1beta1.stub:com.google.cloud.firestore.v1beta1.stub:com.google.cloud.language.v1beta2.stub:com.google.cloud.language.v1.stub:com.google.cloud.logging.v2.stub:com.google.cloud.monitoring.v3.stub:com.google.cloud.pubsub.v1.stub:com.google.cloud.speech.v1beta1.stub:com.google.cloud.speech.v1.stub:com.google.cloud.tasks.v2beta2.stub:com.google.cloud.texttospeech.v1beta1.stub:com.google.cloud.texttospeech.v1.stub:com.google.cloud.trace.v1.stub:com.google.cloud.trace.v2.stub:com.google.cloud.videointelligence.v1beta1.stub:com.google.cloud.videointelligence.v1beta2.stub:com.google.cloud.videointelligence.v1.stub:com.google.cloud.videointelligence.v1p1beta1.stub:com.google.cloud.vision.v1.stub:com.google.cloud.vision.v1p1beta1.stub:com.google.cloud.vision.v1p2beta1.stub Deprecated packages diff --git a/versions.txt b/versions.txt index cfc4472cc477..85392e68fd39 100644 --- a/versions.txt +++ b/versions.txt @@ -30,6 +30,7 @@ grpc-google-cloud-spanner-v1:0.18.0:0.18.1-SNAPSHOT grpc-google-cloud-speech-v1:0.18.0:0.18.1-SNAPSHOT grpc-google-cloud-speech-v1beta1:0.18.0:0.18.1-SNAPSHOT grpc-google-cloud-speech-v1p1beta1:0.18.0:0.18.1-SNAPSHOT +grpc-google-cloud-tasks-v2beta2:0.18.0:0.18.1-SNAPSHOT grpc-google-cloud-texttospeech-v1:0.18.0:0.18.1-SNAPSHOT grpc-google-cloud-texttospeech-v1beta1:0.18.0:0.18.1-SNAPSHOT grpc-google-cloud-trace-v1:0.18.0:0.18.1-SNAPSHOT @@ -67,6 +68,7 @@ proto-google-cloud-spanner-v1:0.18.0:0.18.1-SNAPSHOT proto-google-cloud-speech-v1:0.18.0:0.18.1-SNAPSHOT proto-google-cloud-speech-v1beta1:0.18.0:0.18.1-SNAPSHOT proto-google-cloud-speech-v1p1beta1:0.18.0:0.18.1-SNAPSHOT +proto-google-cloud-tasks-v2beta2:0.18.0:0.18.1-SNAPSHOT proto-google-cloud-texttospeech-v1:0.18.0:0.18.1-SNAPSHOT proto-google-cloud-texttospeech-v1beta1:0.18.0:0.18.1-SNAPSHOT proto-google-cloud-trace-v1:0.18.0:0.18.1-SNAPSHOT @@ -127,6 +129,7 @@ google-cloud-resourcemanager:0.53.0-alpha:0.53.1-alpha-SNAPSHOT google-cloud-spanner:0.53.0-beta:0.53.1-beta-SNAPSHOT google-cloud-speech:0.53.0-beta:0.53.1-beta-SNAPSHOT google-cloud-storage:1.35.0:1.35.1-SNAPSHOT +google-cloud-tasks:0.53.0-beta:0.53.1-beta-SNAPSHOT google-cloud-texttospeech:0.53.0-beta:0.53.1-beta-SNAPSHOT google-cloud-testing:0.53.0-alpha:0.53.1-alpha-SNAPSHOT google-cloud-trace:0.53.0-beta:0.53.1-beta-SNAPSHOT