1 // Copyright 2018 Google LLC.
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 package google.ads.googleads.v0.services;
20 import "google/ads/googleads/v0/resources/media_file.proto";
21 import "google/api/annotations.proto";
22 import "google/protobuf/wrappers.proto";
23 import "google/rpc/status.proto";
25 option csharp_namespace = "Google.Ads.GoogleAds.V0.Services";
26 option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v0/services;services";
27 option java_multiple_files = true;
28 option java_outer_classname = "MediaFileServiceProto";
29 option java_package = "com.google.ads.googleads.v0.services";
30 option objc_class_prefix = "GAA";
31 option php_namespace = "Google\\Ads\\GoogleAds\\V0\\Services";
32 option ruby_package = "Google::Ads::GoogleAds::V0::Services";
34 // Proto file describing the Media File service.
36 // Service to manage media files.
37 service MediaFileService {
38 // Returns the requested media file in full detail.
39 rpc GetMediaFile(GetMediaFileRequest)
40 returns (google.ads.googleads.v0.resources.MediaFile) {
41 option (google.api.http) = {
42 get: "/v0/{resource_name=customers/*/mediaFiles/*}"
46 // Creates media files. Operation statuses are returned.
47 rpc MutateMediaFiles(MutateMediaFilesRequest)
48 returns (MutateMediaFilesResponse) {
49 option (google.api.http) = {
50 post: "/v0/customers/{customer_id=*}/mediaFiles:mutate"
56 // Request message for
57 // [MediaFileService.GetMediaFile][google.ads.googleads.v0.services.MediaFileService.GetMediaFile]
58 message GetMediaFileRequest {
59 // The resource name of the media file to fetch.
60 string resource_name = 1;
63 // Request message for
64 // [MediaFileService.MutateMediaFiles][google.ads.googleads.v0.services.MediaFileService.MutateMediaFiles]
65 message MutateMediaFilesRequest {
66 // The ID of the customer whose media files are being modified.
67 string customer_id = 1;
69 // The list of operations to perform on individual media file.
70 repeated MediaFileOperation operations = 2;
72 // If true, successful operations will be carried out and invalid
73 // operations will return errors. If false, all operations will be carried
74 // out in one transaction if and only if they are all valid.
76 bool partial_failure = 3;
78 // If true, the request is validated but not executed. Only errors are
79 // returned, not results.
80 bool validate_only = 4;
83 // A single operation to create media file.
84 message MediaFileOperation {
85 // The mutate operation.
87 // Create operation: No resource name is expected for the new media file.
88 google.ads.googleads.v0.resources.MediaFile create = 1;
92 // Response message for a media file mutate.
93 message MutateMediaFilesResponse {
94 // Errors that pertain to operation failures in the partial failure mode.
95 // Returned only when partial_failure = true and all errors occur inside the
96 // operations. If any errors occur outside the operations (e.g. auth errors),
97 // we return an RPC level error.
98 google.rpc.Status partial_failure_error = 3;
100 // All results for the mutate.
101 repeated MutateMediaFileResult results = 2;
104 // The result for the media file mutate.
105 message MutateMediaFileResult {
106 // The resource name returned for successful operations.
107 string resource_name = 1;