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
// This file is @generated by prost-build.
/// The common metadata for long running operations.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CommonOperationMetadata {
    /// The state of the operation.
    #[prost(enumeration = "common_operation_metadata::State", tag = "1")]
    pub state: i32,
    /// The creation time of the operation.
    #[prost(message, optional, tag = "2")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// The last update time of the operation.
    #[prost(message, optional, tag = "3")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
}
/// Nested message and enum types in `CommonOperationMetadata`.
pub mod common_operation_metadata {
    /// State of the longrunning operation.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum State {
        /// Unspecified state.
        Unspecified = 0,
        /// Operation is still running.
        Running = 1,
        /// Operation is being cancelled.
        Cancelling = 2,
        /// Operation succeeded.
        Succeeded = 3,
        /// Operation failed.
        Failed = 4,
        /// Operation is cancelled.
        Cancelled = 5,
        /// Operation is pending not running yet.
        Pending = 6,
    }
    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::Running => "RUNNING",
                State::Cancelling => "CANCELLING",
                State::Succeeded => "SUCCEEDED",
                State::Failed => "FAILED",
                State::Cancelled => "CANCELLED",
                State::Pending => "PENDING",
            }
        }
        /// 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),
                "RUNNING" => Some(Self::Running),
                "CANCELLING" => Some(Self::Cancelling),
                "SUCCEEDED" => Some(Self::Succeeded),
                "FAILED" => Some(Self::Failed),
                "CANCELLED" => Some(Self::Cancelled),
                "PENDING" => Some(Self::Pending),
                _ => None,
            }
        }
    }
}
/// Describes the state of a job.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum JobState {
    /// The job state is unspecified.
    Unspecified = 0,
    /// The service is preparing to run the job.
    Pending = 9,
    /// The job is in progress.
    Running = 1,
    /// The job completed successfully.
    Succeeded = 2,
    /// The job failed.
    Failed = 3,
    /// The job has been cancelled.
    Cancelled = 4,
    /// Entity Recon API: The knowledge extraction job is running.
    KnowledgeExtraction = 5,
    /// Entity Recon API: The preprocessing job is running.
    ReconPreprocessing = 6,
    /// Entity Recon API: The clustering job is running.
    Clustering = 7,
    /// Entity Recon API: The exporting clusters job is running.
    ExportingClusters = 8,
}
impl JobState {
    /// 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 {
            JobState::Unspecified => "JOB_STATE_UNSPECIFIED",
            JobState::Pending => "JOB_STATE_PENDING",
            JobState::Running => "JOB_STATE_RUNNING",
            JobState::Succeeded => "JOB_STATE_SUCCEEDED",
            JobState::Failed => "JOB_STATE_FAILED",
            JobState::Cancelled => "JOB_STATE_CANCELLED",
            JobState::KnowledgeExtraction => "JOB_STATE_KNOWLEDGE_EXTRACTION",
            JobState::ReconPreprocessing => "JOB_STATE_RECON_PREPROCESSING",
            JobState::Clustering => "JOB_STATE_CLUSTERING",
            JobState::ExportingClusters => "JOB_STATE_EXPORTING_CLUSTERS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "JOB_STATE_UNSPECIFIED" => Some(Self::Unspecified),
            "JOB_STATE_PENDING" => Some(Self::Pending),
            "JOB_STATE_RUNNING" => Some(Self::Running),
            "JOB_STATE_SUCCEEDED" => Some(Self::Succeeded),
            "JOB_STATE_FAILED" => Some(Self::Failed),
            "JOB_STATE_CANCELLED" => Some(Self::Cancelled),
            "JOB_STATE_KNOWLEDGE_EXTRACTION" => Some(Self::KnowledgeExtraction),
            "JOB_STATE_RECON_PREPROCESSING" => Some(Self::ReconPreprocessing),
            "JOB_STATE_CLUSTERING" => Some(Self::Clustering),
            "JOB_STATE_EXPORTING_CLUSTERS" => Some(Self::ExportingClusters),
            _ => None,
        }
    }
}
/// The desired input location and metadata.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InputConfig {
    /// Set of input BigQuery tables.
    #[prost(message, repeated, tag = "1")]
    pub bigquery_input_configs: ::prost::alloc::vec::Vec<BigQueryInputConfig>,
    /// Entity type
    #[prost(enumeration = "input_config::EntityType", tag = "2")]
    pub entity_type: i32,
    /// Optional. Provide the bigquery table containing the previous results if
    /// cluster ID stability is desired. Format is
    /// `projects/*/datasets/*/tables/*`.
    #[prost(string, tag = "3")]
    pub previous_result_bigquery_table: ::prost::alloc::string::String,
}
/// Nested message and enum types in `InputConfig`.
pub mod input_config {
    /// The type of entities we will support. Currently, we only support people,
    /// establishment, property, and product types. If the type is
    /// unspecified, it will be generic type.
    #[derive(
        Clone,
        Copy,
        Debug,
        PartialEq,
        Eq,
        Hash,
        PartialOrd,
        Ord,
        ::prost::Enumeration
    )]
    #[repr(i32)]
    pub enum EntityType {
        /// The default value.
        Unspecified = 0,
        /// People entity.
        People = 1,
        /// Establishment entity.
        Establishment = 2,
        /// Property entity. e.g. real estate property.
        Property = 3,
        /// Product entity.
        Product = 4,
        /// Organization entity.
        Organization = 5,
        /// Local Business entity.
        LocalBusiness = 6,
        /// Person entity.
        Person = 7,
    }
    impl EntityType {
        /// 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 {
                EntityType::Unspecified => "ENTITY_TYPE_UNSPECIFIED",
                EntityType::People => "PEOPLE",
                EntityType::Establishment => "ESTABLISHMENT",
                EntityType::Property => "PROPERTY",
                EntityType::Product => "PRODUCT",
                EntityType::Organization => "ORGANIZATION",
                EntityType::LocalBusiness => "LOCAL_BUSINESS",
                EntityType::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 {
                "ENTITY_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
                "PEOPLE" => Some(Self::People),
                "ESTABLISHMENT" => Some(Self::Establishment),
                "PROPERTY" => Some(Self::Property),
                "PRODUCT" => Some(Self::Product),
                "ORGANIZATION" => Some(Self::Organization),
                "LOCAL_BUSINESS" => Some(Self::LocalBusiness),
                "PERSON" => Some(Self::Person),
                _ => None,
            }
        }
    }
}
/// The input config for BigQuery tables.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct BigQueryInputConfig {
    /// Required. Format is `projects/*/datasets/*/tables/*`.
    #[prost(string, tag = "1")]
    pub bigquery_table: ::prost::alloc::string::String,
    /// Required. Schema mapping file
    #[prost(string, tag = "2")]
    pub gcs_uri: ::prost::alloc::string::String,
}
/// The desired output location and metadata.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct OutputConfig {
    /// Format is “projects/*/datasets/*”.
    #[prost(string, tag = "1")]
    pub bigquery_dataset: ::prost::alloc::string::String,
}
/// Recon configs
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReconConfig {
    /// Extra options that affect entity clustering behavior.
    #[prost(message, optional, tag = "3")]
    pub options: ::core::option::Option<recon_config::Options>,
    /// Model Configs
    #[prost(message, optional, tag = "4")]
    pub model_config: ::core::option::Option<recon_config::ModelConfig>,
    /// Choice of clustering algorithm. Default is ConnectedComponentsConfig.
    #[prost(oneof = "recon_config::ClusteringConfig", tags = "1, 2")]
    pub clustering_config: ::core::option::Option<recon_config::ClusteringConfig>,
}
/// Nested message and enum types in `ReconConfig`.
pub mod recon_config {
    /// Options for experimental changes on entity clustering behavior.
    #[derive(Clone, Copy, PartialEq, ::prost::Message)]
    pub struct Options {
        /// If true, separate clusters by their geographic region (from geocoding).
        /// Uses the following entity features:
        ///
        /// - schema.org/addressLocality
        /// - schema.org/addressRegion
        /// - schema.org/addressCountry
        /// Warning: processing will no longer be regionalized!
        #[prost(bool, tag = "100")]
        pub enable_geocoding_separation: bool,
    }
    /// Model Configs
    #[derive(Clone, PartialEq, ::prost::Message)]
    pub struct ModelConfig {
        /// Model name. Refer to external documentation for valid names.
        /// If unspecified, it defaults to the one mentioned in the documentation.
        #[prost(string, tag = "1")]
        pub model_name: ::prost::alloc::string::String,
        /// Model version tag. Refer to external documentation for valid tags.
        /// If unspecified, it defaults to the one mentioned in the documentation.
        #[prost(string, tag = "2")]
        pub version_tag: ::prost::alloc::string::String,
    }
    /// Choice of clustering algorithm. Default is ConnectedComponentsConfig.
    #[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
    pub enum ClusteringConfig {
        /// Configs for connected components.
        #[prost(message, tag = "1")]
        ConnectedComponentsConfig(super::ConnectedComponentsConfig),
        /// Configs for affinity clustering.
        #[prost(message, tag = "2")]
        AffinityClusteringConfig(super::AffinityClusteringConfig),
    }
}
/// Options for connected components.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ConnectedComponentsConfig {
    /// Threshold used for connected components. Default value is 0.85.
    #[prost(float, tag = "1")]
    pub weight_threshold: f32,
}
/// Options for affinity clustering.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct AffinityClusteringConfig {
    /// Number of iterations to perform. Default value is 1.
    #[prost(int64, tag = "1")]
    pub compression_round_count: i64,
}
/// Details of operations that perform deletes of any entities.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct DeleteOperationMetadata {
    /// The common part of the operation metadata.
    #[prost(message, optional, tag = "1")]
    pub common_metadata: ::core::option::Option<CommonOperationMetadata>,
}
/// Request message for CreateEntityReconciliationJob.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateEntityReconciliationJobRequest {
    /// Required. The resource name of the Location to create the
    /// EntityReconciliationJob in. Format:
    /// `projects/{project}/locations/{location}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The EntityReconciliationJob to create.
    #[prost(message, optional, tag = "2")]
    pub entity_reconciliation_job: ::core::option::Option<EntityReconciliationJob>,
}
/// Request message for GetEntityReconciliationJob.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct GetEntityReconciliationJobRequest {
    /// Required. The name of the EntityReconciliationJob resource.
    /// Format:
    /// `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for
