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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
// This file is @generated by prost-build.
/// A sale for the merchant.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LfpSale {
    /// Output only. Identifier. The name of the `LfpSale` resource.
    /// Format:
    /// `accounts/{account}/lfpSales/{sale}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The Merchant Center ID of the merchant to submit the sale for.
    #[prost(int64, tag = "2")]
    pub target_account: i64,
    /// Required. The identifier of the merchant's store. Either a `storeCode`
    /// inserted through the API or the code of the store in the Business Profile.
    #[prost(string, tag = "3")]
    pub store_code: ::prost::alloc::string::String,
    /// Required. A unique identifier for the product. If both inventories and
    /// sales are submitted for a merchant, this id should match for the same
    /// product.
    ///
    /// **Note**: if the merchant sells the same product new and used, they should
    /// have different IDs.
    #[prost(string, tag = "4")]
    pub offer_id: ::prost::alloc::string::String,
    /// Required. The [CLDR territory
    /// code](<https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml>)
    /// for the country where the product is sold.
    #[prost(string, tag = "5")]
    pub region_code: ::prost::alloc::string::String,
    /// Required. The two-letter ISO 639-1 language code for the item.
    #[prost(string, tag = "6")]
    pub content_language: ::prost::alloc::string::String,
    /// Required. The Global Trade Item Number of the sold product.
    #[prost(string, tag = "7")]
    pub gtin: ::prost::alloc::string::String,
    /// Required. The unit price of the product.
    #[prost(message, optional, tag = "8")]
    pub price: ::core::option::Option<super::super::super::r#type::Price>,
    /// Required. The relative change of the available quantity. Negative for items
    /// returned.
    #[prost(int64, tag = "9")]
    pub quantity: i64,
    /// Required. The timestamp for the sale.
    #[prost(message, optional, tag = "10")]
    pub sale_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. System generated globally unique ID for the `LfpSale`.
    #[prost(string, optional, tag = "11")]
    pub uid: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. The [feed
    /// label](<https://developers.google.com/shopping-content/guides/products/feed-labels>)
    /// for the product. If this is not set, it will default to `regionCode`.
    #[prost(string, optional, tag = "12")]
    pub feed_label: ::core::option::Option<::prost::alloc::string::String>,
}
/// Request message for the InsertLfpSale method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InsertLfpSaleRequest {
    /// Required. The LFP provider account.
    /// Format: `accounts/{lfp_partner}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The sale to insert.
    #[prost(message, optional, tag = "2")]
    pub lfp_sale: ::core::option::Option<LfpSale>,
}
/// Generated client implementations.
pub mod lfp_sale_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service for a [LFP
    /// partner](https://support.google.com/merchants/answer/7676652) to submit sales
    /// data for a merchant.
    #[derive(Debug, Clone)]
    pub struct LfpSaleServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> LfpSaleServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> LfpSaleServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            LfpSaleServiceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Inserts a `LfpSale` for the given merchant.
        pub async fn insert_lfp_sale(
            &mut self,
            request: impl tonic::IntoRequest<super::InsertLfpSaleRequest>,
        ) -> std::result::Result<tonic::Response<super::LfpSale>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.shopping.merchant.lfp.v1beta.LfpSaleService/InsertLfpSale",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.shopping.merchant.lfp.v1beta.LfpSaleService",
                        "InsertLfpSale",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Local Inventory for the merchant.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LfpInventory {
    /// Output only. Identifier. The name for the `LfpInventory` resource.
    /// Format:
    /// `accounts/{account}/lfpInventories/{target_merchant}~{store_code}~{offer}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The Merchant Center ID of the merchant to submit the inventory
    /// for.
    #[prost(int64, tag = "2")]
    pub target_account: i64,
    /// Required. The identifier of the merchant's store. Either the store code
    /// inserted through `InsertLfpStore` or the store code in the Business
    /// Profile.
    #[prost(string, tag = "3")]
    pub store_code: ::prost::alloc::string::String,
    /// Required. Immutable. A unique identifier for the product. If both
    /// inventories and sales are submitted for a merchant, this id should match
    /// for the same product.
    ///
    /// **Note**: if the merchant sells the same product new and used, they should
    /// have different IDs.
    #[prost(string, tag = "4")]
    pub offer_id: ::prost::alloc::string::String,
    /// Required. The [CLDR territory
    /// code](<https://github.com/unicode-org/cldr/blob/latest/common/main/en.xml>)
    /// for the country where the product is sold.
    #[prost(string, tag = "5")]
    pub region_code: ::prost::alloc::string::String,
    /// Required. The two-letter ISO 639-1 language code for the item.
    #[prost(string, tag = "6")]
    pub content_language: ::prost::alloc::string::String,
    /// Optional. The Global Trade Item Number of the product.
    #[prost(string, optional, tag = "7")]
    pub gtin: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. The current price of the product.
    #[prost(message, optional, tag = "8")]
    pub price: ::core::option::Option<super::super::super::r#type::Price>,
    /// Required. Availability of the product at this store.
    /// For accepted attribute values, see the [local product inventory data
    /// specification](<https://support.google.com/merchants/answer/3061342>)
    #[prost(string, tag = "9")]
    pub availability: ::prost::alloc::string::String,
    /// Optional. Quantity of the product available at this store. Must be greater
    /// than or equal to zero.
    #[prost(int64, optional, tag = "10")]
    pub quantity: ::core::option::Option<i64>,
    /// Optional. The time when the inventory is collected. If not set, it will be
    /// set to the time when the inventory is submitted.
    #[prost(message, optional, tag = "11")]
    pub collection_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Supported pickup method for this offer. Unless the value is "not
    /// supported", this field must be submitted together with `pickupSla`. For
    /// accepted attribute values, see the [local product inventory data
    /// specification](<https://support.google.com/merchants/answer/3061342>).
    #[prost(string, optional, tag = "12")]
    pub pickup_method: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. Expected date that an order will be ready for pickup relative to
    /// the order date. Must be submitted together with `pickupMethod`. For
    /// accepted attribute values, see the [local product inventory data
    /// specification](<https://support.google.com/merchants/answer/3061342>).
    #[prost(string, optional, tag = "13")]
    pub pickup_sla: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. The [feed
    /// label](<https://developers.google.com/shopping-content/guides/products/feed-labels>)
    /// for the product. If this is not set, it will default to `regionCode`.
    #[prost(string, optional, tag = "14")]
    pub feed_label: ::core::option::Option<::prost::alloc::string::String>,
}
/// Request message for the `InsertLfpInventory` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InsertLfpInventoryRequest {
    /// Required. The LFP provider account.
    /// Format: `accounts/{account}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The inventory to insert.
    #[prost(message, optional, tag = "2")]
    pub lfp_inventory: ::core::option::Option<LfpInventory>,
}
/// Generated client implementations.
pub mod lfp_inventory_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service for a [LFP
    /// partner](https://support.google.com/merchants/answer/7676652) to submit local
    /// inventories for a merchant.
    #[derive(Debug, Clone)]
    pub struct LfpInventoryServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> LfpInventoryServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> LfpInventoryServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            LfpInventoryServiceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Inserts a `LfpInventory` resource for the given target merchant account. If
        /// the resource already exists, it will be replaced. The inventory
        /// automatically expires after 30 days.
        pub async fn insert_lfp_inventory(
            &mut self,
            request: impl tonic::IntoRequest<super::InsertLfpInventoryRequest>,
        ) -> std::result::Result<tonic::Response<super::LfpInventory>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.shopping.merchant.lfp.v1beta.LfpInventoryService/InsertLfpInventory",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.shopping.merchant.lfp.v1beta.LfpInventoryService",
                        "InsertLfpInventory",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// A store for the merchant. This will be used to match to a store under the
/// Google Business Profile of the target merchant. If a matching store can't be
/// found, the inventories or sales submitted with the store code will not be
/// used.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LfpStore {
    /// Output only. Identifier. The name of the `LfpStore` resource.
    /// Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The Merchant Center id of the merchant to submit the store for.
    #[prost(int64, tag = "2")]
    pub target_account: i64,
    /// Required. Immutable. A store identifier that is unique for the target
    /// merchant.
    #[prost(string, tag = "3")]
    pub store_code: ::prost::alloc::string::String,
    /// Required. The street address of the store.
    /// Example: 1600 Amphitheatre Pkwy, Mountain View, CA 94043, USA.
    #[prost(string, tag = "4")]
    pub store_address: ::prost::alloc::string::String,
    /// Optional. The merchant or store name.
    #[prost(string, optional, tag = "5")]
    pub store_name: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. The store phone number in
    /// [E.164](<https://en.wikipedia.org/wiki/E.164>) format. Example:
    /// `+15556767888`
    #[prost(string, optional, tag = "6")]
    pub phone_number: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. The website URL for the store or merchant.
    #[prost(string, optional, tag = "7")]
    pub website_uri: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. [Google My Business category
    /// id](<https://gcid-explorer.corp.google.com/static/gcid.html>).
    #[prost(string, repeated, tag = "8")]
    pub gcid_category: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Optional. The [Google Place
    /// Id](<https://developers.google.com/maps/documentation/places/web-service/place-id#id-overview>)
    /// of the store location.
    #[prost(string, optional, tag = "9")]
    pub place_id: ::core::option::Option<::prost::alloc::string::String>,
    /// Optional. Output only. The state of matching to a Google Business Profile.
    /// See
    /// [matchingStateHint][google.shopping.merchant.lfp.v1beta.LfpStore.matching_state_hint]
    /// for further details if no match is found.
    #[prost(enumeration = "lfp_store::StoreMatchingState", tag = "10")]
    pub matching_state: i32,
    /// Optional. Output only. The hint of why the matching has failed. This is
    /// only set when
    /// [matchingState][google.shopping.merchant.lfp.v1beta.LfpStore.matching_state]=`STORE_MATCHING_STATE_FAILED`.
    ///
    /// Possible values are:
    ///
    /// - "`linked-store-not-found`": There aren't any Google Business
    /// Profile stores available for matching.
    /// - "`store-match-not-found`": The provided `LfpStore` couldn't be matched to
    /// any of the connected Google Business Profile stores. Merchant Center
    /// account is connected correctly and stores are available on Google Business
    /// Profile, but the `LfpStore` location address does not match with Google
    /// Business Profile stores' addresses. Update the `LfpStore` address or Google
    /// Business Profile store address to match correctly.
    /// - "`store-match-unverified`": The provided `LfpStore` couldn't be matched
    /// to any of the connected Google Business Profile stores, as the matched
    /// Google Business Profile store is unverified. Go through the Google Business
    /// Profile verification process to match correctly.
    #[prost(string, optional, tag = "11")]
    pub matching_state_hint: ::core::option::Option<::prost::alloc::string::String>,
}
/// Nested message and enum types in `LfpStore`.
pub mod lfp_store {
    /// The state of matching `LfpStore` to a Google Business Profile.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum StoreMatchingState {
        /// Store matching state unspecified.
        Unspecified = 0,
        /// The `LfpStore` is successfully matched with a Google Business Profile
        /// store.
        Matched = 1,
        /// The `LfpStore` is not matched with a Google Business Profile store.
        Failed = 2,
    }
    impl StoreMatchingState {
        /// String value of the enum field names used in the ProtoBuf definition.
        ///
        /// The values are not transformed in any way and thus are considered stable
        /// (if the ProtoBuf definition does not change) and safe for programmatic use.
        pub fn as_str_name(&self) -> &'static str {
            match self {
                StoreMatchingState::Unspecified => "STORE_MATCHING_STATE_UNSPECIFIED",
                StoreMatchingState::Matched => "STORE_MATCHING_STATE_MATCHED",
                StoreMatchingState::Failed => "STORE_MATCHING_STATE_FAILED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STORE_MATCHING_STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "STORE_MATCHING_STATE_MATCHED" => Some(Self::Matched),
                "STORE_MATCHING_STATE_FAILED" => Some(Self::Failed),
                _ => None,
            }
        }
    }
}
/// Request message for the `GetLfpStore` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetLfpStoreRequest {
    /// Required. The name of the store to retrieve.
    /// Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for the InsertLfpStore method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InsertLfpStoreRequest {
    /// Required. The LFP provider account
    /// Format: `accounts/{account}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The store to insert.
    #[prost(message, optional, tag = "2")]
    pub lfp_store: ::core::option::Option<LfpStore>,
}
/// Request message for the DeleteLfpStore method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteLfpStoreRequest {
    /// Required. The name of the store to delete for the target merchant account.
    /// Format: `accounts/{account}/lfpStores/{target_merchant}~{store_code}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for the ListLfpStores method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLfpStoresRequest {
    /// Required. The LFP partner.
    /// Format: `accounts/{account}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The Merchant Center id of the merchant to list stores for.
    #[prost(int64, tag = "2")]
    pub target_account: i64,
    /// Optional. The maximum number of `LfpStore` resources for the given account
    /// to return. The service returns fewer than this value if the number of
    /// stores for the given account is less than the `pageSize`. The default value
    /// is 250. The maximum value is 1000; If a value higher than the maximum is
    /// specified, then the `pageSize` will default to the maximum.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous `ListLfpStoresRequest`
    /// call. Provide the page token to retrieve the subsequent page. When
    /// paginating, all other parameters provided to `ListLfpStoresRequest` must
    /// match the call that provided the page token. The token returned as
    /// [nextPageToken][google.shopping.merchant.lfp.v1beta.ListLfpStoresResponse.next_page_token]
    /// in the response to the previous request.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response message for the ListLfpStores method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListLfpStoresResponse {
    /// The stores from the specified merchant.
    #[prost(message, repeated, tag = "1")]
    pub lfp_stores: ::prost::alloc::vec::Vec<LfpStore>,
    /// A token, which can be sent as `pageToken` to retrieve the next page.
    /// If this field is omitted, there are no subsequent pages.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod lfp_store_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Service for a [LFP
    /// partner](https://support.google.com/merchants/answer/7676652) to submit local
    /// stores for a merchant.
    #[derive(Debug, Clone)]
    pub struct LfpStoreServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> LfpStoreServiceClient<T>
    where
        T: tonic::client::GrpcService<tonic::body::BoxBody>,
        T::Error: Into<StdError>,
        T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
        <T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
    {
        pub fn new(inner: T) -> Self {
            let inner = tonic::client::Grpc::new(inner);
            Self { inner }
        }
        pub fn with_origin(inner: T, origin: Uri) -> Self {
            let inner = tonic::client::Grpc::with_origin(inner, origin);
            Self { inner }
        }
        pub fn with_interceptor<F>(
            inner: T,
            interceptor: F,
        ) -> LfpStoreServiceClient<InterceptedService<T, F>>
        where
            F: tonic::service::Interceptor,
            T::ResponseBody: Default,
            T: tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
                Response = http::Response<
                    <T as tonic::client::GrpcService<tonic::body::BoxBody>>::ResponseBody,
                >,
            >,
            <T as tonic::codegen::Service<
                http::Request<tonic::body::BoxBody>,
            >>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
        {
            LfpStoreServiceClient::new(InterceptedService::new(inner, interceptor))
        }
        /// Compress requests with the given encoding.
        ///
        /// This requires the server to support it otherwise it might respond with an
        /// error.
        #[must_use]
        pub fn send_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.send_compressed(encoding);
            self
        }
        /// Enable decompressing responses.
        #[must_use]
        pub fn accept_compressed(mut self, encoding: CompressionEncoding) -> Self {
            self.inner = self.inner.accept_compressed(encoding);
            self
        }
        /// Limits the maximum size of a decoded message.
        ///
        /// Default: `4MB`
        #[must_use]
        pub fn max_decoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_decoding_message_size(limit);
            self
        }
        /// Limits the maximum size of an encoded message.
        ///
        /// Default: `usize::MAX`
        #[must_use]
        pub fn max_encoding_message_size(mut self, limit: usize) -> Self {
            self.inner = self.inner.max_encoding_message_size(limit);
            self
        }
        /// Retrieves information about a store.
        pub async fn get_lfp_store(
            &mut self,
            request: impl tonic::IntoRequest<super::GetLfpStoreRequest>,
        ) -> std::result::Result<tonic::Response<super::LfpStore>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.shopping.merchant.lfp.v1beta.LfpStoreService/GetLfpStore",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.shopping.merchant.lfp.v1beta.LfpStoreService",
                        "GetLfpStore",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Inserts a store for the target merchant. If the store with the same store
        /// code already exists, it will be replaced.
        pub async fn insert_lfp_store(
            &mut self,
            request: impl tonic::IntoRequest<super::InsertLfpStoreRequest>,
        ) -> std::result::Result<tonic::Response<super::LfpStore>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.shopping.merchant.lfp.v1beta.LfpStoreService/InsertLfpStore",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.shopping.merchant.lfp.v1beta.LfpStoreService",
                        "InsertLfpStore",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a store for a target merchant.
        pub async fn delete_lfp_store(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteLfpStoreRequest>,
        ) -> std::result::Result<tonic::Response<()>, tonic::Status> {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.shopping.merchant.lfp.v1beta.LfpStoreService/DeleteLfpStore",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.shopping.merchant.lfp.v1beta.LfpStoreService",
                        "DeleteLfpStore",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists the stores of the target merchant, specified by the filter in
        /// `ListLfpStoresRequest`.
        pub async fn list_lfp_stores(
            &mut self,
            request: impl tonic::IntoRequest<super::ListLfpStoresRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListLfpStoresResponse>,
            tonic::Status,
        > {
            self.inner
                .ready()
                .await
                .map_err(|e| {
                    tonic::Status::new(
                        tonic::Code::Unknown,
                        format!("Service was not ready: {}", e.into()),
                    )
                })?;
            let codec = tonic::codec::ProstCodec::default();
            let path = http::uri::PathAndQuery::from_static(
                "/google.shopping.merchant.lfp.v1beta.LfpStoreService/ListLfpStores",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.shopping.merchant.lfp.v1beta.LfpStoreService",
                        "ListLfpStores",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}