batch_job.proto 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. // Copyright 2021 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.v7.resources;
  16. import "google/ads/googleads/v7/enums/batch_job_status.proto";
  17. import "google/api/field_behavior.proto";
  18. import "google/api/resource.proto";
  19. import "google/api/annotations.proto";
  20. option csharp_namespace = "Google.Ads.GoogleAds.V7.Resources";
  21. option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v7/resources;resources";
  22. option java_multiple_files = true;
  23. option java_outer_classname = "BatchJobProto";
  24. option java_package = "com.google.ads.googleads.v7.resources";
  25. option objc_class_prefix = "GAA";
  26. option php_namespace = "Google\\Ads\\GoogleAds\\V7\\Resources";
  27. option ruby_package = "Google::Ads::GoogleAds::V7::Resources";
  28. // Proto file describing the batch job resource.
  29. // A list of mutates being processed asynchronously. The mutates are uploaded
  30. // by the user. The mutates themselves aren't readable and the results of the
  31. // job can only be read using BatchJobService.ListBatchJobResults.
  32. message BatchJob {
  33. option (google.api.resource) = {
  34. type: "googleads.googleapis.com/BatchJob"
  35. pattern: "customers/{customer_id}/batchJobs/{batch_job_id}"
  36. };
  37. // Additional information about the batch job. This message is also used as
  38. // metadata returned in batch job Long Running Operations.
  39. message BatchJobMetadata {
  40. // Output only. The time when this batch job was created.
  41. // Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:00"
  42. optional string creation_date_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  43. // Output only. The time when this batch job started running.
  44. // Formatted as yyyy-mm-dd hh:mm:ss. Example: "2018-03-05 09:15:30"
  45. optional string start_date_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  46. // Output only. The time when this batch job was completed.
  47. // Formatted as yyyy-MM-dd HH:mm:ss. Example: "2018-03-05 09:16:00"
  48. optional string completion_date_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  49. // Output only. The fraction (between 0.0 and 1.0) of mutates that have been processed.
  50. // This is empty if the job hasn't started running yet.
  51. optional double estimated_completion_ratio = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
  52. // Output only. The number of mutate operations in the batch job.
  53. optional int64 operation_count = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
  54. // Output only. The number of mutate operations executed by the batch job.
  55. // Present only if the job has started running.
  56. optional int64 executed_operation_count = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
  57. }
  58. // Immutable. The resource name of the batch job.
  59. // Batch job resource names have the form:
  60. //
  61. // `customers/{customer_id}/batchJobs/{batch_job_id}`
  62. string resource_name = 1 [
  63. (google.api.field_behavior) = IMMUTABLE,
  64. (google.api.resource_reference) = {
  65. type: "googleads.googleapis.com/BatchJob"
  66. }
  67. ];
  68. // Output only. ID of this batch job.
  69. optional int64 id = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
  70. // Output only. The next sequence token to use when adding operations. Only set when the
  71. // batch job status is PENDING.
  72. optional string next_add_sequence_token = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
  73. // Output only. Contains additional information about this batch job.
  74. BatchJobMetadata metadata = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  75. // Output only. Status of this batch job.
  76. google.ads.googleads.v7.enums.BatchJobStatusEnum.BatchJobStatus status = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
  77. // Output only. The resource name of the long-running operation that can be used to poll
  78. // for completion. Only set when the batch job status is RUNNING or DONE.
  79. optional string long_running_operation = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
  80. }