/// [EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEntityReconciliationJobsRequest {
    /// Required. The name of the EntityReconciliationJob's parent resource.
    /// Format: `projects/{project}/locations/{location}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// An expression for filtering the results of the request. For field names
    /// both snake_case and camelCase are supported.
    #[prost(string, tag = "2")]
    pub filter: ::prost::alloc::string::String,
    /// The standard list page size.
    #[prost(int32, tag = "3")]
    pub page_size: i32,
    /// The standard list page token.
    #[prost(string, tag = "4")]
    pub page_token: ::prost::alloc::string::String,
}
/// Response message for
/// [EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.ListEntityReconciliationJobs].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListEntityReconciliationJobsResponse {
    /// A list of EntityReconciliationJobs that matches the specified filter in the
    /// request.
    #[prost(message, repeated, tag = "1")]
    pub entity_reconciliation_jobs: ::prost::alloc::vec::Vec<EntityReconciliationJob>,
    /// The standard List next-page token.
    #[prost(string, tag = "2")]
    pub next_page_token: ::prost::alloc::string::String,
}
/// Request message for CancelEntityReconciliationJob.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CancelEntityReconciliationJobRequest {
    /// Required. The name of the EntityReconciliationJob resource.
    /// Format:
    /// `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Request message for DeleteEntityReconciliationJob.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteEntityReconciliationJobRequest {
    /// Required. The name of the EntityReconciliationJob resource.
    /// Format:
    /// `projects/{project}/locations/{location}/entityReconciliationJobs/{entity_reconciliation_job}`
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
}
/// Entity reconciliation job message.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct EntityReconciliationJob {
    /// Output only. Resource name of the EntityReconciliationJob.
    #[prost(string, tag = "1")]
    pub name: ::prost::alloc::string::String,
    /// Required. Information about the input BigQuery tables.
    #[prost(message, optional, tag = "2")]
    pub input_config: ::core::option::Option<InputConfig>,
    /// Required. The desired output location.
    #[prost(message, optional, tag = "3")]
    pub output_config: ::core::option::Option<OutputConfig>,
    /// Output only. The detailed state of the job.
    #[prost(enumeration = "JobState", tag = "4")]
    pub state: i32,
    /// Output only. Only populated when the job's state is JOB_STATE_FAILED or
    /// JOB_STATE_CANCELLED.
    #[prost(message, optional, tag = "5")]
    pub error: ::core::option::Option<super::super::super::rpc::Status>,
    /// Output only. Time when the EntityReconciliationJob was created.
    #[prost(message, optional, tag = "6")]
    pub create_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when the EntityReconciliationJob entered any of the
    /// following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`,
    /// `JOB_STATE_CANCELLED`.
    #[prost(message, optional, tag = "7")]
    pub end_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Output only. Time when the EntityReconciliationJob was most recently
    /// updated.
    #[prost(message, optional, tag = "8")]
    pub update_time: ::core::option::Option<::prost_types::Timestamp>,
    /// Optional. Recon configs to adjust the clustering behavior.
    #[prost(message, optional, tag = "9")]
    pub recon_config: ::core::option::Option<ReconConfig>,
}
/// Request message for
/// [EnterpriseKnowledgeGraphService.Lookup][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.Lookup].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LookupRequest {
    /// Required. The name of the Entity's parent resource.
    /// Format:
    /// `projects/{project}/locations/{location}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The list of entity ids to be used for lookup.
    #[prost(string, repeated, tag = "2")]
    pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The list of language codes (defined in ISO 693) to run the query with,
    /// e.g. 'en'.
    #[prost(string, repeated, tag = "3")]
    pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Response message for
