openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 27.9 kB
JSON
{"openapi":"3.0.0","info":{"contact":{"name":"Google","url":"https://google.com"},"description":"Provides natural language understanding technologies, such as sentiment analysis, entity recognition, entity sentiment analysis, and other text annotations, to developers.","title":"Cloud Natural Language","version":"v1","x-apiClientRegistration":{"url":"https://console.developers.google.com"},"x-apisguru-categories":["text"],"x-logo":{"url":"https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"},"x-origin":[{"converter":{"url":"https://github.com/lucybot/api-spec-converter","version":"2.7.18"},"format":"google","url":"https://language.googleapis.com/$discovery/rest?version=v1","version":"v1"}],"x-preferred":true,"x-providerName":"googleapis.com","x-serviceName":"language"},"externalDocs":{"url":"https://cloud.google.com/natural-language/"},"tags":[{"name":"documents"}],"paths":{"/v1/documents:analyzeEntities":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Finds named entities (currently proper names and common nouns) in the text\nalong with entity types, salience, mentions for each entity, and\nother properties.","operationId":"language.documents.analyzeEntities","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeEntitiesRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AnalyzeEntitiesResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-language"]},{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["documents"]}},"/v1/documents:analyzeEntitySentiment":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Finds entities, similar to AnalyzeEntities in the text and analyzes\nsentiment associated with each entity and its mentions.","operationId":"language.documents.analyzeEntitySentiment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeEntitySentimentRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AnalyzeEntitySentimentResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-language"]},{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["documents"]}},"/v1/documents:analyzeSentiment":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Analyzes the sentiment of the provided text.","operationId":"language.documents.analyzeSentiment","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeSentimentRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AnalyzeSentimentResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-language"]},{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["documents"]}},"/v1/documents:analyzeSyntax":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Analyzes the syntax of the text and provides sentence boundaries and\ntokenization along with part of speech tags, dependency trees, and other\nproperties.","operationId":"language.documents.analyzeSyntax","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeSyntaxRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AnalyzeSyntaxResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-language"]},{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["documents"]}},"/v1/documents:annotateText":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"A convenience method that provides all the features that analyzeSentiment,\nanalyzeEntities, and analyzeSyntax provide in one call.","operationId":"language.documents.annotateText","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotateTextRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AnnotateTextResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-language"]},{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["documents"]}},"/v1/documents:classifyText":{"parameters":[{"$ref":"#/components/parameters/_.xgafv"},{"$ref":"#/components/parameters/access_token"},{"$ref":"#/components/parameters/alt"},{"$ref":"#/components/parameters/callback"},{"$ref":"#/components/parameters/fields"},{"$ref":"#/components/parameters/key"},{"$ref":"#/components/parameters/oauth_token"},{"$ref":"#/components/parameters/prettyPrint"},{"$ref":"#/components/parameters/quotaUser"},{"$ref":"#/components/parameters/uploadType"},{"$ref":"#/components/parameters/upload_protocol"}],"post":{"description":"Classifies a document into categories.","operationId":"language.documents.classifyText","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyTextRequest"}}}},"responses":{"200":{"description":"Successful response","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ClassifyTextResponse"}}}}},"security":[{"Oauth2":["https://www.googleapis.com/auth/cloud-language"]},{"Oauth2":["https://www.googleapis.com/auth/cloud-platform"]}],"tags":["documents"]}}},"servers":[{"url":"https://language.googleapis.com/"}],"components":{"parameters":{"access_token":{"description":"OAuth access token.","in":"query","name":"access_token","schema":{"type":"string"}},"alt":{"description":"Data format for response.","in":"query","name":"alt","schema":{"type":"string","enum":["json","media","proto"],"default":"json"}},"callback":{"description":"JSONP","in":"query","name":"callback","schema":{"type":"string"}},"fields":{"description":"Selector specifying which fields to include in a partial response.","in":"query","name":"fields","schema":{"type":"string"}},"key":{"description":"API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.","in":"query","name":"key","schema":{"type":"string"}},"oauth_token":{"description":"OAuth 2.0 token for the current user.","in":"query","name":"oauth_token","schema":{"type":"string"}},"prettyPrint":{"description":"Returns response with indentations and line breaks.","in":"query","name":"prettyPrint","schema":{"type":"boolean","default":true}},"quotaUser":{"description":"Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.","in":"query","name":"quotaUser","schema":{"type":"string"}},"uploadType":{"description":"Legacy upload protocol for media (e.g. \"media\", \"multipart\").","in":"query","name":"uploadType","schema":{"type":"string"}},"upload_protocol":{"description":"Upload protocol for media (e.g. \"raw\", \"multipart\").","in":"query","name":"upload_protocol","schema":{"type":"string"}},"_.xgafv":{"description":"V1 error format.","in":"query","name":"$.xgafv","schema":{"type":"string","enum":["1","2"]}}},"securitySchemes":{"Oauth2":{"description":"Oauth 2.0 authentication","type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://accounts.google.com/o/oauth2/auth","scopes":{"https://www.googleapis.com/auth/cloud-language":"Apply machine learning models to reveal the structure and meaning of text","https://www.googleapis.com/auth/cloud-platform":"View and manage your data across Google Cloud Platform services"}}}}},"schemas":{"AnalyzeEntitiesRequest":{"description":"The entity analysis request message.","properties":{"document":{"$ref":"#/components/schemas/Document"},"encodingType":{"description":"The encoding type used by the API to calculate offsets.","enum":["NONE","UTF8","UTF16","UTF32"],"type":"string"}},"type":"object"},"AnalyzeEntitiesResponse":{"description":"The entity analysis response message.","properties":{"entities":{"description":"The recognized entities in the input document.","items":{"$ref":"#/components/schemas/Entity"},"type":"array"},"language":{"description":"The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.","type":"string"}},"type":"object"},"AnalyzeEntitySentimentRequest":{"description":"The entity-level sentiment analysis request message.","properties":{"document":{"$ref":"#/components/schemas/Document"},"encodingType":{"description":"The encoding type used by the API to calculate offsets.","enum":["NONE","UTF8","UTF16","UTF32"],"type":"string"}},"type":"object"},"AnalyzeEntitySentimentResponse":{"description":"The entity-level sentiment analysis response message.","properties":{"entities":{"description":"The recognized entities in the input document with associated sentiments.","items":{"$ref":"#/components/schemas/Entity"},"type":"array"},"language":{"description":"The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.","type":"string"}},"type":"object"},"AnalyzeSentimentRequest":{"description":"The sentiment analysis request message.","properties":{"document":{"$ref":"#/components/schemas/Document"},"encodingType":{"description":"The encoding type used by the API to calculate sentence offsets.","enum":["NONE","UTF8","UTF16","UTF32"],"type":"string"}},"type":"object"},"AnalyzeSentimentResponse":{"description":"The sentiment analysis response message.","properties":{"documentSentiment":{"$ref":"#/components/schemas/Sentiment"},"language":{"description":"The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.","type":"string"},"sentences":{"description":"The sentiment for all the sentences in the document.","items":{"$ref":"#/components/schemas/Sentence"},"type":"array"}},"type":"object"},"AnalyzeSyntaxRequest":{"description":"The syntax analysis request message.","properties":{"document":{"$ref":"#/components/schemas/Document"},"encodingType":{"description":"The encoding type used by the API to calculate offsets.","enum":["NONE","UTF8","UTF16","UTF32"],"type":"string"}},"type":"object"},"AnalyzeSyntaxResponse":{"description":"The syntax analysis response message.","properties":{"language":{"description":"The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.","type":"string"},"sentences":{"description":"Sentences in the input document.","items":{"$ref":"#/components/schemas/Sentence"},"type":"array"},"tokens":{"description":"Tokens, along with their syntactic information, in the input document.","items":{"$ref":"#/components/schemas/Token"},"type":"array"}},"type":"object"},"AnnotateTextRequest":{"description":"The request message for the text annotation API, which can perform multiple\nanalysis types (sentiment, entities, and syntax) in one call.","properties":{"document":{"$ref":"#/components/schemas/Document"},"encodingType":{"description":"The encoding type used by the API to calculate offsets.","enum":["NONE","UTF8","UTF16","UTF32"],"type":"string"},"features":{"$ref":"#/components/schemas/Features"}},"type":"object"},"AnnotateTextResponse":{"description":"The text annotations response message.","properties":{"categories":{"description":"Categories identified in the input document.","items":{"$ref":"#/components/schemas/ClassificationCategory"},"type":"array"},"documentSentiment":{"$ref":"#/components/schemas/Sentiment"},"entities":{"description":"Entities, along with their semantic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_entities.","items":{"$ref":"#/components/schemas/Entity"},"type":"array"},"language":{"description":"The language of the text, which will be the same as the language specified\nin the request or, if not specified, the automatically-detected language.\nSee Document.language field for more details.","type":"string"},"sentences":{"description":"Sentences in the input document. Populated if the user enables\nAnnotateTextRequest.Features.extract_syntax.","items":{"$ref":"#/components/schemas/Sentence"},"type":"array"},"tokens":{"description":"Tokens, along with their syntactic information, in the input document.\nPopulated if the user enables\nAnnotateTextRequest.Features.extract_syntax.","items":{"$ref":"#/components/schemas/Token"},"type":"array"}},"type":"object"},"ClassificationCategory":{"description":"Represents a category returned from the text classifier.","properties":{"confidence":{"description":"The classifier's confidence of the category. Number represents how certain\nthe classifier is that this category represents the given text.","format":"float","type":"number"},"name":{"description":"The name of the category representing the document, from the [predefined\ntaxonomy](/natural-language/docs/categories).","type":"string"}},"type":"object"},"ClassifyTextRequest":{"description":"The document classification request message.","properties":{"document":{"$ref":"#/components/schemas/Document"}},"type":"object"},"ClassifyTextResponse":{"description":"The document classification response message.","properties":{"categories":{"description":"Categories representing the input document.","items":{"$ref":"#/components/schemas/ClassificationCategory"},"type":"array"}},"type":"object"},"DependencyEdge":{"description":"Represents dependency parse tree information for a token. (For more\ninformation on dependency labels, see\nhttp://www.aclweb.org/anthology/P13-2017","properties":{"headTokenIndex":{"description":"Represents the head of this token in the dependency tree.\nThis is the index of the token which has an arc going to this token.\nThe index is the position of the token in the array of tokens returned\nby the API method. If this token is a root token, then the\n`head_token_index` is its own index.","format":"int32","type":"integer"},"label":{"description":"The parse label for the token.","enum":["UNKNOWN","ABBREV","ACOMP","ADVCL","ADVMOD","AMOD","APPOS","ATTR","AUX","AUXPASS","CC","CCOMP","CONJ","CSUBJ","CSUBJPASS","DEP","DET","DISCOURSE","DOBJ","EXPL","GOESWITH","IOBJ","MARK","MWE","MWV","NEG","NN","NPADVMOD","NSUBJ","NSUBJPASS","NUM","NUMBER","P","PARATAXIS","PARTMOD","PCOMP","POBJ","POSS","POSTNEG","PRECOMP","PRECONJ","PREDET","PREF","PREP","PRONL","PRT","PS","QUANTMOD","RCMOD","RCMODREL","RDROP","REF","REMNANT","REPARANDUM","ROOT","SNUM","SUFF","TMOD","TOPIC","VMOD","VOCATIVE","XCOMP","SUFFIX","TITLE","ADVPHMOD","AUXCAUS","AUXVV","DTMOD","FOREIGN","KW","LIST","NOMC","NOMCSUBJ","NOMCSUBJPASS","NUMC","COP","DISLOCATED","ASP","GMOD","GOBJ","INFMOD","MES","NCOMP"],"type":"string"}},"type":"object"},"Document":{"description":"################################################################ #\n\nRepresents the input to API methods.","properties":{"content":{"description":"The content of the input in string format.\nCloud audit logging exempt since it is based on user data.","type":"string"},"gcsContentUri":{"description":"The Google Cloud Storage URI where the file content is located.\nThis URI must be of the form: gs://bucket_name/object_name. For more\ndetails, see https://cloud.google.com/storage/docs/reference-uris.\nNOTE: Cloud Storage object versioning is not supported.","type":"string"},"language":{"description":"The language of the document (if not specified, the language is\nautomatically detected). Both ISO and BCP-47 language codes are\naccepted.<br>\n[Language Support](/natural-language/docs/languages)\nlists currently supported languages for each API method.\nIf the language (either specified by the caller or automatically detected)\nis not supported by the called API method, an `INVALID_ARGUMENT` error\nis returned.","type":"string"},"type":{"description":"Required. If the type is not set or is `TYPE_UNSPECIFIED`,\nreturns an `INVALID_ARGUMENT` error.","enum":["TYPE_UNSPECIFIED","PLAIN_TEXT","HTML"],"type":"string"}},"type":"object"},"Entity":{"description":"Represents a phrase in the text that is a known entity, such as\na person, an organization, or location. The API associates information, such\nas salience and mentions, with entities.","properties":{"mentions":{"description":"The mentions of this entity in the input document. The API currently\nsupports proper noun mentions.","items":{"$ref":"#/components/schemas/EntityMention"},"type":"array"},"metadata":{"additionalProperties":{"type":"string"},"description":"Metadata associated with the entity.\n\nCurrently, Wikipedia URLs and Knowledge Graph MIDs are provided, if\navailable. The associated keys are \"wikipedia_url\" and \"mid\", respectively.","type":"object"},"name":{"description":"The representative name for the entity.","type":"string"},"salience":{"description":"The salience score associated with the entity in the [0, 1.0] range.\n\nThe salience score for an entity provides information about the\nimportance or centrality of that entity to the entire document text.\nScores closer to 0 are less salient, while scores closer to 1.0 are highly\nsalient.","format":"float","type":"number"},"sentiment":{"$ref":"#/components/schemas/Sentiment"},"type":{"description":"The entity type.","enum":["UNKNOWN","PERSON","LOCATION","ORGANIZATION","EVENT","WORK_OF_ART","CONSUMER_GOOD","OTHER"],"type":"string"}},"type":"object"},"EntityMention":{"description":"Represents a mention for an entity in the text. Currently, proper noun\nmentions are supported.","properties":{"sentiment":{"$ref":"#/components/schemas/Sentiment"},"text":{"$ref":"#/components/schemas/TextSpan"},"type":{"description":"The type of the entity mention.","enum":["TYPE_UNKNOWN","PROPER","COMMON"],"type":"string"}},"type":"object"},"Features":{"description":"All available features for sentiment, syntax, and semantic analysis.\nSetting each one to true will enable that specific analysis for the input.","properties":{"classifyText":{"description":"Classify the full document into categories.","type":"boolean"},"extractDocumentSentiment":{"description":"Extract document-level sentiment.","type":"boolean"},"extractEntities":{"description":"Extract entities.","type":"boolean"},"extractEntitySentiment":{"description":"Extract entities and their associated sentiment.","type":"boolean"},"extractSyntax":{"description":"Extract syntax information.","type":"boolean"}},"type":"object"},"PartOfSpeech":{"description":"Represents part of speech information for a token. Parts of speech\nare as defined in\nhttp://www.lrec-conf.org/proceedings/lrec2012/pdf/274_Paper.pdf","properties":{"aspect":{"description":"The grammatical aspect.","enum":["ASPECT_UNKNOWN","PERFECTIVE","IMPERFECTIVE","PROGRESSIVE"],"type":"string"},"case":{"description":"The grammatical case.","enum":["CASE_UNKNOWN","ACCUSATIVE","ADVERBIAL","COMPLEMENTIVE","DATIVE","GENITIVE","INSTRUMENTAL","LOCATIVE","NOMINATIVE","OBLIQUE","PARTITIVE","PREPOSITIONAL","REFLEXIVE_CASE","RELATIVE_CASE","VOCATIVE"],"type":"string"},"form":{"description":"The grammatical form.","enum":["FORM_UNKNOWN","ADNOMIAL","AUXILIARY","COMPLEMENTIZER","FINAL_ENDING","GERUND","REALIS","IRREALIS","SHORT","LONG","ORDER","SPECIFIC"],"type":"string"},"gender":{"description":"The grammatical gender.","enum":["GENDER_UNKNOWN","FEMININE","MASCULINE","NEUTER"],"type":"string"},"mood":{"description":"The grammatical mood.","enum":["MOOD_UNKNOWN","CONDITIONAL_MOOD","IMPERATIVE","INDICATIVE","INTERROGATIVE","JUSSIVE","SUBJUNCTIVE"],"type":"string"},"number":{"description":"The grammatical number.","enum":["NUMBER_UNKNOWN","SINGULAR","PLURAL","DUAL"],"type":"string"},"person":{"description":"The grammatical person.","enum":["PERSON_UNKNOWN","FIRST","SECOND","THIRD","REFLEXIVE_PERSON"],"type":"string"},"proper":{"description":"The grammatical properness.","enum":["PROPER_UNKNOWN","PROPER","NOT_PROPER"],"type":"string"},"reciprocity":{"description":"The grammatical reciprocity.","enum":["RECIPROCITY_UNKNOWN","RECIPROCAL","NON_RECIPROCAL"],"type":"string"},"tag":{"description":"The part of speech tag.","enum":["UNKNOWN","ADJ","ADP","ADV","CONJ","DET","NOUN","NUM","PRON","PRT","PUNCT","VERB","X","AFFIX"],"type":"string"},"tense":{"description":"The grammatical tense.","enum":["TENSE_UNKNOWN","CONDITIONAL_TENSE","FUTURE","PAST","PRESENT","IMPERFECT","PLUPERFECT"],"type":"string"},"voice":{"description":"The grammatical voice.","enum":["VOICE_UNKNOWN","ACTIVE","CAUSATIVE","PASSIVE"],"type":"string"}},"type":"object"},"Sentence":{"description":"Represents a sentence in the input document.","properties":{"sentiment":{"$ref":"#/components/schemas/Sentiment"},"text":{"$ref":"#/components/schemas/TextSpan"}},"type":"object"},"Sentiment":{"description":"Represents the feeling associated with the entire text or entities in\nthe text.","properties":{"magnitude":{"description":"A non-negative number in the [0, +inf) range, which represents\nthe absolute magnitude of sentiment regardless of score (positive or\nnegative).","format":"float","type":"number"},"score":{"description":"Sentiment score between -1.0 (negative sentiment) and 1.0\n(positive sentiment).","format":"float","type":"number"}},"type":"object"},"Status":{"description":"The `Status` type defines a logical error model that is suitable for different\nprogramming environments, including REST APIs and RPC APIs. It is used by\n[gRPC](https://github.com/grpc). The error model is designed to be:\n\n- Simple to use and understand for most users\n- Flexible enough to meet unexpected needs\n\n# Overview\n\nThe `Status` message contains three pieces of data: error code, error message,\nand error details. The error code should be an enum value of\ngoogle.rpc.Code, but it may accept additional error codes if needed. The\nerror message should be a developer-facing English message that helps\ndevelopers *understand* and *resolve* the error. If a localized user-facing\nerror message is needed, put the localized message in the error details or\nlocalize it in the client. The optional error details may contain arbitrary\ninformation about the error. There is a predefined set of error detail types\nin the package `google.rpc` that can be used for common error conditions.\n\n# Language mapping\n\nThe `Status` message is the logical representation of the error model, but it\nis not necessarily the actual wire format. When the `Status` message is\nexposed in different client libraries and different wire protocols, it can be\nmapped differently. For example, it will likely be mapped to some exceptions\nin Java, but more likely mapped to some error codes in C.\n\n# Other uses\n\nThe error model and the `Status` message can be used in a variety of\nenvironments, either with or without APIs, to provide a\nconsistent developer experience across different environments.\n\nExample uses of this error model include:\n\n- Partial errors. If a service needs to return partial errors to the client,\n it may embed the `Status` in the normal response to indicate the partial\n errors.\n\n- Workflow errors. A typical workflow has multiple steps. Each step may\n have a `Status` message for error reporting.\n\n- Batch operations. If a client uses batch request and batch response, the\n `Status` message should be used directly inside batch response, one for\n each error sub-response.\n\n- Asynchronous operations. If an API call embeds asynchronous operation\n results in its response, the status of those operations should be\n represented directly using the `Status` message.\n\n- Logging. If some API errors are stored in logs, the message `Status` could\n be used directly after any stripping needed for security/privacy reasons.","properties":{"code":{"description":"The status code, which should be an enum value of google.rpc.Code.","format":"int32","type":"integer"},"details":{"description":"A list of messages that carry the error details. There is a common set of\nmessage types for APIs to use.","items":{"additionalProperties":{"description":"Properties of the object. Contains field @type with type URL."},"type":"object"},"type":"array"},"message":{"description":"A developer-facing error message, which should be in English. Any\nuser-facing error message should be localized and sent in the\ngoogle.rpc.Status.details field, or localized by the client.","type":"string"}},"type":"object"},"TextSpan":{"description":"Represents an output piece of text.","properties":{"beginOffset":{"description":"The API calculates the beginning offset of the content in the original\ndocument according to the EncodingType specified in the API request.","format":"int32","type":"integer"},"content":{"description":"The content of the output text.","type":"string"}},"type":"object"},"Token":{"description":"Represents the smallest syntactic building block of the text.","properties":{"dependencyEdge":{"$ref":"#/components/schemas/DependencyEdge"},"lemma":{"description":"[Lemma](https://en.wikipedia.org/wiki/Lemma_%28morphology%29) of the token.","type":"string"},"partOfSpeech":{"$ref":"#/components/schemas/PartOfSpeech"},"text":{"$ref":"#/components/schemas/TextSpan"}},"type":"object"}}}}