Debian Codegraph @

shopping/merchant/accounts/apiv1beta/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/v1beta/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_v1beta_emailpreferences_proto_enumTypes[0].Descriptor()
87 }
88
89 func (EmailPreferences_OptInState) Type() protoreflect.EnumType {
90 return &file_google_shopping_merchant_accounts_v1beta_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_v1beta_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.v1beta.EmailPreferences_OptInState" json:"news_and_tips,omitempty"`
115 }
116
117 func (x *EmailPreferences) Reset() {
118 *x = EmailPreferences{}
119 mi := &file_google_shopping_merchant_accounts_v1beta_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_v1beta_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_v1beta_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_v1beta_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_v1beta_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_v1beta_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 UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
219 }
220
221 func (x *UpdateEmailPreferencesRequest) Reset() {
222 *x = UpdateEmailPreferencesRequest{}
223 mi := &file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[2]
224 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
225 ms.StoreMessageInfo(mi)
226 }
227
228 func (x *UpdateEmailPreferencesRequest) String() string {
229 return protoimpl.X.MessageStringOf(x)
230 }
231
232 func (*UpdateEmailPreferencesRequest) ProtoMessage() {}
233
234 func (x *UpdateEmailPreferencesRequest) ProtoReflect() protoreflect.Message {
235 mi := &file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes[2]
236 if x != nil {
237 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
238 if ms.LoadMessageInfo() == nil {
239 ms.StoreMessageInfo(mi)
240 }
241 return ms
242 }
243 return mi.MessageOf(x)
244 }
245
246 // Deprecated: Use UpdateEmailPreferencesRequest.ProtoReflect.Descriptor instead.
247 func (*UpdateEmailPreferencesRequest) Descriptor() ([]byte, []int) {
248 return file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDescGZIP(), []int{2}
249 }
250
251 func (x *UpdateEmailPreferencesRequest) GetEmailPreferences() *EmailPreferences {
252 if x != nil {
253 return x.EmailPreferences
254 }
255 return nil
256 }
257
258 func (x *UpdateEmailPreferencesRequest) GetUpdateMask() *fieldmaskpb.FieldMask {
259 if x != nil {
260 return x.UpdateMask
261 }
262 return nil
263 }
264
265 var File_google_shopping_merchant_accounts_v1beta_emailpreferences_proto protoreflect.FileDescriptor
266
267 var file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDesc = []byte{
268 0x0a, 0x3f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e,
269 0x67, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75,
270 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c,
271 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74,
272 0x6f, 0x12, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69,
273 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f,
274 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x1a, 0x1c, 0x67, 0x6f, 0x6f,
275 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69,
276 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
277 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f,
278 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66,
279 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72,
280 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f,
281 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20,
282 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f,
283 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
284 0x22, 0x80, 0x03, 0x0a, 0x10, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72,
285 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
286 0x01, 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x08, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x6e,
287 0x0a, 0x0d, 0x6e, 0x65, 0x77, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x70, 0x73, 0x18,
288 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x45, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73,
289 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74,
290 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
291 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
292 0x73, 0x2e, 0x4f, 0x70, 0x74, 0x49, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x03, 0xe0, 0x41,
293 0x01, 0x52, 0x0b, 0x6e, 0x65, 0x77, 0x73, 0x41, 0x6e, 0x64, 0x54, 0x69, 0x70, 0x73, 0x22, 0x58,
294 0x0a, 0x0a, 0x4f, 0x70, 0x74, 0x49, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x18,
295 0x4f, 0x50, 0x54, 0x5f, 0x49, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53,
296 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x50,
297 0x54, 0x45, 0x44, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x50, 0x54,
298 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x43, 0x4f, 0x4e,
299 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x03, 0x3a, 0x88, 0x01, 0xea, 0x41, 0x84, 0x01, 0x0a,
300 0x2b, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x67, 0x6f, 0x6f,
301 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6d, 0x61, 0x69,
302 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x31, 0x61, 0x63,
303 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x7d,
304 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x7d, 0x2f, 0x65,
305 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2a,
306 0x10, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
307 0x73, 0x32, 0x10, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
308 0x63, 0x65, 0x73, 0x22, 0x65, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50,
309 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
310 0x74, 0x12, 0x47, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42,
311 0x33, 0xe0, 0x41, 0x02, 0xfa, 0x41, 0x2d, 0x0a, 0x2b, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e,
312 0x74, 0x61, 0x70, 0x69, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,
313 0x63, 0x6f, 0x6d, 0x2f, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65,
314 0x6e, 0x63, 0x65, 0x73, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x1d, 0x55,
315 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72,
316 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x6c, 0x0a, 0x11,
317 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
318 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
319 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61,
320 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65,
321 0x74, 0x61, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
322 0x63, 0x65, 0x73, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x10, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x50,
323 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x40, 0x0a, 0x0b, 0x75, 0x70,
324 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
325 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
326 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x42, 0x03, 0xe0, 0x41, 0x02,
327 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x32, 0xf3, 0x04, 0x0a,
328 0x17, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
329 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xe3, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74,
330 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73,
331 0x12, 0x44, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69,
332 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f,
333 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x47, 0x65, 0x74, 0x45,
334 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52,
335 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
336 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e,
337 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
338 0x61, 0x2e, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
339 0x65, 0x73, 0x22, 0x4a, 0xda, 0x41, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x82, 0xd3, 0xe4, 0x93, 0x02,
340 0x3d, 0x12, 0x3b, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62,
341 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e,
342 0x74, 0x73, 0x2f, 0x2a, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6d, 0x61,
343 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x7d, 0x12, 0xa8,
344 0x02, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72,
345 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x47, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
346 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63,
347 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31,
348 0x62, 0x65, 0x74, 0x61, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x45, 0x6d, 0x61, 0x69, 0x6c,
349 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
350 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70,
351 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63,
352 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x45, 0x6d,
353 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x88,
354 0x01, 0xda, 0x41, 0x1d, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72,
355 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2c, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73,
356 0x6b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x62, 0x3a, 0x11, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x5f, 0x70,
357 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x32, 0x4d, 0x2f, 0x61, 0x63, 0x63,
358 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x7b, 0x65, 0x6d,
359 0x61, 0x69, 0x6c, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2e,
360 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x2a, 0x2f,
361 0x75, 0x73, 0x65, 0x72, 0x73, 0x2f, 0x2a, 0x2f, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65,
362 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x7d, 0x1a, 0x47, 0xca, 0x41, 0x1a, 0x6d, 0x65,
363 0x72, 0x63, 0x68, 0x61, 0x6e, 0x74, 0x61, 0x70, 0x69, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
364 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0xd2, 0x41, 0x27, 0x68, 0x74, 0x74, 0x70, 0x73,
365 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69,
366 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x75, 0x74, 0x68, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x65,
367 0x6e, 0x74, 0x42, 0x97, 0x01, 0x0a, 0x2c, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
368 0x65, 0x2e, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x6d, 0x65, 0x72, 0x63, 0x68,
369 0x61, 0x6e, 0x74, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x31, 0x62,
370 0x65, 0x74, 0x61, 0x42, 0x15, 0x45, 0x6d, 0x61, 0x69, 0x6c, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72,
371 0x65, 0x6e, 0x63, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4e, 0x63, 0x6c,
372 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67,
373 0x6f, 0x2f, 0x73, 0x68, 0x6f, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2f, 0x6d, 0x65, 0x72, 0x63, 0x68,
374 0x61, 0x6e, 0x74, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x70, 0x69,
375 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x70,
376 0x62, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
377 0x6f, 0x74, 0x6f, 0x33,
378 }
379
380 var (
381 file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDescOnce sync.Once
382 file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDescData = file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDesc
383 )
384
385 func file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDescGZIP() []byte {
386 file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDescOnce.Do(func() {
387 file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDescData)
388 })
389 return file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDescData
390 }
391
392 var file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
393 var file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
394 var file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_goTypes = []any{
395 (EmailPreferences_OptInState)(0), // 0: google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState
396 (*EmailPreferences)(nil), // 1: google.shopping.merchant.accounts.v1beta.EmailPreferences
397 (*GetEmailPreferencesRequest)(nil), // 2: google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest
398 (*UpdateEmailPreferencesRequest)(nil), // 3: google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest
399 (*fieldmaskpb.FieldMask)(nil), // 4: google.protobuf.FieldMask
400 }
401 var file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_depIdxs = []int32{
402 0, // 0: google.shopping.merchant.accounts.v1beta.EmailPreferences.news_and_tips:type_name -> google.shopping.merchant.accounts.v1beta.EmailPreferences.OptInState
403 1, // 1: google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest.email_preferences:type_name -> google.shopping.merchant.accounts.v1beta.EmailPreferences
404 4, // 2: google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest.update_mask:type_name -> google.protobuf.FieldMask
405 2, // 3: google.shopping.merchant.accounts.v1beta.EmailPreferencesService.GetEmailPreferences:input_type -> google.shopping.merchant.accounts.v1beta.GetEmailPreferencesRequest
406 3, // 4: google.shopping.merchant.accounts.v1beta.EmailPreferencesService.UpdateEmailPreferences:input_type -> google.shopping.merchant.accounts.v1beta.UpdateEmailPreferencesRequest
407 1, // 5: google.shopping.merchant.accounts.v1beta.EmailPreferencesService.GetEmailPreferences:output_type -> google.shopping.merchant.accounts.v1beta.EmailPreferences
408 1, // 6: google.shopping.merchant.accounts.v1beta.EmailPreferencesService.UpdateEmailPreferences:output_type -> google.shopping.merchant.accounts.v1beta.EmailPreferences
409 5, // [5:7] is the sub-list for method output_type
410 3, // [3:5] is the sub-list for method input_type
411 3, // [3:3] is the sub-list for extension type_name
412 3, // [3:3] is the sub-list for extension extendee
413 0, // [0:3] is the sub-list for field type_name
414 }
415
416 func init() { file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_init() }
417 func file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_init() {
418 if File_google_shopping_merchant_accounts_v1beta_emailpreferences_proto != nil {
419 return
420 }
421 type x struct{}
422 out := protoimpl.TypeBuilder{
423 File: protoimpl.DescBuilder{
424 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
425 RawDescriptor: file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDesc,
426 NumEnums: 1,
427 NumMessages: 3,
428 NumExtensions: 0,
429 NumServices: 1,
430 },
431 GoTypes: file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_goTypes,
432 DependencyIndexes: file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_depIdxs,
433 EnumInfos: file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_enumTypes,
434 MessageInfos: file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_msgTypes,
435 }.Build()
436 File_google_shopping_merchant_accounts_v1beta_emailpreferences_proto = out.File
437 file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_rawDesc = nil
438 file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_goTypes = nil
439 file_google_shopping_merchant_accounts_v1beta_emailpreferences_proto_depIdxs = nil
440 }
441
442 // Reference imports to suppress errors if they are not otherwise used.
443 var _ context.Context
444 var _ grpc.ClientConnInterface
445
446 // This is a compile-time assertion to ensure that this generated file
447 // is compatible with the grpc package it is being compiled against.
448 const _ = grpc.SupportPackageIsVersion6
449
450 // EmailPreferencesServiceClient is the client API for EmailPreferencesService service.
451 //
452 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
453 type EmailPreferencesServiceClient interface {
454 // Returns the email preferences for a Merchant Center account user.
455 //
456 // Use the name=accounts/*/users/me/emailPreferences alias to get preferences
457 // for the authenticated user.
458 GetEmailPreferences(ctx context.Context, in *GetEmailPreferencesRequest, opts ...grpc.CallOption) (*EmailPreferences, error)
459 // Updates the email preferences for a Merchant Center account user. MCA users
460 // should specify the MCA account rather than a sub-account of the MCA.
461 //
462 // Preferences which are not explicitly selected in the update mask will not
463 // be updated.
464 //
465 // It is invalid for updates to specify an UNCONFIRMED opt-in status value.
466 //
467 // Use the name=accounts/*/users/me/emailPreferences alias to update
468 // preferences
469 // for the authenticated user.
470 UpdateEmailPreferences(ctx context.Context, in *UpdateEmailPreferencesRequest, opts ...grpc.CallOption) (*EmailPreferences, error)
471 }
472
473 type emailPreferencesServiceClient struct {
474 cc grpc.ClientConnInterface
475 }
476
477 func NewEmailPreferencesServiceClient(cc grpc.ClientConnInterface) EmailPreferencesServiceClient {
478 return &emailPreferencesServiceClient{cc}
479 }
480
481 func (c *emailPreferencesServiceClient) GetEmailPreferences(ctx context.Context, in *GetEmailPreferencesRequest, opts ...grpc.CallOption) (*EmailPreferences, error) {
482 out := new(EmailPreferences)
483 err := c.cc.Invoke(ctx, "/google.shopping.merchant.accounts.v1beta.EmailPreferencesService/GetEmailPreferences", in, out, opts...)
484 if err != nil {
485 return nil, err
486 }
487 return out, nil
488 }
489
490 func (c *emailPreferencesServiceClient) UpdateEmailPreferences(ctx context.Context, in *UpdateEmailPreferencesRequest, opts ...grpc.CallOption) (*EmailPreferences, error) {
491 out := new(EmailPreferences)
492 err := c.cc.Invoke(ctx, "/google.shopping.merchant.accounts.v1beta.EmailPreferencesService/UpdateEmailPreferences", in, out, opts...)
493 if err != nil {
494 return nil, err
495 }
496 return out, nil
497 }
498
499 // EmailPreferencesServiceServer is the server API for EmailPreferencesService service.
500 type EmailPreferencesServiceServer interface {
501 // Returns the email preferences for a Merchant Center account user.
502 //
503 // Use the name=accounts/*/users/me/emailPreferences alias to get preferences
504 // for the authenticated user.
505 GetEmailPreferences(context.Context, *GetEmailPreferencesRequest) (*EmailPreferences, error)
506 // Updates the email preferences for a Merchant Center account user. MCA users
507 // should specify the MCA account rather than a sub-account of the MCA.
508 //
509 // Preferences which are not explicitly selected in the update mask will not
510 // be updated.
511 //
512 // It is invalid for updates to specify an UNCONFIRMED opt-in status value.
513 //
514 // Use the name=accounts/*/users/me/emailPreferences alias to update
515 // preferences
516 // for the authenticated user.
517 UpdateEmailPreferences(context.Context, *UpdateEmailPreferencesRequest) (*EmailPreferences, error)
518 }
519
520 // UnimplementedEmailPreferencesServiceServer can be embedded to have forward compatible implementations.
521 type UnimplementedEmailPreferencesServiceServer struct {
522 }
523
524 func (*UnimplementedEmailPreferencesServiceServer) GetEmailPreferences(context.Context, *GetEmailPreferencesRequest) (*EmailPreferences, error) {
525 return nil, status.Errorf(codes.Unimplemented, "method GetEmailPreferences not implemented")
526 }
527 func (*UnimplementedEmailPreferencesServiceServer) UpdateEmailPreferences(context.Context, *UpdateEmailPreferencesRequest) (*EmailPreferences, error) {
528 return nil, status.Errorf(codes.Unimplemented, "method UpdateEmailPreferences not implemented")
529 }
530
531 func RegisterEmailPreferencesServiceServer(s *grpc.Server, srv EmailPreferencesServiceServer) {
532 s.RegisterService(&_EmailPreferencesService_serviceDesc, srv)
533 }
534
535 func _EmailPreferencesService_GetEmailPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
536 in := new(GetEmailPreferencesRequest)
537 if err := dec(in); err != nil {
538 return nil, err
539 }
540 if interceptor == nil {
541 return srv.(EmailPreferencesServiceServer).GetEmailPreferences(ctx, in)
542 }
543 info := &grpc.UnaryServerInfo{
544 Server: srv,
545 FullMethod: "/google.shopping.merchant.accounts.v1beta.EmailPreferencesService/GetEmailPreferences",
546 }
547 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
548 return srv.(EmailPreferencesServiceServer).GetEmailPreferences(ctx, req.(*GetEmailPreferencesRequest))
549 }
550 return interceptor(ctx, in, info, handler)
551 }
552
553 func _EmailPreferencesService_UpdateEmailPreferences_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
554 in := new(UpdateEmailPreferencesRequest)
555 if err := dec(in); err != nil {
556 return nil, err
557 }
558 if interceptor == nil {
559 return srv.(EmailPreferencesServiceServer).UpdateEmailPreferences(ctx, in)
560 }
561 info := &grpc.UnaryServerInfo{
562 Server: srv,
563 FullMethod: "/google.shopping.merchant.accounts.v1beta.EmailPreferencesService/UpdateEmailPreferences",
564 }
565 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
566 return srv.(EmailPreferencesServiceServer).UpdateEmailPreferences(ctx, req.(*UpdateEmailPreferencesRequest))
567 }
568 return interceptor(ctx, in, info, handler)
569 }
570
571 var _EmailPreferencesService_serviceDesc = grpc.ServiceDesc{
572 ServiceName: "google.shopping.merchant.accounts.v1beta.EmailPreferencesService",
573 HandlerType: (*EmailPreferencesServiceServer)(nil),
574 Methods: []grpc.MethodDesc{
575 {
576 MethodName: "GetEmailPreferences",
577 Handler: _EmailPreferencesService_GetEmailPreferences_Handler,
578 },
579 {
580 MethodName: "UpdateEmailPreferences",
581 Handler: _EmailPreferencesService_UpdateEmailPreferences_Handler,
582 },
583 },
584 Streams: []grpc.StreamDesc{},
585 Metadata: "google/shopping/merchant/accounts/v1beta/emailpreferences.proto",
586 }