/// [EnterpriseKnowledgeGraphService.Lookup][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.Lookup].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LookupResponse {
    /// The local context applicable for the response. See more details at
    /// <http://www.w3.org/TR/json-ld/#context-definitions.>
    #[prost(message, optional, tag = "1")]
    pub context: ::core::option::Option<::prost_types::Value>,
    /// The schema type of top-level JSON-LD object, e.g. ItemList.
    #[prost(message, optional, tag = "2")]
    pub r#type: ::core::option::Option<::prost_types::Value>,
    /// The item list of search results.
    #[prost(message, optional, tag = "3")]
    pub item_list_element: ::core::option::Option<::prost_types::ListValue>,
}
/// Request message for
/// [EnterpriseKnowledgeGraphService.Search][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.Search].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchRequest {
    /// Required. The name of the Entity's parent resource.
    /// Format:
    /// `projects/{project}/locations/{location}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The literal query string for search.
    #[prost(string, tag = "2")]
    pub query: ::prost::alloc::string::String,
    /// The list of language codes (defined in ISO 693) to run the query with,
    /// e.g. 'en'.
    #[prost(string, repeated, tag = "3")]
    pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Restricts returned entities with these types, e.g. Person
    /// (as defined in <http://schema.org/Person>). If multiple types are specified,
    /// returned entities will contain one or more of these types.
    #[prost(string, repeated, tag = "4")]
    pub types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Limits the number of entities to be returned.
    #[prost(message, optional, tag = "6")]
    pub limit: ::core::option::Option<i32>,
}
/// Response message for
/// [EnterpriseKnowledgeGraphService.Search][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.Search].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchResponse {
    /// The local context applicable for the response. See more details at
    /// <http://www.w3.org/TR/json-ld/#context-definitions.>
    #[prost(message, optional, tag = "1")]
    pub context: ::core::option::Option<::prost_types::Value>,
    /// The schema type of top-level JSON-LD object, e.g. ItemList.
    #[prost(message, optional, tag = "2")]
    pub r#type: ::core::option::Option<::prost_types::Value>,
    /// The item list of search results.
    #[prost(message, optional, tag = "3")]
    pub item_list_element: ::core::option::Option<::prost_types::ListValue>,
}
/// Request message for
/// [EnterpriseKnowledgeGraphService.LookupPublicKg][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.LookupPublicKg].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LookupPublicKgRequest {
    /// Required. The name of the Entity's parent resource.
    /// Format:
    /// `projects/{project}/locations/{location}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The list of entity ids to be used for lookup.
    #[prost(string, repeated, tag = "2")]
    pub ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// The list of language codes (defined in ISO 693) to run the query with,
    /// e.g. 'en'.
    #[prost(string, repeated, tag = "3")]
    pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// Response message for
