Debian Codegraph @

shopping/merchant/accounts/apiv1/accountspb/emailpreferences.pb.go

raw
1 // Copyright 2025 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
15 // Code generated by protoc-gen-go. DO NOT EDIT.
16 // versions:
17 // protoc-gen-go v1.35.2
18 // protoc v4.25.7
19 // source: google/shopping/merchant/accounts/v1/emailpreferences.proto
20
21 package accountspb
22
23 import (
24 context "context"
25 _ "google.golang.org/genproto/googleapis/api/annotations"
26 grpc "google.golang.org/grpc"
27 codes "google.golang.org/grpc/codes"
28 status "google.golang.org/grpc/status"
29 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
30 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
31 fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
32 reflect "reflect"
33 sync "sync"
34 )
35
36 const (
37 // Verify that this generated code is sufficiently up-to-date.
38 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
39 // Verify that runtime/protoimpl is sufficiently up-to-date.
40 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
41 )
42
43 // Opt in state of the email preference.
44 type EmailPreferences_OptInState int32
45
46 const (
47 // Opt-in status is not specified.
48 EmailPreferences_OPT_IN_STATE_UNSPECIFIED EmailPreferences_OptInState = 0
49 // User has opted out of receiving this type of email.
50 EmailPreferences_OPTED_OUT EmailPreferences_OptInState = 1
51 // User has opted in to receiving this type of email.
52 EmailPreferences_OPTED_IN EmailPreferences_OptInState = 2
53 // User has opted in to receiving this type of email and the confirmation
54 // email has been sent, but user has not yet confirmed the opt in (applies
55 // only to certain countries).
56 EmailPreferences_UNCONFIRMED EmailPreferences_OptInState = 3
57 )
58
59 // Enum value maps for EmailPreferences_OptInState.
60 var (
61 EmailPreferences_OptInState_name = map[int32]string{
62 0: "OPT_IN_STATE_UNSPECIFIED",
63 1: "OPTED_OUT",
64 2: "OPTED_IN",
65 3: "UNCONFIRMED",
66 }
67 EmailPreferences_OptInState_value = map[string]int32{
68 "OPT_IN_STATE_UNSPECIFIED": 0,
69 "OPTED_OUT": 1,
70 "OPTED_IN": 2,
71 "UNCONFIRMED": 3,
72 }
73 )
74
75 func (x EmailPreferences_OptInState) Enum() *EmailPreferences_OptInState {
76 p := new(EmailPreferences_OptInState)
77 *p = x
78 return p
79 }
80
81 func (x EmailPreferences_OptInState) String() string {
82 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
83 }
84
85 func (EmailPreferences_OptInState) Descriptor() protoreflect.EnumDescriptor {
86 return file_google_shopping_merchant_accounts_v1_emailpreferences_proto_enumTypes[0].Descriptor()
87 }
88
89 func (EmailPreferences_OptInState) Type() protoreflect.EnumType {
90 return &file_google_shopping_merchant_accounts_v1_emailpreferences_proto_enumTypes[0]
91 }
92
93 func (x EmailPreferences_OptInState) Number() protoreflect.EnumNumber {
94 return protoreflect.EnumNumber(x)
95 }
96
97 // Deprecated: Use EmailPreferences_OptInState.Descriptor instead.
98 func (EmailPreferences_OptInState) EnumDescriptor() ([]byte, []int) {
99 return file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDescGZIP(), []int{0, 0}
100 }
101
102 // The categories of notifications the user opted into / opted out of. The email
103 // preferences do not include mandatory announcements as users can't opt out of
104 // them.
105 type EmailPreferences struct {
106 state protoimpl.MessageState
107 sizeCache protoimpl.SizeCache
108 unknownFields protoimpl.UnknownFields
109
110 // Identifier. The name of the EmailPreferences. The endpoint is only
111 // supported for the authenticated user.
112 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
113 // Optional. Updates on new features, tips and best practices.
114 NewsAndTips EmailPreferences_OptInState `protobuf:"varint,2,opt,name=news_and_tips,json=newsAndTips,proto3,enum=google.shopping.merchant.accounts.v1.EmailPreferences_OptInState" json:"news_and_tips,omitempty"`
115 }
116
117 func (x *EmailPreferences) Reset() {
118 *x = EmailPreferences{}
119 mi := &file_google_shopping_merchant_accounts_v1_emailpreferences_proto_msgTypes[0]
120 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
121 ms.StoreMessageInfo(mi)
122 }
123
124 func (x *EmailPreferences) String() string {
125 return protoimpl.X.MessageStringOf(x)
126 }
127
128 func (*EmailPreferences) ProtoMessage() {}
129
130 func (x *EmailPreferences) ProtoReflect() protoreflect.Message {
131 mi := &file_google_shopping_merchant_accounts_v1_emailpreferences_proto_msgTypes[0]
132 if x != nil {
133 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
134 if ms.LoadMessageInfo() == nil {
135 ms.StoreMessageInfo(mi)
136 }
137 return ms
138 }
139 return mi.MessageOf(x)
140 }
141
142 // Deprecated: Use EmailPreferences.ProtoReflect.Descriptor instead.
143 func (*EmailPreferences) Descriptor() ([]byte, []int) {
144 return file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDescGZIP(), []int{0}
145 }
146
147 func (x *EmailPreferences) GetName() string {
148 if x != nil {
149 return x.Name
150 }
151 return ""
152 }
153
154 func (x *EmailPreferences) GetNewsAndTips() EmailPreferences_OptInState {
155 if x != nil {
156 return x.NewsAndTips
157 }
158 return EmailPreferences_OPT_IN_STATE_UNSPECIFIED
159 }
160
161 // Request message for GetEmailPreferences method.
162 type GetEmailPreferencesRequest struct {
163 state protoimpl.MessageState
164 sizeCache protoimpl.SizeCache
165 unknownFields protoimpl.UnknownFields
166
167 // Required. The name of the `EmailPreferences` resource.
168 // Format: `accounts/{account}/users/{email}/emailPreferences`
169 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
170 }
171
172 func (x *GetEmailPreferencesRequest) Reset() {
173 *x = GetEmailPreferencesRequest{}
174 mi := &file_google_shopping_merchant_accounts_v1_emailpreferences_proto_msgTypes[1]
175 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
176 ms.StoreMessageInfo(mi)
177 }
178
179 func (x *GetEmailPreferencesRequest) String() string {
180 return protoimpl.X.MessageStringOf(x)
181 }
182
183 func (*GetEmailPreferencesRequest) ProtoMessage() {}
184
185 func (x *GetEmailPreferencesRequest) ProtoReflect() protoreflect.Message {
186 mi := &file_google_shopping_merchant_accounts_v1_emailpreferences_proto_msgTypes[1]
187 if x != nil {
188 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
189 if ms.LoadMessageInfo() == nil {
190 ms.StoreMessageInfo(mi)
191 }
192 return ms
193 }
194 return mi.MessageOf(x)
195 }
196
197 // Deprecated: Use GetEmailPreferencesRequest.ProtoReflect.Descriptor instead.
198 func (*GetEmailPreferencesRequest) Descriptor() ([]byte, []int) {
199 return file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDescGZIP(), []int{1}
200 }
201
202 func (x *GetEmailPreferencesRequest) GetName() string {
203 if x != nil {
204 return x.Name
205 }
206 return ""
207 }
208
209 // Request message for UpdateEmailPreferences method.
210 type UpdateEmailPreferencesRequest struct {
211 state protoimpl.MessageState
212 sizeCache protoimpl.SizeCache
213 unknownFields protoimpl.UnknownFields
214
215 // Required. Email Preferences to be updated.
216 EmailPreferences *EmailPreferences `protobuf:"bytes,1,opt,name=email_preferences,json=emailPreferences,proto3" json:"email_preferences,omitempty"`
217 // Required. List of fields being updated.
218 //
219 // The following fields are supported (in both `snake_case` and
220 // `lowerCamelCase`):
221 //
222 // - `news_and_tips`
223 UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
224 }
225
226 func (x *UpdateEmailPreferencesRequest) Reset() {
227 *x = UpdateEmailPreferencesRequest{}
228 mi := &file_google_shopping_merchant_accounts_v1_emailpreferences_proto_msgTypes[2]
229 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
230 ms.StoreMessageInfo(mi)
231 }
232
233 func (x *UpdateEmailPreferencesRequest) String() string {
234 return protoimpl.X.MessageStringOf(x)
235 }
236
237 func (*UpdateEmailPreferencesRequest) ProtoMessage() {}
238
239 func (x *UpdateEmailPreferencesRequest) ProtoReflect() protoreflect.Message {
240 mi := &file_google_shopping_merchant_accounts_v1_emailpreferences_proto_msgTypes[2]
241 if x != nil {
242 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
243 if ms.LoadMessageInfo() == nil {
244 ms.StoreMessageInfo(mi)
245 }
246 return ms
247 }
248 return mi.MessageOf(x)
249 }
250
251 // Deprecated: Use UpdateEmailPreferencesRequest.ProtoReflect.Descriptor instead.
252 func (*UpdateEmailPreferencesRequest) Descriptor() ([]byte, []int) {
253 return file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDescGZIP(), []int{2}
254 }
255
256 func (x *UpdateEmailPreferencesRequest) GetEmailPreferences() *EmailPreferences {
257 if x != nil {
258 return x.EmailPreferences
259 }
260 return nil
261 }
262
263 func (x *UpdateEmailPreferencesRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
264 if x != nil {
265 return x.UpdateMask
266 }
267 return nil
268 }
269
270 var File_google_shopping_merchant_accounts_v1_emailpreferences_proto protoreflect.FileDescriptor
271
272 var file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDesc = []byte{
273 0x0a, 0x3b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e,
274 0x67, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75,
275 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x70, 0x72, 0x65, 0x66,
276 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x24, 0x67,
277 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x6d,
278 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
279 0x2e, 0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f,
280 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
281 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c,
282 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67,
283 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68,
284 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f,
285 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
286 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
287 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61,
288 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x02, 0x0a, 0x10, 0x45, 0x6d, 0x61,
289 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x17, 0x0a,
290 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08,
291 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x6a, 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x73, 0x5f, 0x61,
292 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x70, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x41, 0x2e,
293 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e,
294 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
295 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72,
296 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x49, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65,
297 0x42, 0x03, 0xe0, 0x41, 0x01, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x73, 0x41, 0x6e, 0x64, 0x54, 0x69,
298 0x70, 0x73, 0x22, 0x58, 0x0a, 0x0a, 0x4f, 0x70, 0x74, 0x49, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65,
299 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x50, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45,
300 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d,
301 0x0a, 0x09, 0x4f, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a,
302 0x08, 0x4f, 0x50, 0x54, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x55,
303 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x03, 0x3a, 0x88, 0x01, 0xea,
304 0x41, 0x84, 0x01, 0x0a, 0x2b, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x61, 0x70, 0x69,
305 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
306 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73,
307 0x12, 0x31, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f,
308 0x75, 0x6e, 0x74, 0x7d, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x65, 0x6d, 0x61, 0x69,
309 0x6c, 0x7d, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
310 0x63, 0x65, 0x73, 0x2a, 0x10, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72,
311 0x65, 0x6e, 0x63, 0x65, 0x73, 0x32, 0x10, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66,
312 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x65, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x6d,
313 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65,
314 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x47, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
315 0x01, 0x28, 0x09, 0x42, 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x6d, 0x65, 0x72,
316 0x63, 0x68, 0x61, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61,
317 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65,
318 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xcb,
319 0x01, 0x0a, 0x1d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72,
320 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
321 0x12, 0x68, 0x0a, 0x11, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72,
322 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x67, 0x6f,
323 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x65,
324 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e,
325 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
326 0x63, 0x65, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x50,
327 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70,
328 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
329 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
330 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02,
331 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x32, 0xdb, 0x04, 0x0a,
332 0x17, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
333 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xd7, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74,
334 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73,
335 0x12, 0x40, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69,
336 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f,
337 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c,
338 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
339 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70,
340 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63,
341 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50,
342 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x46, 0xda, 0x41, 0x04, 0x6e,
343 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x61, 0x63, 0x63, 0x6f,
344 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x63,
345 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a,
346 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
347 0x73, 0x7d, 0x12, 0x9c, 0x02, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61,
348 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x43, 0x2e,
349 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e,
350 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
351 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c,
352 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
353 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70,
354 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63,
355 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50,
356 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x84, 0x01, 0xda, 0x41, 0x1d,
357 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
358 0x73, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x82, 0xd3, 0xe4,
359 0x93, 0x02, 0x5e, 0x3a, 0x11, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65,
360 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x32, 0x49, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
361 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66,
362 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x63, 0x63,
363 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f,
364 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73,
365 0x7d, 0x1a, 0x47, 0xca, 0x41, 0x1a, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x61, 0x70,
366 0x69, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
367 0xd2, 0x41, 0x27, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67,
368 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75,
369 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x42, 0x88, 0x02, 0x0a, 0x28, 0x63,
370 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69,
371 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f,
372 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x15, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72,
373 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
374 0x5a, 0x4a, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63,
375 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2f, 0x6d,
376 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
377 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x70,
378 0x62, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x70, 0x62, 0xaa, 0x02, 0x24, 0x47,
379 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x53, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x4d,
380 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
381 0x2e, 0x56, 0x31, 0xca, 0x02, 0x24, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5c, 0x53, 0x68, 0x6f,
382 0x70, 0x70, 0x69, 0x6e, 0x67, 0x5c, 0x4d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x5c, 0x41,
383 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x5c, 0x56, 0x31, 0xea, 0x02, 0x28, 0x47, 0x6f, 0x6f,
384 0x67, 0x6c, 0x65, 0x3a, 0x3a, 0x53, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x4d,
385 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x3a, 0x3a, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
386 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
387 }
388
389 var (
390 file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDescOnce sync.Once
391 file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDescData = file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDesc
392 )
393
394 func file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDescGZIP() []byte {
395 file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDescOnce.Do(func() {
396 file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDescData)
397 })
398 return file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDescData
399 }
400
401 var file_google_shopping_merchant_accounts_v1_emailpreferences_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
402 var file_google_shopping_merchant_accounts_v1_emailpreferences_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
403 var file_google_shopping_merchant_accounts_v1_emailpreferences_proto_goTypes = []any{
404 (EmailPreferences_OptInState)(0), // 0: google.shopping.merchant.accounts.v1.EmailPreferences.OptInState
405 (*EmailPreferences)(nil), // 1: google.shopping.merchant.accounts.v1.EmailPreferences
406 (*GetEmailPreferencesRequest)(nil), // 2: google.shopping.merchant.accounts.v1.GetEmailPreferencesRequest
407 (*UpdateEmailPreferencesRequest)(nil), // 3: google.shopping.merchant.accounts.v1.UpdateEmailPreferencesRequest
408 (*fieldmaskpb.FieldMask)(nil), // 4: google.protobuf.FieldMask
409 }
410 var file_google_shopping_merchant_accounts_v1_emailpreferences_proto_depIdxs = []int32{
411 0, // 0: google.shopping.merchant.accounts.v1.EmailPreferences.news_and_tips:type_name -> google.shopping.merchant.accounts.v1.EmailPreferences.OptInState
412 1, // 1: google.shopping.merchant.accounts.v1.UpdateEmailPreferencesRequest.email_preferences:type_name -> google.shopping.merchant.accounts.v1.EmailPreferences
413 4, // 2: google.shopping.merchant.accounts.v1.UpdateEmailPreferencesRequest.update_mask:type_name -> google.protobuf.FieldMask
414 2, // 3: google.shopping.merchant.accounts.v1.EmailPreferencesService.GetEmailPreferences:input_type -> google.shopping.merchant.accounts.v1.GetEmailPreferencesRequest
415 3, // 4: google.shopping.merchant.accounts.v1.EmailPreferencesService.UpdateEmailPreferences:input_type -> google.shopping.merchant.accounts.v1.UpdateEmailPreferencesRequest
416 1, // 5: google.shopping.merchant.accounts.v1.EmailPreferencesService.GetEmailPreferences:output_type -> google.shopping.merchant.accounts.v1.EmailPreferences
417 1, // 6: google.shopping.merchant.accounts.v1.EmailPreferencesService.UpdateEmailPreferences:output_type -> google.shopping.merchant.accounts.v1.EmailPreferences
418 5, // [5:7] is the sub-list for method output_type
419 3, // [3:5] is the sub-list for method input_type
420 3, // [3:3] is the sub-list for extension type_name
421 3, // [3:3] is the sub-list for extension extendee
422 0, // [0:3] is the sub-list for field type_name
423 }
424
425 func init() { file_google_shopping_merchant_accounts_v1_emailpreferences_proto_init() }
426 func file_google_shopping_merchant_accounts_v1_emailpreferences_proto_init() {
427 if File_google_shopping_merchant_accounts_v1_emailpreferences_proto != nil {
428 return
429 }
430 type x struct{}
431 out := protoimpl.TypeBuilder{
432 File: protoimpl.DescBuilder{
433 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
434 RawDescriptor: file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDesc,
435 NumEnums: 1,
436 NumMessages: 3,
437 NumExtensions: 0,
438 NumServices: 1,
439 },
440 GoTypes: file_google_shopping_merchant_accounts_v1_emailpreferences_proto_goTypes,
441 DependencyIndexes: file_google_shopping_merchant_accounts_v1_emailpreferences_proto_depIdxs,
442 EnumInfos: file_google_shopping_merchant_accounts_v1_emailpreferences_proto_enumTypes,
443 MessageInfos: file_google_shopping_merchant_accounts_v1_emailpreferences_proto_msgTypes,
444 }.Build()
445 File_google_shopping_merchant_accounts_v1_emailpreferences_proto = out.File
446 file_google_shopping_merchant_accounts_v1_emailpreferences_proto_rawDesc = nil
447 file_google_shopping_merchant_accounts_v1_emailpreferences_proto_goTypes = nil
448 file_google_shopping_merchant_accounts_v1_emailpreferences_proto_depIdxs = nil
449 }
450
451 // Reference imports to suppress errors if they are not otherwise used.
452 var _ context.Context
453 var _ grpc.ClientConnInterface
454
455 // This is a compile-time assertion to ensure that this generated file
456 // is compatible with the grpc package it is being compiled against.
457 const _ = grpc.SupportPackageIsVersion6
458
459 // EmailPreferencesServiceClient is the client API for EmailPreferencesService service.
460 //
461 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
462 type EmailPreferencesServiceClient interface {
463 // Returns the email preferences for a Merchant Center account user.
464 // This service only permits retrieving and updating email preferences for the
465 // authenticated user.
466 // Use the name=accounts/*/users/me/emailPreferences alias to get preferences
467 // for the authenticated user.
468 GetEmailPreferences(ctx context.Context, in *GetEmailPreferencesRequest, opts ...grpc.CallOption) (*EmailPreferences, error)
469 // Updates the email preferences for a Merchant Center account user. Advanced
470 // account users should specify the advanced account rather than a sub-account
471 // of the advanced account.
472 //
473 // Preferences which are not explicitly selected in the update mask will not
474 // be updated.
475 //
476 // It is invalid for updates to specify an UNCONFIRMED opt-in status value.
477 //
478 // Use the name=accounts/*/users/me/emailPreferences alias to update
479 // preferences
480 // for the authenticated user.
481 UpdateEmailPreferences(ctx context.Context, in *UpdateEmailPreferencesRequest, opts ...grpc.CallOption) (*EmailPreferences, error)
482 }
483
484 type emailPreferencesServiceClient struct {
485 cc grpc.ClientConnInterface
486 }
487
488 func NewEmailPreferencesServiceClient(cc grpc.ClientConnInterface) EmailPreferencesServiceClient {
489 return &emailPreferencesServiceClient{cc}
490 }
491
492 func (c *emailPreferencesServiceClient) GetEmailPreferences(ctx context.Context, in *GetEmailPreferencesRequest, opts ...grpc.CallOption) (*EmailPreferences, error) {
493 out := new(EmailPreferences)
494 err := c.cc.Invoke(ctx, "/google.shopping.merchant.accounts.v1.EmailPreferencesService/GetEmailPreferences", in, out, opts...)
495 if err != nil {
496 return nil, err
497 }
498 return out, nil
499 }
500
501 func (c *emailPreferencesServiceClient) UpdateEmailPreferences(ctx context.Context, in *UpdateEmailPreferencesRequest, opts ...grpc.CallOption) (*EmailPreferences, error) {
502 out := new(EmailPreferences)
503 err := c.cc.Invoke(ctx, "/google.shopping.merchant.accounts.v1.EmailPreferencesService/UpdateEmailPreferences", in, out, opts...)
504 if err != nil {
505 return nil, err
506 }
507 return out, nil
508 }
509
510 // EmailPreferencesServiceServer is the server API for EmailPreferencesService service.
511 type EmailPreferencesServiceServer interface {
512 // Returns the email preferences for a Merchant Center account user.
513 // This service only permits retrieving and updating email preferences for the
514 // authenticated user.
515 // Use the name=accounts/*/users/me/emailPreferences alias to get preferences
516 // for the authenticated user.
517 GetEmailPreferences(context.Context, *GetEmailPreferencesRequest) (*EmailPreferences, error)
518 // Updates the email preferences for a Merchant Center account user. Advanced
519 // account users should specify the advanced account rather than a sub-account
520 // of the advanced account.
521 //
522 // Preferences which are not explicitly selected in the update mask will not
523 // be updated.
524 //
525 // It is invalid for updates to specify an UNCONFIRMED opt-in status value.
526 //
527 // Use the name=accounts/*/users/me/emailPreferences alias to update
528 // preferences
529 // for the authenticated user.
530 UpdateEmailPreferences(context.Context, *UpdateEmailPreferencesRequest) (*EmailPreferences, error)
531 }
532
533 // UnimplementedEmailPreferencesServiceServer can be embedded to have forward compatible implementations.
534 type UnimplementedEmailPreferencesServiceServer struct {
535 }
536
537 func (*UnimplementedEmailPreferencesServiceServer) GetEmailPreferences(context.Context, *GetEmailPreferencesRequest) (*EmailPreferences, error) {
538 return nil, status.Errorf(codes.Unimplemented, "method GetEmailPreferences not implemented")
539 }
540 func (*UnimplementedEmailPreferencesServiceServer) UpdateEmailPreferences(context.Context, *UpdateEmailPreferencesRequest) (*EmailPreferences, error) {
541 return nil, status.Errorf(codes.Unimplemented, "method UpdateEmailPreferences not implemented")
542 }
543
544 func RegisterEmailPreferencesServiceServer(s *grpc.Server, srv EmailPreferencesServiceServer) {
545 s.RegisterService(&_EmailPreferencesService_serviceDesc, srv)
546 }
547
548 func _EmailPreferencesService_GetEmailPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
549 in := new(GetEmailPreferencesRequest)
550 if err := dec(in); err != nil {
551 return nil, err
552 }
553 if interceptor == nil {
554 return srv.(EmailPreferencesServiceServer).GetEmailPreferences(ctx, in)
555 }
556 info := &grpc.UnaryServerInfo{
557 Server: srv,
558 FullMethod: "/google.shopping.merchant.accounts.v1.EmailPreferencesService/GetEmailPreferences",
559 }
560 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
561 return srv.(EmailPreferencesServiceServer).GetEmailPreferences(ctx, req.(*GetEmailPreferencesRequest))
562 }
563 return interceptor(ctx, in, info, handler)
564 }
565
566 func _EmailPreferencesService_UpdateEmailPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
567 in := new(UpdateEmailPreferencesRequest)
568 if err := dec(in); err != nil {
569 return nil, err
570 }
571 if interceptor == nil {
572 return srv.(EmailPreferencesServiceServer).UpdateEmailPreferences(ctx, in)
573 }
574 info := &grpc.UnaryServerInfo{
575 Server: srv,
576 FullMethod: "/google.shopping.merchant.accounts.v1.EmailPreferencesService/UpdateEmailPreferences",
577 }
578 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
579 return srv.(EmailPreferencesServiceServer).UpdateEmailPreferences(ctx, req.(*UpdateEmailPreferencesRequest))
580 }
581 return interceptor(ctx, in, info, handler)
582 }
583
584 var _EmailPreferencesService_serviceDesc = grpc.ServiceDesc{
585 ServiceName: "google.shopping.merchant.accounts.v1.EmailPreferencesService",
586 HandlerType: (*EmailPreferencesServiceServer)(nil),
587 Methods: []grpc.MethodDesc{
588 {
589 MethodName: "GetEmailPreferences",
590 Handler: _EmailPreferencesService_GetEmailPreferences_Handler,
591 },
592 {
593 MethodName: "UpdateEmailPreferences",
594 Handler: _EmailPreferencesService_UpdateEmailPreferences_Handler,
595 },
596 },
597 Streams: []grpc.StreamDesc{},
598 Metadata: "google/shopping/merchant/accounts/v1/emailpreferences.proto",
599 }