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
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
// This file is @generated by prost-build.
/// A transaction processed by the account manager.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountManagerTransaction {
    /// The name of the transaction. This uniquely identifies the
    /// transaction. Format of name is
    /// projects/{project}/accountManagers/{account_manager}/transactions/{transaction}.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// The account ID for which the transaction was processed.
    #[prost(string, tag = "2")]
    pub account_id: ::prost::alloc::string::String,
    /// Information about the transaction.
    #[prost(message, optional, tag = "3")]
    pub info: ::core::option::Option<AccountManagerTransactionInfo>,
    /// The payer in the transaction.
    #[prost(message, optional, tag = "4")]
    pub payer: ::core::option::Option<AccountManagerSettlementParticipant>,
    /// The payee in the transaction.
    #[prost(message, optional, tag = "5")]
    pub payee: ::core::option::Option<AccountManagerSettlementParticipant>,
    /// Reconciliation information for the transaction.
    #[prost(message, optional, tag = "6")]
    pub reconciliation_info: ::core::option::Option<
        AccountManagerTransactionReconciliationInfo,
    >,
    /// The amount for payment settlement in the transaction.
    #[prost(message, optional, tag = "7")]
    pub amount: ::core::option::Option<super::super::super::super::super::r#type::Money>,
}
/// Information about a transaction processed by the account manager.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountManagerTransactionInfo {
    /// An identifier that is mandatorily present in every transaction processed
    /// via account manager.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// The transaction type.
    #[prost(enumeration = "AccountManagerTransactionType", tag = "3")]
    pub transaction_type: i32,
    /// Output only. The transaction's state.
    #[prost(enumeration = "account_manager_transaction_info::State", tag = "5")]
    pub state: i32,
    /// Metadata about the transaction.
    #[prost(message, optional, tag = "6")]
    pub metadata: ::core::option::Option<
        account_manager_transaction_info::AccountManagerTransactionMetadata,
    >,
    /// Output only. Any error details for the current transaction, if the state is
    /// `FAILED`.
    #[prost(message, optional, tag = "7")]
    pub error_details: ::core::option::Option<
        account_manager_transaction_info::AccountManagerTransactionErrorDetails,
    >,
}
/// Nested message and enum types in `AccountManagerTransactionInfo`.
pub mod account_manager_transaction_info {
    /// Common metadata about a transaction.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AccountManagerTransactionMetadata {
        /// The time at which the transaction took place.
        #[prost(message, optional, tag = "1")]
        pub transaction_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Output only. The time at which the transaction resource was created by
        /// the account manager.
        #[prost(message, optional, tag = "2")]
        pub create_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Output only. The time at which the transaction resource was last updated
        /// by the account manager.
        #[prost(message, optional, tag = "3")]
        pub update_time: ::core::option::Option<::prost_types::Timestamp>,
        /// Retrieval reference number (RRN) for the transaction.
        #[prost(string, tag = "4")]
        pub retrieval_reference_number: ::prost::alloc::string::String,
        /// The initiation mode of this transaction.
        #[prost(string, tag = "5")]
        pub initiation_mode: ::prost::alloc::string::String,
        /// The purpose code of this transaction.
        #[prost(string, tag = "6")]
        pub purpose_code: ::prost::alloc::string::String,
    }
    /// All details about any error in the processing of a transaction.
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct AccountManagerTransactionErrorDetails {
        /// Output only. Error code of the failed transaction.
        #[prost(string, tag = "1")]
        pub error_code: ::prost::alloc::string::String,
        /// Output only. Error description for the failed transaction.
        #[prost(string, tag = "2")]
        pub error_message: ::prost::alloc::string::String,
    }
    /// Specifies the current state of the transaction.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Unspecified state.
        Unspecified = 0,
        /// The transaction has successfully completed.
        Succeeded = 1,
        /// The transaction has failed.
        Failed = 2,
    }
    impl State {
        /// 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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Succeeded => "SUCCEEDED",
                State::Failed => "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 {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "SUCCEEDED" => Some(Self::Succeeded),
                "FAILED" => Some(Self::Failed),
                _ => None,
            }
        }
    }
}
/// A participant in a payment settlement transaction processed by the
/// account manager. The participant could either be the payer or the payee
/// in the transaction.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountManagerSettlementParticipant {
    /// The participant information.
    #[prost(message, optional, tag = "1")]
    pub participant: ::core::option::Option<AccountManagerParticipant>,
    /// Information about a merchant who is a participant in the payment. This
    /// field will be specified only if the participant is a merchant.
    #[prost(message, optional, tag = "2")]
    pub merchant_info: ::core::option::Option<AccountManagerMerchantInfo>,
}
/// A participant in a transaction processed by the account manager.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountManagerParticipant {
    /// The payment address of the participant. In the UPI system, this will be the
    /// virtual payment address (VPA) of the participant.
    #[prost(string, tag = "1")]
    pub payment_address: ::prost::alloc::string::String,
    /// The persona of the participant.
    #[prost(enumeration = "account_manager_participant::Persona", tag = "2")]
    pub persona: i32,
    /// Unique identification of an account.
    #[prost(message, optional, tag = "3")]
    pub account: ::core::option::Option<super::super::v1::AccountReference>,
}
/// Nested message and enum types in `AccountManagerParticipant`.
pub mod account_manager_participant {
    /// The type of the participant.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum Persona {
        /// Unspecified persona.
        Unspecified = 0,
        /// Participant is an entity.
        Entity = 1,
        /// Participant is a person.
        Person = 2,
    }
    impl Persona {
        /// 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 {
                Persona::Unspecified => "PERSONA_UNSPECIFIED",
                Persona::Entity => "ENTITY",
                Persona::Person => "PERSON",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "PERSONA_UNSPECIFIED" => Some(Self::Unspecified),
                "ENTITY" => Some(Self::Entity),
                "PERSON" => Some(Self::Person),
                _ => None,
            }
        }
    }
}
/// A merchant in a transaction processed by the account manager.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AccountManagerMerchantInfo {
    /// Merchant Category Code (MCC) as specified by UPI. This is a four-digit
    /// number listed in ISO 18245 for retail financial services.
    #[prost(string, tag = "1")]
    pub category_code: ::prost::alloc::string::String,
    /// ID of the merchant.
    #[prost(string, tag = "2")]
    pub id: ::prost::alloc::string::String,
}
/// Reconciliation information for a transaction processed by account manager.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AccountManagerTransactionReconciliationInfo {
    /// Output only. State of reconciliation.
    #[prost(
        enumeration = "account_manager_transaction_reconciliation_info::ReconciliationState",
        tag = "1"
    )]
    pub state: i32,
    /// Time at which reconciliation was performed for the transaction.
    #[prost(message, optional, tag = "2")]
    pub reconciliation_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `AccountManagerTransactionReconciliationInfo`.