/// [EnterpriseKnowledgeGraphService.LookupPublicKg][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.LookupPublicKg].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct LookupPublicKgResponse {
    /// The local context applicable for the response. See more details at
    /// <http://www.w3.org/TR/json-ld/#context-definitions.>
    #[prost(message, optional, tag = "1")]
    pub context: ::core::option::Option<::prost_types::Value>,
    /// The schema type of top-level JSON-LD object, e.g. ItemList.
    #[prost(message, optional, tag = "2")]
    pub r#type: ::core::option::Option<::prost_types::Value>,
    /// The item list of search results.
    #[prost(message, optional, tag = "3")]
    pub item_list_element: ::core::option::Option<::prost_types::ListValue>,
}
/// Request message for
/// [EnterpriseKnowledgeGraphService.Search][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.Search].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPublicKgRequest {
    /// Required. The name of the Entity's parent resource.
    /// Format:
    /// `projects/{project}/locations/{location}`
    #[prost(string, tag = "1")]
    pub parent: ::prost::alloc::string::String,
    /// Required. The literal query string for search.
    #[prost(string, tag = "2")]
    pub query: ::prost::alloc::string::String,
    /// The list of language codes (defined in ISO 693) to run the query with,
    /// e.g. 'en'.
    #[prost(string, repeated, tag = "3")]
    pub languages: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Restricts returned entities with these types, e.g. Person
    /// (as defined in <http://schema.org/Person>). If multiple types are specified,
    /// returned entities will contain one or more of these types.
    #[prost(string, repeated, tag = "4")]
    pub types: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Limits the number of entities to be returned.
    #[prost(message, optional, tag = "6")]
    pub limit: ::core::option::Option<i32>,
}
/// Response message for
/// [EnterpriseKnowledgeGraphService.Search][google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService.Search].
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SearchPublicKgResponse {
    /// The local context applicable for the response. See more details at
    /// <http://www.w3.org/TR/json-ld/#context-definitions.>
    #[prost(message, optional, tag = "1")]
    pub context: ::core::option::Option<::prost_types::Value>,
    /// The schema type of top-level JSON-LD object, e.g. ItemList.
    #[prost(message, optional, tag = "2")]
    pub r#type: ::core::option::Option<::prost_types::Value>,
    /// The item list of search results.
    #[prost(message, optional, tag = "3")]
    pub item_list_element: ::core::option::Option<::prost_types::ListValue>,
}
/// Generated client implementations.
pub mod enterprise_knowledge_graph_service_client {
    #![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
    use tonic::codegen::*;
    use tonic::codegen::http::Uri;
    /// APIs for enterprise knowledge graph product.
    #[derive(Debug, Clone)]
    pub struct EnterpriseKnowledgeGraphServiceClient<T> {
        inner: tonic::client::Grpc<T>,
    }
    impl<T> EnterpriseKnowledgeGraphServiceClient<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,
        ) -> EnterpriseKnowledgeGraphServiceClient<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,
        {
            EnterpriseKnowledgeGraphServiceClient::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
        }
        /// Creates a EntityReconciliationJob. A EntityReconciliationJob once created
        /// will right away be attempted to start.
        pub async fn create_entity_reconciliation_job(
            &mut self,
            request: impl tonic::IntoRequest<super::CreateEntityReconciliationJobRequest>,
        ) -> std::result::Result<
            tonic::Response<super::EntityReconciliationJob>,
            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.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/CreateEntityReconciliationJob",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
                        "CreateEntityReconciliationJob",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Gets a EntityReconciliationJob.
        pub async fn get_entity_reconciliation_job(
            &mut self,
            request: impl tonic::IntoRequest<super::GetEntityReconciliationJobRequest>,
        ) -> std::result::Result<
            tonic::Response<super::EntityReconciliationJob>,
            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.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/GetEntityReconciliationJob",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
                        "GetEntityReconciliationJob",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Lists Entity Reconciliation Jobs.
        pub async fn list_entity_reconciliation_jobs(
            &mut self,
            request: impl tonic::IntoRequest<super::ListEntityReconciliationJobsRequest>,
        ) -> std::result::Result<
            tonic::Response<super::ListEntityReconciliationJobsResponse>,
            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.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/ListEntityReconciliationJobs",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
                        "ListEntityReconciliationJobs",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Cancels a EntityReconciliationJob. Success of cancellation is not
        /// guaranteed.
        pub async fn cancel_entity_reconciliation_job(
            &mut self,
            request: impl tonic::IntoRequest<super::CancelEntityReconciliationJobRequest>,
        ) -> 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.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/CancelEntityReconciliationJob",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
                        "CancelEntityReconciliationJob",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Deletes a EntityReconciliationJob.
        /// It only deletes the job when the job state is in FAILED, SUCCEEDED, and
        /// CANCELLED.
        pub async fn delete_entity_reconciliation_job(
            &mut self,
            request: impl tonic::IntoRequest<super::DeleteEntityReconciliationJobRequest>,
        ) -> 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.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/DeleteEntityReconciliationJob",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
                        "DeleteEntityReconciliationJob",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Finds the Cloud KG entities with CKG ID(s).
        pub async fn lookup(
            &mut self,
            request: impl tonic::IntoRequest<super::LookupRequest>,
        ) -> std::result::Result<tonic::Response<super::LookupResponse>, 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.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/Lookup",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
                        "Lookup",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Searches the Cloud KG entities with entity name.
        pub async fn search(
            &mut self,
            request: impl tonic::IntoRequest<super::SearchRequest>,
        ) -> std::result::Result<tonic::Response<super::SearchResponse>, 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.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/Search",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
                        "Search",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Finds the public KG entities with public KG ID(s).
        pub async fn lookup_public_kg(
            &mut self,
            request: impl tonic::IntoRequest<super::LookupPublicKgRequest>,
        ) -> std::result::Result<
            tonic::Response<super::LookupPublicKgResponse>,
            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.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/LookupPublicKg",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
                        "LookupPublicKg",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
        /// Searches the public KG entities with entity name.
        pub async fn search_public_kg(
            &mut self,
            request: impl tonic::IntoRequest<super::SearchPublicKgRequest>,
        ) -> std::result::Result<
            tonic::Response<super::SearchPublicKgResponse>,
            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.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService/SearchPublicKg",
            );
            let mut req = request.into_request();
            req.extensions_mut()
                .insert(
                    GrpcMethod::new(
                        "google.cloud.enterpriseknowledgegraph.v1.EnterpriseKnowledgeGraphService",
                        "SearchPublicKg",
                    ),
                );
            self.inner.unary(req, path, codec).await
        }
    }
}