aboutsummaryrefslogtreecommitdiff
path: root/google/ads/googleads/v1/resources/feed.proto
blob: 9bf8d7ca8bade48ee974bba3ba94afac2e7c573f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

package google.ads.googleads.v1.resources;

import "google/ads/googleads/v1/enums/affiliate_location_feed_relationship_type.proto";
import "google/ads/googleads/v1/enums/feed_attribute_type.proto";
import "google/ads/googleads/v1/enums/feed_origin.proto";
import "google/ads/googleads/v1/enums/feed_status.proto";
import "google/protobuf/wrappers.proto";
import "google/api/annotations.proto";

option csharp_namespace = "Google.Ads.GoogleAds.V1.Resources";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v1/resources;resources";
option java_multiple_files = true;
option java_outer_classname = "FeedProto";
option java_package = "com.google.ads.googleads.v1.resources";
option objc_class_prefix = "GAA";
option php_namespace = "Google\\Ads\\GoogleAds\\V1\\Resources";
option ruby_package = "Google::Ads::GoogleAds::V1::Resources";

// Proto file describing the Feed resource.

// A feed.
message Feed {
  // Data used to configure a location feed populated from Google My Business
  // Locations.
  message PlacesLocationFeedData {
    // Data used for authorization using OAuth.
    message OAuthInfo {
      // The HTTP method used to obtain authorization.
      google.protobuf.StringValue http_method = 1;

      // The HTTP request URL used to obtain authorization.
      google.protobuf.StringValue http_request_url = 2;

      // The HTTP authorization header used to obtain authorization.
      google.protobuf.StringValue http_authorization_header = 3;
    }

    // Required authentication token (from OAuth API) for the email.
    // This field can only be specified in a create request. All its subfields
    // are not selectable.
    OAuthInfo oauth_info = 1;

    // Email address of a Google My Business account or email address of a
    // manager of the Google My Business account. Required.
    google.protobuf.StringValue email_address = 2;

    // Plus page ID of the managed business whose locations should be used. If
    // this field is not set, then all businesses accessible by the user
    // (specified by email_address) are used.
    // This field is mutate-only and is not selectable.
    google.protobuf.StringValue business_account_id = 10;

    // Used to filter Google My Business listings by business name. If
    // business_name_filter is set, only listings with a matching business name
    // are candidates to be sync'd into FeedItems.
    google.protobuf.StringValue business_name_filter = 4;

    // Used to filter Google My Business listings by categories. If entries
    // exist in category_filters, only listings that belong to any of the
    // categories are candidates to be sync'd into FeedItems. If no entries
    // exist in category_filters, then all listings are candidates for syncing.
    repeated google.protobuf.StringValue category_filters = 5;

    // Used to filter Google My Business listings by labels. If entries exist in
    // label_filters, only listings that has any of the labels set are
    // candidates to be synchronized into FeedItems. If no entries exist in
    // label_filters, then all listings are candidates for syncing.
    repeated google.protobuf.StringValue label_filters = 6;
  }

  // Data used to configure an affiliate location feed populated with the
  // specified chains.
  message AffiliateLocationFeedData {
    // The list of chains that the affiliate location feed will sync the
    // locations from.
    repeated google.protobuf.Int64Value chain_ids = 1;

    // The relationship the chains have with the advertiser.
    google.ads.googleads.v1.enums.AffiliateLocationFeedRelationshipTypeEnum.AffiliateLocationFeedRelationshipType relationship_type = 2;
  }

  // The resource name of the feed.
  // Feed resource names have the form:
  //
  // `customers/{customer_id}/feeds/{feed_id}`
  string resource_name = 1;

  // The ID of the feed.
  // This field is read-only.
  google.protobuf.Int64Value id = 2;

  // Name of the feed. Required.
  google.protobuf.StringValue name = 3;

  // The Feed's attributes. Required on CREATE.
  // Disallowed on UPDATE. Use attribute_operations to add new attributes.
  repeated FeedAttribute attributes = 4;

  // The list of operations changing the feed attributes. Attributes can only
  // be added, not removed.
  repeated FeedAttributeOperation attribute_operations = 9;

  // Specifies who manages the FeedAttributes for the Feed.
  google.ads.googleads.v1.enums.FeedOriginEnum.FeedOrigin origin = 5;

  // Status of the feed.
  // This field is read-only.
  google.ads.googleads.v1.enums.FeedStatusEnum.FeedStatus status = 8;

  // The system data for the Feed. This data specifies information for
  // generating the feed items of the system generated feed.
  oneof system_feed_generation_data {
    // Data used to configure a location feed populated from Google My Business
    // Locations.
    PlacesLocationFeedData places_location_feed_data = 6;

    // Data used to configure an affiliate location feed populated with
    // the specified chains.
    AffiliateLocationFeedData affiliate_location_feed_data = 7;
  }
}

// FeedAttributes define the types of data expected to be present in a Feed. A
// single FeedAttribute specifies the expected type of the FeedItemAttributes
// with the same FeedAttributeId. Optionally, a FeedAttribute can be marked as
// being part of a FeedItem's unique key.
message FeedAttribute {
  // ID of the attribute.
  google.protobuf.Int64Value id = 1;

  // The name of the attribute. Required.
  google.protobuf.StringValue name = 2;

  // Data type for feed attribute. Required.
  google.ads.googleads.v1.enums.FeedAttributeTypeEnum.FeedAttributeType type = 3;

  // Indicates that data corresponding to this attribute is part of a
  // FeedItem's unique key. It defaults to false if it is unspecified. Note
  // that a unique key is not required in a Feed's schema, in which case the
  // FeedItems must be referenced by their feed_item_id.
  google.protobuf.BoolValue is_part_of_key = 4;
}

// Operation to be performed on a feed attribute list in a mutate.
message FeedAttributeOperation {
  // The operator.
  enum Operator {
    // Unspecified.
    UNSPECIFIED = 0;

    // Used for return value only. Represents value unknown in this version.
    UNKNOWN = 1;

    // Add the attribute to the existing attributes.
    ADD = 2;
  }

  // Type of list operation to perform.
  Operator operator = 1;

  // The feed attribute being added to the list.
  FeedAttribute value = 2;
}