github.com/chrusty/openapi2proto@v0.0.0-20171127225041-f5804f48ccdb/fixtures/semantic_api.proto (about)

     1  syntax = "proto3";
     2  
     3  import "google/protobuf/wrappers.proto";
     4  
     5  import "google/protobuf/empty.proto";
     6  
     7  import "google/protobuf/any.proto";
     8  
     9  package thesemanticapi;
    10  
    11  message GetConceptSearchRequest {
    12      // "all" or comma-separated list of specific optional fields: pages, ticker_symbol, links, taxonomy, combinations, geocodes, article_list, scope_notes, search_api_query
    13      // 
    14      // Optional fields are returned in result_set. They are briefly explained here:
    15      // 
    16      // pages: A list of topic pages associated with a specific concept.
    17      // ticker_symbol: If this concept is a publicly traded company, this field contains the ticker symbol.
    18      // links: A list of links from this concept to external data resources.
    19      // taxonomy: For descriptor concepts, this field returns a list of taxonomic relations to other concepts.
    20      // combinations: For descriptor concepts, this field returns a list of the specific meanings tis concept takes on when combined with other concepts.
    21      // geocodes: For geographic concepts, the full GIS record from geonames.
    22      // article_list: A list of up to 10 articles associated with this concept.
    23      // scope_notes: Scope notes contains clarifications and meaning definitions that explicate the relationship between the concept and an article.
    24      // search_api_query: Returns the request one would need to submit to the Article Search API to obtain a list of articles annotated with this concept.
    25      enum GetConceptSearchRequest_Field {
    26          GETCONCEPTSEARCHREQUEST_FIELD_ALL = 0;
    27          GETCONCEPTSEARCHREQUEST_FIELD_PAGES = 1;
    28          GETCONCEPTSEARCHREQUEST_FIELD_TICKER_SYMBOL = 2;
    29          GETCONCEPTSEARCHREQUEST_FIELD_LINKS = 3;
    30          GETCONCEPTSEARCHREQUEST_FIELD_TAXONOMY = 4;
    31          GETCONCEPTSEARCHREQUEST_FIELD_COMBINATIONS = 5;
    32          GETCONCEPTSEARCHREQUEST_FIELD_GEOCODES = 6;
    33          GETCONCEPTSEARCHREQUEST_FIELD_ARTICLE_LIST = 7;
    34          GETCONCEPTSEARCHREQUEST_FIELD_SCOPE_NOTES = 8;
    35          GETCONCEPTSEARCHREQUEST_FIELD_SEARCH_API_QUERY = 9;
    36      }
    37      GetConceptSearchRequest_Field fields = 1;
    38      // Integer value for the index count from the first concept to the last concept, sorted alphabetically. Used in a Search Query. A Search Query will return up to 10 concepts in its results.
    39      int32 offset = 2;
    40      // Precedes the search term string. Used in a Search Query. Except for <specific_concept_name>, Search Query will take the required parameters listed above (<concept_type>, <concept_uri>, <article_uri>) as an optional_parameter in addition to the query=<query_term>.
    41      string query = 3;
    42  }
    43  
    44  message GetConceptSearchResponse {
    45      string copyright = 1;
    46      int32 num_results = 2;
    47      repeated ConceptRelation results = 3;
    48      string status = 4;
    49  }
    50  
    51  message GetNameConceptTypeSpecificConceptRequest {
    52      ConceptTypeParam concept_type = 1;
    53      // "all" or comma-separated list of specific optional fields: pages, ticker_symbol, links, taxonomy, combinations, geocodes, article_list, scope_notes, search_api_query
    54      // 
    55      // Optional fields are returned in result_set. They are briefly explained here:
    56      // 
    57      // pages: A list of topic pages associated with a specific concept.
    58      // ticker_symbol: If this concept is a publicly traded company, this field contains the ticker symbol.
    59      // links: A list of links from this concept to external data resources.
    60      // taxonomy: For descriptor concepts, this field returns a list of taxonomic relations to other concepts.
    61      // combinations: For descriptor concepts, this field returns a list of the specific meanings tis concept takes on when combined with other concepts.
    62      // geocodes: For geographic concepts, the full GIS record from geonames.
    63      // article_list: A list of up to 10 articles associated with this concept.
    64      // scope_notes: Scope notes contains clarifications and meaning definitions that explicate the relationship between the concept and an article.
    65      // search_api_query: Returns the request one would need to submit to the Article Search API to obtain a list of articles annotated with this concept.
    66      enum GetNameConceptTypeSpecificConceptRequest_Field {
    67          GETNAMECONCEPTTYPESPECIFICCONCEPTREQUEST_FIELD_ALL = 0;
    68          GETNAMECONCEPTTYPESPECIFICCONCEPTREQUEST_FIELD_PAGES = 1;
    69          GETNAMECONCEPTTYPESPECIFICCONCEPTREQUEST_FIELD_TICKER_SYMBOL = 2;
    70          GETNAMECONCEPTTYPESPECIFICCONCEPTREQUEST_FIELD_LINKS = 3;
    71          GETNAMECONCEPTTYPESPECIFICCONCEPTREQUEST_FIELD_TAXONOMY = 4;
    72          GETNAMECONCEPTTYPESPECIFICCONCEPTREQUEST_FIELD_COMBINATIONS = 5;
    73          GETNAMECONCEPTTYPESPECIFICCONCEPTREQUEST_FIELD_GEOCODES = 6;
    74          GETNAMECONCEPTTYPESPECIFICCONCEPTREQUEST_FIELD_ARTICLE_LIST = 7;
    75          GETNAMECONCEPTTYPESPECIFICCONCEPTREQUEST_FIELD_SCOPE_NOTES = 8;
    76          GETNAMECONCEPTTYPESPECIFICCONCEPTREQUEST_FIELD_SEARCH_API_QUERY = 9;
    77      }
    78      GetNameConceptTypeSpecificConceptRequest_Field fields = 2;
    79      // Precedes the search term string. Used in a Search Query. Except for <specific_concept_name>, Search Query will take the required parameters listed above (<concept_type>, <concept_uri>, <article_uri>) as an optional_parameter in addition to the query=<query_term>.
    80      string query = 3;
    81      string specific_concept = 4;
    82  }
    83  
    84  message GetNameConceptTypeSpecificConceptResponse {
    85      string copyright = 1;
    86      int32 num_results = 2;
    87      repeated Concept results = 3;
    88      string status = 4;
    89  }
    90  
    91  message Concept {
    92      repeated ConceptRelation ancestors = 1;
    93      message Article_list {
    94          message Result {
    95              string body = 1;
    96              string byline = 2;
    97              message Concepts {
    98                  repeated string nytd_des = 1;
    99                  repeated string nytd_org = 2;
   100                  repeated string nytd_per = 3;
   101              }
   102              Concepts concepts = 3;
   103              string date = 4;
   104              string document_type = 5;
   105              string title = 6;
   106              string type_of_material = 7;
   107              string url = 8;
   108          }
   109          repeated Result results = 1;
   110          int32 total = 2;
   111      }
   112      Article_list article_list = 2;
   113      message Combination {
   114          string combination_note = 1;
   115          int32 combination_source_concept_id = 2;
   116          string combination_source_concept_name = 3;
   117          string combination_source_concept_type = 4;
   118          int32 combination_target_concept_id = 5;
   119          string combination_target_concept_name = 6;
   120          string combination_target_concept_type = 7;
   121      }
   122      repeated Combination combinations = 3;
   123      string concept_created = 4;
   124      int32 concept_id = 5;
   125      string concept_name = 6;
   126      string concept_status = 7;
   127      string concept_type = 8;
   128      string concept_updated = 9;
   129      repeated ConceptRelation descendants = 10;
   130      int32 is_times_tag = 11;
   131      message Link {
   132          int32 concept_id = 1;
   133          string concept_name = 2;
   134          string concept_status = 3;
   135          string concept_type = 4;
   136          int32 is_times_tag = 5;
   137          string link = 6;
   138          int32 link_id = 7;
   139          string link_type = 8;
   140          string mapping_type = 9;
   141          string relation = 10;
   142      }
   143      repeated Link links = 12;
   144      message Scope_note {
   145          string scope_note = 1;
   146          string scope_note_name = 2;
   147          string scope_note_type = 3;
   148      }
   149      repeated Scope_note scope_notes = 13;
   150      string search_api_query = 14;
   151      message Taxonomy {
   152          int32 source_concept_id = 1;
   153          string source_concept_name = 2;
   154          string source_concept_type = 3;
   155          string source_concept_vernacular = 4;
   156          int32 target_concept_id = 5;
   157          string target_concept_name = 6;
   158          string target_concept_type = 7;
   159          string target_concept_vernacular = 8;
   160          string taxonomic_relation = 9;
   161          string taxonomic_verification_status = 10;
   162      }
   163      repeated Taxonomy taxonomy = 15;
   164      string vernacular = 16;
   165  }
   166  
   167  message ConceptRelation {
   168      enum ConceptRelation_Class {
   169          CONCEPTRELATION_CLASS_NYTD_GEO = 0;
   170          CONCEPTRELATION_CLASS_NYTD_PER = 1;
   171          CONCEPTRELATION_CLASS_NYTD_ORG = 2;
   172          CONCEPTRELATION_CLASS_NYTD_DES = 3;
   173      }
   174      ConceptRelation_Class class = 1;
   175      string concept_created = 2;
   176      int32 concept_id = 3;
   177      string concept_name = 4;
   178      string concept_status = 5;
   179      string concept_type = 6;
   180      string concept_updated = 7;
   181      int32 is_times_tag = 8;
   182      string vernacular = 9;
   183  }
   184  
   185  enum ConceptTypeParam {
   186      NYTD_GEO = 0;
   187      NYTD_PER = 1;
   188      NYTD_ORG = 2;
   189      NYTD_DES = 3;
   190  }
   191  
   192  message TestModel {
   193      enum TestModel_Category {
   194          TESTMODEL_CATEGORY_NYTD_GEO = 0;
   195          TESTMODEL_CATEGORY_NYTD_PER = 1;
   196          TESTMODEL_CATEGORY_NYTD_ORG = 2;
   197          TESTMODEL_CATEGORY_NYTD_DES = 3;
   198      }
   199      TestModel_Category category = 1;
   200      message Class {
   201          string something = 1;
   202      }
   203      repeated Class class = 2;
   204      google.protobuf.Any test_any_value = 10;
   205      bool test_bool = 3;
   206      google.protobuf.BoolValue test_bool_value = 4;
   207      google.protobuf.BytesValue test_bytes_value = 9;
   208      google.protobuf.Any test_float_value = 7;
   209      map<string, TestModel> test_map_object = 11;
   210      map<string, string> test_map_scalar = 12;
   211      google.protobuf.DoubleValue test_num_value = 5;
   212      google.protobuf.DoubleValue test_numer_value = 6;
   213      google.protobuf.StringValue test_string_value = 8;
   214  }
   215  
   216  service TheSemanticAPIService {
   217      rpc GetConceptSearch(GetConceptSearchRequest) returns (GetConceptSearchResponse) {}
   218      rpc GetNameConceptTypeSpecificConcept(GetNameConceptTypeSpecificConceptRequest) returns (GetNameConceptTypeSpecificConceptResponse) {}
   219      rpc GetSomethingBlah(google.protobuf.Empty) returns (google.protobuf.Empty) {}
   220  }