batch_job.proto 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. syntax = "proto3";
  15. package google.ads.googleads.v11.resources;
  16. import "google/ads/googleads/v11/enums/batch_job_status.proto";
  17. import "google/api/field_behavior.proto";
  18. import "google/api/resource.proto";
  19. option csharp_namespace = "Google.Ads.GoogleAds.V11.Resources";
  20. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v11/resources;resources";
  21. option java_multiple_files = true;
  22. option java_outer_classname = "BatchJobProto";
  23. option java_package = "com.google.ads.googleads.v11.resources";
  24. option objc_class_prefix = "GAA";
  25. option php_namespace = "Google\\Ads\\GoogleAds\\V11\\Resources";
  26. option ruby_package = "Google::Ads::GoogleAds::V11::Resources";
  27. // Proto file describing the batch job resource.
  28. // A list of mutates being processed asynchronously. The mutates are uploaded
  29. // by the user. The mutates themselves aren't readable and the results of the
  30. // job can only be read using BatchJobService.ListBatchJobResults.
  31. message BatchJob {
  32. option (google.api.resource) = {
  33. type: "googleads.googleapis.com/BatchJob"
  34. pattern: "customers/{customer_id}/batchJobs/{batch_job_id}"
  35. };
  36. // Additional information about the batch job. This message is also used as
  37. // metadata returned in batch job Long Running Operations.
  38. message BatchJobMetadata {
  39. // Output only. The time when this batch job was created.
  40. // Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:00"
  41. optional string creation_date_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  42. // Output only. The time when this batch job started running.
  43. // Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:30"
  44. optional string start_date_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  45. // Output only. The time when this batch job was completed.
  46. // Formatted as yyyy-MM-dd HH:mm:ss. Example: "2018-03-05 09:16:00"
  47. optional string completion_date_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  48. // Output only. The fraction (between 0.0 and 1.0) of mutates that have been processed.
  49. // This is empty if the job hasn't started running yet.
  50. optional double estimated_completion_ratio = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  51. // Output only. The number of mutate operations in the batch job.
  52. optional int64 operation_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  53. // Output only. The number of mutate operations executed by the batch job.
  54. // Present only if the job has started running.
  55. optional int64 executed_operation_count = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  56. }
  57. // Immutable. The resource name of the batch job.
  58. // Batch job resource names have the form:
  59. //
  60. // `customers/{customer_id}/batchJobs/{batch_job_id}`
  61. string resource_name = 1 [
  62. (google.api.field_behavior) = IMMUTABLE,
  63. (google.api.resource_reference) = {
  64. type: "googleads.googleapis.com/BatchJob"
  65. }
  66. ];
  67. // Output only. ID of this batch job.
  68. optional int64 id = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  69. // Output only. The next sequence token to use when adding operations. Only set when the
  70. // batch job status is PENDING.
  71. optional string next_add_sequence_token = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  72. // Output only. Contains additional information about this batch job.
  73. BatchJobMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  74. // Output only. Status of this batch job.
  75. google.ads.googleads.v11.enums.BatchJobStatusEnum.BatchJobStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  76. // Output only. The resource name of the long-running operation that can be used to poll
  77. // for completion. Only set when the batch job status is RUNNING or DONE.
  78. optional string long_running_operation = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  79. }