pub mod account_manager_transaction_reconciliation_info {
    /// State of transaction reconciliation.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum ReconciliationState {
        /// Unspecified state.
        Unspecified = 0,
        /// Reconciliation was successful.
        Succeeded = 1,
        /// Reconciliation failed.
        Failed = 2,
    }
    impl ReconciliationState {
        /// 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 {
                ReconciliationState::Unspecified => "RECONCILIATION_STATE_UNSPECIFIED",
                ReconciliationState::Succeeded => "SUCCEEDED",
                ReconciliationState::Failed => "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 {
                "RECONCILIATION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "SUCCEEDED" => Some(Self::Succeeded),
                "FAILED" => Some(Self::Failed),
                _ => None,
            }
        }
    }
}
/// Request for the `ExportAccountManagerTransactions` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExportAccountManagerTransactionsRequest {
    /// Required. The parent resource for the transactions. The format is
    /// `projects/{project}/accountManagers/{account_manager}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. Transaction type of an account manager transaction. The possible
    /// values for transaction type are
    ///
    /// * CREDIT
    /// * CREDIT_REVERSAL
    /// * DEBIT
    /// * DEBIT_REVERSAL
    ///
    /// If no transaction type is specified, records of all the above transaction
    /// types will be exported.
    #[prost(enumeration = "AccountManagerTransactionType", tag = "3")]
    pub transaction_type: i32,
    /// Optional. The start time for the query.
    #[prost(message, optional, tag = "4")]
    pub start_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. The end time for the query.
    #[prost(message, optional, tag = "5")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Request for the `ListAccountManagerTransactions` method. Callers can request
