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