/// for transactions to be filtered by the given filter criteria and specified
/// pagination parameters.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAccountManagerTransactionsRequest {
    /// Required. The parent resource. The format is
    /// `projects/{project}/accountManagers/{account_manager}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Optional. The maximum number of transactions to return. The service may
    /// return fewer than this value. If unspecified or if the specified value is
    /// less than 1, at most 50 transactions will be returned. The maximum value is
    /// 1000; values above 1000 will be coerced to 1000. While paginating, you can
    /// specify a new page size parameter for each page of transactions to be
    /// listed.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// Optional. A page token, received from a previous
    /// `ListAccountManagerTransactions` call. Specify this parameter to retrieve
    /// the next page of transactions.
    ///
    /// When paginating, you must specify only the `page_token` parameter. The
    /// filter that was specified in the initial call to the
    /// `ListAccountManagerTransactions` method that returned the page token will
    /// be reused for all further calls where the page token parameter is
    /// specified.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
    /// Optional. An expression that filters the list of transactions.
    ///
    /// A filter expression consists of a field name, a comparison operator, and
    /// a value for filtering. The value must be a string, a number, or a
    /// boolean. The comparison operator must be one of: `<`, `>`, or `=`.
    /// Filters are not case sensitive.
    ///
    /// The following fields in the `Transaction` are eligible for filtering:
    ///
    ///    * `accountID` - The account ID. Allowed comparison operators: `=`. When
    ///    account manager is used for managing UPI Lite transactions, accountID
    ///    should be the Lite Reference Number (LRN).
    ///    * `accountNumber` - Bank account number associated with the
    ///    account. Allowed comparison operators: `=`.
    ///    * `IFSC` - Bank IFSC code associated with the account.
    ///    Allowed comparison operators: `=`.
    ///    * `RRN` - The retrieval reference number of the transaction. Allowed
    ///    comparison operators: `=`.
    ///    * `transactionTime` - The timestamp (in UTC) at which the transaction
    ///    took place. The value should be in the format `YYYY-MM-DDTHH:MM:SSZ`.
    ///    Allowed comparison operators: `>`, `<`.
    ///
    /// You can combine multiple expressions by enclosing each expression in
    /// parentheses. Expressions are combined with AND logic. No other logical
    /// operators are supported.
    ///
    /// Here are a few examples:
    ///
    ///    * `rrn = 123456789123` - The RRN is _123456789123_.
    ///    * `(accountID = 12345678) AND (transactionTime < "2021-08-15T14:50:00Z")`
    ///    - The accountID is 12345678 and the transaction was received
    ///    before _2021-08-15 14:50:00 UTC_.
    ///    * `transactionTime > "2021-08-15T14:50:00Z" AND transactionTime <
    ///    "2021-08-16T14:50:00Z"` - The transaction was received between
    ///    _2021-08-15 14:50:00 UTC_ and _2021-08-16 14:50:00 UTC_.
    #[prost(string, tag = "5")]
    pub filter: ::prost::alloc::string::String,
}
/// Response for the `ListAccountManagerTransactions` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAccountManagerTransactionsResponse {
    /// List of account manager transactions satisfying the filtered request.
    #[prost(message, repeated, tag = "1")]
    pub account_manager_transactions: ::prost::alloc::vec::Vec<
        AccountManagerTransaction,
    >,
    /// Pass this token in the ListAccountManagerTransactionsRequest to continue to
    /// list results. If all results have been returned, this field is an empty
    /// string or not present in the response.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Reconciliation request for an account manager transaction.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReconcileAccountManagerTransactionsRequest {
    /// Required. The transaction that will be reconciled.
    #[prost(message, optional, tag = "1")]
    pub transaction: ::core::option::Option<AccountManagerTransaction>,
}
/// Request for the `BatchReconcileAccountManagerTransactions` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchReconcileAccountManagerTransactionsRequest {
    /// Required. The parent resource. The format is
    /// `projects/{project}/accountManagers/{account_manager}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The request message specifying the transaction to reconcile.
    /// A maximum of 200 transactions can be reconciled in a batch.
    #[prost(message, repeated, tag = "2")]
    pub requests: ::prost::alloc::vec::Vec<ReconcileAccountManagerTransactionsRequest>,
}
/// Response for the `BatchReconcileAccountManagerTransactions` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchReconcileAccountManagerTransactionsResponse {
    /// List of transactions reconciled.
    #[prost(message, repeated, tag = "1")]
    pub account_manager_transactions: ::prost::alloc::vec::Vec<
        AccountManagerTransaction,
    >,
}
/// The type of a account manager transaction. Every transaction processed by the
/// account manager will be one of these transaction types.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AccountManagerTransactionType {
    /// Unspecified transaction type.
    Unspecified = 0,
    /// Credit transaction type.
    Credit = 1,
    /// Credit reversal transaction type.
    CreditReversal = 2,
    /// Debit transaction type.
    Debit = 3,
    /// Debit reversal transaction type.
    DebitReversal = 4,
}
impl AccountManagerTransactionType {
    /// 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 {
            AccountManagerTransactionType::Unspecified => {
                "ACCOUNT_MANAGER_TRANSACTION_TYPE_UNSPECIFIED"
            }
            AccountManagerTransactionType::Credit => "CREDIT",
            AccountManagerTransactionType::CreditReversal => "CREDIT_REVERSAL",
            AccountManagerTransactionType::Debit => "DEBIT",
            AccountManagerTransactionType::DebitReversal => "DEBIT_REVERSAL",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "ACCOUNT_MANAGER_TRANSACTION_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "CREDIT" => Some(Self::Credit),
            "CREDIT_REVERSAL" => Some(Self::CreditReversal),
            "DEBIT" => Some(Self::Debit),
            "DEBIT_REVERSAL" => Some(Self::DebitReversal),
            _ => None,
        }
    }
}
/// Generated client implementations.
pub mod account_manager_transactions_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Lists and exports transactions processed by the account manager.
    #[derive(Debug, Clone)]
    pub struct AccountManagerTransactionsClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> AccountManagerTransactionsClient<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,
        ) -> AccountManagerTransactionsClient<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,
        {
            AccountManagerTransactionsClient::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
        }
        /// Export transactions received within the specified time range as a
        /// file into a configured target location. The returned `Operation` type has
        /// the following method-specific fields:
        ///
        /// - `metadata`:
        /// [ExportAccountManagerTransactionsMetadata][google.cloud.paymentgateway.issuerswitch.accountmanager.v1.ExportAccountManagerTransactionsMetadata]
        /// - `response`:
        /// [ExportAccountManagerTransactionsResponse][google.cloud.paymentgateway.issuerswitch.accountmanager.v1.ExportAccountManagerTransactionsResponse]
        ///
        /// The exported file will be in the standard CSV format where each row in the
        /// file represents a transaction. The file has the following fields in order:
        ///
        /// 1. `TransactionID`
        ///     * **Min Length** - 35 characters
        ///     * **Max Length** - 35 characters
        ///     * **Description** - Account manager transaction ID.
        /// 1. `TransactionType`
        ///     * **Min Length** - 22 characters
        ///     * **Max Length** - 25 characters
        ///     * **Description** - Type of the transaction. This will be one of
        ///     `TRANSACTION_TYPE_CREDIT`, `TRANSACTION_TYPE_CREDIT_REVERSAL`,
        ///     `TRANSACTION_TYPE_DEBIT` or `TRANSACTION_TYPE_DEBIT_REVERSAL`. When
        ///     account manager is used for managing UPI Lite transactions, the CREDIT
        ///     transactions would be for Lite account top-ups and DEBIT transactions
        ///     could be either for a Lite account disablement where balance is
        ///     transferred back the underlying bank account or for a Lite account
        ///     financial transaction which happened offline.
        /// 1. `AccountID`
        ///     * **Min Length** - 35 characters
        ///     * **Max Length** - 35 characters
        ///     * **Description** - Account ID. When account manager is used for
        ///     managing UPI Lite transactions, this column will contain the Lite
        ///     Reference Number (LRN) of the UPI Lite account.
        /// 1. `State`
        ///     * **Min Length** - 6 characters
        ///     * **Max Length** - 12 characters
        ///     * **Description** - State of the transaction. This will be one of
        ///     `SUCCEEDED` or `FAILED`.
        /// 1. `RRN`
        ///     * **Min Length** - 12 characters
        ///     * **Max Length** - 12 characters
        ///     * **Description** - Retrieval reference number associated with the
        ///     transaction.
        /// 1. `PayerVPA`
        ///     * **Min Length** - 3 characters
        ///     * **Max Length** - 255 characters
        ///     * **Description** - Virtual Payment Address (VPA) of the payer.
        /// 1. `PayerIFSC`
        ///     * **Min Length** - 11 characters
        ///     * **Max Length** - 11 characters
        ///     * **Description** - IFSC of the payer's bank account.
        /// 1. `PayerAccountNumber`
        ///     * **Min Length** - 1 characters
        ///     * **Max Length** - 30 characters
        ///     * **Description** - Payer's bank account number.
        /// 1. `PayeeVPA`
        ///     * **Min Length** - 3 characters
        ///     * **Max Length** - 255 characters
        ///     * **Description** - Virtual Payment Address (VPA) of the payee.
        /// 1. `PayeeIFSC`
        ///     * **Min Length** - 11 characters
        ///     * **Max Length** - 11 characters
        ///     * **Description** - IFSC of the payee's bank account.
        /// 1. `PayeeAccountNumber`
        ///     * **Min Length** - 1 characters
        ///     * **Max Length** - 30 characters
        ///     * **Description** - Payee's bank account number.
        /// 1. `PayeeMCC`
        ///     * **Min Length** - 4 characters
        ///     * **Max Length** - 4 characters
        ///     * **Description** - Payee's Merchant Category Code (MCC), only if the
        ///     payee is a merchant.
        /// 1. `PayeeMerchantID`
        ///     * **Min Length** - 4 characters
        ///     * **Max Length** - 4 characters
        ///     * **Description** - Payee's merchant ID, only if the payee is a
        ///     merchant.
        /// 1. `Currency`
        ///     * **Min Length** - 3 characters
        ///     * **Max Length** - 3 characters
        ///     * **Description** - Currency of the amount involved in the transaction.
        ///     The currency codes are defined in ISO 4217.
        /// 1. `Amount`
        ///     * **Description** - Amount involved in the transaction.
        /// 1. `Purpose`
        ///     * **Min Length** - 1 characters
        ///     * **Max Length** - 4 characters
        ///     * **Description** - Purpose code associated with the transaction. When
        ///     account manager is used for managing UPI Lite transactions, this column
        ///     will contain one of the values from `41` (Lite account creation with
        ///     initial topup), `42` (Lite account topup), `43` (Lite account
        ///     disablement with balance transfer) or `44` (Lite account online
        ///     transaction).
        /// 1. `TransactionTime`
        ///     * **Min Length** - 20 characters
        ///     * **Max Length** - 20 characters
        ///     * **Description** - Timestamp (in UTC) indicating the timestamp at
        ///     which the transaction took place. The format will be as per RFC-3339.
        ///     Example : 2022-11-22T23:00:05Z
        pub async fn export_account_manager_transactions(
            &mut self,
            request: impl tonic::IntoRequest<
                super::ExportAccountManagerTransactionsRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<
                super::super::super::super::super::super::longrunning::Operation,
            >,
            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.cloud.paymentgateway.issuerswitch.accountmanager.v1.AccountManagerTransactions/ExportAccountManagerTransactions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.paymentgateway.issuerswitch.accountmanager.v1.AccountManagerTransactions",
                        "ExportAccountManagerTransactions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// List account manager transactions that satisfy specified filter criteria.
        pub async fn list_account_manager_transactions(
            &mut self,
            request: impl tonic::IntoRequest<
                super::ListAccountManagerTransactionsRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::ListAccountManagerTransactionsResponse>,
            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.cloud.paymentgateway.issuerswitch.accountmanager.v1.AccountManagerTransactions/ListAccountManagerTransactions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.paymentgateway.issuerswitch.accountmanager.v1.AccountManagerTransactions",
                        "ListAccountManagerTransactions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Batch reconcile account manager transactions and return status for each
        /// transaction.
        pub async fn batch_reconcile_account_manager_transactions(
            &mut self,
            request: impl tonic::IntoRequest<
                super::BatchReconcileAccountManagerTransactionsRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::BatchReconcileAccountManagerTransactionsResponse>,
            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.cloud.paymentgateway.issuerswitch.accountmanager.v1.AccountManagerTransactions/BatchReconcileAccountManagerTransactions",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.paymentgateway.issuerswitch.accountmanager.v1.AccountManagerTransactions",
                        "BatchReconcileAccountManagerTransactions",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}
/// Entity representing an account managed by the account manager.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ManagedAccount {
    /// The name of the account which uniquely identifies the account.
    /// Format:
    /// projects/{project}/accountManagers/{account_manager}/accounts/{account}
    /// When account manager is used for managing UPI Lite transactions,
    /// `{account}` is the Lite Reference Number (LRN).
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. The associated bank account information.
    #[prost(message, optional, tag = "2")]
    pub account_reference: ::core::option::Option<super::super::v1::AccountReference>,
    /// Output only. State of the account.
    #[prost(enumeration = "managed_account::State", tag = "3")]
    pub state: i32,
    /// Required. Current balance of the account.
    #[prost(message, optional, tag = "4")]
    pub balance: ::core::option::Option<
        super::super::super::super::super::r#type::Money,
    >,
    /// Output only. State of the last reconciliation done on the account.
    #[prost(enumeration = "managed_account::AccountReconciliationState", tag = "5")]
    pub last_reconciliation_state: i32,
    /// Output only. Time at which last reconciliation was done on the account.
    #[prost(message, optional, tag = "6")]
    pub last_reconciliation_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time at which the account was created by the account
    /// manager.
    #[prost(message, optional, tag = "7")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. The time at which the account was last updated by the account
    /// manager.
    #[prost(message, optional, tag = "8")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `ManagedAccount`.
pub mod managed_account {
    /// State of an account.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Unspecified state.
        Unspecified = 0,
        /// Account is active.
        Active = 1,
        /// Account is inactive.
        Deactivated = 2,
    }
    impl State {
        /// 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 {
                State::Unspecified => "STATE_UNSPECIFIED",
                State::Active => "ACTIVE",
                State::Deactivated => "DEACTIVATED",
            }
        }
        /// Creates an enum from field names used in the ProtoBuf definition.
        pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
            match value {
                "STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "ACTIVE" => Some(Self::Active),
                "DEACTIVATED" => Some(Self::Deactivated),
                _ => None,
            }
        }
    }
    /// Reconciliation state of an account.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum AccountReconciliationState {
        /// Unspecified state.
        Unspecified = 0,
        /// Successful reconciliation.
        Succeeded = 1,
        /// Reconciliation failed.
        Failed = 2,
    }
    impl AccountReconciliationState {
        /// 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 {
                AccountReconciliationState::Unspecified => {
                    "ACCOUNT_RECONCILIATION_STATE_UNSPECIFIED"
                }
                AccountReconciliationState::Succeeded => "SUCCEEDED",
                AccountReconciliationState::Failed => "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 {
                "ACCOUNT_RECONCILIATION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
                "SUCCEEDED" => Some(Self::Succeeded),
                "FAILED" => Some(Self::Failed),
                _ => None,
            }
        }
    }
}
/// Reconciliation request for an account balance.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReconcileManagedAccountBalanceRequest {
    /// Required. Account that needs to be reconciled.
    #[prost(message, optional, tag = "1")]
    pub account: ::core::option::Option<ManagedAccount>,
    /// Required. Expected balance amount for the account.
    #[prost(message, optional, tag = "2")]
    pub expected_balance: ::core::option::Option<
        super::super::super::super::super::r#type::Money,
    >,
    /// Required. Timestamp to be taken as reference for reconciling the balance
    /// amount.
    #[prost(message, optional, tag = "3")]
    pub reference_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Request for the `BatchReconcileManagedAccountBalance` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchReconcileManagedAccountBalanceRequest {
    /// Required. The parent resource. The format is
    /// `projects/{project}/accountManagers/{account_manager}`.
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The request message specifying the accounts to reconcile.
    /// A maximum of 200 account balances can be reconciled in a batch.
    #[prost(message, repeated, tag = "2")]
    pub requests: ::prost::alloc::vec::Vec<ReconcileManagedAccountBalanceRequest>,
}
/// Response for the `BatchReconcileManagedAccountBalance` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BatchReconcileManagedAccountBalanceResponse {
    /// Accounts whose balances were reconciled.
    #[prost(message, repeated, tag = "1")]
    pub accounts: ::prost::alloc::vec::Vec<ManagedAccount>,
}
/// Request for the `GetManagedAccount` method.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetManagedAccountRequest {
    /// Required. The name of the managed account to retrieve.
    /// Format:
    /// `projects/{project}/accountManagers/{account_manager}/accounts/{account}`
    /// When account manager is used for managing UPI Lite transactions, {account}
    /// should be the Lite Reference Number (LRN).
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Generated client implementations.
pub mod managed_accounts_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// Reconciles and provide balance information for an account within the account
    /// manager.
    #[derive(Debug, Clone)]
    pub struct ManagedAccountsClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> ManagedAccountsClient<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,
        ) -> ManagedAccountsClient<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,
        {
            ManagedAccountsClient::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
        }
        /// Batch reconcile account balance and return status for each account.
        pub async fn batch_reconcile_managed_account_balance(
            &mut self,
            request: impl tonic::IntoRequest<
                super::BatchReconcileManagedAccountBalanceRequest,
            >,
        ) -> std::result::Result<
            tonic::Response<super::BatchReconcileManagedAccountBalanceResponse>,
            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.cloud.paymentgateway.issuerswitch.accountmanager.v1.ManagedAccounts/BatchReconcileManagedAccountBalance",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.paymentgateway.issuerswitch.accountmanager.v1.ManagedAccounts",
                        "BatchReconcileManagedAccountBalance",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Get information on the account managed by account manager.
        pub async fn get_managed_account(
            &mut self,
            request: impl tonic::IntoRequest<super::GetManagedAccountRequest>,
        ) -> std::result::Result<tonic::Response<super::ManagedAccount>, 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.cloud.paymentgateway.issuerswitch.accountmanager.v1.ManagedAccounts/GetManagedAccount",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.paymentgateway.issuerswitch.accountmanager.v1.ManagedAccounts",
                        "GetManagedAccount",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}