@google-cloud/language
- Version 7.1.0
- Published
- 3.65 MB
- 1 dependency
- Apache-2.0 license
Install
npm i @google-cloud/language
yarn add @google-cloud/language
pnpm add @google-cloud/language
Overview
Google Cloud Natural Language API client for Node.js
Index
Variables
Type Aliases
Namespaces
protos.google.api
- ClientLibraryDestination
- ClientLibraryOrganization
- ClientLibrarySettings
- CommonLanguageSettings
- CppSettings
- CustomHttpPattern
- DotnetSettings
- FieldBehavior
- GoSettings
- Http
- HttpRule
- IClientLibrarySettings
- ICommonLanguageSettings
- ICppSettings
- ICustomHttpPattern
- IDotnetSettings
- IGoSettings
- IHttp
- IHttpRule
- IJavaSettings
- IMethodSettings
- INodeSettings
- IPhpSettings
- IPublishing
- IPythonSettings
- IRubySettings
- JavaSettings
- LaunchStage
- MethodSettings
- NodeSettings
- PhpSettings
- Publishing
- PythonSettings
- RubySettings
protos.google.cloud.language.v1
- AnalyzeEntitiesRequest
- AnalyzeEntitiesResponse
- AnalyzeEntitySentimentRequest
- AnalyzeEntitySentimentResponse
- AnalyzeSentimentRequest
- AnalyzeSentimentResponse
- AnalyzeSyntaxRequest
- AnalyzeSyntaxResponse
- AnnotateTextRequest
- AnnotateTextResponse
- ClassificationCategory
- ClassificationModelOptions
- ClassifyTextRequest
- ClassifyTextResponse
- DependencyEdge
- Document
- EncodingType
- Entity
- EntityMention
- IAnalyzeEntitiesRequest
- IAnalyzeEntitiesResponse
- IAnalyzeEntitySentimentRequest
- IAnalyzeEntitySentimentResponse
- IAnalyzeSentimentRequest
- IAnalyzeSentimentResponse
- IAnalyzeSyntaxRequest
- IAnalyzeSyntaxResponse
- IAnnotateTextRequest
- IAnnotateTextResponse
- IClassificationCategory
- IClassificationModelOptions
- IClassifyTextRequest
- IClassifyTextResponse
- IDependencyEdge
- IDocument
- IEntity
- IEntityMention
- IModerateTextRequest
- IModerateTextResponse
- IPartOfSpeech
- ISentence
- ISentiment
- ITextSpan
- IToken
- LanguageService
- ModerateTextRequest
- ModerateTextResponse
- PartOfSpeech
- Sentence
- Sentiment
- TextSpan
- Token
protos.google.cloud.language.v1beta2
- AnalyzeEntitiesRequest
- AnalyzeEntitiesResponse
- AnalyzeEntitySentimentRequest
- AnalyzeEntitySentimentResponse
- AnalyzeSentimentRequest
- AnalyzeSentimentResponse
- AnalyzeSyntaxRequest
- AnalyzeSyntaxResponse
- AnnotateTextRequest
- AnnotateTextResponse
- ClassificationCategory
- ClassificationModelOptions
- ClassifyTextRequest
- ClassifyTextResponse
- DependencyEdge
- Document
- EncodingType
- Entity
- EntityMention
- IAnalyzeEntitiesRequest
- IAnalyzeEntitiesResponse
- IAnalyzeEntitySentimentRequest
- IAnalyzeEntitySentimentResponse
- IAnalyzeSentimentRequest
- IAnalyzeSentimentResponse
- IAnalyzeSyntaxRequest
- IAnalyzeSyntaxResponse
- IAnnotateTextRequest
- IAnnotateTextResponse
- IClassificationCategory
- IClassificationModelOptions
- IClassifyTextRequest
- IClassifyTextResponse
- IDependencyEdge
- IDocument
- IEntity
- IEntityMention
- IModerateTextRequest
- IModerateTextResponse
- IPartOfSpeech
- ISentence
- ISentiment
- ITextSpan
- IToken
- LanguageService
- ModerateTextRequest
- ModerateTextResponse
- PartOfSpeech
- Sentence
- Sentiment
- TextSpan
- Token
protos.google.cloud.language.v2
- AnalyzeEntitiesRequest
- AnalyzeEntitiesResponse
- AnalyzeSentimentRequest
- AnalyzeSentimentResponse
- AnnotateTextRequest
- AnnotateTextResponse
- ClassificationCategory
- ClassifyTextRequest
- ClassifyTextResponse
- Document
- EncodingType
- Entity
- EntityMention
- IAnalyzeEntitiesRequest
- IAnalyzeEntitiesResponse
- IAnalyzeSentimentRequest
- IAnalyzeSentimentResponse
- IAnnotateTextRequest
- IAnnotateTextResponse
- IClassificationCategory
- IClassifyTextRequest
- IClassifyTextResponse
- IDocument
- IEntity
- IEntityMention
- IModerateTextRequest
- IModerateTextResponse
- ISentence
- ISentiment
- ITextSpan
- LanguageService
- ModerateTextRequest
- ModerateTextResponse
- Sentence
- Sentiment
- TextSpan
protos.google.protobuf
- DescriptorProto
- Duration
- Edition
- EnumDescriptorProto
- EnumOptions
- EnumValueDescriptorProto
- EnumValueOptions
- ExtensionRangeOptions
- FeatureSet
- FeatureSetDefaults
- FieldDescriptorProto
- FieldOptions
- FileDescriptorProto
- FileDescriptorSet
- FileOptions
- GeneratedCodeInfo
- IDescriptorProto
- IDuration
- IEnumDescriptorProto
- IEnumOptions
- IEnumValueDescriptorProto
- IEnumValueOptions
- IExtensionRangeOptions
- IFeatureSet
- IFeatureSetDefaults
- IFieldDescriptorProto
- IFieldOptions
- IFileDescriptorProto
- IFileDescriptorSet
- IFileOptions
- IGeneratedCodeInfo
- IMessageOptions
- IMethodDescriptorProto
- IMethodOptions
- IOneofDescriptorProto
- IOneofOptions
- IServiceDescriptorProto
- IServiceOptions
- ISourceCodeInfo
- IUninterpretedOption
- MessageOptions
- MethodDescriptorProto
- MethodOptions
- OneofDescriptorProto
- OneofOptions
- ServiceDescriptorProto
- ServiceOptions
- SourceCodeInfo
- UninterpretedOption
Variables
variable _default
const _default: { v1: typeof v1; v1beta2: typeof v1beta2; v2: typeof v2; LanguageServiceClient: typeof v1.LanguageServiceClient;};
variable LanguageServiceClient
const LanguageServiceClient: typeof v1.LanguageServiceClient;
Type Aliases
type LanguageServiceClient
type LanguageServiceClient = v1.LanguageServiceClient;
Namespaces
namespace protos
module 'build/protos/protos.d.ts' {}
Namespace google.
namespace protos.google
namespace protos.google {}
Namespace google.
namespace protos.google.api
namespace protos.google.api {}
Namespace api.
class ClientLibrarySettings
class ClientLibrarySettings implements IClientLibrarySettings {}
Represents a ClientLibrarySettings.
constructor
constructor(properties?: IClientLibrarySettings);
Constructs a new ClientLibrarySettings.
Parameter properties
Properties to set
property cppSettings
cppSettings?: ICppSettings;
ClientLibrarySettings cppSettings.
property dotnetSettings
dotnetSettings?: IDotnetSettings;
ClientLibrarySettings dotnetSettings.
property goSettings
goSettings?: IGoSettings;
ClientLibrarySettings goSettings.
property javaSettings
javaSettings?: IJavaSettings;
ClientLibrarySettings javaSettings.
property launchStage
launchStage: | LaunchStage | 'LAUNCH_STAGE_UNSPECIFIED' | 'UNIMPLEMENTED' | 'PRELAUNCH' | 'EARLY_ACCESS' | 'ALPHA' | 'BETA' | 'GA' | 'DEPRECATED';
ClientLibrarySettings launchStage.
property nodeSettings
nodeSettings?: INodeSettings;
ClientLibrarySettings nodeSettings.
property phpSettings
phpSettings?: IPhpSettings;
ClientLibrarySettings phpSettings.
property pythonSettings
pythonSettings?: IPythonSettings;
ClientLibrarySettings pythonSettings.
property restNumericEnums
restNumericEnums: boolean;
ClientLibrarySettings restNumericEnums.
property rubySettings
rubySettings?: IRubySettings;
ClientLibrarySettings rubySettings.
property version
version: string;
ClientLibrarySettings version.
method create
static create: ( properties?: google.api.IClientLibrarySettings) => google.api.ClientLibrarySettings;
Creates a new ClientLibrarySettings instance using the specified properties.
Parameter properties
Properties to set
Returns
ClientLibrarySettings instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.ClientLibrarySettings;
Decodes a ClientLibrarySettings message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClientLibrarySettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.ClientLibrarySettings;
Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClientLibrarySettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClientLibrarySettings message. Does not implicitly verify messages.
Parameter message
ClientLibrarySettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly verify messages.
Parameter message
ClientLibrarySettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.api.ClientLibrarySettings;
Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClientLibrarySettings
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClientLibrarySettings
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClientLibrarySettings to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified.
Parameter message
ClientLibrarySettings
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClientLibrarySettings message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class CommonLanguageSettings
class CommonLanguageSettings implements ICommonLanguageSettings {}
Represents a CommonLanguageSettings.
constructor
constructor(properties?: ICommonLanguageSettings);
Constructs a new CommonLanguageSettings.
Parameter properties
Properties to set
property destinations
destinations: ClientLibraryDestination[];
CommonLanguageSettings destinations.
property referenceDocsUri
referenceDocsUri: string;
CommonLanguageSettings referenceDocsUri.
method create
static create: ( properties?: google.api.ICommonLanguageSettings) => google.api.CommonLanguageSettings;
Creates a new CommonLanguageSettings instance using the specified properties.
Parameter properties
Properties to set
Returns
CommonLanguageSettings instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.CommonLanguageSettings;
Decodes a CommonLanguageSettings message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
CommonLanguageSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.CommonLanguageSettings;
Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
CommonLanguageSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified CommonLanguageSettings message. Does not implicitly verify messages.
Parameter message
CommonLanguageSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly verify messages.
Parameter message
CommonLanguageSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.api.CommonLanguageSettings;
Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
CommonLanguageSettings
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for CommonLanguageSettings
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this CommonLanguageSettings to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified.
Parameter message
CommonLanguageSettings
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a CommonLanguageSettings message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class CppSettings
class CppSettings implements ICppSettings {}
Represents a CppSettings.
constructor
constructor(properties?: ICppSettings);
Constructs a new CppSettings.
Parameter properties
Properties to set
property common
common?: ICommonLanguageSettings;
CppSettings common.
method create
static create: (properties?: google.api.ICppSettings) => google.api.CppSettings;
Creates a new CppSettings instance using the specified properties.
Parameter properties
Properties to set
Returns
CppSettings instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.CppSettings;
Decodes a CppSettings message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
CppSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.CppSettings;
Decodes a CppSettings message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
CppSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.ICppSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified CppSettings message. Does not implicitly verify messages.
Parameter message
CppSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.ICppSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified CppSettings message, length delimited. Does not implicitly verify messages.
Parameter message
CppSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.CppSettings;
Creates a CppSettings message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
CppSettings
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for CppSettings
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this CppSettings to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.CppSettings, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a CppSettings message. Also converts values to other types if specified.
Parameter message
CppSettings
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a CppSettings message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class CustomHttpPattern
class CustomHttpPattern implements ICustomHttpPattern {}
Represents a CustomHttpPattern.
constructor
constructor(properties?: ICustomHttpPattern);
Constructs a new CustomHttpPattern.
Parameter properties
Properties to set
property kind
kind: string;
CustomHttpPattern kind.
property path
path: string;
CustomHttpPattern path.
method create
static create: ( properties?: google.api.ICustomHttpPattern) => google.api.CustomHttpPattern;
Creates a new CustomHttpPattern instance using the specified properties.
Parameter properties
Properties to set
Returns
CustomHttpPattern instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.CustomHttpPattern;
Decodes a CustomHttpPattern message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
CustomHttpPattern
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.CustomHttpPattern;
Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
CustomHttpPattern
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified CustomHttpPattern message. Does not implicitly verify messages.
Parameter message
CustomHttpPattern message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly verify messages.
Parameter message
CustomHttpPattern message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.api.CustomHttpPattern;
Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
CustomHttpPattern
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for CustomHttpPattern
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this CustomHttpPattern to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
Parameter message
CustomHttpPattern
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a CustomHttpPattern message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class DotnetSettings
class DotnetSettings implements IDotnetSettings {}
Represents a DotnetSettings.
constructor
constructor(properties?: IDotnetSettings);
Constructs a new DotnetSettings.
Parameter properties
Properties to set
property common
common?: ICommonLanguageSettings;
DotnetSettings common.
property forcedNamespaceAliases
forcedNamespaceAliases: string[];
DotnetSettings forcedNamespaceAliases.
property handwrittenSignatures
handwrittenSignatures: string[];
DotnetSettings handwrittenSignatures.
property ignoredResources
ignoredResources: string[];
DotnetSettings ignoredResources.
property renamedResources
renamedResources: { [k: string]: string };
DotnetSettings renamedResources.
property renamedServices
renamedServices: { [k: string]: string };
DotnetSettings renamedServices.
method create
static create: ( properties?: google.api.IDotnetSettings) => google.api.DotnetSettings;
Creates a new DotnetSettings instance using the specified properties.
Parameter properties
Properties to set
Returns
DotnetSettings instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.DotnetSettings;
Decodes a DotnetSettings message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
DotnetSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.DotnetSettings;
Decodes a DotnetSettings message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
DotnetSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.IDotnetSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified DotnetSettings message. Does not implicitly verify messages.
Parameter message
DotnetSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.IDotnetSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified DotnetSettings message, length delimited. Does not implicitly verify messages.
Parameter message
DotnetSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.DotnetSettings;
Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
DotnetSettings
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for DotnetSettings
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this DotnetSettings to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a DotnetSettings message. Also converts values to other types if specified.
Parameter message
DotnetSettings
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a DotnetSettings message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class GoSettings
class GoSettings implements IGoSettings {}
Represents a GoSettings.
constructor
constructor(properties?: IGoSettings);
Constructs a new GoSettings.
Parameter properties
Properties to set
property common
common?: ICommonLanguageSettings;
GoSettings common.
method create
static create: (properties?: google.api.IGoSettings) => google.api.GoSettings;
Creates a new GoSettings instance using the specified properties.
Parameter properties
Properties to set
Returns
GoSettings instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.GoSettings;
Decodes a GoSettings message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
GoSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.GoSettings;
Decodes a GoSettings message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
GoSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.IGoSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified GoSettings message. Does not implicitly verify messages.
Parameter message
GoSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.IGoSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified GoSettings message, length delimited. Does not implicitly verify messages.
Parameter message
GoSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.GoSettings;
Creates a GoSettings message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
GoSettings
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for GoSettings
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this GoSettings to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.GoSettings, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a GoSettings message. Also converts values to other types if specified.
Parameter message
GoSettings
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a GoSettings message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Http
class Http implements IHttp {}
Represents a Http.
constructor
constructor(properties?: IHttp);
Constructs a new Http.
Parameter properties
Properties to set
property fullyDecodeReservedExpansion
fullyDecodeReservedExpansion: boolean;
Http fullyDecodeReservedExpansion.
property rules
rules: IHttpRule[];
Http rules.
method create
static create: (properties?: google.api.IHttp) => google.api.Http;
Creates a new Http instance using the specified properties.
Parameter properties
Properties to set
Returns
Http instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.Http;
Decodes a Http message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Http
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.Http;
Decodes a Http message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Http
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.IHttp, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Http message. Does not implicitly verify messages.
Parameter message
Http message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.IHttp, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Http message, length delimited. Does not implicitly verify messages.
Parameter message
Http message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.Http;
Creates a Http message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Http
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Http
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Http to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.Http, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Http message. Also converts values to other types if specified.
Parameter message
Http
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Http message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class HttpRule
class HttpRule implements IHttpRule {}
Represents a HttpRule.
constructor
constructor(properties?: IHttpRule);
Constructs a new HttpRule.
Parameter properties
Properties to set
property additionalBindings
additionalBindings: IHttpRule[];
HttpRule additionalBindings.
property body
body: string;
HttpRule body.
property custom
custom?: ICustomHttpPattern;
HttpRule custom.
property delete
delete?: string;
HttpRule delete.
property get
get?: string;
HttpRule get.
property patch
patch?: string;
HttpRule patch.
property pattern
pattern?: 'get' | 'put' | 'post' | 'delete' | 'patch' | 'custom';
HttpRule pattern.
property post
post?: string;
HttpRule post.
property put
put?: string;
HttpRule put.
property responseBody
responseBody: string;
HttpRule responseBody.
property selector
selector: string;
HttpRule selector.
method create
static create: (properties?: google.api.IHttpRule) => google.api.HttpRule;
Creates a new HttpRule instance using the specified properties.
Parameter properties
Properties to set
Returns
HttpRule instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.HttpRule;
Decodes a HttpRule message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
HttpRule
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.HttpRule;
Decodes a HttpRule message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
HttpRule
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.IHttpRule, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified HttpRule message. Does not implicitly verify messages.
Parameter message
HttpRule message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.IHttpRule, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified HttpRule message, length delimited. Does not implicitly verify messages.
Parameter message
HttpRule message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.HttpRule;
Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
HttpRule
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for HttpRule
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this HttpRule to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.HttpRule, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a HttpRule message. Also converts values to other types if specified.
Parameter message
HttpRule
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a HttpRule message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class JavaSettings
class JavaSettings implements IJavaSettings {}
Represents a JavaSettings.
constructor
constructor(properties?: IJavaSettings);
Constructs a new JavaSettings.
Parameter properties
Properties to set
property common
common?: ICommonLanguageSettings;
JavaSettings common.
property libraryPackage
libraryPackage: string;
JavaSettings libraryPackage.
property serviceClassNames
serviceClassNames: { [k: string]: string };
JavaSettings serviceClassNames.
method create
static create: ( properties?: google.api.IJavaSettings) => google.api.JavaSettings;
Creates a new JavaSettings instance using the specified properties.
Parameter properties
Properties to set
Returns
JavaSettings instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.JavaSettings;
Decodes a JavaSettings message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
JavaSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.JavaSettings;
Decodes a JavaSettings message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
JavaSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.IJavaSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified JavaSettings message. Does not implicitly verify messages.
Parameter message
JavaSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.IJavaSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified JavaSettings message, length delimited. Does not implicitly verify messages.
Parameter message
JavaSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.JavaSettings;
Creates a JavaSettings message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
JavaSettings
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for JavaSettings
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this JavaSettings to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.JavaSettings, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a JavaSettings message. Also converts values to other types if specified.
Parameter message
JavaSettings
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a JavaSettings message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class MethodSettings
class MethodSettings implements IMethodSettings {}
Represents a MethodSettings.
constructor
constructor(properties?: IMethodSettings);
Constructs a new MethodSettings.
Parameter properties
Properties to set
property autoPopulatedFields
autoPopulatedFields: string[];
MethodSettings autoPopulatedFields.
property longRunning
longRunning?: MethodSettings.ILongRunning;
MethodSettings longRunning.
property selector
selector: string;
MethodSettings selector.
method create
static create: ( properties?: google.api.IMethodSettings) => google.api.MethodSettings;
Creates a new MethodSettings instance using the specified properties.
Parameter properties
Properties to set
Returns
MethodSettings instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.MethodSettings;
Decodes a MethodSettings message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
MethodSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.MethodSettings;
Decodes a MethodSettings message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
MethodSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.IMethodSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified MethodSettings message. Does not implicitly verify messages.
Parameter message
MethodSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.IMethodSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified MethodSettings message, length delimited. Does not implicitly verify messages.
Parameter message
MethodSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.MethodSettings;
Creates a MethodSettings message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
MethodSettings
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for MethodSettings
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this MethodSettings to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.MethodSettings, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a MethodSettings message. Also converts values to other types if specified.
Parameter message
MethodSettings
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a MethodSettings message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class NodeSettings
class NodeSettings implements INodeSettings {}
Represents a NodeSettings.
constructor
constructor(properties?: INodeSettings);
Constructs a new NodeSettings.
Parameter properties
Properties to set
property common
common?: ICommonLanguageSettings;
NodeSettings common.
method create
static create: ( properties?: google.api.INodeSettings) => google.api.NodeSettings;
Creates a new NodeSettings instance using the specified properties.
Parameter properties
Properties to set
Returns
NodeSettings instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.NodeSettings;
Decodes a NodeSettings message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
NodeSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.NodeSettings;
Decodes a NodeSettings message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
NodeSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.INodeSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified NodeSettings message. Does not implicitly verify messages.
Parameter message
NodeSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.INodeSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified NodeSettings message, length delimited. Does not implicitly verify messages.
Parameter message
NodeSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.NodeSettings;
Creates a NodeSettings message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
NodeSettings
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for NodeSettings
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this NodeSettings to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.NodeSettings, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a NodeSettings message. Also converts values to other types if specified.
Parameter message
NodeSettings
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a NodeSettings message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class PhpSettings
class PhpSettings implements IPhpSettings {}
Represents a PhpSettings.
constructor
constructor(properties?: IPhpSettings);
Constructs a new PhpSettings.
Parameter properties
Properties to set
property common
common?: ICommonLanguageSettings;
PhpSettings common.
method create
static create: (properties?: google.api.IPhpSettings) => google.api.PhpSettings;
Creates a new PhpSettings instance using the specified properties.
Parameter properties
Properties to set
Returns
PhpSettings instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.PhpSettings;
Decodes a PhpSettings message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
PhpSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.PhpSettings;
Decodes a PhpSettings message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
PhpSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.IPhpSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified PhpSettings message. Does not implicitly verify messages.
Parameter message
PhpSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.IPhpSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified PhpSettings message, length delimited. Does not implicitly verify messages.
Parameter message
PhpSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.PhpSettings;
Creates a PhpSettings message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
PhpSettings
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for PhpSettings
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this PhpSettings to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.PhpSettings, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a PhpSettings message. Also converts values to other types if specified.
Parameter message
PhpSettings
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a PhpSettings message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Publishing
class Publishing implements IPublishing {}
Represents a Publishing.
constructor
constructor(properties?: IPublishing);
Constructs a new Publishing.
Parameter properties
Properties to set
property apiShortName
apiShortName: string;
Publishing apiShortName.
property codeownerGithubTeams
codeownerGithubTeams: string[];
Publishing codeownerGithubTeams.
property docTagPrefix
docTagPrefix: string;
Publishing docTagPrefix.
property documentationUri
documentationUri: string;
Publishing documentationUri.
property githubLabel
githubLabel: string;
Publishing githubLabel.
property librarySettings
librarySettings: IClientLibrarySettings[];
Publishing librarySettings.
property methodSettings
methodSettings: IMethodSettings[];
Publishing methodSettings.
property newIssueUri
newIssueUri: string;
Publishing newIssueUri.
property organization
organization: | ClientLibraryOrganization | 'CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED' | 'CLOUD' | 'ADS' | 'PHOTOS' | 'STREET_VIEW' | 'SHOPPING' | 'GEO' | 'GENERATIVE_AI';
Publishing organization.
property protoReferenceDocumentationUri
protoReferenceDocumentationUri: string;
Publishing protoReferenceDocumentationUri.
method create
static create: (properties?: google.api.IPublishing) => google.api.Publishing;
Creates a new Publishing instance using the specified properties.
Parameter properties
Properties to set
Returns
Publishing instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.Publishing;
Decodes a Publishing message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Publishing
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.Publishing;
Decodes a Publishing message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Publishing
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.IPublishing, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Publishing message. Does not implicitly verify messages.
Parameter message
Publishing message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.IPublishing, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Publishing message, length delimited. Does not implicitly verify messages.
Parameter message
Publishing message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.Publishing;
Creates a Publishing message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Publishing
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Publishing
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Publishing to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.Publishing, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Publishing message. Also converts values to other types if specified.
Parameter message
Publishing
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Publishing message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class PythonSettings
class PythonSettings implements IPythonSettings {}
Represents a PythonSettings.
constructor
constructor(properties?: IPythonSettings);
Constructs a new PythonSettings.
Parameter properties
Properties to set
property common
common?: ICommonLanguageSettings;
PythonSettings common.
method create
static create: ( properties?: google.api.IPythonSettings) => google.api.PythonSettings;
Creates a new PythonSettings instance using the specified properties.
Parameter properties
Properties to set
Returns
PythonSettings instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.PythonSettings;
Decodes a PythonSettings message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
PythonSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.PythonSettings;
Decodes a PythonSettings message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
PythonSettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.IPythonSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified PythonSettings message. Does not implicitly verify messages.
Parameter message
PythonSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.IPythonSettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified PythonSettings message, length delimited. Does not implicitly verify messages.
Parameter message
PythonSettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.PythonSettings;
Creates a PythonSettings message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
PythonSettings
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for PythonSettings
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this PythonSettings to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.PythonSettings, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a PythonSettings message. Also converts values to other types if specified.
Parameter message
PythonSettings
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a PythonSettings message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class RubySettings
class RubySettings implements IRubySettings {}
Represents a RubySettings.
constructor
constructor(properties?: IRubySettings);
Constructs a new RubySettings.
Parameter properties
Properties to set
property common
common?: ICommonLanguageSettings;
RubySettings common.
method create
static create: ( properties?: google.api.IRubySettings) => google.api.RubySettings;
Creates a new RubySettings instance using the specified properties.
Parameter properties
Properties to set
Returns
RubySettings instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.RubySettings;
Decodes a RubySettings message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
RubySettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.RubySettings;
Decodes a RubySettings message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
RubySettings
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.IRubySettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified RubySettings message. Does not implicitly verify messages.
Parameter message
RubySettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.IRubySettings, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified RubySettings message, length delimited. Does not implicitly verify messages.
Parameter message
RubySettings message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.api.RubySettings;
Creates a RubySettings message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
RubySettings
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for RubySettings
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this RubySettings to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.RubySettings, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a RubySettings message. Also converts values to other types if specified.
Parameter message
RubySettings
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a RubySettings message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface IClientLibrarySettings
interface IClientLibrarySettings {}
Properties of a ClientLibrarySettings.
property cppSettings
cppSettings?: google.api.ICppSettings | null;
ClientLibrarySettings cppSettings
property dotnetSettings
dotnetSettings?: google.api.IDotnetSettings | null;
ClientLibrarySettings dotnetSettings
property goSettings
goSettings?: google.api.IGoSettings | null;
ClientLibrarySettings goSettings
property javaSettings
javaSettings?: google.api.IJavaSettings | null;
ClientLibrarySettings javaSettings
property launchStage
launchStage?: | google.api.LaunchStage | keyof typeof google.api.LaunchStage | null;
ClientLibrarySettings launchStage
property nodeSettings
nodeSettings?: google.api.INodeSettings | null;
ClientLibrarySettings nodeSettings
property phpSettings
phpSettings?: google.api.IPhpSettings | null;
ClientLibrarySettings phpSettings
property pythonSettings
pythonSettings?: google.api.IPythonSettings | null;
ClientLibrarySettings pythonSettings
property restNumericEnums
restNumericEnums?: boolean | null;
ClientLibrarySettings restNumericEnums
property rubySettings
rubySettings?: google.api.IRubySettings | null;
ClientLibrarySettings rubySettings
property version
version?: string | null;
ClientLibrarySettings version
interface ICommonLanguageSettings
interface ICommonLanguageSettings {}
Properties of a CommonLanguageSettings.
property destinations
destinations?: google.api.ClientLibraryDestination[] | null;
CommonLanguageSettings destinations
property referenceDocsUri
referenceDocsUri?: string | null;
CommonLanguageSettings referenceDocsUri
interface ICppSettings
interface ICppSettings {}
Properties of a CppSettings.
property common
common?: google.api.ICommonLanguageSettings | null;
CppSettings common
interface ICustomHttpPattern
interface ICustomHttpPattern {}
Properties of a CustomHttpPattern.
interface IDotnetSettings
interface IDotnetSettings {}
Properties of a DotnetSettings.
property common
common?: google.api.ICommonLanguageSettings | null;
DotnetSettings common
property forcedNamespaceAliases
forcedNamespaceAliases?: string[] | null;
DotnetSettings forcedNamespaceAliases
property handwrittenSignatures
handwrittenSignatures?: string[] | null;
DotnetSettings handwrittenSignatures
property ignoredResources
ignoredResources?: string[] | null;
DotnetSettings ignoredResources
property renamedResources
renamedResources?: { [k: string]: string } | null;
DotnetSettings renamedResources
property renamedServices
renamedServices?: { [k: string]: string } | null;
DotnetSettings renamedServices
interface IGoSettings
interface IGoSettings {}
Properties of a GoSettings.
property common
common?: google.api.ICommonLanguageSettings | null;
GoSettings common
interface IHttp
interface IHttp {}
Properties of a Http.
property fullyDecodeReservedExpansion
fullyDecodeReservedExpansion?: boolean | null;
Http fullyDecodeReservedExpansion
property rules
rules?: google.api.IHttpRule[] | null;
Http rules
interface IHttpRule
interface IHttpRule {}
Properties of a HttpRule.
property "delete"
delete?: string | null;
HttpRule delete
property additionalBindings
additionalBindings?: google.api.IHttpRule[] | null;
HttpRule additionalBindings
property body
body?: string | null;
HttpRule body
property custom
custom?: google.api.ICustomHttpPattern | null;
HttpRule custom
property get
get?: string | null;
HttpRule get
property patch
patch?: string | null;
HttpRule patch
property post
post?: string | null;
HttpRule post
property put
put?: string | null;
HttpRule put
property responseBody
responseBody?: string | null;
HttpRule responseBody
property selector
selector?: string | null;
HttpRule selector
interface IJavaSettings
interface IJavaSettings {}
Properties of a JavaSettings.
property common
common?: google.api.ICommonLanguageSettings | null;
JavaSettings common
property libraryPackage
libraryPackage?: string | null;
JavaSettings libraryPackage
property serviceClassNames
serviceClassNames?: { [k: string]: string } | null;
JavaSettings serviceClassNames
interface IMethodSettings
interface IMethodSettings {}
Properties of a MethodSettings.
property autoPopulatedFields
autoPopulatedFields?: string[] | null;
MethodSettings autoPopulatedFields
property longRunning
longRunning?: google.api.MethodSettings.ILongRunning | null;
MethodSettings longRunning
property selector
selector?: string | null;
MethodSettings selector
interface INodeSettings
interface INodeSettings {}
Properties of a NodeSettings.
property common
common?: google.api.ICommonLanguageSettings | null;
NodeSettings common
interface IPhpSettings
interface IPhpSettings {}
Properties of a PhpSettings.
property common
common?: google.api.ICommonLanguageSettings | null;
PhpSettings common
interface IPublishing
interface IPublishing {}
Properties of a Publishing.
property apiShortName
apiShortName?: string | null;
Publishing apiShortName
property codeownerGithubTeams
codeownerGithubTeams?: string[] | null;
Publishing codeownerGithubTeams
property docTagPrefix
docTagPrefix?: string | null;
Publishing docTagPrefix
property documentationUri
documentationUri?: string | null;
Publishing documentationUri
property githubLabel
githubLabel?: string | null;
Publishing githubLabel
property librarySettings
librarySettings?: google.api.IClientLibrarySettings[] | null;
Publishing librarySettings
property methodSettings
methodSettings?: google.api.IMethodSettings[] | null;
Publishing methodSettings
property newIssueUri
newIssueUri?: string | null;
Publishing newIssueUri
property organization
organization?: | google.api.ClientLibraryOrganization | keyof typeof google.api.ClientLibraryOrganization | null;
Publishing organization
property protoReferenceDocumentationUri
protoReferenceDocumentationUri?: string | null;
Publishing protoReferenceDocumentationUri
interface IPythonSettings
interface IPythonSettings {}
Properties of a PythonSettings.
property common
common?: google.api.ICommonLanguageSettings | null;
PythonSettings common
interface IRubySettings
interface IRubySettings {}
Properties of a RubySettings.
property common
common?: google.api.ICommonLanguageSettings | null;
RubySettings common
enum ClientLibraryDestination
enum ClientLibraryDestination { CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, GITHUB = 10, PACKAGE_MANAGER = 20,}
ClientLibraryDestination enum.
member CLIENT_LIBRARY_DESTINATION_UNSPECIFIED
CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0
member GITHUB
GITHUB = 10
member PACKAGE_MANAGER
PACKAGE_MANAGER = 20
enum ClientLibraryOrganization
enum ClientLibraryOrganization { CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, CLOUD = 1, ADS = 2, PHOTOS = 3, STREET_VIEW = 4, SHOPPING = 5, GEO = 6, GENERATIVE_AI = 7,}
ClientLibraryOrganization enum.
member ADS
ADS = 2
member CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED
CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0
member CLOUD
CLOUD = 1
member GENERATIVE_AI
GENERATIVE_AI = 7
member GEO
GEO = 6
member PHOTOS
PHOTOS = 3
member SHOPPING
SHOPPING = 5
member STREET_VIEW
STREET_VIEW = 4
enum FieldBehavior
enum FieldBehavior { FIELD_BEHAVIOR_UNSPECIFIED = 0, OPTIONAL = 1, REQUIRED = 2, OUTPUT_ONLY = 3, INPUT_ONLY = 4, IMMUTABLE = 5, UNORDERED_LIST = 6, NON_EMPTY_DEFAULT = 7, IDENTIFIER = 8,}
FieldBehavior enum.
member FIELD_BEHAVIOR_UNSPECIFIED
FIELD_BEHAVIOR_UNSPECIFIED = 0
member IDENTIFIER
IDENTIFIER = 8
member IMMUTABLE
IMMUTABLE = 5
member INPUT_ONLY
INPUT_ONLY = 4
member NON_EMPTY_DEFAULT
NON_EMPTY_DEFAULT = 7
member OPTIONAL
OPTIONAL = 1
member OUTPUT_ONLY
OUTPUT_ONLY = 3
member REQUIRED
REQUIRED = 2
member UNORDERED_LIST
UNORDERED_LIST = 6
enum LaunchStage
enum LaunchStage { LAUNCH_STAGE_UNSPECIFIED = 0, UNIMPLEMENTED = 6, PRELAUNCH = 7, EARLY_ACCESS = 1, ALPHA = 2, BETA = 3, GA = 4, DEPRECATED = 5,}
LaunchStage enum.
member ALPHA
ALPHA = 2
member BETA
BETA = 3
member DEPRECATED
DEPRECATED = 5
member EARLY_ACCESS
EARLY_ACCESS = 1
member GA
GA = 4
member LAUNCH_STAGE_UNSPECIFIED
LAUNCH_STAGE_UNSPECIFIED = 0
member PRELAUNCH
PRELAUNCH = 7
member UNIMPLEMENTED
UNIMPLEMENTED = 6
namespace protos.google.api.MethodSettings
namespace protos.google.api.MethodSettings {}
class LongRunning
class LongRunning implements ILongRunning {}
Represents a LongRunning.
constructor
constructor(properties?: ILongRunning);
Constructs a new LongRunning.
Parameter properties
Properties to set
property initialPollDelay
initialPollDelay?: protobuf.IDuration;
LongRunning initialPollDelay.
property maxPollDelay
maxPollDelay?: protobuf.IDuration;
LongRunning maxPollDelay.
property pollDelayMultiplier
pollDelayMultiplier: number;
LongRunning pollDelayMultiplier.
property totalPollTimeout
totalPollTimeout?: protobuf.IDuration;
LongRunning totalPollTimeout.
method create
static create: ( properties?: google.api.MethodSettings.ILongRunning) => google.api.MethodSettings.LongRunning;
Creates a new LongRunning instance using the specified properties.
Parameter properties
Properties to set
Returns
LongRunning instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.api.MethodSettings.LongRunning;
Decodes a LongRunning message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
LongRunning
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.api.MethodSettings.LongRunning;
Decodes a LongRunning message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
LongRunning
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified LongRunning message. Does not implicitly verify messages.
Parameter message
LongRunning message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified LongRunning message, length delimited. Does not implicitly verify messages.
Parameter message
LongRunning message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.api.MethodSettings.LongRunning;
Creates a LongRunning message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
LongRunning
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for LongRunning
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this LongRunning to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a LongRunning message. Also converts values to other types if specified.
Parameter message
LongRunning
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a LongRunning message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface ILongRunning
interface ILongRunning {}
Properties of a LongRunning.
property initialPollDelay
initialPollDelay?: google.protobuf.IDuration | null;
LongRunning initialPollDelay
property maxPollDelay
maxPollDelay?: google.protobuf.IDuration | null;
LongRunning maxPollDelay
property pollDelayMultiplier
pollDelayMultiplier?: number | null;
LongRunning pollDelayMultiplier
property totalPollTimeout
totalPollTimeout?: google.protobuf.IDuration | null;
LongRunning totalPollTimeout
namespace protos.google.cloud
namespace protos.google.cloud {}
Namespace cloud.
namespace protos.google.cloud.language
namespace protos.google.cloud.language {}
Namespace language.
namespace protos.google.cloud.language.v1
namespace protos.google.cloud.language.v1 {}
Namespace v1.
class AnalyzeEntitiesRequest
class AnalyzeEntitiesRequest implements IAnalyzeEntitiesRequest {}
Represents an AnalyzeEntitiesRequest.
constructor
constructor(properties?: IAnalyzeEntitiesRequest);
Constructs a new AnalyzeEntitiesRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnalyzeEntitiesRequest document.
property encodingType
encodingType: EncodingType | 'NONE' | 'UTF8' | 'UTF16' | 'UTF32';
AnalyzeEntitiesRequest encodingType.
method create
static create: ( properties?: google.cloud.language.v1.IAnalyzeEntitiesRequest) => google.cloud.language.v1.AnalyzeEntitiesRequest;
Creates a new AnalyzeEntitiesRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeEntitiesRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.AnalyzeEntitiesRequest;
Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeEntitiesRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.AnalyzeEntitiesRequest;
Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeEntitiesRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IAnalyzeEntitiesRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesRequest message. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IAnalyzeEntitiesRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.AnalyzeEntitiesRequest;
Creates an AnalyzeEntitiesRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeEntitiesRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeEntitiesRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeEntitiesRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.AnalyzeEntitiesRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeEntitiesRequest message. Also converts values to other types if specified.
Parameter message
AnalyzeEntitiesRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeEntitiesRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeEntitiesResponse
class AnalyzeEntitiesResponse implements IAnalyzeEntitiesResponse {}
Represents an AnalyzeEntitiesResponse.
constructor
constructor(properties?: IAnalyzeEntitiesResponse);
Constructs a new AnalyzeEntitiesResponse.
Parameter properties
Properties to set
property entities
entities: IEntity[];
AnalyzeEntitiesResponse entities.
property language
language: string;
AnalyzeEntitiesResponse language.
method create
static create: ( properties?: google.cloud.language.v1.IAnalyzeEntitiesResponse) => google.cloud.language.v1.AnalyzeEntitiesResponse;
Creates a new AnalyzeEntitiesResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeEntitiesResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.AnalyzeEntitiesResponse;
Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeEntitiesResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.AnalyzeEntitiesResponse;
Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeEntitiesResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IAnalyzeEntitiesResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesResponse message. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IAnalyzeEntitiesResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.AnalyzeEntitiesResponse;
Creates an AnalyzeEntitiesResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeEntitiesResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeEntitiesResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeEntitiesResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.AnalyzeEntitiesResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeEntitiesResponse message. Also converts values to other types if specified.
Parameter message
AnalyzeEntitiesResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeEntitiesResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeEntitySentimentRequest
class AnalyzeEntitySentimentRequest implements IAnalyzeEntitySentimentRequest {}
Represents an AnalyzeEntitySentimentRequest.
constructor
constructor(properties?: IAnalyzeEntitySentimentRequest);
Constructs a new AnalyzeEntitySentimentRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnalyzeEntitySentimentRequest document.
property encodingType
encodingType: EncodingType | 'NONE' | 'UTF8' | 'UTF16' | 'UTF32';
AnalyzeEntitySentimentRequest encodingType.
method create
static create: ( properties?: google.cloud.language.v1.IAnalyzeEntitySentimentRequest) => google.cloud.language.v1.AnalyzeEntitySentimentRequest;
Creates a new AnalyzeEntitySentimentRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeEntitySentimentRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.AnalyzeEntitySentimentRequest;
Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeEntitySentimentRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.AnalyzeEntitySentimentRequest;
Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeEntitySentimentRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IAnalyzeEntitySentimentRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitySentimentRequest message. Does not implicitly verify messages.
Parameter message
AnalyzeEntitySentimentRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IAnalyzeEntitySentimentRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitySentimentRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeEntitySentimentRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.AnalyzeEntitySentimentRequest;
Creates an AnalyzeEntitySentimentRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeEntitySentimentRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeEntitySentimentRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeEntitySentimentRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.AnalyzeEntitySentimentRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeEntitySentimentRequest message. Also converts values to other types if specified.
Parameter message
AnalyzeEntitySentimentRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeEntitySentimentRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeEntitySentimentResponse
class AnalyzeEntitySentimentResponse implements IAnalyzeEntitySentimentResponse {}
Represents an AnalyzeEntitySentimentResponse.
constructor
constructor(properties?: IAnalyzeEntitySentimentResponse);
Constructs a new AnalyzeEntitySentimentResponse.
Parameter properties
Properties to set
property entities
entities: IEntity[];
AnalyzeEntitySentimentResponse entities.
property language
language: string;
AnalyzeEntitySentimentResponse language.
method create
static create: ( properties?: google.cloud.language.v1.IAnalyzeEntitySentimentResponse) => google.cloud.language.v1.AnalyzeEntitySentimentResponse;
Creates a new AnalyzeEntitySentimentResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeEntitySentimentResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.AnalyzeEntitySentimentResponse;
Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeEntitySentimentResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.AnalyzeEntitySentimentResponse;
Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeEntitySentimentResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IAnalyzeEntitySentimentResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitySentimentResponse message. Does not implicitly verify messages.
Parameter message
AnalyzeEntitySentimentResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IAnalyzeEntitySentimentResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitySentimentResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeEntitySentimentResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.AnalyzeEntitySentimentResponse;
Creates an AnalyzeEntitySentimentResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeEntitySentimentResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeEntitySentimentResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeEntitySentimentResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.AnalyzeEntitySentimentResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeEntitySentimentResponse message. Also converts values to other types if specified.
Parameter message
AnalyzeEntitySentimentResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeEntitySentimentResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeSentimentRequest
class AnalyzeSentimentRequest implements IAnalyzeSentimentRequest {}
Represents an AnalyzeSentimentRequest.
constructor
constructor(properties?: IAnalyzeSentimentRequest);
Constructs a new AnalyzeSentimentRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnalyzeSentimentRequest document.
property encodingType
encodingType: EncodingType | 'NONE' | 'UTF8' | 'UTF16' | 'UTF32';
AnalyzeSentimentRequest encodingType.
method create
static create: ( properties?: google.cloud.language.v1.IAnalyzeSentimentRequest) => google.cloud.language.v1.AnalyzeSentimentRequest;
Creates a new AnalyzeSentimentRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeSentimentRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.AnalyzeSentimentRequest;
Decodes an AnalyzeSentimentRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeSentimentRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.AnalyzeSentimentRequest;
Decodes an AnalyzeSentimentRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeSentimentRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IAnalyzeSentimentRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentRequest message. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IAnalyzeSentimentRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.AnalyzeSentimentRequest;
Creates an AnalyzeSentimentRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeSentimentRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeSentimentRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeSentimentRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.AnalyzeSentimentRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeSentimentRequest message. Also converts values to other types if specified.
Parameter message
AnalyzeSentimentRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeSentimentRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeSentimentResponse
class AnalyzeSentimentResponse implements IAnalyzeSentimentResponse {}
Represents an AnalyzeSentimentResponse.
constructor
constructor(properties?: IAnalyzeSentimentResponse);
Constructs a new AnalyzeSentimentResponse.
Parameter properties
Properties to set
property documentSentiment
documentSentiment?: ISentiment;
AnalyzeSentimentResponse documentSentiment.
property language
language: string;
AnalyzeSentimentResponse language.
property sentences
sentences: ISentence[];
AnalyzeSentimentResponse sentences.
method create
static create: ( properties?: google.cloud.language.v1.IAnalyzeSentimentResponse) => google.cloud.language.v1.AnalyzeSentimentResponse;
Creates a new AnalyzeSentimentResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeSentimentResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.AnalyzeSentimentResponse;
Decodes an AnalyzeSentimentResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeSentimentResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.AnalyzeSentimentResponse;
Decodes an AnalyzeSentimentResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeSentimentResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IAnalyzeSentimentResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentResponse message. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IAnalyzeSentimentResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.AnalyzeSentimentResponse;
Creates an AnalyzeSentimentResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeSentimentResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeSentimentResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeSentimentResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.AnalyzeSentimentResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeSentimentResponse message. Also converts values to other types if specified.
Parameter message
AnalyzeSentimentResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeSentimentResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeSyntaxRequest
class AnalyzeSyntaxRequest implements IAnalyzeSyntaxRequest {}
Represents an AnalyzeSyntaxRequest.
constructor
constructor(properties?: IAnalyzeSyntaxRequest);
Constructs a new AnalyzeSyntaxRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnalyzeSyntaxRequest document.
property encodingType
encodingType: EncodingType | 'NONE' | 'UTF8' | 'UTF16' | 'UTF32';
AnalyzeSyntaxRequest encodingType.
method create
static create: ( properties?: google.cloud.language.v1.IAnalyzeSyntaxRequest) => google.cloud.language.v1.AnalyzeSyntaxRequest;
Creates a new AnalyzeSyntaxRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeSyntaxRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.AnalyzeSyntaxRequest;
Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeSyntaxRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.AnalyzeSyntaxRequest;
Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeSyntaxRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IAnalyzeSyntaxRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSyntaxRequest message. Does not implicitly verify messages.
Parameter message
AnalyzeSyntaxRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IAnalyzeSyntaxRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSyntaxRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeSyntaxRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.AnalyzeSyntaxRequest;
Creates an AnalyzeSyntaxRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeSyntaxRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeSyntaxRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeSyntaxRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.AnalyzeSyntaxRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeSyntaxRequest message. Also converts values to other types if specified.
Parameter message
AnalyzeSyntaxRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeSyntaxRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeSyntaxResponse
class AnalyzeSyntaxResponse implements IAnalyzeSyntaxResponse {}
Represents an AnalyzeSyntaxResponse.
constructor
constructor(properties?: IAnalyzeSyntaxResponse);
Constructs a new AnalyzeSyntaxResponse.
Parameter properties
Properties to set
property language
language: string;
AnalyzeSyntaxResponse language.
property sentences
sentences: ISentence[];
AnalyzeSyntaxResponse sentences.
property tokens
tokens: IToken[];
AnalyzeSyntaxResponse tokens.
method create
static create: ( properties?: google.cloud.language.v1.IAnalyzeSyntaxResponse) => google.cloud.language.v1.AnalyzeSyntaxResponse;
Creates a new AnalyzeSyntaxResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeSyntaxResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.AnalyzeSyntaxResponse;
Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeSyntaxResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.AnalyzeSyntaxResponse;
Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeSyntaxResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IAnalyzeSyntaxResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSyntaxResponse message. Does not implicitly verify messages.
Parameter message
AnalyzeSyntaxResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IAnalyzeSyntaxResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSyntaxResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeSyntaxResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.AnalyzeSyntaxResponse;
Creates an AnalyzeSyntaxResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeSyntaxResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeSyntaxResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeSyntaxResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.AnalyzeSyntaxResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeSyntaxResponse message. Also converts values to other types if specified.
Parameter message
AnalyzeSyntaxResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeSyntaxResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnnotateTextRequest
class AnnotateTextRequest implements IAnnotateTextRequest {}
Represents an AnnotateTextRequest.
constructor
constructor(properties?: IAnnotateTextRequest);
Constructs a new AnnotateTextRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnnotateTextRequest document.
property encodingType
encodingType: EncodingType | 'NONE' | 'UTF8' | 'UTF16' | 'UTF32';
AnnotateTextRequest encodingType.
property features
features?: AnnotateTextRequest.IFeatures;
AnnotateTextRequest features.
method create
static create: ( properties?: google.cloud.language.v1.IAnnotateTextRequest) => google.cloud.language.v1.AnnotateTextRequest;
Creates a new AnnotateTextRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnnotateTextRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.AnnotateTextRequest;
Decodes an AnnotateTextRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnnotateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.AnnotateTextRequest;
Decodes an AnnotateTextRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnnotateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IAnnotateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextRequest message. Does not implicitly verify messages.
Parameter message
AnnotateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IAnnotateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnnotateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.AnnotateTextRequest;
Creates an AnnotateTextRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnnotateTextRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnnotateTextRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnnotateTextRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.AnnotateTextRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnnotateTextRequest message. Also converts values to other types if specified.
Parameter message
AnnotateTextRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnnotateTextRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnnotateTextResponse
class AnnotateTextResponse implements IAnnotateTextResponse {}
Represents an AnnotateTextResponse.
constructor
constructor(properties?: IAnnotateTextResponse);
Constructs a new AnnotateTextResponse.
Parameter properties
Properties to set
property categories
categories: IClassificationCategory[];
AnnotateTextResponse categories.
property documentSentiment
documentSentiment?: ISentiment;
AnnotateTextResponse documentSentiment.
property entities
entities: IEntity[];
AnnotateTextResponse entities.
property language
language: string;
AnnotateTextResponse language.
property moderationCategories
moderationCategories: IClassificationCategory[];
AnnotateTextResponse moderationCategories.
property sentences
sentences: ISentence[];
AnnotateTextResponse sentences.
property tokens
tokens: IToken[];
AnnotateTextResponse tokens.
method create
static create: ( properties?: google.cloud.language.v1.IAnnotateTextResponse) => google.cloud.language.v1.AnnotateTextResponse;
Creates a new AnnotateTextResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnnotateTextResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.AnnotateTextResponse;
Decodes an AnnotateTextResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnnotateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.AnnotateTextResponse;
Decodes an AnnotateTextResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnnotateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IAnnotateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextResponse message. Does not implicitly verify messages.
Parameter message
AnnotateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IAnnotateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnnotateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.AnnotateTextResponse;
Creates an AnnotateTextResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnnotateTextResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnnotateTextResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnnotateTextResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.AnnotateTextResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnnotateTextResponse message. Also converts values to other types if specified.
Parameter message
AnnotateTextResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnnotateTextResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ClassificationCategory
class ClassificationCategory implements IClassificationCategory {}
Represents a ClassificationCategory.
constructor
constructor(properties?: IClassificationCategory);
Constructs a new ClassificationCategory.
Parameter properties
Properties to set
property confidence
confidence: number;
ClassificationCategory confidence.
property name
name: string;
ClassificationCategory name.
method create
static create: ( properties?: google.cloud.language.v1.IClassificationCategory) => google.cloud.language.v1.ClassificationCategory;
Creates a new ClassificationCategory instance using the specified properties.
Parameter properties
Properties to set
Returns
ClassificationCategory instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.ClassificationCategory;
Decodes a ClassificationCategory message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClassificationCategory
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.ClassificationCategory;
Decodes a ClassificationCategory message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClassificationCategory
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IClassificationCategory, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassificationCategory message. Does not implicitly verify messages.
Parameter message
ClassificationCategory message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IClassificationCategory, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassificationCategory message, length delimited. Does not implicitly verify messages.
Parameter message
ClassificationCategory message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.ClassificationCategory;
Creates a ClassificationCategory message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClassificationCategory
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClassificationCategory
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClassificationCategory to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.ClassificationCategory, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClassificationCategory message. Also converts values to other types if specified.
Parameter message
ClassificationCategory
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClassificationCategory message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ClassificationModelOptions
class ClassificationModelOptions implements IClassificationModelOptions {}
Represents a ClassificationModelOptions.
constructor
constructor(properties?: IClassificationModelOptions);
Constructs a new ClassificationModelOptions.
Parameter properties
Properties to set
property modelType
modelType?: 'v1Model' | 'v2Model';
ClassificationModelOptions modelType.
property v1Model
v1Model?: ClassificationModelOptions.IV1Model;
ClassificationModelOptions v1Model.
property v2Model
v2Model?: ClassificationModelOptions.IV2Model;
ClassificationModelOptions v2Model.
method create
static create: ( properties?: google.cloud.language.v1.IClassificationModelOptions) => google.cloud.language.v1.ClassificationModelOptions;
Creates a new ClassificationModelOptions instance using the specified properties.
Parameter properties
Properties to set
Returns
ClassificationModelOptions instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.ClassificationModelOptions;
Decodes a ClassificationModelOptions message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClassificationModelOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.ClassificationModelOptions;
Decodes a ClassificationModelOptions message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClassificationModelOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IClassificationModelOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassificationModelOptions message. Does not implicitly verify messages.
Parameter message
ClassificationModelOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IClassificationModelOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassificationModelOptions message, length delimited. Does not implicitly verify messages.
Parameter message
ClassificationModelOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.ClassificationModelOptions;
Creates a ClassificationModelOptions message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClassificationModelOptions
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClassificationModelOptions
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClassificationModelOptions to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.ClassificationModelOptions, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClassificationModelOptions message. Also converts values to other types if specified.
Parameter message
ClassificationModelOptions
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClassificationModelOptions message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ClassifyTextRequest
class ClassifyTextRequest implements IClassifyTextRequest {}
Represents a ClassifyTextRequest.
constructor
constructor(properties?: IClassifyTextRequest);
Constructs a new ClassifyTextRequest.
Parameter properties
Properties to set
property classificationModelOptions
classificationModelOptions?: IClassificationModelOptions;
ClassifyTextRequest classificationModelOptions.
property document
document?: IDocument;
ClassifyTextRequest document.
method create
static create: ( properties?: google.cloud.language.v1.IClassifyTextRequest) => google.cloud.language.v1.ClassifyTextRequest;
Creates a new ClassifyTextRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
ClassifyTextRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.ClassifyTextRequest;
Decodes a ClassifyTextRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClassifyTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.ClassifyTextRequest;
Decodes a ClassifyTextRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClassifyTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IClassifyTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextRequest message. Does not implicitly verify messages.
Parameter message
ClassifyTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IClassifyTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextRequest message, length delimited. Does not implicitly verify messages.
Parameter message
ClassifyTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.ClassifyTextRequest;
Creates a ClassifyTextRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClassifyTextRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClassifyTextRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClassifyTextRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.ClassifyTextRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClassifyTextRequest message. Also converts values to other types if specified.
Parameter message
ClassifyTextRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClassifyTextRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ClassifyTextResponse
class ClassifyTextResponse implements IClassifyTextResponse {}
Represents a ClassifyTextResponse.
constructor
constructor(properties?: IClassifyTextResponse);
Constructs a new ClassifyTextResponse.
Parameter properties
Properties to set
property categories
categories: IClassificationCategory[];
ClassifyTextResponse categories.
method create
static create: ( properties?: google.cloud.language.v1.IClassifyTextResponse) => google.cloud.language.v1.ClassifyTextResponse;
Creates a new ClassifyTextResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
ClassifyTextResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.ClassifyTextResponse;
Decodes a ClassifyTextResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClassifyTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.ClassifyTextResponse;
Decodes a ClassifyTextResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClassifyTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IClassifyTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextResponse message. Does not implicitly verify messages.
Parameter message
ClassifyTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IClassifyTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextResponse message, length delimited. Does not implicitly verify messages.
Parameter message
ClassifyTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.ClassifyTextResponse;
Creates a ClassifyTextResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClassifyTextResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClassifyTextResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClassifyTextResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.ClassifyTextResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClassifyTextResponse message. Also converts values to other types if specified.
Parameter message
ClassifyTextResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClassifyTextResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class DependencyEdge
class DependencyEdge implements IDependencyEdge {}
Represents a DependencyEdge.
constructor
constructor(properties?: IDependencyEdge);
Constructs a new DependencyEdge.
Parameter properties
Properties to set
property headTokenIndex
headTokenIndex: number;
DependencyEdge headTokenIndex.
property label
label: | 'UNKNOWN' | 'NUMBER' | 'CONJ' | 'DET' | 'NUM' | 'PRT' | 'VOCATIVE' | DependencyEdge.Label | 'ABBREV' | 'ACOMP' | 'ADVCL' | 'ADVMOD' | 'AMOD' | 'APPOS' | 'ATTR' | 'AUX' | 'AUXPASS' | 'CC' | 'CCOMP' | 'CSUBJ' | 'CSUBJPASS' | 'DEP' | 'DISCOURSE' | 'DOBJ' | 'EXPL' | 'GOESWITH' | 'IOBJ' | 'MARK' | 'MWE' | 'MWV' | 'NEG' | 'NN' | 'NPADVMOD' | 'NSUBJ' | 'NSUBJPASS' | 'P' | 'PARATAXIS' | 'PARTMOD' | 'PCOMP' | 'POBJ' | 'POSS' | 'POSTNEG' | 'PRECOMP' | 'PRECONJ' | 'PREDET' | 'PREF' | 'PREP' | 'PRONL' | 'PS' | 'QUANTMOD' | 'RCMOD' | 'RCMODREL' | 'RDROP' | 'REF' | 'REMNANT' | 'REPARANDUM' | 'ROOT' | 'SNUM' | 'SUFF' | 'TMOD' | 'TOPIC' | 'VMOD' | 'XCOMP' | 'SUFFIX' | 'TITLE' | 'ADVPHMOD' | 'AUXCAUS' | 'AUXVV' | 'DTMOD' | 'FOREIGN' | 'KW' | 'LIST' | 'NOMC' | 'NOMCSUBJ' | 'NOMCSUBJPASS' | 'NUMC' | 'COP' | 'DISLOCATED' | 'ASP' | 'GMOD' | 'GOBJ' | 'INFMOD' | 'MES' | 'NCOMP';
DependencyEdge label.
method create
static create: ( properties?: google.cloud.language.v1.IDependencyEdge) => google.cloud.language.v1.DependencyEdge;
Creates a new DependencyEdge instance using the specified properties.
Parameter properties
Properties to set
Returns
DependencyEdge instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.DependencyEdge;
Decodes a DependencyEdge message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
DependencyEdge
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.DependencyEdge;
Decodes a DependencyEdge message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
DependencyEdge
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IDependencyEdge, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified DependencyEdge message. Does not implicitly verify messages.
Parameter message
DependencyEdge message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IDependencyEdge, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified DependencyEdge message, length delimited. Does not implicitly verify messages.
Parameter message
DependencyEdge message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.DependencyEdge;
Creates a DependencyEdge message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
DependencyEdge
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for DependencyEdge
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this DependencyEdge to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.DependencyEdge, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a DependencyEdge message. Also converts values to other types if specified.
Parameter message
DependencyEdge
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a DependencyEdge message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Document
class Document implements IDocument {}
Represents a Document.
constructor
constructor(properties?: IDocument);
Constructs a new Document.
Parameter properties
Properties to set
property content
content?: string;
Document content.
property gcsContentUri
gcsContentUri?: string;
Document gcsContentUri.
property language
language: string;
Document language.
property source
source?: 'content' | 'gcsContentUri';
Document source.
property type
type: Document.Type | 'TYPE_UNSPECIFIED' | 'PLAIN_TEXT' | 'HTML';
Document type.
method create
static create: ( properties?: google.cloud.language.v1.IDocument) => google.cloud.language.v1.Document;
Creates a new Document instance using the specified properties.
Parameter properties
Properties to set
Returns
Document instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.Document;
Decodes a Document message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Document
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.Document;
Decodes a Document message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Document
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IDocument, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Document message. Does not implicitly verify messages.
Parameter message
Document message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IDocument, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Document message, length delimited. Does not implicitly verify messages.
Parameter message
Document message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.Document;
Creates a Document message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Document
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Document
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Document to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.Document, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Document message. Also converts values to other types if specified.
Parameter message
Document
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Document message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Entity
class Entity implements IEntity {}
Represents an Entity.
constructor
constructor(properties?: IEntity);
Constructs a new Entity.
Parameter properties
Properties to set
property mentions
mentions: IEntityMention[];
Entity mentions.
property metadata
metadata: { [k: string]: string };
Entity metadata.
property name
name: string;
Entity name.
property salience
salience: number;
Entity salience.
property sentiment
sentiment?: ISentiment;
Entity sentiment.
property type
type: | Entity.Type | 'UNKNOWN' | 'PERSON' | 'LOCATION' | 'ORGANIZATION' | 'EVENT' | 'WORK_OF_ART' | 'CONSUMER_GOOD' | 'OTHER' | 'PHONE_NUMBER' | 'ADDRESS' | 'DATE' | 'NUMBER' | 'PRICE';
Entity type.
method create
static create: ( properties?: google.cloud.language.v1.IEntity) => google.cloud.language.v1.Entity;
Creates a new Entity instance using the specified properties.
Parameter properties
Properties to set
Returns
Entity instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.Entity;
Decodes an Entity message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Entity
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.Entity;
Decodes an Entity message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Entity
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IEntity, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Entity message. Does not implicitly verify messages.
Parameter message
Entity message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IEntity, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Entity message, length delimited. Does not implicitly verify messages.
Parameter message
Entity message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.Entity;
Creates an Entity message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Entity
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Entity
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Entity to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.Entity, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an Entity message. Also converts values to other types if specified.
Parameter message
Entity
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an Entity message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class EntityMention
class EntityMention implements IEntityMention {}
Represents an EntityMention.
constructor
constructor(properties?: IEntityMention);
Constructs a new EntityMention.
Parameter properties
Properties to set
property sentiment
sentiment?: ISentiment;
EntityMention sentiment.
property text
text?: ITextSpan;
EntityMention text.
property type
type: 'PROPER' | EntityMention.Type | 'TYPE_UNKNOWN' | 'COMMON';
EntityMention type.
method create
static create: ( properties?: google.cloud.language.v1.IEntityMention) => google.cloud.language.v1.EntityMention;
Creates a new EntityMention instance using the specified properties.
Parameter properties
Properties to set
Returns
EntityMention instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.EntityMention;
Decodes an EntityMention message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
EntityMention
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.EntityMention;
Decodes an EntityMention message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
EntityMention
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IEntityMention, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EntityMention message. Does not implicitly verify messages.
Parameter message
EntityMention message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IEntityMention, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EntityMention message, length delimited. Does not implicitly verify messages.
Parameter message
EntityMention message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.EntityMention;
Creates an EntityMention message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
EntityMention
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for EntityMention
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this EntityMention to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.EntityMention, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an EntityMention message. Also converts values to other types if specified.
Parameter message
EntityMention
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an EntityMention message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class LanguageService
class LanguageService extends $protobuf.rpc.Service {}
Represents a LanguageService
constructor
constructor( rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
Constructs a new LanguageService service.
Parameter rpcImpl
RPC implementation
Parameter requestDelimited
Whether requests are length-delimited
Parameter responseDelimited
Whether responses are length-delimited
method analyzeEntities
analyzeEntities: { ( request: google.cloud.language.v1.IAnalyzeEntitiesRequest, callback: google.cloud.language.v1.LanguageService.AnalyzeEntitiesCallback ): void; (request: IAnalyzeEntitiesRequest): Promise<AnalyzeEntitiesResponse>;};
Calls AnalyzeEntities.
Parameter request
AnalyzeEntitiesRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnalyzeEntitiesResponse
Calls AnalyzeEntities.
Parameter request
AnalyzeEntitiesRequest message or plain object
Returns
Promise
method analyzeEntitySentiment
analyzeEntitySentiment: { ( request: google.cloud.language.v1.IAnalyzeEntitySentimentRequest, callback: google.cloud.language.v1.LanguageService.AnalyzeEntitySentimentCallback ): void; ( request: IAnalyzeEntitySentimentRequest ): Promise<AnalyzeEntitySentimentResponse>;};
Calls AnalyzeEntitySentiment.
Parameter request
AnalyzeEntitySentimentRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnalyzeEntitySentimentResponse
Calls AnalyzeEntitySentiment.
Parameter request
AnalyzeEntitySentimentRequest message or plain object
Returns
Promise
method analyzeSentiment
analyzeSentiment: { ( request: google.cloud.language.v1.IAnalyzeSentimentRequest, callback: google.cloud.language.v1.LanguageService.AnalyzeSentimentCallback ): void; (request: IAnalyzeSentimentRequest): Promise<AnalyzeSentimentResponse>;};
Calls AnalyzeSentiment.
Parameter request
AnalyzeSentimentRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnalyzeSentimentResponse
Calls AnalyzeSentiment.
Parameter request
AnalyzeSentimentRequest message or plain object
Returns
Promise
method analyzeSyntax
analyzeSyntax: { ( request: google.cloud.language.v1.IAnalyzeSyntaxRequest, callback: google.cloud.language.v1.LanguageService.AnalyzeSyntaxCallback ): void; (request: IAnalyzeSyntaxRequest): Promise<AnalyzeSyntaxResponse>;};
Calls AnalyzeSyntax.
Parameter request
AnalyzeSyntaxRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnalyzeSyntaxResponse
Calls AnalyzeSyntax.
Parameter request
AnalyzeSyntaxRequest message or plain object
Returns
Promise
method annotateText
annotateText: { ( request: google.cloud.language.v1.IAnnotateTextRequest, callback: google.cloud.language.v1.LanguageService.AnnotateTextCallback ): void; (request: IAnnotateTextRequest): Promise<AnnotateTextResponse>;};
Calls AnnotateText.
Parameter request
AnnotateTextRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnnotateTextResponse
Calls AnnotateText.
Parameter request
AnnotateTextRequest message or plain object
Returns
Promise
method classifyText
classifyText: { ( request: google.cloud.language.v1.IClassifyTextRequest, callback: google.cloud.language.v1.LanguageService.ClassifyTextCallback ): void; (request: IClassifyTextRequest): Promise<ClassifyTextResponse>;};
Calls ClassifyText.
Parameter request
ClassifyTextRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and ClassifyTextResponse
Calls ClassifyText.
Parameter request
ClassifyTextRequest message or plain object
Returns
Promise
method create
static create: ( rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean) => LanguageService;
Creates new LanguageService service using the specified rpc implementation.
Parameter rpcImpl
RPC implementation
Parameter requestDelimited
Whether requests are length-delimited
Parameter responseDelimited
Whether responses are length-delimited
Returns
RPC service. Useful where requests and/or responses are streamed.
method moderateText
moderateText: { ( request: google.cloud.language.v1.IModerateTextRequest, callback: google.cloud.language.v1.LanguageService.ModerateTextCallback ): void; (request: IModerateTextRequest): Promise<ModerateTextResponse>;};
Calls ModerateText.
Parameter request
ModerateTextRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and ModerateTextResponse
Calls ModerateText.
Parameter request
ModerateTextRequest message or plain object
Returns
Promise
class ModerateTextRequest
class ModerateTextRequest implements IModerateTextRequest {}
Represents a ModerateTextRequest.
constructor
constructor(properties?: IModerateTextRequest);
Constructs a new ModerateTextRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
ModerateTextRequest document.
method create
static create: ( properties?: google.cloud.language.v1.IModerateTextRequest) => google.cloud.language.v1.ModerateTextRequest;
Creates a new ModerateTextRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
ModerateTextRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.ModerateTextRequest;
Decodes a ModerateTextRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ModerateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.ModerateTextRequest;
Decodes a ModerateTextRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ModerateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IModerateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextRequest message. Does not implicitly verify messages.
Parameter message
ModerateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IModerateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextRequest message, length delimited. Does not implicitly verify messages.
Parameter message
ModerateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.ModerateTextRequest;
Creates a ModerateTextRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ModerateTextRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ModerateTextRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ModerateTextRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.ModerateTextRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ModerateTextRequest message. Also converts values to other types if specified.
Parameter message
ModerateTextRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ModerateTextRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ModerateTextResponse
class ModerateTextResponse implements IModerateTextResponse {}
Represents a ModerateTextResponse.
constructor
constructor(properties?: IModerateTextResponse);
Constructs a new ModerateTextResponse.
Parameter properties
Properties to set
property moderationCategories
moderationCategories: IClassificationCategory[];
ModerateTextResponse moderationCategories.
method create
static create: ( properties?: google.cloud.language.v1.IModerateTextResponse) => google.cloud.language.v1.ModerateTextResponse;
Creates a new ModerateTextResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
ModerateTextResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.ModerateTextResponse;
Decodes a ModerateTextResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ModerateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.ModerateTextResponse;
Decodes a ModerateTextResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ModerateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IModerateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextResponse message. Does not implicitly verify messages.
Parameter message
ModerateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IModerateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextResponse message, length delimited. Does not implicitly verify messages.
Parameter message
ModerateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.ModerateTextResponse;
Creates a ModerateTextResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ModerateTextResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ModerateTextResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ModerateTextResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.ModerateTextResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ModerateTextResponse message. Also converts values to other types if specified.
Parameter message
ModerateTextResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ModerateTextResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class PartOfSpeech
class PartOfSpeech implements IPartOfSpeech {}
Represents a PartOfSpeech.
constructor
constructor(properties?: IPartOfSpeech);
Constructs a new PartOfSpeech.
Parameter properties
Properties to set
property aspect
aspect: | PartOfSpeech.Aspect | 'ASPECT_UNKNOWN' | 'PERFECTIVE' | 'IMPERFECTIVE' | 'PROGRESSIVE';
PartOfSpeech aspect.
property case
case: | PartOfSpeech.Case | 'CASE_UNKNOWN' | 'ACCUSATIVE' | 'ADVERBIAL' | 'COMPLEMENTIVE' | 'DATIVE' | 'GENITIVE' | 'INSTRUMENTAL' | 'LOCATIVE' | 'NOMINATIVE' | 'OBLIQUE' | 'PARTITIVE' | 'PREPOSITIONAL' | 'REFLEXIVE_CASE' | 'RELATIVE_CASE' | 'VOCATIVE';
PartOfSpeech case.
property form
form: | PartOfSpeech.Form | 'FORM_UNKNOWN' | 'ADNOMIAL' | 'AUXILIARY' | 'COMPLEMENTIZER' | 'FINAL_ENDING' | 'GERUND' | 'REALIS' | 'IRREALIS' | 'SHORT' | 'LONG' | 'ORDER' | 'SPECIFIC';
PartOfSpeech form.
property gender
gender: | PartOfSpeech.Gender | 'GENDER_UNKNOWN' | 'FEMININE' | 'MASCULINE' | 'NEUTER';
PartOfSpeech gender.
property mood
mood: | PartOfSpeech.Mood | 'MOOD_UNKNOWN' | 'CONDITIONAL_MOOD' | 'IMPERATIVE' | 'INDICATIVE' | 'INTERROGATIVE' | 'JUSSIVE' | 'SUBJUNCTIVE';
PartOfSpeech mood.
property number
number: PartOfSpeech.Number | 'NUMBER_UNKNOWN' | 'SINGULAR' | 'PLURAL' | 'DUAL';
PartOfSpeech number.
property person
person: | PartOfSpeech.Person | 'PERSON_UNKNOWN' | 'FIRST' | 'SECOND' | 'THIRD' | 'REFLEXIVE_PERSON';
PartOfSpeech person.
property proper
proper: PartOfSpeech.Proper | 'PROPER_UNKNOWN' | 'PROPER' | 'NOT_PROPER';
PartOfSpeech proper.
property reciprocity
reciprocity: | PartOfSpeech.Reciprocity | 'RECIPROCITY_UNKNOWN' | 'RECIPROCAL' | 'NON_RECIPROCAL';
PartOfSpeech reciprocity.
property tag
tag: | 'UNKNOWN' | PartOfSpeech.Tag | 'ADJ' | 'ADP' | 'ADV' | 'CONJ' | 'DET' | 'NOUN' | 'NUM' | 'PRON' | 'PRT' | 'PUNCT' | 'VERB' | 'X' | 'AFFIX';
PartOfSpeech tag.
property tense
tense: | PartOfSpeech.Tense | 'TENSE_UNKNOWN' | 'CONDITIONAL_TENSE' | 'FUTURE' | 'PAST' | 'PRESENT' | 'IMPERFECT' | 'PLUPERFECT';
PartOfSpeech tense.
property voice
voice: PartOfSpeech.Voice | 'VOICE_UNKNOWN' | 'ACTIVE' | 'CAUSATIVE' | 'PASSIVE';
PartOfSpeech voice.
method create
static create: ( properties?: google.cloud.language.v1.IPartOfSpeech) => google.cloud.language.v1.PartOfSpeech;
Creates a new PartOfSpeech instance using the specified properties.
Parameter properties
Properties to set
Returns
PartOfSpeech instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.PartOfSpeech;
Decodes a PartOfSpeech message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
PartOfSpeech
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.PartOfSpeech;
Decodes a PartOfSpeech message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
PartOfSpeech
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IPartOfSpeech, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified PartOfSpeech message. Does not implicitly verify messages.
Parameter message
PartOfSpeech message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IPartOfSpeech, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified PartOfSpeech message, length delimited. Does not implicitly verify messages.
Parameter message
PartOfSpeech message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.PartOfSpeech;
Creates a PartOfSpeech message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
PartOfSpeech
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for PartOfSpeech
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this PartOfSpeech to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.PartOfSpeech, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a PartOfSpeech message. Also converts values to other types if specified.
Parameter message
PartOfSpeech
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a PartOfSpeech message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Sentence
class Sentence implements ISentence {}
Represents a Sentence.
constructor
constructor(properties?: ISentence);
Constructs a new Sentence.
Parameter properties
Properties to set
property sentiment
sentiment?: ISentiment;
Sentence sentiment.
property text
text?: ITextSpan;
Sentence text.
method create
static create: ( properties?: google.cloud.language.v1.ISentence) => google.cloud.language.v1.Sentence;
Creates a new Sentence instance using the specified properties.
Parameter properties
Properties to set
Returns
Sentence instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.Sentence;
Decodes a Sentence message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Sentence
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.Sentence;
Decodes a Sentence message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Sentence
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.ISentence, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentence message. Does not implicitly verify messages.
Parameter message
Sentence message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.ISentence, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentence message, length delimited. Does not implicitly verify messages.
Parameter message
Sentence message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.Sentence;
Creates a Sentence message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Sentence
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Sentence
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Sentence to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.Sentence, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Sentence message. Also converts values to other types if specified.
Parameter message
Sentence
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Sentence message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Sentiment
class Sentiment implements ISentiment {}
Represents a Sentiment.
constructor
constructor(properties?: ISentiment);
Constructs a new Sentiment.
Parameter properties
Properties to set
property magnitude
magnitude: number;
Sentiment magnitude.
property score
score: number;
Sentiment score.
method create
static create: ( properties?: google.cloud.language.v1.ISentiment) => google.cloud.language.v1.Sentiment;
Creates a new Sentiment instance using the specified properties.
Parameter properties
Properties to set
Returns
Sentiment instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.Sentiment;
Decodes a Sentiment message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Sentiment
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.Sentiment;
Decodes a Sentiment message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Sentiment
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.ISentiment, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentiment message. Does not implicitly verify messages.
Parameter message
Sentiment message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.ISentiment, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentiment message, length delimited. Does not implicitly verify messages.
Parameter message
Sentiment message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.Sentiment;
Creates a Sentiment message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Sentiment
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Sentiment
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Sentiment to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.Sentiment, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Sentiment message. Also converts values to other types if specified.
Parameter message
Sentiment
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Sentiment message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class TextSpan
class TextSpan implements ITextSpan {}
Represents a TextSpan.
constructor
constructor(properties?: ITextSpan);
Constructs a new TextSpan.
Parameter properties
Properties to set
property beginOffset
beginOffset: number;
TextSpan beginOffset.
property content
content: string;
TextSpan content.
method create
static create: ( properties?: google.cloud.language.v1.ITextSpan) => google.cloud.language.v1.TextSpan;
Creates a new TextSpan instance using the specified properties.
Parameter properties
Properties to set
Returns
TextSpan instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.TextSpan;
Decodes a TextSpan message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
TextSpan
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.TextSpan;
Decodes a TextSpan message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
TextSpan
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.ITextSpan, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified TextSpan message. Does not implicitly verify messages.
Parameter message
TextSpan message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.ITextSpan, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified TextSpan message, length delimited. Does not implicitly verify messages.
Parameter message
TextSpan message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.TextSpan;
Creates a TextSpan message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
TextSpan
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for TextSpan
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this TextSpan to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.TextSpan, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a TextSpan message. Also converts values to other types if specified.
Parameter message
TextSpan
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a TextSpan message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Token
class Token implements IToken {}
Represents a Token.
constructor
constructor(properties?: IToken);
Constructs a new Token.
Parameter properties
Properties to set
property dependencyEdge
dependencyEdge?: IDependencyEdge;
Token dependencyEdge.
property lemma
lemma: string;
Token lemma.
property partOfSpeech
partOfSpeech?: IPartOfSpeech;
Token partOfSpeech.
property text
text?: ITextSpan;
Token text.
method create
static create: ( properties?: google.cloud.language.v1.IToken) => google.cloud.language.v1.Token;
Creates a new Token instance using the specified properties.
Parameter properties
Properties to set
Returns
Token instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1.Token;
Decodes a Token message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Token
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1.Token;
Decodes a Token message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Token
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1.IToken, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Token message. Does not implicitly verify messages.
Parameter message
Token message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1.IToken, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Token message, length delimited. Does not implicitly verify messages.
Parameter message
Token message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1.Token;
Creates a Token message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Token
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Token
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Token to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1.Token, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Token message. Also converts values to other types if specified.
Parameter message
Token
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Token message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface IAnalyzeEntitiesRequest
interface IAnalyzeEntitiesRequest {}
Properties of an AnalyzeEntitiesRequest.
property document
document?: google.cloud.language.v1.IDocument | null;
AnalyzeEntitiesRequest document
property encodingType
encodingType?: | google.cloud.language.v1.EncodingType | keyof typeof google.cloud.language.v1.EncodingType | null;
AnalyzeEntitiesRequest encodingType
interface IAnalyzeEntitiesResponse
interface IAnalyzeEntitiesResponse {}
Properties of an AnalyzeEntitiesResponse.
interface IAnalyzeEntitySentimentRequest
interface IAnalyzeEntitySentimentRequest {}
Properties of an AnalyzeEntitySentimentRequest.
property document
document?: google.cloud.language.v1.IDocument | null;
AnalyzeEntitySentimentRequest document
property encodingType
encodingType?: | google.cloud.language.v1.EncodingType | keyof typeof google.cloud.language.v1.EncodingType | null;
AnalyzeEntitySentimentRequest encodingType
interface IAnalyzeEntitySentimentResponse
interface IAnalyzeEntitySentimentResponse {}
Properties of an AnalyzeEntitySentimentResponse.
interface IAnalyzeSentimentRequest
interface IAnalyzeSentimentRequest {}
Properties of an AnalyzeSentimentRequest.
property document
document?: google.cloud.language.v1.IDocument | null;
AnalyzeSentimentRequest document
property encodingType
encodingType?: | google.cloud.language.v1.EncodingType | keyof typeof google.cloud.language.v1.EncodingType | null;
AnalyzeSentimentRequest encodingType
interface IAnalyzeSentimentResponse
interface IAnalyzeSentimentResponse {}
Properties of an AnalyzeSentimentResponse.
property documentSentiment
documentSentiment?: google.cloud.language.v1.ISentiment | null;
AnalyzeSentimentResponse documentSentiment
property language
language?: string | null;
AnalyzeSentimentResponse language
property sentences
sentences?: google.cloud.language.v1.ISentence[] | null;
AnalyzeSentimentResponse sentences
interface IAnalyzeSyntaxRequest
interface IAnalyzeSyntaxRequest {}
Properties of an AnalyzeSyntaxRequest.
property document
document?: google.cloud.language.v1.IDocument | null;
AnalyzeSyntaxRequest document
property encodingType
encodingType?: | google.cloud.language.v1.EncodingType | keyof typeof google.cloud.language.v1.EncodingType | null;
AnalyzeSyntaxRequest encodingType
interface IAnalyzeSyntaxResponse
interface IAnalyzeSyntaxResponse {}
Properties of an AnalyzeSyntaxResponse.
interface IAnnotateTextRequest
interface IAnnotateTextRequest {}
Properties of an AnnotateTextRequest.
property document
document?: google.cloud.language.v1.IDocument | null;
AnnotateTextRequest document
property encodingType
encodingType?: | google.cloud.language.v1.EncodingType | keyof typeof google.cloud.language.v1.EncodingType | null;
AnnotateTextRequest encodingType
property features
features?: google.cloud.language.v1.AnnotateTextRequest.IFeatures | null;
AnnotateTextRequest features
interface IAnnotateTextResponse
interface IAnnotateTextResponse {}
Properties of an AnnotateTextResponse.
property categories
categories?: google.cloud.language.v1.IClassificationCategory[] | null;
AnnotateTextResponse categories
property documentSentiment
documentSentiment?: google.cloud.language.v1.ISentiment | null;
AnnotateTextResponse documentSentiment
property entities
entities?: google.cloud.language.v1.IEntity[] | null;
AnnotateTextResponse entities
property language
language?: string | null;
AnnotateTextResponse language
property moderationCategories
moderationCategories?: google.cloud.language.v1.IClassificationCategory[] | null;
AnnotateTextResponse moderationCategories
property sentences
sentences?: google.cloud.language.v1.ISentence[] | null;
AnnotateTextResponse sentences
property tokens
tokens?: google.cloud.language.v1.IToken[] | null;
AnnotateTextResponse tokens
interface IClassificationCategory
interface IClassificationCategory {}
Properties of a ClassificationCategory.
property confidence
confidence?: number | null;
ClassificationCategory confidence
property name
name?: string | null;
ClassificationCategory name
interface IClassificationModelOptions
interface IClassificationModelOptions {}
Properties of a ClassificationModelOptions.
interface IClassifyTextRequest
interface IClassifyTextRequest {}
Properties of a ClassifyTextRequest.
property classificationModelOptions
classificationModelOptions?: google.cloud.language.v1.IClassificationModelOptions | null;
ClassifyTextRequest classificationModelOptions
property document
document?: google.cloud.language.v1.IDocument | null;
ClassifyTextRequest document
interface IClassifyTextResponse
interface IClassifyTextResponse {}
Properties of a ClassifyTextResponse.
property categories
categories?: google.cloud.language.v1.IClassificationCategory[] | null;
ClassifyTextResponse categories
interface IDependencyEdge
interface IDependencyEdge {}
Properties of a DependencyEdge.
property headTokenIndex
headTokenIndex?: number | null;
DependencyEdge headTokenIndex
property label
label?: | google.cloud.language.v1.DependencyEdge.Label | keyof typeof google.cloud.language.v1.DependencyEdge.Label | null;
DependencyEdge label
interface IDocument
interface IDocument {}
Properties of a Document.
property content
content?: string | null;
Document content
property gcsContentUri
gcsContentUri?: string | null;
Document gcsContentUri
property language
language?: string | null;
Document language
property type
type?: | google.cloud.language.v1.Document.Type | keyof typeof google.cloud.language.v1.Document.Type | null;
Document type
interface IEntity
interface IEntity {}
Properties of an Entity.
property mentions
mentions?: google.cloud.language.v1.IEntityMention[] | null;
Entity mentions
property metadata
metadata?: { [k: string]: string } | null;
Entity metadata
property name
name?: string | null;
Entity name
property salience
salience?: number | null;
Entity salience
property sentiment
sentiment?: google.cloud.language.v1.ISentiment | null;
Entity sentiment
property type
type?: | google.cloud.language.v1.Entity.Type | keyof typeof google.cloud.language.v1.Entity.Type | null;
Entity type
interface IEntityMention
interface IEntityMention {}
Properties of an EntityMention.
property sentiment
sentiment?: google.cloud.language.v1.ISentiment | null;
EntityMention sentiment
property text
text?: google.cloud.language.v1.ITextSpan | null;
EntityMention text
property type
type?: | google.cloud.language.v1.EntityMention.Type | keyof typeof google.cloud.language.v1.EntityMention.Type | null;
EntityMention type
interface IModerateTextRequest
interface IModerateTextRequest {}
Properties of a ModerateTextRequest.
property document
document?: google.cloud.language.v1.IDocument | null;
ModerateTextRequest document
interface IModerateTextResponse
interface IModerateTextResponse {}
Properties of a ModerateTextResponse.
property moderationCategories
moderationCategories?: google.cloud.language.v1.IClassificationCategory[] | null;
ModerateTextResponse moderationCategories
interface IPartOfSpeech
interface IPartOfSpeech {}
Properties of a PartOfSpeech.
property "case"
case?: | google.cloud.language.v1.PartOfSpeech.Case | keyof typeof google.cloud.language.v1.PartOfSpeech.Case | null;
PartOfSpeech case
property aspect
aspect?: | google.cloud.language.v1.PartOfSpeech.Aspect | keyof typeof google.cloud.language.v1.PartOfSpeech.Aspect | null;
PartOfSpeech aspect
property form
form?: | google.cloud.language.v1.PartOfSpeech.Form | keyof typeof google.cloud.language.v1.PartOfSpeech.Form | null;
PartOfSpeech form
property gender
gender?: | google.cloud.language.v1.PartOfSpeech.Gender | keyof typeof google.cloud.language.v1.PartOfSpeech.Gender | null;
PartOfSpeech gender
property mood
mood?: | google.cloud.language.v1.PartOfSpeech.Mood | keyof typeof google.cloud.language.v1.PartOfSpeech.Mood | null;
PartOfSpeech mood
property number
number?: | google.cloud.language.v1.PartOfSpeech.Number | keyof typeof google.cloud.language.v1.PartOfSpeech.Number | null;
PartOfSpeech number
property person
person?: | google.cloud.language.v1.PartOfSpeech.Person | keyof typeof google.cloud.language.v1.PartOfSpeech.Person | null;
PartOfSpeech person
property proper
proper?: | google.cloud.language.v1.PartOfSpeech.Proper | keyof typeof google.cloud.language.v1.PartOfSpeech.Proper | null;
PartOfSpeech proper
property reciprocity
reciprocity?: | google.cloud.language.v1.PartOfSpeech.Reciprocity | keyof typeof google.cloud.language.v1.PartOfSpeech.Reciprocity | null;
PartOfSpeech reciprocity
property tag
tag?: | google.cloud.language.v1.PartOfSpeech.Tag | keyof typeof google.cloud.language.v1.PartOfSpeech.Tag | null;
PartOfSpeech tag
property tense
tense?: | google.cloud.language.v1.PartOfSpeech.Tense | keyof typeof google.cloud.language.v1.PartOfSpeech.Tense | null;
PartOfSpeech tense
property voice
voice?: | google.cloud.language.v1.PartOfSpeech.Voice | keyof typeof google.cloud.language.v1.PartOfSpeech.Voice | null;
PartOfSpeech voice
interface ISentence
interface ISentence {}
Properties of a Sentence.
interface ISentiment
interface ISentiment {}
Properties of a Sentiment.
interface ITextSpan
interface ITextSpan {}
Properties of a TextSpan.
property beginOffset
beginOffset?: number | null;
TextSpan beginOffset
property content
content?: string | null;
TextSpan content
interface IToken
interface IToken {}
Properties of a Token.
property dependencyEdge
dependencyEdge?: google.cloud.language.v1.IDependencyEdge | null;
Token dependencyEdge
property lemma
lemma?: string | null;
Token lemma
property partOfSpeech
partOfSpeech?: google.cloud.language.v1.IPartOfSpeech | null;
Token partOfSpeech
property text
text?: google.cloud.language.v1.ITextSpan | null;
Token text
enum EncodingType
enum EncodingType { NONE = 0, UTF8 = 1, UTF16 = 2, UTF32 = 3,}
EncodingType enum.
namespace protos.google.cloud.language.v1beta2
namespace protos.google.cloud.language.v1beta2 {}
Namespace v1beta2.
class AnalyzeEntitiesRequest
class AnalyzeEntitiesRequest implements IAnalyzeEntitiesRequest {}
Represents an AnalyzeEntitiesRequest.
constructor
constructor(properties?: IAnalyzeEntitiesRequest);
Constructs a new AnalyzeEntitiesRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnalyzeEntitiesRequest document.
property encodingType
encodingType: 'NONE' | 'UTF8' | 'UTF16' | 'UTF32' | EncodingType;
AnalyzeEntitiesRequest encodingType.
method create
static create: ( properties?: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest) => google.cloud.language.v1beta2.AnalyzeEntitiesRequest;
Creates a new AnalyzeEntitiesRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeEntitiesRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.AnalyzeEntitiesRequest;
Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeEntitiesRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.AnalyzeEntitiesRequest;
Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeEntitiesRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesRequest message. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.AnalyzeEntitiesRequest;
Creates an AnalyzeEntitiesRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeEntitiesRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeEntitiesRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeEntitiesRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.AnalyzeEntitiesRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeEntitiesRequest message. Also converts values to other types if specified.
Parameter message
AnalyzeEntitiesRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeEntitiesRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeEntitiesResponse
class AnalyzeEntitiesResponse implements IAnalyzeEntitiesResponse {}
Represents an AnalyzeEntitiesResponse.
constructor
constructor(properties?: IAnalyzeEntitiesResponse);
Constructs a new AnalyzeEntitiesResponse.
Parameter properties
Properties to set
property entities
entities: IEntity[];
AnalyzeEntitiesResponse entities.
property language
language: string;
AnalyzeEntitiesResponse language.
method create
static create: ( properties?: google.cloud.language.v1beta2.IAnalyzeEntitiesResponse) => google.cloud.language.v1beta2.AnalyzeEntitiesResponse;
Creates a new AnalyzeEntitiesResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeEntitiesResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.AnalyzeEntitiesResponse;
Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeEntitiesResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.AnalyzeEntitiesResponse;
Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeEntitiesResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesResponse message. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.AnalyzeEntitiesResponse;
Creates an AnalyzeEntitiesResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeEntitiesResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeEntitiesResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeEntitiesResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.AnalyzeEntitiesResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeEntitiesResponse message. Also converts values to other types if specified.
Parameter message
AnalyzeEntitiesResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeEntitiesResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeEntitySentimentRequest
class AnalyzeEntitySentimentRequest implements IAnalyzeEntitySentimentRequest {}
Represents an AnalyzeEntitySentimentRequest.
constructor
constructor(properties?: IAnalyzeEntitySentimentRequest);
Constructs a new AnalyzeEntitySentimentRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnalyzeEntitySentimentRequest document.
property encodingType
encodingType: 'NONE' | 'UTF8' | 'UTF16' | 'UTF32' | EncodingType;
AnalyzeEntitySentimentRequest encodingType.
method create
static create: ( properties?: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest) => google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest;
Creates a new AnalyzeEntitySentimentRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeEntitySentimentRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest;
Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeEntitySentimentRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest;
Decodes an AnalyzeEntitySentimentRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeEntitySentimentRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitySentimentRequest message. Does not implicitly verify messages.
Parameter message
AnalyzeEntitySentimentRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitySentimentRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeEntitySentimentRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest;
Creates an AnalyzeEntitySentimentRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeEntitySentimentRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeEntitySentimentRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeEntitySentimentRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.AnalyzeEntitySentimentRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeEntitySentimentRequest message. Also converts values to other types if specified.
Parameter message
AnalyzeEntitySentimentRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeEntitySentimentRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeEntitySentimentResponse
class AnalyzeEntitySentimentResponse implements IAnalyzeEntitySentimentResponse {}
Represents an AnalyzeEntitySentimentResponse.
constructor
constructor(properties?: IAnalyzeEntitySentimentResponse);
Constructs a new AnalyzeEntitySentimentResponse.
Parameter properties
Properties to set
property entities
entities: IEntity[];
AnalyzeEntitySentimentResponse entities.
property language
language: string;
AnalyzeEntitySentimentResponse language.
method create
static create: ( properties?: google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse) => google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse;
Creates a new AnalyzeEntitySentimentResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeEntitySentimentResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse;
Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeEntitySentimentResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse;
Decodes an AnalyzeEntitySentimentResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeEntitySentimentResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitySentimentResponse message. Does not implicitly verify messages.
Parameter message
AnalyzeEntitySentimentResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitySentimentResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeEntitySentimentResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse;
Creates an AnalyzeEntitySentimentResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeEntitySentimentResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeEntitySentimentResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeEntitySentimentResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.AnalyzeEntitySentimentResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeEntitySentimentResponse message. Also converts values to other types if specified.
Parameter message
AnalyzeEntitySentimentResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeEntitySentimentResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeSentimentRequest
class AnalyzeSentimentRequest implements IAnalyzeSentimentRequest {}
Represents an AnalyzeSentimentRequest.
constructor
constructor(properties?: IAnalyzeSentimentRequest);
Constructs a new AnalyzeSentimentRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnalyzeSentimentRequest document.
property encodingType
encodingType: 'NONE' | 'UTF8' | 'UTF16' | 'UTF32' | EncodingType;
AnalyzeSentimentRequest encodingType.
method create
static create: ( properties?: google.cloud.language.v1beta2.IAnalyzeSentimentRequest) => google.cloud.language.v1beta2.AnalyzeSentimentRequest;
Creates a new AnalyzeSentimentRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeSentimentRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.AnalyzeSentimentRequest;
Decodes an AnalyzeSentimentRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeSentimentRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.AnalyzeSentimentRequest;
Decodes an AnalyzeSentimentRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeSentimentRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IAnalyzeSentimentRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentRequest message. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IAnalyzeSentimentRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.AnalyzeSentimentRequest;
Creates an AnalyzeSentimentRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeSentimentRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeSentimentRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeSentimentRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.AnalyzeSentimentRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeSentimentRequest message. Also converts values to other types if specified.
Parameter message
AnalyzeSentimentRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeSentimentRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeSentimentResponse
class AnalyzeSentimentResponse implements IAnalyzeSentimentResponse {}
Represents an AnalyzeSentimentResponse.
constructor
constructor(properties?: IAnalyzeSentimentResponse);
Constructs a new AnalyzeSentimentResponse.
Parameter properties
Properties to set
property documentSentiment
documentSentiment?: ISentiment;
AnalyzeSentimentResponse documentSentiment.
property language
language: string;
AnalyzeSentimentResponse language.
property sentences
sentences: ISentence[];
AnalyzeSentimentResponse sentences.
method create
static create: ( properties?: google.cloud.language.v1beta2.IAnalyzeSentimentResponse) => google.cloud.language.v1beta2.AnalyzeSentimentResponse;
Creates a new AnalyzeSentimentResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeSentimentResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.AnalyzeSentimentResponse;
Decodes an AnalyzeSentimentResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeSentimentResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.AnalyzeSentimentResponse;
Decodes an AnalyzeSentimentResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeSentimentResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IAnalyzeSentimentResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentResponse message. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IAnalyzeSentimentResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.AnalyzeSentimentResponse;
Creates an AnalyzeSentimentResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeSentimentResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeSentimentResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeSentimentResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.AnalyzeSentimentResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeSentimentResponse message. Also converts values to other types if specified.
Parameter message
AnalyzeSentimentResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeSentimentResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeSyntaxRequest
class AnalyzeSyntaxRequest implements IAnalyzeSyntaxRequest {}
Represents an AnalyzeSyntaxRequest.
constructor
constructor(properties?: IAnalyzeSyntaxRequest);
Constructs a new AnalyzeSyntaxRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnalyzeSyntaxRequest document.
property encodingType
encodingType: 'NONE' | 'UTF8' | 'UTF16' | 'UTF32' | EncodingType;
AnalyzeSyntaxRequest encodingType.
method create
static create: ( properties?: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest) => google.cloud.language.v1beta2.AnalyzeSyntaxRequest;
Creates a new AnalyzeSyntaxRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeSyntaxRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.AnalyzeSyntaxRequest;
Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeSyntaxRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.AnalyzeSyntaxRequest;
Decodes an AnalyzeSyntaxRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeSyntaxRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSyntaxRequest message. Does not implicitly verify messages.
Parameter message
AnalyzeSyntaxRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSyntaxRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeSyntaxRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.AnalyzeSyntaxRequest;
Creates an AnalyzeSyntaxRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeSyntaxRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeSyntaxRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeSyntaxRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.AnalyzeSyntaxRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeSyntaxRequest message. Also converts values to other types if specified.
Parameter message
AnalyzeSyntaxRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeSyntaxRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeSyntaxResponse
class AnalyzeSyntaxResponse implements IAnalyzeSyntaxResponse {}
Represents an AnalyzeSyntaxResponse.
constructor
constructor(properties?: IAnalyzeSyntaxResponse);
Constructs a new AnalyzeSyntaxResponse.
Parameter properties
Properties to set
property language
language: string;
AnalyzeSyntaxResponse language.
property sentences
sentences: ISentence[];
AnalyzeSyntaxResponse sentences.
property tokens
tokens: IToken[];
AnalyzeSyntaxResponse tokens.
method create
static create: ( properties?: google.cloud.language.v1beta2.IAnalyzeSyntaxResponse) => google.cloud.language.v1beta2.AnalyzeSyntaxResponse;
Creates a new AnalyzeSyntaxResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeSyntaxResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.AnalyzeSyntaxResponse;
Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeSyntaxResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.AnalyzeSyntaxResponse;
Decodes an AnalyzeSyntaxResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeSyntaxResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSyntaxResponse message. Does not implicitly verify messages.
Parameter message
AnalyzeSyntaxResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSyntaxResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeSyntaxResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.AnalyzeSyntaxResponse;
Creates an AnalyzeSyntaxResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeSyntaxResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeSyntaxResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeSyntaxResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.AnalyzeSyntaxResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeSyntaxResponse message. Also converts values to other types if specified.
Parameter message
AnalyzeSyntaxResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeSyntaxResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnnotateTextRequest
class AnnotateTextRequest implements IAnnotateTextRequest {}
Represents an AnnotateTextRequest.
constructor
constructor(properties?: IAnnotateTextRequest);
Constructs a new AnnotateTextRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnnotateTextRequest document.
property encodingType
encodingType: 'NONE' | 'UTF8' | 'UTF16' | 'UTF32' | EncodingType;
AnnotateTextRequest encodingType.
property features
features?: AnnotateTextRequest.IFeatures;
AnnotateTextRequest features.
method create
static create: ( properties?: google.cloud.language.v1beta2.IAnnotateTextRequest) => google.cloud.language.v1beta2.AnnotateTextRequest;
Creates a new AnnotateTextRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnnotateTextRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.AnnotateTextRequest;
Decodes an AnnotateTextRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnnotateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.AnnotateTextRequest;
Decodes an AnnotateTextRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnnotateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IAnnotateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextRequest message. Does not implicitly verify messages.
Parameter message
AnnotateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IAnnotateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnnotateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.AnnotateTextRequest;
Creates an AnnotateTextRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnnotateTextRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnnotateTextRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnnotateTextRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.AnnotateTextRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnnotateTextRequest message. Also converts values to other types if specified.
Parameter message
AnnotateTextRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnnotateTextRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnnotateTextResponse
class AnnotateTextResponse implements IAnnotateTextResponse {}
Represents an AnnotateTextResponse.
constructor
constructor(properties?: IAnnotateTextResponse);
Constructs a new AnnotateTextResponse.
Parameter properties
Properties to set
property categories
categories: IClassificationCategory[];
AnnotateTextResponse categories.
property documentSentiment
documentSentiment?: ISentiment;
AnnotateTextResponse documentSentiment.
property entities
entities: IEntity[];
AnnotateTextResponse entities.
property language
language: string;
AnnotateTextResponse language.
property moderationCategories
moderationCategories: IClassificationCategory[];
AnnotateTextResponse moderationCategories.
property sentences
sentences: ISentence[];
AnnotateTextResponse sentences.
property tokens
tokens: IToken[];
AnnotateTextResponse tokens.
method create
static create: ( properties?: google.cloud.language.v1beta2.IAnnotateTextResponse) => google.cloud.language.v1beta2.AnnotateTextResponse;
Creates a new AnnotateTextResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnnotateTextResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.AnnotateTextResponse;
Decodes an AnnotateTextResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnnotateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.AnnotateTextResponse;
Decodes an AnnotateTextResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnnotateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IAnnotateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextResponse message. Does not implicitly verify messages.
Parameter message
AnnotateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IAnnotateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnnotateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.AnnotateTextResponse;
Creates an AnnotateTextResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnnotateTextResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnnotateTextResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnnotateTextResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.AnnotateTextResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnnotateTextResponse message. Also converts values to other types if specified.
Parameter message
AnnotateTextResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnnotateTextResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ClassificationCategory
class ClassificationCategory implements IClassificationCategory {}
Represents a ClassificationCategory.
constructor
constructor(properties?: IClassificationCategory);
Constructs a new ClassificationCategory.
Parameter properties
Properties to set
property confidence
confidence: number;
ClassificationCategory confidence.
property name
name: string;
ClassificationCategory name.
method create
static create: ( properties?: google.cloud.language.v1beta2.IClassificationCategory) => google.cloud.language.v1beta2.ClassificationCategory;
Creates a new ClassificationCategory instance using the specified properties.
Parameter properties
Properties to set
Returns
ClassificationCategory instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.ClassificationCategory;
Decodes a ClassificationCategory message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClassificationCategory
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.ClassificationCategory;
Decodes a ClassificationCategory message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClassificationCategory
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IClassificationCategory, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassificationCategory message. Does not implicitly verify messages.
Parameter message
ClassificationCategory message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IClassificationCategory, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassificationCategory message, length delimited. Does not implicitly verify messages.
Parameter message
ClassificationCategory message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.ClassificationCategory;
Creates a ClassificationCategory message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClassificationCategory
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClassificationCategory
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClassificationCategory to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.ClassificationCategory, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClassificationCategory message. Also converts values to other types if specified.
Parameter message
ClassificationCategory
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClassificationCategory message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ClassificationModelOptions
class ClassificationModelOptions implements IClassificationModelOptions {}
Represents a ClassificationModelOptions.
constructor
constructor(properties?: IClassificationModelOptions);
Constructs a new ClassificationModelOptions.
Parameter properties
Properties to set
property modelType
modelType?: 'v1Model' | 'v2Model';
ClassificationModelOptions modelType.
property v1Model
v1Model?: ClassificationModelOptions.IV1Model;
ClassificationModelOptions v1Model.
property v2Model
v2Model?: ClassificationModelOptions.IV2Model;
ClassificationModelOptions v2Model.
method create
static create: ( properties?: google.cloud.language.v1beta2.IClassificationModelOptions) => google.cloud.language.v1beta2.ClassificationModelOptions;
Creates a new ClassificationModelOptions instance using the specified properties.
Parameter properties
Properties to set
Returns
ClassificationModelOptions instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.ClassificationModelOptions;
Decodes a ClassificationModelOptions message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClassificationModelOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.ClassificationModelOptions;
Decodes a ClassificationModelOptions message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClassificationModelOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IClassificationModelOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassificationModelOptions message. Does not implicitly verify messages.
Parameter message
ClassificationModelOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IClassificationModelOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassificationModelOptions message, length delimited. Does not implicitly verify messages.
Parameter message
ClassificationModelOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.ClassificationModelOptions;
Creates a ClassificationModelOptions message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClassificationModelOptions
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClassificationModelOptions
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClassificationModelOptions to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.ClassificationModelOptions, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClassificationModelOptions message. Also converts values to other types if specified.
Parameter message
ClassificationModelOptions
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClassificationModelOptions message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ClassifyTextRequest
class ClassifyTextRequest implements IClassifyTextRequest {}
Represents a ClassifyTextRequest.
constructor
constructor(properties?: IClassifyTextRequest);
Constructs a new ClassifyTextRequest.
Parameter properties
Properties to set
property classificationModelOptions
classificationModelOptions?: IClassificationModelOptions;
ClassifyTextRequest classificationModelOptions.
property document
document?: IDocument;
ClassifyTextRequest document.
method create
static create: ( properties?: google.cloud.language.v1beta2.IClassifyTextRequest) => google.cloud.language.v1beta2.ClassifyTextRequest;
Creates a new ClassifyTextRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
ClassifyTextRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.ClassifyTextRequest;
Decodes a ClassifyTextRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClassifyTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.ClassifyTextRequest;
Decodes a ClassifyTextRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClassifyTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IClassifyTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextRequest message. Does not implicitly verify messages.
Parameter message
ClassifyTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IClassifyTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextRequest message, length delimited. Does not implicitly verify messages.
Parameter message
ClassifyTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.ClassifyTextRequest;
Creates a ClassifyTextRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClassifyTextRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClassifyTextRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClassifyTextRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.ClassifyTextRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClassifyTextRequest message. Also converts values to other types if specified.
Parameter message
ClassifyTextRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClassifyTextRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ClassifyTextResponse
class ClassifyTextResponse implements IClassifyTextResponse {}
Represents a ClassifyTextResponse.
constructor
constructor(properties?: IClassifyTextResponse);
Constructs a new ClassifyTextResponse.
Parameter properties
Properties to set
property categories
categories: IClassificationCategory[];
ClassifyTextResponse categories.
method create
static create: ( properties?: google.cloud.language.v1beta2.IClassifyTextResponse) => google.cloud.language.v1beta2.ClassifyTextResponse;
Creates a new ClassifyTextResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
ClassifyTextResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.ClassifyTextResponse;
Decodes a ClassifyTextResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClassifyTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.ClassifyTextResponse;
Decodes a ClassifyTextResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClassifyTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IClassifyTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextResponse message. Does not implicitly verify messages.
Parameter message
ClassifyTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IClassifyTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextResponse message, length delimited. Does not implicitly verify messages.
Parameter message
ClassifyTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.ClassifyTextResponse;
Creates a ClassifyTextResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClassifyTextResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClassifyTextResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClassifyTextResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.ClassifyTextResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClassifyTextResponse message. Also converts values to other types if specified.
Parameter message
ClassifyTextResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClassifyTextResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class DependencyEdge
class DependencyEdge implements IDependencyEdge {}
Represents a DependencyEdge.
constructor
constructor(properties?: IDependencyEdge);
Constructs a new DependencyEdge.
Parameter properties
Properties to set
property headTokenIndex
headTokenIndex: number;
DependencyEdge headTokenIndex.
property label
label: | 'UNKNOWN' | 'NUMBER' | 'CONJ' | 'DET' | 'NUM' | 'PRT' | 'VOCATIVE' | 'ABBREV' | 'ACOMP' | 'ADVCL' | 'ADVMOD' | 'AMOD' | 'APPOS' | 'ATTR' | 'AUX' | 'AUXPASS' | 'CC' | 'CCOMP' | 'CSUBJ' | 'CSUBJPASS' | 'DEP' | 'DISCOURSE' | 'DOBJ' | 'EXPL' | 'GOESWITH' | 'IOBJ' | 'MARK' | 'MWE' | 'MWV' | 'NEG' | 'NN' | 'NPADVMOD' | 'NSUBJ' | 'NSUBJPASS' | 'P' | 'PARATAXIS' | 'PARTMOD' | 'PCOMP' | 'POBJ' | 'POSS' | 'POSTNEG' | 'PRECOMP' | 'PRECONJ' | 'PREDET' | 'PREF' | 'PREP' | 'PRONL' | 'PS' | 'QUANTMOD' | 'RCMOD' | 'RCMODREL' | 'RDROP' | 'REF' | 'REMNANT' | 'REPARANDUM' | 'ROOT' | 'SNUM' | 'SUFF' | 'TMOD' | 'TOPIC' | 'VMOD' | 'XCOMP' | 'SUFFIX' | 'TITLE' | 'ADVPHMOD' | 'AUXCAUS' | 'AUXVV' | 'DTMOD' | 'FOREIGN' | 'KW' | 'LIST' | 'NOMC' | 'NOMCSUBJ' | 'NOMCSUBJPASS' | 'NUMC' | 'COP' | 'DISLOCATED' | 'ASP' | 'GMOD' | 'GOBJ' | 'INFMOD' | 'MES' | 'NCOMP' | DependencyEdge.Label;
DependencyEdge label.
method create
static create: ( properties?: google.cloud.language.v1beta2.IDependencyEdge) => google.cloud.language.v1beta2.DependencyEdge;
Creates a new DependencyEdge instance using the specified properties.
Parameter properties
Properties to set
Returns
DependencyEdge instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.DependencyEdge;
Decodes a DependencyEdge message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
DependencyEdge
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.DependencyEdge;
Decodes a DependencyEdge message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
DependencyEdge
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IDependencyEdge, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified DependencyEdge message. Does not implicitly verify messages.
Parameter message
DependencyEdge message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IDependencyEdge, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified DependencyEdge message, length delimited. Does not implicitly verify messages.
Parameter message
DependencyEdge message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.DependencyEdge;
Creates a DependencyEdge message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
DependencyEdge
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for DependencyEdge
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this DependencyEdge to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.DependencyEdge, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a DependencyEdge message. Also converts values to other types if specified.
Parameter message
DependencyEdge
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a DependencyEdge message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Document
class Document implements IDocument {}
Represents a Document.
constructor
constructor(properties?: IDocument);
Constructs a new Document.
Parameter properties
Properties to set
property boilerplateHandling
boilerplateHandling: | Document.BoilerplateHandling | 'BOILERPLATE_HANDLING_UNSPECIFIED' | 'SKIP_BOILERPLATE' | 'KEEP_BOILERPLATE';
Document boilerplateHandling.
property content
content?: string;
Document content.
property gcsContentUri
gcsContentUri?: string;
Document gcsContentUri.
property language
language: string;
Document language.
property referenceWebUri
referenceWebUri: string;
Document referenceWebUri.
property source
source?: 'content' | 'gcsContentUri';
Document source.
property type
type: 'TYPE_UNSPECIFIED' | 'PLAIN_TEXT' | 'HTML' | Document.Type;
Document type.
method create
static create: ( properties?: google.cloud.language.v1beta2.IDocument) => google.cloud.language.v1beta2.Document;
Creates a new Document instance using the specified properties.
Parameter properties
Properties to set
Returns
Document instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.Document;
Decodes a Document message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Document
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.Document;
Decodes a Document message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Document
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IDocument, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Document message. Does not implicitly verify messages.
Parameter message
Document message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IDocument, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Document message, length delimited. Does not implicitly verify messages.
Parameter message
Document message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.Document;
Creates a Document message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Document
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Document
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Document to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.Document, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Document message. Also converts values to other types if specified.
Parameter message
Document
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Document message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Entity
class Entity implements IEntity {}
Represents an Entity.
constructor
constructor(properties?: IEntity);
Constructs a new Entity.
Parameter properties
Properties to set
property mentions
mentions: IEntityMention[];
Entity mentions.
property metadata
metadata: { [k: string]: string };
Entity metadata.
property name
name: string;
Entity name.
property salience
salience: number;
Entity salience.
property sentiment
sentiment?: ISentiment;
Entity sentiment.
property type
type: | 'UNKNOWN' | 'PERSON' | 'LOCATION' | 'ORGANIZATION' | 'EVENT' | 'WORK_OF_ART' | 'CONSUMER_GOOD' | 'OTHER' | 'PHONE_NUMBER' | 'ADDRESS' | 'DATE' | 'NUMBER' | 'PRICE' | Entity.Type;
Entity type.
method create
static create: ( properties?: google.cloud.language.v1beta2.IEntity) => google.cloud.language.v1beta2.Entity;
Creates a new Entity instance using the specified properties.
Parameter properties
Properties to set
Returns
Entity instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.Entity;
Decodes an Entity message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Entity
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.Entity;
Decodes an Entity message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Entity
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IEntity, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Entity message. Does not implicitly verify messages.
Parameter message
Entity message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IEntity, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Entity message, length delimited. Does not implicitly verify messages.
Parameter message
Entity message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.Entity;
Creates an Entity message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Entity
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Entity
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Entity to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.Entity, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an Entity message. Also converts values to other types if specified.
Parameter message
Entity
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an Entity message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class EntityMention
class EntityMention implements IEntityMention {}
Represents an EntityMention.
constructor
constructor(properties?: IEntityMention);
Constructs a new EntityMention.
Parameter properties
Properties to set
property sentiment
sentiment?: ISentiment;
EntityMention sentiment.
property text
text?: ITextSpan;
EntityMention text.
property type
type: 'PROPER' | 'TYPE_UNKNOWN' | 'COMMON' | EntityMention.Type;
EntityMention type.
method create
static create: ( properties?: google.cloud.language.v1beta2.IEntityMention) => google.cloud.language.v1beta2.EntityMention;
Creates a new EntityMention instance using the specified properties.
Parameter properties
Properties to set
Returns
EntityMention instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.EntityMention;
Decodes an EntityMention message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
EntityMention
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.EntityMention;
Decodes an EntityMention message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
EntityMention
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IEntityMention, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EntityMention message. Does not implicitly verify messages.
Parameter message
EntityMention message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IEntityMention, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EntityMention message, length delimited. Does not implicitly verify messages.
Parameter message
EntityMention message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.EntityMention;
Creates an EntityMention message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
EntityMention
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for EntityMention
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this EntityMention to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.EntityMention, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an EntityMention message. Also converts values to other types if specified.
Parameter message
EntityMention
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an EntityMention message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class LanguageService
class LanguageService extends $protobuf.rpc.Service {}
Represents a LanguageService
constructor
constructor( rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
Constructs a new LanguageService service.
Parameter rpcImpl
RPC implementation
Parameter requestDelimited
Whether requests are length-delimited
Parameter responseDelimited
Whether responses are length-delimited
method analyzeEntities
analyzeEntities: { ( request: google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeEntitiesCallback ): void; (request: IAnalyzeEntitiesRequest): Promise<AnalyzeEntitiesResponse>;};
Calls AnalyzeEntities.
Parameter request
AnalyzeEntitiesRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnalyzeEntitiesResponse
Calls AnalyzeEntities.
Parameter request
AnalyzeEntitiesRequest message or plain object
Returns
Promise
method analyzeEntitySentiment
analyzeEntitySentiment: { ( request: google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeEntitySentimentCallback ): void; ( request: IAnalyzeEntitySentimentRequest ): Promise<AnalyzeEntitySentimentResponse>;};
Calls AnalyzeEntitySentiment.
Parameter request
AnalyzeEntitySentimentRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnalyzeEntitySentimentResponse
Calls AnalyzeEntitySentiment.
Parameter request
AnalyzeEntitySentimentRequest message or plain object
Returns
Promise
method analyzeSentiment
analyzeSentiment: { ( request: google.cloud.language.v1beta2.IAnalyzeSentimentRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeSentimentCallback ): void; (request: IAnalyzeSentimentRequest): Promise<AnalyzeSentimentResponse>;};
Calls AnalyzeSentiment.
Parameter request
AnalyzeSentimentRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnalyzeSentimentResponse
Calls AnalyzeSentiment.
Parameter request
AnalyzeSentimentRequest message or plain object
Returns
Promise
method analyzeSyntax
analyzeSyntax: { ( request: google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, callback: google.cloud.language.v1beta2.LanguageService.AnalyzeSyntaxCallback ): void; (request: IAnalyzeSyntaxRequest): Promise<AnalyzeSyntaxResponse>;};
Calls AnalyzeSyntax.
Parameter request
AnalyzeSyntaxRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnalyzeSyntaxResponse
Calls AnalyzeSyntax.
Parameter request
AnalyzeSyntaxRequest message or plain object
Returns
Promise
method annotateText
annotateText: { ( request: google.cloud.language.v1beta2.IAnnotateTextRequest, callback: google.cloud.language.v1beta2.LanguageService.AnnotateTextCallback ): void; (request: IAnnotateTextRequest): Promise<AnnotateTextResponse>;};
Calls AnnotateText.
Parameter request
AnnotateTextRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnnotateTextResponse
Calls AnnotateText.
Parameter request
AnnotateTextRequest message or plain object
Returns
Promise
method classifyText
classifyText: { ( request: google.cloud.language.v1beta2.IClassifyTextRequest, callback: google.cloud.language.v1beta2.LanguageService.ClassifyTextCallback ): void; (request: IClassifyTextRequest): Promise<ClassifyTextResponse>;};
Calls ClassifyText.
Parameter request
ClassifyTextRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and ClassifyTextResponse
Calls ClassifyText.
Parameter request
ClassifyTextRequest message or plain object
Returns
Promise
method create
static create: ( rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean) => LanguageService;
Creates new LanguageService service using the specified rpc implementation.
Parameter rpcImpl
RPC implementation
Parameter requestDelimited
Whether requests are length-delimited
Parameter responseDelimited
Whether responses are length-delimited
Returns
RPC service. Useful where requests and/or responses are streamed.
method moderateText
moderateText: { ( request: google.cloud.language.v1beta2.IModerateTextRequest, callback: google.cloud.language.v1beta2.LanguageService.ModerateTextCallback ): void; (request: IModerateTextRequest): Promise<ModerateTextResponse>;};
Calls ModerateText.
Parameter request
ModerateTextRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and ModerateTextResponse
Calls ModerateText.
Parameter request
ModerateTextRequest message or plain object
Returns
Promise
class ModerateTextRequest
class ModerateTextRequest implements IModerateTextRequest {}
Represents a ModerateTextRequest.
constructor
constructor(properties?: IModerateTextRequest);
Constructs a new ModerateTextRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
ModerateTextRequest document.
method create
static create: ( properties?: google.cloud.language.v1beta2.IModerateTextRequest) => google.cloud.language.v1beta2.ModerateTextRequest;
Creates a new ModerateTextRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
ModerateTextRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.ModerateTextRequest;
Decodes a ModerateTextRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ModerateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.ModerateTextRequest;
Decodes a ModerateTextRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ModerateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IModerateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextRequest message. Does not implicitly verify messages.
Parameter message
ModerateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IModerateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextRequest message, length delimited. Does not implicitly verify messages.
Parameter message
ModerateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.ModerateTextRequest;
Creates a ModerateTextRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ModerateTextRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ModerateTextRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ModerateTextRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.ModerateTextRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ModerateTextRequest message. Also converts values to other types if specified.
Parameter message
ModerateTextRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ModerateTextRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ModerateTextResponse
class ModerateTextResponse implements IModerateTextResponse {}
Represents a ModerateTextResponse.
constructor
constructor(properties?: IModerateTextResponse);
Constructs a new ModerateTextResponse.
Parameter properties
Properties to set
property moderationCategories
moderationCategories: IClassificationCategory[];
ModerateTextResponse moderationCategories.
method create
static create: ( properties?: google.cloud.language.v1beta2.IModerateTextResponse) => google.cloud.language.v1beta2.ModerateTextResponse;
Creates a new ModerateTextResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
ModerateTextResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.ModerateTextResponse;
Decodes a ModerateTextResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ModerateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.ModerateTextResponse;
Decodes a ModerateTextResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ModerateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IModerateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextResponse message. Does not implicitly verify messages.
Parameter message
ModerateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IModerateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextResponse message, length delimited. Does not implicitly verify messages.
Parameter message
ModerateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.ModerateTextResponse;
Creates a ModerateTextResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ModerateTextResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ModerateTextResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ModerateTextResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.ModerateTextResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ModerateTextResponse message. Also converts values to other types if specified.
Parameter message
ModerateTextResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ModerateTextResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class PartOfSpeech
class PartOfSpeech implements IPartOfSpeech {}
Represents a PartOfSpeech.
constructor
constructor(properties?: IPartOfSpeech);
Constructs a new PartOfSpeech.
Parameter properties
Properties to set
property aspect
aspect: | 'ASPECT_UNKNOWN' | 'PERFECTIVE' | 'IMPERFECTIVE' | 'PROGRESSIVE' | PartOfSpeech.Aspect;
PartOfSpeech aspect.
property case
case: | 'CASE_UNKNOWN' | 'ACCUSATIVE' | 'ADVERBIAL' | 'COMPLEMENTIVE' | 'DATIVE' | 'GENITIVE' | 'INSTRUMENTAL' | 'LOCATIVE' | 'NOMINATIVE' | 'OBLIQUE' | 'PARTITIVE' | 'PREPOSITIONAL' | 'REFLEXIVE_CASE' | 'RELATIVE_CASE' | 'VOCATIVE' | PartOfSpeech.Case;
PartOfSpeech case.
property form
form: | 'FORM_UNKNOWN' | 'ADNOMIAL' | 'AUXILIARY' | 'COMPLEMENTIZER' | 'FINAL_ENDING' | 'GERUND' | 'REALIS' | 'IRREALIS' | 'SHORT' | 'LONG' | 'ORDER' | 'SPECIFIC' | PartOfSpeech.Form;
PartOfSpeech form.
property gender
gender: | 'GENDER_UNKNOWN' | 'FEMININE' | 'MASCULINE' | 'NEUTER' | PartOfSpeech.Gender;
PartOfSpeech gender.
property mood
mood: | 'MOOD_UNKNOWN' | 'CONDITIONAL_MOOD' | 'IMPERATIVE' | 'INDICATIVE' | 'INTERROGATIVE' | 'JUSSIVE' | 'SUBJUNCTIVE' | PartOfSpeech.Mood;
PartOfSpeech mood.
property number
number: 'NUMBER_UNKNOWN' | 'SINGULAR' | 'PLURAL' | 'DUAL' | PartOfSpeech.Number;
PartOfSpeech number.
property person
person: | 'PERSON_UNKNOWN' | 'FIRST' | 'SECOND' | 'THIRD' | 'REFLEXIVE_PERSON' | PartOfSpeech.Person;
PartOfSpeech person.
property proper
proper: 'PROPER_UNKNOWN' | 'PROPER' | 'NOT_PROPER' | PartOfSpeech.Proper;
PartOfSpeech proper.
property reciprocity
reciprocity: | 'RECIPROCITY_UNKNOWN' | 'RECIPROCAL' | 'NON_RECIPROCAL' | PartOfSpeech.Reciprocity;
PartOfSpeech reciprocity.
property tag
tag: | 'UNKNOWN' | 'ADJ' | 'ADP' | 'ADV' | 'CONJ' | 'DET' | 'NOUN' | 'NUM' | 'PRON' | 'PRT' | 'PUNCT' | 'VERB' | 'X' | 'AFFIX' | PartOfSpeech.Tag;
PartOfSpeech tag.
property tense
tense: | 'TENSE_UNKNOWN' | 'CONDITIONAL_TENSE' | 'FUTURE' | 'PAST' | 'PRESENT' | 'IMPERFECT' | 'PLUPERFECT' | PartOfSpeech.Tense;
PartOfSpeech tense.
property voice
voice: 'VOICE_UNKNOWN' | 'ACTIVE' | 'CAUSATIVE' | 'PASSIVE' | PartOfSpeech.Voice;
PartOfSpeech voice.
method create
static create: ( properties?: google.cloud.language.v1beta2.IPartOfSpeech) => google.cloud.language.v1beta2.PartOfSpeech;
Creates a new PartOfSpeech instance using the specified properties.
Parameter properties
Properties to set
Returns
PartOfSpeech instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.PartOfSpeech;
Decodes a PartOfSpeech message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
PartOfSpeech
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.PartOfSpeech;
Decodes a PartOfSpeech message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
PartOfSpeech
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IPartOfSpeech, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified PartOfSpeech message. Does not implicitly verify messages.
Parameter message
PartOfSpeech message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IPartOfSpeech, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified PartOfSpeech message, length delimited. Does not implicitly verify messages.
Parameter message
PartOfSpeech message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.PartOfSpeech;
Creates a PartOfSpeech message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
PartOfSpeech
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for PartOfSpeech
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this PartOfSpeech to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.PartOfSpeech, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a PartOfSpeech message. Also converts values to other types if specified.
Parameter message
PartOfSpeech
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a PartOfSpeech message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Sentence
class Sentence implements ISentence {}
Represents a Sentence.
constructor
constructor(properties?: ISentence);
Constructs a new Sentence.
Parameter properties
Properties to set
property sentiment
sentiment?: ISentiment;
Sentence sentiment.
property text
text?: ITextSpan;
Sentence text.
method create
static create: ( properties?: google.cloud.language.v1beta2.ISentence) => google.cloud.language.v1beta2.Sentence;
Creates a new Sentence instance using the specified properties.
Parameter properties
Properties to set
Returns
Sentence instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.Sentence;
Decodes a Sentence message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Sentence
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.Sentence;
Decodes a Sentence message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Sentence
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.ISentence, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentence message. Does not implicitly verify messages.
Parameter message
Sentence message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.ISentence, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentence message, length delimited. Does not implicitly verify messages.
Parameter message
Sentence message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.Sentence;
Creates a Sentence message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Sentence
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Sentence
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Sentence to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.Sentence, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Sentence message. Also converts values to other types if specified.
Parameter message
Sentence
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Sentence message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Sentiment
class Sentiment implements ISentiment {}
Represents a Sentiment.
constructor
constructor(properties?: ISentiment);
Constructs a new Sentiment.
Parameter properties
Properties to set
property magnitude
magnitude: number;
Sentiment magnitude.
property score
score: number;
Sentiment score.
method create
static create: ( properties?: google.cloud.language.v1beta2.ISentiment) => google.cloud.language.v1beta2.Sentiment;
Creates a new Sentiment instance using the specified properties.
Parameter properties
Properties to set
Returns
Sentiment instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.Sentiment;
Decodes a Sentiment message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Sentiment
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.Sentiment;
Decodes a Sentiment message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Sentiment
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.ISentiment, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentiment message. Does not implicitly verify messages.
Parameter message
Sentiment message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.ISentiment, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentiment message, length delimited. Does not implicitly verify messages.
Parameter message
Sentiment message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.Sentiment;
Creates a Sentiment message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Sentiment
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Sentiment
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Sentiment to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.Sentiment, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Sentiment message. Also converts values to other types if specified.
Parameter message
Sentiment
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Sentiment message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class TextSpan
class TextSpan implements ITextSpan {}
Represents a TextSpan.
constructor
constructor(properties?: ITextSpan);
Constructs a new TextSpan.
Parameter properties
Properties to set
property beginOffset
beginOffset: number;
TextSpan beginOffset.
property content
content: string;
TextSpan content.
method create
static create: ( properties?: google.cloud.language.v1beta2.ITextSpan) => google.cloud.language.v1beta2.TextSpan;
Creates a new TextSpan instance using the specified properties.
Parameter properties
Properties to set
Returns
TextSpan instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.TextSpan;
Decodes a TextSpan message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
TextSpan
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.TextSpan;
Decodes a TextSpan message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
TextSpan
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.ITextSpan, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified TextSpan message. Does not implicitly verify messages.
Parameter message
TextSpan message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.ITextSpan, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified TextSpan message, length delimited. Does not implicitly verify messages.
Parameter message
TextSpan message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.TextSpan;
Creates a TextSpan message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
TextSpan
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for TextSpan
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this TextSpan to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.TextSpan, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a TextSpan message. Also converts values to other types if specified.
Parameter message
TextSpan
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a TextSpan message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Token
class Token implements IToken {}
Represents a Token.
constructor
constructor(properties?: IToken);
Constructs a new Token.
Parameter properties
Properties to set
property dependencyEdge
dependencyEdge?: IDependencyEdge;
Token dependencyEdge.
property lemma
lemma: string;
Token lemma.
property partOfSpeech
partOfSpeech?: IPartOfSpeech;
Token partOfSpeech.
property text
text?: ITextSpan;
Token text.
method create
static create: ( properties?: google.cloud.language.v1beta2.IToken) => google.cloud.language.v1beta2.Token;
Creates a new Token instance using the specified properties.
Parameter properties
Properties to set
Returns
Token instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v1beta2.Token;
Decodes a Token message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Token
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v1beta2.Token;
Decodes a Token message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Token
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v1beta2.IToken, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Token message. Does not implicitly verify messages.
Parameter message
Token message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v1beta2.IToken, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Token message, length delimited. Does not implicitly verify messages.
Parameter message
Token message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v1beta2.Token;
Creates a Token message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Token
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Token
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Token to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v1beta2.Token, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Token message. Also converts values to other types if specified.
Parameter message
Token
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Token message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface IAnalyzeEntitiesRequest
interface IAnalyzeEntitiesRequest {}
Properties of an AnalyzeEntitiesRequest.
property document
document?: google.cloud.language.v1beta2.IDocument | null;
AnalyzeEntitiesRequest document
property encodingType
encodingType?: | google.cloud.language.v1beta2.EncodingType | keyof typeof google.cloud.language.v1beta2.EncodingType | null;
AnalyzeEntitiesRequest encodingType
interface IAnalyzeEntitiesResponse
interface IAnalyzeEntitiesResponse {}
Properties of an AnalyzeEntitiesResponse.
interface IAnalyzeEntitySentimentRequest
interface IAnalyzeEntitySentimentRequest {}
Properties of an AnalyzeEntitySentimentRequest.
property document
document?: google.cloud.language.v1beta2.IDocument | null;
AnalyzeEntitySentimentRequest document
property encodingType
encodingType?: | google.cloud.language.v1beta2.EncodingType | keyof typeof google.cloud.language.v1beta2.EncodingType | null;
AnalyzeEntitySentimentRequest encodingType
interface IAnalyzeEntitySentimentResponse
interface IAnalyzeEntitySentimentResponse {}
Properties of an AnalyzeEntitySentimentResponse.
interface IAnalyzeSentimentRequest
interface IAnalyzeSentimentRequest {}
Properties of an AnalyzeSentimentRequest.
property document
document?: google.cloud.language.v1beta2.IDocument | null;
AnalyzeSentimentRequest document
property encodingType
encodingType?: | google.cloud.language.v1beta2.EncodingType | keyof typeof google.cloud.language.v1beta2.EncodingType | null;
AnalyzeSentimentRequest encodingType
interface IAnalyzeSentimentResponse
interface IAnalyzeSentimentResponse {}
Properties of an AnalyzeSentimentResponse.
property documentSentiment
documentSentiment?: google.cloud.language.v1beta2.ISentiment | null;
AnalyzeSentimentResponse documentSentiment
property language
language?: string | null;
AnalyzeSentimentResponse language
property sentences
sentences?: google.cloud.language.v1beta2.ISentence[] | null;
AnalyzeSentimentResponse sentences
interface IAnalyzeSyntaxRequest
interface IAnalyzeSyntaxRequest {}
Properties of an AnalyzeSyntaxRequest.
property document
document?: google.cloud.language.v1beta2.IDocument | null;
AnalyzeSyntaxRequest document
property encodingType
encodingType?: | google.cloud.language.v1beta2.EncodingType | keyof typeof google.cloud.language.v1beta2.EncodingType | null;
AnalyzeSyntaxRequest encodingType
interface IAnalyzeSyntaxResponse
interface IAnalyzeSyntaxResponse {}
Properties of an AnalyzeSyntaxResponse.
interface IAnnotateTextRequest
interface IAnnotateTextRequest {}
Properties of an AnnotateTextRequest.
property document
document?: google.cloud.language.v1beta2.IDocument | null;
AnnotateTextRequest document
property encodingType
encodingType?: | google.cloud.language.v1beta2.EncodingType | keyof typeof google.cloud.language.v1beta2.EncodingType | null;
AnnotateTextRequest encodingType
property features
features?: google.cloud.language.v1beta2.AnnotateTextRequest.IFeatures | null;
AnnotateTextRequest features
interface IAnnotateTextResponse
interface IAnnotateTextResponse {}
Properties of an AnnotateTextResponse.
property categories
categories?: google.cloud.language.v1beta2.IClassificationCategory[] | null;
AnnotateTextResponse categories
property documentSentiment
documentSentiment?: google.cloud.language.v1beta2.ISentiment | null;
AnnotateTextResponse documentSentiment
property entities
entities?: google.cloud.language.v1beta2.IEntity[] | null;
AnnotateTextResponse entities
property language
language?: string | null;
AnnotateTextResponse language
property moderationCategories
moderationCategories?: | google.cloud.language.v1beta2.IClassificationCategory[] | null;
AnnotateTextResponse moderationCategories
property sentences
sentences?: google.cloud.language.v1beta2.ISentence[] | null;
AnnotateTextResponse sentences
property tokens
tokens?: google.cloud.language.v1beta2.IToken[] | null;
AnnotateTextResponse tokens
interface IClassificationCategory
interface IClassificationCategory {}
Properties of a ClassificationCategory.
property confidence
confidence?: number | null;
ClassificationCategory confidence
property name
name?: string | null;
ClassificationCategory name
interface IClassificationModelOptions
interface IClassificationModelOptions {}
Properties of a ClassificationModelOptions.
interface IClassifyTextRequest
interface IClassifyTextRequest {}
Properties of a ClassifyTextRequest.
property classificationModelOptions
classificationModelOptions?: google.cloud.language.v1beta2.IClassificationModelOptions | null;
ClassifyTextRequest classificationModelOptions
property document
document?: google.cloud.language.v1beta2.IDocument | null;
ClassifyTextRequest document
interface IClassifyTextResponse
interface IClassifyTextResponse {}
Properties of a ClassifyTextResponse.
property categories
categories?: google.cloud.language.v1beta2.IClassificationCategory[] | null;
ClassifyTextResponse categories
interface IDependencyEdge
interface IDependencyEdge {}
Properties of a DependencyEdge.
property headTokenIndex
headTokenIndex?: number | null;
DependencyEdge headTokenIndex
property label
label?: | google.cloud.language.v1beta2.DependencyEdge.Label | keyof typeof google.cloud.language.v1beta2.DependencyEdge.Label | null;
DependencyEdge label
interface IDocument
interface IDocument {}
Properties of a Document.
property boilerplateHandling
boilerplateHandling?: | google.cloud.language.v1beta2.Document.BoilerplateHandling | keyof typeof google.cloud.language.v1beta2.Document.BoilerplateHandling | null;
Document boilerplateHandling
property content
content?: string | null;
Document content
property gcsContentUri
gcsContentUri?: string | null;
Document gcsContentUri
property language
language?: string | null;
Document language
property referenceWebUri
referenceWebUri?: string | null;
Document referenceWebUri
property type
type?: | google.cloud.language.v1beta2.Document.Type | keyof typeof google.cloud.language.v1beta2.Document.Type | null;
Document type
interface IEntity
interface IEntity {}
Properties of an Entity.
property mentions
mentions?: google.cloud.language.v1beta2.IEntityMention[] | null;
Entity mentions
property metadata
metadata?: { [k: string]: string } | null;
Entity metadata
property name
name?: string | null;
Entity name
property salience
salience?: number | null;
Entity salience
property sentiment
sentiment?: google.cloud.language.v1beta2.ISentiment | null;
Entity sentiment
property type
type?: | google.cloud.language.v1beta2.Entity.Type | keyof typeof google.cloud.language.v1beta2.Entity.Type | null;
Entity type
interface IEntityMention
interface IEntityMention {}
Properties of an EntityMention.
property sentiment
sentiment?: google.cloud.language.v1beta2.ISentiment | null;
EntityMention sentiment
property text
text?: google.cloud.language.v1beta2.ITextSpan | null;
EntityMention text
property type
type?: | google.cloud.language.v1beta2.EntityMention.Type | keyof typeof google.cloud.language.v1beta2.EntityMention.Type | null;
EntityMention type
interface IModerateTextRequest
interface IModerateTextRequest {}
Properties of a ModerateTextRequest.
property document
document?: google.cloud.language.v1beta2.IDocument | null;
ModerateTextRequest document
interface IModerateTextResponse
interface IModerateTextResponse {}
Properties of a ModerateTextResponse.
property moderationCategories
moderationCategories?: | google.cloud.language.v1beta2.IClassificationCategory[] | null;
ModerateTextResponse moderationCategories
interface IPartOfSpeech
interface IPartOfSpeech {}
Properties of a PartOfSpeech.
property "case"
case?: | google.cloud.language.v1beta2.PartOfSpeech.Case | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Case | null;
PartOfSpeech case
property aspect
aspect?: | google.cloud.language.v1beta2.PartOfSpeech.Aspect | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Aspect | null;
PartOfSpeech aspect
property form
form?: | google.cloud.language.v1beta2.PartOfSpeech.Form | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Form | null;
PartOfSpeech form
property gender
gender?: | google.cloud.language.v1beta2.PartOfSpeech.Gender | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Gender | null;
PartOfSpeech gender
property mood
mood?: | google.cloud.language.v1beta2.PartOfSpeech.Mood | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Mood | null;
PartOfSpeech mood
property number
number?: | google.cloud.language.v1beta2.PartOfSpeech.Number | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Number | null;
PartOfSpeech number
property person
person?: | google.cloud.language.v1beta2.PartOfSpeech.Person | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Person | null;
PartOfSpeech person
property proper
proper?: | google.cloud.language.v1beta2.PartOfSpeech.Proper | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Proper | null;
PartOfSpeech proper
property reciprocity
reciprocity?: | google.cloud.language.v1beta2.PartOfSpeech.Reciprocity | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Reciprocity | null;
PartOfSpeech reciprocity
property tag
tag?: | google.cloud.language.v1beta2.PartOfSpeech.Tag | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Tag | null;
PartOfSpeech tag
property tense
tense?: | google.cloud.language.v1beta2.PartOfSpeech.Tense | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Tense | null;
PartOfSpeech tense
property voice
voice?: | google.cloud.language.v1beta2.PartOfSpeech.Voice | keyof typeof google.cloud.language.v1beta2.PartOfSpeech.Voice | null;
PartOfSpeech voice
interface ISentence
interface ISentence {}
Properties of a Sentence.
interface ISentiment
interface ISentiment {}
Properties of a Sentiment.
interface ITextSpan
interface ITextSpan {}
Properties of a TextSpan.
property beginOffset
beginOffset?: number | null;
TextSpan beginOffset
property content
content?: string | null;
TextSpan content
interface IToken
interface IToken {}
Properties of a Token.
property dependencyEdge
dependencyEdge?: google.cloud.language.v1beta2.IDependencyEdge | null;
Token dependencyEdge
property lemma
lemma?: string | null;
Token lemma
property partOfSpeech
partOfSpeech?: google.cloud.language.v1beta2.IPartOfSpeech | null;
Token partOfSpeech
property text
text?: google.cloud.language.v1beta2.ITextSpan | null;
Token text
enum EncodingType
enum EncodingType { NONE = 0, UTF8 = 1, UTF16 = 2, UTF32 = 3,}
EncodingType enum.
namespace protos.google.cloud.language.v2
namespace protos.google.cloud.language.v2 {}
Namespace v2.
class AnalyzeEntitiesRequest
class AnalyzeEntitiesRequest implements IAnalyzeEntitiesRequest {}
Represents an AnalyzeEntitiesRequest.
constructor
constructor(properties?: IAnalyzeEntitiesRequest);
Constructs a new AnalyzeEntitiesRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnalyzeEntitiesRequest document.
property encodingType
encodingType: 'NONE' | 'UTF8' | 'UTF16' | 'UTF32' | EncodingType;
AnalyzeEntitiesRequest encodingType.
method create
static create: ( properties?: google.cloud.language.v2.IAnalyzeEntitiesRequest) => google.cloud.language.v2.AnalyzeEntitiesRequest;
Creates a new AnalyzeEntitiesRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeEntitiesRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.AnalyzeEntitiesRequest;
Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeEntitiesRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.AnalyzeEntitiesRequest;
Decodes an AnalyzeEntitiesRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeEntitiesRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IAnalyzeEntitiesRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesRequest message. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IAnalyzeEntitiesRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.AnalyzeEntitiesRequest;
Creates an AnalyzeEntitiesRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeEntitiesRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeEntitiesRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeEntitiesRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.AnalyzeEntitiesRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeEntitiesRequest message. Also converts values to other types if specified.
Parameter message
AnalyzeEntitiesRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeEntitiesRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeEntitiesResponse
class AnalyzeEntitiesResponse implements IAnalyzeEntitiesResponse {}
Represents an AnalyzeEntitiesResponse.
constructor
constructor(properties?: IAnalyzeEntitiesResponse);
Constructs a new AnalyzeEntitiesResponse.
Parameter properties
Properties to set
property entities
entities: IEntity[];
AnalyzeEntitiesResponse entities.
property languageCode
languageCode: string;
AnalyzeEntitiesResponse languageCode.
property languageSupported
languageSupported: boolean;
AnalyzeEntitiesResponse languageSupported.
method create
static create: ( properties?: google.cloud.language.v2.IAnalyzeEntitiesResponse) => google.cloud.language.v2.AnalyzeEntitiesResponse;
Creates a new AnalyzeEntitiesResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeEntitiesResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.AnalyzeEntitiesResponse;
Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeEntitiesResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.AnalyzeEntitiesResponse;
Decodes an AnalyzeEntitiesResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeEntitiesResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IAnalyzeEntitiesResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesResponse message. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IAnalyzeEntitiesResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeEntitiesResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeEntitiesResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.AnalyzeEntitiesResponse;
Creates an AnalyzeEntitiesResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeEntitiesResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeEntitiesResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeEntitiesResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.AnalyzeEntitiesResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeEntitiesResponse message. Also converts values to other types if specified.
Parameter message
AnalyzeEntitiesResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeEntitiesResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeSentimentRequest
class AnalyzeSentimentRequest implements IAnalyzeSentimentRequest {}
Represents an AnalyzeSentimentRequest.
constructor
constructor(properties?: IAnalyzeSentimentRequest);
Constructs a new AnalyzeSentimentRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnalyzeSentimentRequest document.
property encodingType
encodingType: 'NONE' | 'UTF8' | 'UTF16' | 'UTF32' | EncodingType;
AnalyzeSentimentRequest encodingType.
method create
static create: ( properties?: google.cloud.language.v2.IAnalyzeSentimentRequest) => google.cloud.language.v2.AnalyzeSentimentRequest;
Creates a new AnalyzeSentimentRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeSentimentRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.AnalyzeSentimentRequest;
Decodes an AnalyzeSentimentRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeSentimentRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.AnalyzeSentimentRequest;
Decodes an AnalyzeSentimentRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeSentimentRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IAnalyzeSentimentRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentRequest message. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IAnalyzeSentimentRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.AnalyzeSentimentRequest;
Creates an AnalyzeSentimentRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeSentimentRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeSentimentRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeSentimentRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.AnalyzeSentimentRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeSentimentRequest message. Also converts values to other types if specified.
Parameter message
AnalyzeSentimentRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeSentimentRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnalyzeSentimentResponse
class AnalyzeSentimentResponse implements IAnalyzeSentimentResponse {}
Represents an AnalyzeSentimentResponse.
constructor
constructor(properties?: IAnalyzeSentimentResponse);
Constructs a new AnalyzeSentimentResponse.
Parameter properties
Properties to set
property documentSentiment
documentSentiment?: ISentiment;
AnalyzeSentimentResponse documentSentiment.
property languageCode
languageCode: string;
AnalyzeSentimentResponse languageCode.
property languageSupported
languageSupported: boolean;
AnalyzeSentimentResponse languageSupported.
property sentences
sentences: ISentence[];
AnalyzeSentimentResponse sentences.
method create
static create: ( properties?: google.cloud.language.v2.IAnalyzeSentimentResponse) => google.cloud.language.v2.AnalyzeSentimentResponse;
Creates a new AnalyzeSentimentResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnalyzeSentimentResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.AnalyzeSentimentResponse;
Decodes an AnalyzeSentimentResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnalyzeSentimentResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.AnalyzeSentimentResponse;
Decodes an AnalyzeSentimentResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnalyzeSentimentResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IAnalyzeSentimentResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentResponse message. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IAnalyzeSentimentResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnalyzeSentimentResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnalyzeSentimentResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.AnalyzeSentimentResponse;
Creates an AnalyzeSentimentResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnalyzeSentimentResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnalyzeSentimentResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnalyzeSentimentResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.AnalyzeSentimentResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnalyzeSentimentResponse message. Also converts values to other types if specified.
Parameter message
AnalyzeSentimentResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnalyzeSentimentResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnnotateTextRequest
class AnnotateTextRequest implements IAnnotateTextRequest {}
Represents an AnnotateTextRequest.
constructor
constructor(properties?: IAnnotateTextRequest);
Constructs a new AnnotateTextRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
AnnotateTextRequest document.
property encodingType
encodingType: 'NONE' | 'UTF8' | 'UTF16' | 'UTF32' | EncodingType;
AnnotateTextRequest encodingType.
property features
features?: AnnotateTextRequest.IFeatures;
AnnotateTextRequest features.
method create
static create: ( properties?: google.cloud.language.v2.IAnnotateTextRequest) => google.cloud.language.v2.AnnotateTextRequest;
Creates a new AnnotateTextRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
AnnotateTextRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.AnnotateTextRequest;
Decodes an AnnotateTextRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnnotateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.AnnotateTextRequest;
Decodes an AnnotateTextRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnnotateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IAnnotateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextRequest message. Does not implicitly verify messages.
Parameter message
AnnotateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IAnnotateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextRequest message, length delimited. Does not implicitly verify messages.
Parameter message
AnnotateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.AnnotateTextRequest;
Creates an AnnotateTextRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnnotateTextRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnnotateTextRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnnotateTextRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.AnnotateTextRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnnotateTextRequest message. Also converts values to other types if specified.
Parameter message
AnnotateTextRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnnotateTextRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class AnnotateTextResponse
class AnnotateTextResponse implements IAnnotateTextResponse {}
Represents an AnnotateTextResponse.
constructor
constructor(properties?: IAnnotateTextResponse);
Constructs a new AnnotateTextResponse.
Parameter properties
Properties to set
property categories
categories: IClassificationCategory[];
AnnotateTextResponse categories.
property documentSentiment
documentSentiment?: ISentiment;
AnnotateTextResponse documentSentiment.
property entities
entities: IEntity[];
AnnotateTextResponse entities.
property languageCode
languageCode: string;
AnnotateTextResponse languageCode.
property languageSupported
languageSupported: boolean;
AnnotateTextResponse languageSupported.
property moderationCategories
moderationCategories: IClassificationCategory[];
AnnotateTextResponse moderationCategories.
property sentences
sentences: ISentence[];
AnnotateTextResponse sentences.
method create
static create: ( properties?: google.cloud.language.v2.IAnnotateTextResponse) => google.cloud.language.v2.AnnotateTextResponse;
Creates a new AnnotateTextResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
AnnotateTextResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.AnnotateTextResponse;
Decodes an AnnotateTextResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
AnnotateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.AnnotateTextResponse;
Decodes an AnnotateTextResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
AnnotateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IAnnotateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextResponse message. Does not implicitly verify messages.
Parameter message
AnnotateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IAnnotateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified AnnotateTextResponse message, length delimited. Does not implicitly verify messages.
Parameter message
AnnotateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.AnnotateTextResponse;
Creates an AnnotateTextResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
AnnotateTextResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for AnnotateTextResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this AnnotateTextResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.AnnotateTextResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an AnnotateTextResponse message. Also converts values to other types if specified.
Parameter message
AnnotateTextResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an AnnotateTextResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ClassificationCategory
class ClassificationCategory implements IClassificationCategory {}
Represents a ClassificationCategory.
constructor
constructor(properties?: IClassificationCategory);
Constructs a new ClassificationCategory.
Parameter properties
Properties to set
property confidence
confidence: number;
ClassificationCategory confidence.
property name
name: string;
ClassificationCategory name.
property severity
severity: number;
ClassificationCategory severity.
method create
static create: ( properties?: google.cloud.language.v2.IClassificationCategory) => google.cloud.language.v2.ClassificationCategory;
Creates a new ClassificationCategory instance using the specified properties.
Parameter properties
Properties to set
Returns
ClassificationCategory instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.ClassificationCategory;
Decodes a ClassificationCategory message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClassificationCategory
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.ClassificationCategory;
Decodes a ClassificationCategory message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClassificationCategory
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IClassificationCategory, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassificationCategory message. Does not implicitly verify messages.
Parameter message
ClassificationCategory message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IClassificationCategory, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassificationCategory message, length delimited. Does not implicitly verify messages.
Parameter message
ClassificationCategory message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.ClassificationCategory;
Creates a ClassificationCategory message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClassificationCategory
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClassificationCategory
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClassificationCategory to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.ClassificationCategory, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClassificationCategory message. Also converts values to other types if specified.
Parameter message
ClassificationCategory
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClassificationCategory message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ClassifyTextRequest
class ClassifyTextRequest implements IClassifyTextRequest {}
Represents a ClassifyTextRequest.
constructor
constructor(properties?: IClassifyTextRequest);
Constructs a new ClassifyTextRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
ClassifyTextRequest document.
method create
static create: ( properties?: google.cloud.language.v2.IClassifyTextRequest) => google.cloud.language.v2.ClassifyTextRequest;
Creates a new ClassifyTextRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
ClassifyTextRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.ClassifyTextRequest;
Decodes a ClassifyTextRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClassifyTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.ClassifyTextRequest;
Decodes a ClassifyTextRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClassifyTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IClassifyTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextRequest message. Does not implicitly verify messages.
Parameter message
ClassifyTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IClassifyTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextRequest message, length delimited. Does not implicitly verify messages.
Parameter message
ClassifyTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.ClassifyTextRequest;
Creates a ClassifyTextRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClassifyTextRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClassifyTextRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClassifyTextRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.ClassifyTextRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClassifyTextRequest message. Also converts values to other types if specified.
Parameter message
ClassifyTextRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClassifyTextRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ClassifyTextResponse
class ClassifyTextResponse implements IClassifyTextResponse {}
Represents a ClassifyTextResponse.
constructor
constructor(properties?: IClassifyTextResponse);
Constructs a new ClassifyTextResponse.
Parameter properties
Properties to set
property categories
categories: IClassificationCategory[];
ClassifyTextResponse categories.
property languageCode
languageCode: string;
ClassifyTextResponse languageCode.
property languageSupported
languageSupported: boolean;
ClassifyTextResponse languageSupported.
method create
static create: ( properties?: google.cloud.language.v2.IClassifyTextResponse) => google.cloud.language.v2.ClassifyTextResponse;
Creates a new ClassifyTextResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
ClassifyTextResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.ClassifyTextResponse;
Decodes a ClassifyTextResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ClassifyTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.ClassifyTextResponse;
Decodes a ClassifyTextResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ClassifyTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IClassifyTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextResponse message. Does not implicitly verify messages.
Parameter message
ClassifyTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IClassifyTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ClassifyTextResponse message, length delimited. Does not implicitly verify messages.
Parameter message
ClassifyTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.ClassifyTextResponse;
Creates a ClassifyTextResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ClassifyTextResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ClassifyTextResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ClassifyTextResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.ClassifyTextResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ClassifyTextResponse message. Also converts values to other types if specified.
Parameter message
ClassifyTextResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ClassifyTextResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Document
class Document implements IDocument {}
Represents a Document.
constructor
constructor(properties?: IDocument);
Constructs a new Document.
Parameter properties
Properties to set
property content
content?: string;
Document content.
property gcsContentUri
gcsContentUri?: string;
Document gcsContentUri.
property languageCode
languageCode: string;
Document languageCode.
property source
source?: 'content' | 'gcsContentUri';
Document source.
property type
type: 'TYPE_UNSPECIFIED' | 'PLAIN_TEXT' | 'HTML' | Document.Type;
Document type.
method create
static create: ( properties?: google.cloud.language.v2.IDocument) => google.cloud.language.v2.Document;
Creates a new Document instance using the specified properties.
Parameter properties
Properties to set
Returns
Document instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.Document;
Decodes a Document message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Document
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.Document;
Decodes a Document message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Document
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IDocument, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Document message. Does not implicitly verify messages.
Parameter message
Document message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IDocument, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Document message, length delimited. Does not implicitly verify messages.
Parameter message
Document message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.Document;
Creates a Document message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Document
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Document
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Document to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.Document, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Document message. Also converts values to other types if specified.
Parameter message
Document
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Document message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Entity
class Entity implements IEntity {}
Represents an Entity.
constructor
constructor(properties?: IEntity);
Constructs a new Entity.
Parameter properties
Properties to set
property mentions
mentions: IEntityMention[];
Entity mentions.
property metadata
metadata: { [k: string]: string };
Entity metadata.
property name
name: string;
Entity name.
property sentiment
sentiment?: ISentiment;
Entity sentiment.
property type
type: | 'UNKNOWN' | 'PERSON' | 'LOCATION' | 'ORGANIZATION' | 'EVENT' | 'WORK_OF_ART' | 'CONSUMER_GOOD' | 'OTHER' | 'PHONE_NUMBER' | 'ADDRESS' | 'DATE' | 'NUMBER' | 'PRICE' | Entity.Type;
Entity type.
method create
static create: ( properties?: google.cloud.language.v2.IEntity) => google.cloud.language.v2.Entity;
Creates a new Entity instance using the specified properties.
Parameter properties
Properties to set
Returns
Entity instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.Entity;
Decodes an Entity message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Entity
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.Entity;
Decodes an Entity message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Entity
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IEntity, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Entity message. Does not implicitly verify messages.
Parameter message
Entity message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IEntity, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Entity message, length delimited. Does not implicitly verify messages.
Parameter message
Entity message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.Entity;
Creates an Entity message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Entity
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Entity
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Entity to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.Entity, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an Entity message. Also converts values to other types if specified.
Parameter message
Entity
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an Entity message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class EntityMention
class EntityMention implements IEntityMention {}
Represents an EntityMention.
constructor
constructor(properties?: IEntityMention);
Constructs a new EntityMention.
Parameter properties
Properties to set
property probability
probability: number;
EntityMention probability.
property sentiment
sentiment?: ISentiment;
EntityMention sentiment.
property text
text?: ITextSpan;
EntityMention text.
property type
type: 'PROPER' | 'TYPE_UNKNOWN' | 'COMMON' | EntityMention.Type;
EntityMention type.
method create
static create: ( properties?: google.cloud.language.v2.IEntityMention) => google.cloud.language.v2.EntityMention;
Creates a new EntityMention instance using the specified properties.
Parameter properties
Properties to set
Returns
EntityMention instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.EntityMention;
Decodes an EntityMention message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
EntityMention
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.EntityMention;
Decodes an EntityMention message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
EntityMention
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IEntityMention, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EntityMention message. Does not implicitly verify messages.
Parameter message
EntityMention message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IEntityMention, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EntityMention message, length delimited. Does not implicitly verify messages.
Parameter message
EntityMention message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.EntityMention;
Creates an EntityMention message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
EntityMention
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for EntityMention
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this EntityMention to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.EntityMention, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an EntityMention message. Also converts values to other types if specified.
Parameter message
EntityMention
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an EntityMention message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class LanguageService
class LanguageService extends $protobuf.rpc.Service {}
Represents a LanguageService
constructor
constructor( rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean);
Constructs a new LanguageService service.
Parameter rpcImpl
RPC implementation
Parameter requestDelimited
Whether requests are length-delimited
Parameter responseDelimited
Whether responses are length-delimited
method analyzeEntities
analyzeEntities: { ( request: google.cloud.language.v2.IAnalyzeEntitiesRequest, callback: google.cloud.language.v2.LanguageService.AnalyzeEntitiesCallback ): void; (request: IAnalyzeEntitiesRequest): Promise<AnalyzeEntitiesResponse>;};
Calls AnalyzeEntities.
Parameter request
AnalyzeEntitiesRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnalyzeEntitiesResponse
Calls AnalyzeEntities.
Parameter request
AnalyzeEntitiesRequest message or plain object
Returns
Promise
method analyzeSentiment
analyzeSentiment: { ( request: google.cloud.language.v2.IAnalyzeSentimentRequest, callback: google.cloud.language.v2.LanguageService.AnalyzeSentimentCallback ): void; (request: IAnalyzeSentimentRequest): Promise<AnalyzeSentimentResponse>;};
Calls AnalyzeSentiment.
Parameter request
AnalyzeSentimentRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnalyzeSentimentResponse
Calls AnalyzeSentiment.
Parameter request
AnalyzeSentimentRequest message or plain object
Returns
Promise
method annotateText
annotateText: { ( request: google.cloud.language.v2.IAnnotateTextRequest, callback: google.cloud.language.v2.LanguageService.AnnotateTextCallback ): void; (request: IAnnotateTextRequest): Promise<AnnotateTextResponse>;};
Calls AnnotateText.
Parameter request
AnnotateTextRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and AnnotateTextResponse
Calls AnnotateText.
Parameter request
AnnotateTextRequest message or plain object
Returns
Promise
method classifyText
classifyText: { ( request: google.cloud.language.v2.IClassifyTextRequest, callback: google.cloud.language.v2.LanguageService.ClassifyTextCallback ): void; (request: IClassifyTextRequest): Promise<ClassifyTextResponse>;};
Calls ClassifyText.
Parameter request
ClassifyTextRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and ClassifyTextResponse
Calls ClassifyText.
Parameter request
ClassifyTextRequest message or plain object
Returns
Promise
method create
static create: ( rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean) => LanguageService;
Creates new LanguageService service using the specified rpc implementation.
Parameter rpcImpl
RPC implementation
Parameter requestDelimited
Whether requests are length-delimited
Parameter responseDelimited
Whether responses are length-delimited
Returns
RPC service. Useful where requests and/or responses are streamed.
method moderateText
moderateText: { ( request: google.cloud.language.v2.IModerateTextRequest, callback: google.cloud.language.v2.LanguageService.ModerateTextCallback ): void; (request: IModerateTextRequest): Promise<ModerateTextResponse>;};
Calls ModerateText.
Parameter request
ModerateTextRequest message or plain object
Parameter callback
Node-style callback called with the error, if any, and ModerateTextResponse
Calls ModerateText.
Parameter request
ModerateTextRequest message or plain object
Returns
Promise
class ModerateTextRequest
class ModerateTextRequest implements IModerateTextRequest {}
Represents a ModerateTextRequest.
constructor
constructor(properties?: IModerateTextRequest);
Constructs a new ModerateTextRequest.
Parameter properties
Properties to set
property document
document?: IDocument;
ModerateTextRequest document.
property modelVersion
modelVersion: | ModerateTextRequest.ModelVersion | 'MODEL_VERSION_UNSPECIFIED' | 'MODEL_VERSION_1' | 'MODEL_VERSION_2';
ModerateTextRequest modelVersion.
method create
static create: ( properties?: google.cloud.language.v2.IModerateTextRequest) => google.cloud.language.v2.ModerateTextRequest;
Creates a new ModerateTextRequest instance using the specified properties.
Parameter properties
Properties to set
Returns
ModerateTextRequest instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.ModerateTextRequest;
Decodes a ModerateTextRequest message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ModerateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.ModerateTextRequest;
Decodes a ModerateTextRequest message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ModerateTextRequest
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IModerateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextRequest message. Does not implicitly verify messages.
Parameter message
ModerateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IModerateTextRequest, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextRequest message, length delimited. Does not implicitly verify messages.
Parameter message
ModerateTextRequest message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.ModerateTextRequest;
Creates a ModerateTextRequest message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ModerateTextRequest
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ModerateTextRequest
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ModerateTextRequest to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.ModerateTextRequest, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ModerateTextRequest message. Also converts values to other types if specified.
Parameter message
ModerateTextRequest
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ModerateTextRequest message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ModerateTextResponse
class ModerateTextResponse implements IModerateTextResponse {}
Represents a ModerateTextResponse.
constructor
constructor(properties?: IModerateTextResponse);
Constructs a new ModerateTextResponse.
Parameter properties
Properties to set
property languageCode
languageCode: string;
ModerateTextResponse languageCode.
property languageSupported
languageSupported: boolean;
ModerateTextResponse languageSupported.
property moderationCategories
moderationCategories: IClassificationCategory[];
ModerateTextResponse moderationCategories.
method create
static create: ( properties?: google.cloud.language.v2.IModerateTextResponse) => google.cloud.language.v2.ModerateTextResponse;
Creates a new ModerateTextResponse instance using the specified properties.
Parameter properties
Properties to set
Returns
ModerateTextResponse instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.ModerateTextResponse;
Decodes a ModerateTextResponse message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ModerateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.ModerateTextResponse;
Decodes a ModerateTextResponse message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ModerateTextResponse
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.IModerateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextResponse message. Does not implicitly verify messages.
Parameter message
ModerateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.IModerateTextResponse, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ModerateTextResponse message, length delimited. Does not implicitly verify messages.
Parameter message
ModerateTextResponse message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.ModerateTextResponse;
Creates a ModerateTextResponse message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ModerateTextResponse
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ModerateTextResponse
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ModerateTextResponse to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.ModerateTextResponse, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ModerateTextResponse message. Also converts values to other types if specified.
Parameter message
ModerateTextResponse
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ModerateTextResponse message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Sentence
class Sentence implements ISentence {}
Represents a Sentence.
constructor
constructor(properties?: ISentence);
Constructs a new Sentence.
Parameter properties
Properties to set
property sentiment
sentiment?: ISentiment;
Sentence sentiment.
property text
text?: ITextSpan;
Sentence text.
method create
static create: ( properties?: google.cloud.language.v2.ISentence) => google.cloud.language.v2.Sentence;
Creates a new Sentence instance using the specified properties.
Parameter properties
Properties to set
Returns
Sentence instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.Sentence;
Decodes a Sentence message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Sentence
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.Sentence;
Decodes a Sentence message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Sentence
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.ISentence, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentence message. Does not implicitly verify messages.
Parameter message
Sentence message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.ISentence, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentence message, length delimited. Does not implicitly verify messages.
Parameter message
Sentence message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.Sentence;
Creates a Sentence message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Sentence
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Sentence
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Sentence to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.Sentence, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Sentence message. Also converts values to other types if specified.
Parameter message
Sentence
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Sentence message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Sentiment
class Sentiment implements ISentiment {}
Represents a Sentiment.
constructor
constructor(properties?: ISentiment);
Constructs a new Sentiment.
Parameter properties
Properties to set
property magnitude
magnitude: number;
Sentiment magnitude.
property score
score: number;
Sentiment score.
method create
static create: ( properties?: google.cloud.language.v2.ISentiment) => google.cloud.language.v2.Sentiment;
Creates a new Sentiment instance using the specified properties.
Parameter properties
Properties to set
Returns
Sentiment instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.Sentiment;
Decodes a Sentiment message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Sentiment
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.Sentiment;
Decodes a Sentiment message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Sentiment
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.ISentiment, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentiment message. Does not implicitly verify messages.
Parameter message
Sentiment message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.ISentiment, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Sentiment message, length delimited. Does not implicitly verify messages.
Parameter message
Sentiment message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.Sentiment;
Creates a Sentiment message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Sentiment
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Sentiment
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Sentiment to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.Sentiment, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Sentiment message. Also converts values to other types if specified.
Parameter message
Sentiment
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Sentiment message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class TextSpan
class TextSpan implements ITextSpan {}
Represents a TextSpan.
constructor
constructor(properties?: ITextSpan);
Constructs a new TextSpan.
Parameter properties
Properties to set
property beginOffset
beginOffset: number;
TextSpan beginOffset.
property content
content: string;
TextSpan content.
method create
static create: ( properties?: google.cloud.language.v2.ITextSpan) => google.cloud.language.v2.TextSpan;
Creates a new TextSpan instance using the specified properties.
Parameter properties
Properties to set
Returns
TextSpan instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.cloud.language.v2.TextSpan;
Decodes a TextSpan message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
TextSpan
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.cloud.language.v2.TextSpan;
Decodes a TextSpan message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
TextSpan
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.cloud.language.v2.ITextSpan, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified TextSpan message. Does not implicitly verify messages.
Parameter message
TextSpan message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.cloud.language.v2.ITextSpan, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified TextSpan message, length delimited. Does not implicitly verify messages.
Parameter message
TextSpan message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.cloud.language.v2.TextSpan;
Creates a TextSpan message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
TextSpan
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for TextSpan
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this TextSpan to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.cloud.language.v2.TextSpan, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a TextSpan message. Also converts values to other types if specified.
Parameter message
TextSpan
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a TextSpan message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface IAnalyzeEntitiesRequest
interface IAnalyzeEntitiesRequest {}
Properties of an AnalyzeEntitiesRequest.
property document
document?: google.cloud.language.v2.IDocument | null;
AnalyzeEntitiesRequest document
property encodingType
encodingType?: | google.cloud.language.v2.EncodingType | keyof typeof google.cloud.language.v2.EncodingType | null;
AnalyzeEntitiesRequest encodingType
interface IAnalyzeEntitiesResponse
interface IAnalyzeEntitiesResponse {}
Properties of an AnalyzeEntitiesResponse.
property entities
entities?: google.cloud.language.v2.IEntity[] | null;
AnalyzeEntitiesResponse entities
property languageCode
languageCode?: string | null;
AnalyzeEntitiesResponse languageCode
property languageSupported
languageSupported?: boolean | null;
AnalyzeEntitiesResponse languageSupported
interface IAnalyzeSentimentRequest
interface IAnalyzeSentimentRequest {}
Properties of an AnalyzeSentimentRequest.
property document
document?: google.cloud.language.v2.IDocument | null;
AnalyzeSentimentRequest document
property encodingType
encodingType?: | google.cloud.language.v2.EncodingType | keyof typeof google.cloud.language.v2.EncodingType | null;
AnalyzeSentimentRequest encodingType
interface IAnalyzeSentimentResponse
interface IAnalyzeSentimentResponse {}
Properties of an AnalyzeSentimentResponse.
property documentSentiment
documentSentiment?: google.cloud.language.v2.ISentiment | null;
AnalyzeSentimentResponse documentSentiment
property languageCode
languageCode?: string | null;
AnalyzeSentimentResponse languageCode
property languageSupported
languageSupported?: boolean | null;
AnalyzeSentimentResponse languageSupported
property sentences
sentences?: google.cloud.language.v2.ISentence[] | null;
AnalyzeSentimentResponse sentences
interface IAnnotateTextRequest
interface IAnnotateTextRequest {}
Properties of an AnnotateTextRequest.
property document
document?: google.cloud.language.v2.IDocument | null;
AnnotateTextRequest document
property encodingType
encodingType?: | google.cloud.language.v2.EncodingType | keyof typeof google.cloud.language.v2.EncodingType | null;
AnnotateTextRequest encodingType
property features
features?: google.cloud.language.v2.AnnotateTextRequest.IFeatures | null;
AnnotateTextRequest features
interface IAnnotateTextResponse
interface IAnnotateTextResponse {}
Properties of an AnnotateTextResponse.
property categories
categories?: google.cloud.language.v2.IClassificationCategory[] | null;
AnnotateTextResponse categories
property documentSentiment
documentSentiment?: google.cloud.language.v2.ISentiment | null;
AnnotateTextResponse documentSentiment
property entities
entities?: google.cloud.language.v2.IEntity[] | null;
AnnotateTextResponse entities
property languageCode
languageCode?: string | null;
AnnotateTextResponse languageCode
property languageSupported
languageSupported?: boolean | null;
AnnotateTextResponse languageSupported
property moderationCategories
moderationCategories?: google.cloud.language.v2.IClassificationCategory[] | null;
AnnotateTextResponse moderationCategories
property sentences
sentences?: google.cloud.language.v2.ISentence[] | null;
AnnotateTextResponse sentences
interface IClassificationCategory
interface IClassificationCategory {}
Properties of a ClassificationCategory.
property confidence
confidence?: number | null;
ClassificationCategory confidence
property name
name?: string | null;
ClassificationCategory name
property severity
severity?: number | null;
ClassificationCategory severity
interface IClassifyTextRequest
interface IClassifyTextRequest {}
Properties of a ClassifyTextRequest.
property document
document?: google.cloud.language.v2.IDocument | null;
ClassifyTextRequest document
interface IClassifyTextResponse
interface IClassifyTextResponse {}
Properties of a ClassifyTextResponse.
property categories
categories?: google.cloud.language.v2.IClassificationCategory[] | null;
ClassifyTextResponse categories
property languageCode
languageCode?: string | null;
ClassifyTextResponse languageCode
property languageSupported
languageSupported?: boolean | null;
ClassifyTextResponse languageSupported
interface IDocument
interface IDocument {}
Properties of a Document.
property content
content?: string | null;
Document content
property gcsContentUri
gcsContentUri?: string | null;
Document gcsContentUri
property languageCode
languageCode?: string | null;
Document languageCode
property type
type?: | google.cloud.language.v2.Document.Type | keyof typeof google.cloud.language.v2.Document.Type | null;
Document type
interface IEntity
interface IEntity {}
Properties of an Entity.
property mentions
mentions?: google.cloud.language.v2.IEntityMention[] | null;
Entity mentions
property metadata
metadata?: { [k: string]: string } | null;
Entity metadata
property name
name?: string | null;
Entity name
property sentiment
sentiment?: google.cloud.language.v2.ISentiment | null;
Entity sentiment
property type
type?: | google.cloud.language.v2.Entity.Type | keyof typeof google.cloud.language.v2.Entity.Type | null;
Entity type
interface IEntityMention
interface IEntityMention {}
Properties of an EntityMention.
property probability
probability?: number | null;
EntityMention probability
property sentiment
sentiment?: google.cloud.language.v2.ISentiment | null;
EntityMention sentiment
property text
text?: google.cloud.language.v2.ITextSpan | null;
EntityMention text
property type
type?: | google.cloud.language.v2.EntityMention.Type | keyof typeof google.cloud.language.v2.EntityMention.Type | null;
EntityMention type
interface IModerateTextRequest
interface IModerateTextRequest {}
Properties of a ModerateTextRequest.
property document
document?: google.cloud.language.v2.IDocument | null;
ModerateTextRequest document
property modelVersion
modelVersion?: | google.cloud.language.v2.ModerateTextRequest.ModelVersion | keyof typeof google.cloud.language.v2.ModerateTextRequest.ModelVersion | null;
ModerateTextRequest modelVersion
interface IModerateTextResponse
interface IModerateTextResponse {}
Properties of a ModerateTextResponse.
property languageCode
languageCode?: string | null;
ModerateTextResponse languageCode
property languageSupported
languageSupported?: boolean | null;
ModerateTextResponse languageSupported
property moderationCategories
moderationCategories?: google.cloud.language.v2.IClassificationCategory[] | null;
ModerateTextResponse moderationCategories
interface ISentence
interface ISentence {}
Properties of a Sentence.
interface ISentiment
interface ISentiment {}
Properties of a Sentiment.
interface ITextSpan
interface ITextSpan {}
Properties of a TextSpan.
property beginOffset
beginOffset?: number | null;
TextSpan beginOffset
property content
content?: string | null;
TextSpan content
enum EncodingType
enum EncodingType { NONE = 0, UTF8 = 1, UTF16 = 2, UTF32 = 3,}
EncodingType enum.
namespace protos.google.protobuf
namespace protos.google.protobuf {}
Namespace protobuf.
class DescriptorProto
class DescriptorProto implements IDescriptorProto {}
Represents a DescriptorProto.
constructor
constructor(properties?: IDescriptorProto);
Constructs a new DescriptorProto.
Parameter properties
Properties to set
property enumType
enumType: IEnumDescriptorProto[];
DescriptorProto enumType.
property extension
extension: IFieldDescriptorProto[];
DescriptorProto extension.
property extensionRange
extensionRange: DescriptorProto.IExtensionRange[];
DescriptorProto extensionRange.
property field
field: IFieldDescriptorProto[];
DescriptorProto field.
property name
name: string;
DescriptorProto name.
property nestedType
nestedType: IDescriptorProto[];
DescriptorProto nestedType.
property oneofDecl
oneofDecl: IOneofDescriptorProto[];
DescriptorProto oneofDecl.
property options
options?: IMessageOptions;
DescriptorProto options.
property reservedName
reservedName: string[];
DescriptorProto reservedName.
property reservedRange
reservedRange: DescriptorProto.IReservedRange[];
DescriptorProto reservedRange.
method create
static create: ( properties?: google.protobuf.IDescriptorProto) => google.protobuf.DescriptorProto;
Creates a new DescriptorProto instance using the specified properties.
Parameter properties
Properties to set
Returns
DescriptorProto instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.DescriptorProto;
Decodes a DescriptorProto message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
DescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.DescriptorProto;
Decodes a DescriptorProto message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
DescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified DescriptorProto message. Does not implicitly verify messages.
Parameter message
DescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified DescriptorProto message, length delimited. Does not implicitly verify messages.
Parameter message
DescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.DescriptorProto;
Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
DescriptorProto
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for DescriptorProto
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this DescriptorProto to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a DescriptorProto message. Also converts values to other types if specified.
Parameter message
DescriptorProto
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a DescriptorProto message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class Duration
class Duration implements IDuration {}
Represents a Duration.
constructor
constructor(properties?: IDuration);
Constructs a new Duration.
Parameter properties
Properties to set
property nanos
nanos: number;
Duration nanos.
property seconds
seconds: any;
Duration seconds.
method create
static create: ( properties?: google.protobuf.IDuration) => google.protobuf.Duration;
Creates a new Duration instance using the specified properties.
Parameter properties
Properties to set
Returns
Duration instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.Duration;
Decodes a Duration message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Duration
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.Duration;
Decodes a Duration message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Duration
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IDuration, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Duration message. Does not implicitly verify messages.
Parameter message
Duration message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IDuration, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Duration message, length delimited. Does not implicitly verify messages.
Parameter message
Duration message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.protobuf.Duration;
Creates a Duration message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Duration
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Duration
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Duration to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.Duration, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Duration message. Also converts values to other types if specified.
Parameter message
Duration
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Duration message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class EnumDescriptorProto
class EnumDescriptorProto implements IEnumDescriptorProto {}
Represents an EnumDescriptorProto.
constructor
constructor(properties?: IEnumDescriptorProto);
Constructs a new EnumDescriptorProto.
Parameter properties
Properties to set
property name
name: string;
EnumDescriptorProto name.
property options
options?: IEnumOptions;
EnumDescriptorProto options.
property reservedName
reservedName: string[];
EnumDescriptorProto reservedName.
property reservedRange
reservedRange: EnumDescriptorProto.IEnumReservedRange[];
EnumDescriptorProto reservedRange.
property value
value: IEnumValueDescriptorProto[];
EnumDescriptorProto value.
method create
static create: ( properties?: google.protobuf.IEnumDescriptorProto) => google.protobuf.EnumDescriptorProto;
Creates a new EnumDescriptorProto instance using the specified properties.
Parameter properties
Properties to set
Returns
EnumDescriptorProto instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.EnumDescriptorProto;
Decodes an EnumDescriptorProto message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
EnumDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.EnumDescriptorProto;
Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
EnumDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EnumDescriptorProto message. Does not implicitly verify messages.
Parameter message
EnumDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly verify messages.
Parameter message
EnumDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.EnumDescriptorProto;
Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
EnumDescriptorProto
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for EnumDescriptorProto
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this EnumDescriptorProto to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified.
Parameter message
EnumDescriptorProto
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an EnumDescriptorProto message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class EnumOptions
class EnumOptions implements IEnumOptions {}
Represents an EnumOptions.
constructor
constructor(properties?: IEnumOptions);
Constructs a new EnumOptions.
Parameter properties
Properties to set
property allowAlias
allowAlias: boolean;
EnumOptions allowAlias.
property deprecated
deprecated: boolean;
EnumOptions deprecated.
property deprecatedLegacyJsonFieldConflicts
deprecatedLegacyJsonFieldConflicts: boolean;
EnumOptions deprecatedLegacyJsonFieldConflicts.
property features
features?: IFeatureSet;
EnumOptions features.
property uninterpretedOption
uninterpretedOption: IUninterpretedOption[];
EnumOptions uninterpretedOption.
method create
static create: ( properties?: google.protobuf.IEnumOptions) => google.protobuf.EnumOptions;
Creates a new EnumOptions instance using the specified properties.
Parameter properties
Properties to set
Returns
EnumOptions instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.EnumOptions;
Decodes an EnumOptions message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
EnumOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.EnumOptions;
Decodes an EnumOptions message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
EnumOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EnumOptions message. Does not implicitly verify messages.
Parameter message
EnumOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EnumOptions message, length delimited. Does not implicitly verify messages.
Parameter message
EnumOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.protobuf.EnumOptions;
Creates an EnumOptions message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
EnumOptions
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for EnumOptions
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this EnumOptions to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an EnumOptions message. Also converts values to other types if specified.
Parameter message
EnumOptions
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an EnumOptions message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class EnumValueDescriptorProto
class EnumValueDescriptorProto implements IEnumValueDescriptorProto {}
Represents an EnumValueDescriptorProto.
constructor
constructor(properties?: IEnumValueDescriptorProto);
Constructs a new EnumValueDescriptorProto.
Parameter properties
Properties to set
property name
name: string;
EnumValueDescriptorProto name.
property number
number: number;
EnumValueDescriptorProto number.
property options
options?: IEnumValueOptions;
EnumValueDescriptorProto options.
method create
static create: ( properties?: google.protobuf.IEnumValueDescriptorProto) => google.protobuf.EnumValueDescriptorProto;
Creates a new EnumValueDescriptorProto instance using the specified properties.
Parameter properties
Properties to set
Returns
EnumValueDescriptorProto instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.EnumValueDescriptorProto;
Decodes an EnumValueDescriptorProto message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
EnumValueDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.EnumValueDescriptorProto;
Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
EnumValueDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EnumValueDescriptorProto message. Does not implicitly verify messages.
Parameter message
EnumValueDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly verify messages.
Parameter message
EnumValueDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.EnumValueDescriptorProto;
Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
EnumValueDescriptorProto
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for EnumValueDescriptorProto
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this EnumValueDescriptorProto to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified.
Parameter message
EnumValueDescriptorProto
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an EnumValueDescriptorProto message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class EnumValueOptions
class EnumValueOptions implements IEnumValueOptions {}
Represents an EnumValueOptions.
constructor
constructor(properties?: IEnumValueOptions);
Constructs a new EnumValueOptions.
Parameter properties
Properties to set
property debugRedact
debugRedact: boolean;
EnumValueOptions debugRedact.
property deprecated
deprecated: boolean;
EnumValueOptions deprecated.
property features
features?: IFeatureSet;
EnumValueOptions features.
property uninterpretedOption
uninterpretedOption: IUninterpretedOption[];
EnumValueOptions uninterpretedOption.
method create
static create: ( properties?: google.protobuf.IEnumValueOptions) => google.protobuf.EnumValueOptions;
Creates a new EnumValueOptions instance using the specified properties.
Parameter properties
Properties to set
Returns
EnumValueOptions instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.EnumValueOptions;
Decodes an EnumValueOptions message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
EnumValueOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.EnumValueOptions;
Decodes an EnumValueOptions message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
EnumValueOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EnumValueOptions message. Does not implicitly verify messages.
Parameter message
EnumValueOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EnumValueOptions message, length delimited. Does not implicitly verify messages.
Parameter message
EnumValueOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.EnumValueOptions;
Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
EnumValueOptions
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for EnumValueOptions
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this EnumValueOptions to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified.
Parameter message
EnumValueOptions
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an EnumValueOptions message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ExtensionRangeOptions
class ExtensionRangeOptions implements IExtensionRangeOptions {}
Represents an ExtensionRangeOptions.
constructor
constructor(properties?: IExtensionRangeOptions);
Constructs a new ExtensionRangeOptions.
Parameter properties
Properties to set
property declaration
declaration: ExtensionRangeOptions.IDeclaration[];
ExtensionRangeOptions declaration.
property features
features?: IFeatureSet;
ExtensionRangeOptions features.
property uninterpretedOption
uninterpretedOption: IUninterpretedOption[];
ExtensionRangeOptions uninterpretedOption.
property verification
verification: | ExtensionRangeOptions.VerificationState | 'DECLARATION' | 'UNVERIFIED';
ExtensionRangeOptions verification.
method create
static create: ( properties?: google.protobuf.IExtensionRangeOptions) => google.protobuf.ExtensionRangeOptions;
Creates a new ExtensionRangeOptions instance using the specified properties.
Parameter properties
Properties to set
Returns
ExtensionRangeOptions instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.ExtensionRangeOptions;
Decodes an ExtensionRangeOptions message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ExtensionRangeOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.ExtensionRangeOptions;
Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ExtensionRangeOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ExtensionRangeOptions message. Does not implicitly verify messages.
Parameter message
ExtensionRangeOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly verify messages.
Parameter message
ExtensionRangeOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.ExtensionRangeOptions;
Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ExtensionRangeOptions
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ExtensionRangeOptions
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ExtensionRangeOptions to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified.
Parameter message
ExtensionRangeOptions
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an ExtensionRangeOptions message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class FeatureSet
class FeatureSet implements IFeatureSet {}
Represents a FeatureSet.
constructor
constructor(properties?: IFeatureSet);
Constructs a new FeatureSet.
Parameter properties
Properties to set
property enumType
enumType: FeatureSet.EnumType | 'ENUM_TYPE_UNKNOWN' | 'OPEN' | 'CLOSED';
FeatureSet enumType.
property fieldPresence
fieldPresence: | FeatureSet.FieldPresence | 'FIELD_PRESENCE_UNKNOWN' | 'EXPLICIT' | 'IMPLICIT' | 'LEGACY_REQUIRED';
FeatureSet fieldPresence.
property jsonFormat
jsonFormat: | FeatureSet.JsonFormat | 'JSON_FORMAT_UNKNOWN' | 'ALLOW' | 'LEGACY_BEST_EFFORT';
FeatureSet jsonFormat.
property messageEncoding
messageEncoding: | FeatureSet.MessageEncoding | 'MESSAGE_ENCODING_UNKNOWN' | 'LENGTH_PREFIXED' | 'DELIMITED';
FeatureSet messageEncoding.
property repeatedFieldEncoding
repeatedFieldEncoding: | FeatureSet.RepeatedFieldEncoding | 'REPEATED_FIELD_ENCODING_UNKNOWN' | 'PACKED' | 'EXPANDED';
FeatureSet repeatedFieldEncoding.
property utf8Validation
utf8Validation: | 'NONE' | FeatureSet.Utf8Validation | 'UTF8_VALIDATION_UNKNOWN' | 'VERIFY';
FeatureSet utf8Validation.
method create
static create: ( properties?: google.protobuf.IFeatureSet) => google.protobuf.FeatureSet;
Creates a new FeatureSet instance using the specified properties.
Parameter properties
Properties to set
Returns
FeatureSet instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.FeatureSet;
Decodes a FeatureSet message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
FeatureSet
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.FeatureSet;
Decodes a FeatureSet message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
FeatureSet
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FeatureSet message. Does not implicitly verify messages.
Parameter message
FeatureSet message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FeatureSet message, length delimited. Does not implicitly verify messages.
Parameter message
FeatureSet message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.protobuf.FeatureSet;
Creates a FeatureSet message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
FeatureSet
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for FeatureSet
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this FeatureSet to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a FeatureSet message. Also converts values to other types if specified.
Parameter message
FeatureSet
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a FeatureSet message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class FeatureSetDefaults
class FeatureSetDefaults implements IFeatureSetDefaults {}
Represents a FeatureSetDefaults.
constructor
constructor(properties?: IFeatureSetDefaults);
Constructs a new FeatureSetDefaults.
Parameter properties
Properties to set
property defaults
defaults: FeatureSetDefaults.IFeatureSetEditionDefault[];
FeatureSetDefaults defaults.
property maximumEdition
maximumEdition: | Edition | 'EDITION_UNKNOWN' | 'EDITION_PROTO2' | 'EDITION_PROTO3' | 'EDITION_2023' | 'EDITION_2024' | 'EDITION_1_TEST_ONLY' | 'EDITION_2_TEST_ONLY' | 'EDITION_99997_TEST_ONLY' | 'EDITION_99998_TEST_ONLY' | 'EDITION_99999_TEST_ONLY' | 'EDITION_MAX';
FeatureSetDefaults maximumEdition.
property minimumEdition
minimumEdition: | Edition | 'EDITION_UNKNOWN' | 'EDITION_PROTO2' | 'EDITION_PROTO3' | 'EDITION_2023' | 'EDITION_2024' | 'EDITION_1_TEST_ONLY' | 'EDITION_2_TEST_ONLY' | 'EDITION_99997_TEST_ONLY' | 'EDITION_99998_TEST_ONLY' | 'EDITION_99999_TEST_ONLY' | 'EDITION_MAX';
FeatureSetDefaults minimumEdition.
method create
static create: ( properties?: google.protobuf.IFeatureSetDefaults) => google.protobuf.FeatureSetDefaults;
Creates a new FeatureSetDefaults instance using the specified properties.
Parameter properties
Properties to set
Returns
FeatureSetDefaults instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.FeatureSetDefaults;
Decodes a FeatureSetDefaults message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
FeatureSetDefaults
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.FeatureSetDefaults;
Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
FeatureSetDefaults
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FeatureSetDefaults message. Does not implicitly verify messages.
Parameter message
FeatureSetDefaults message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly verify messages.
Parameter message
FeatureSetDefaults message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.FeatureSetDefaults;
Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
FeatureSetDefaults
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for FeatureSetDefaults
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this FeatureSetDefaults to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified.
Parameter message
FeatureSetDefaults
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a FeatureSetDefaults message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class FieldDescriptorProto
class FieldDescriptorProto implements IFieldDescriptorProto {}
Represents a FieldDescriptorProto.
constructor
constructor(properties?: IFieldDescriptorProto);
Constructs a new FieldDescriptorProto.
Parameter properties
Properties to set
property defaultValue
defaultValue: string;
FieldDescriptorProto defaultValue.
property extendee
extendee: string;
FieldDescriptorProto extendee.
property jsonName
jsonName: string;
FieldDescriptorProto jsonName.
property label
label: | FieldDescriptorProto.Label | 'LABEL_OPTIONAL' | 'LABEL_REPEATED' | 'LABEL_REQUIRED';
FieldDescriptorProto label.
property name
name: string;
FieldDescriptorProto name.
property number
number: number;
FieldDescriptorProto number.
property oneofIndex
oneofIndex: number;
FieldDescriptorProto oneofIndex.
property options
options?: IFieldOptions;
FieldDescriptorProto options.
property proto3Optional
proto3Optional: boolean;
FieldDescriptorProto proto3Optional.
property type
type: | FieldDescriptorProto.Type | 'TYPE_DOUBLE' | 'TYPE_FLOAT' | 'TYPE_INT64' | 'TYPE_UINT64' | 'TYPE_INT32' | 'TYPE_FIXED64' | 'TYPE_FIXED32' | 'TYPE_BOOL' | 'TYPE_STRING' | 'TYPE_GROUP' | 'TYPE_MESSAGE' | 'TYPE_BYTES' | 'TYPE_UINT32' | 'TYPE_ENUM' | 'TYPE_SFIXED32' | 'TYPE_SFIXED64' | 'TYPE_SINT32' | 'TYPE_SINT64';
FieldDescriptorProto type.
property typeName
typeName: string;
FieldDescriptorProto typeName.
method create
static create: ( properties?: google.protobuf.IFieldDescriptorProto) => google.protobuf.FieldDescriptorProto;
Creates a new FieldDescriptorProto instance using the specified properties.
Parameter properties
Properties to set
Returns
FieldDescriptorProto instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.FieldDescriptorProto;
Decodes a FieldDescriptorProto message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
FieldDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.FieldDescriptorProto;
Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
FieldDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FieldDescriptorProto message. Does not implicitly verify messages.
Parameter message
FieldDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly verify messages.
Parameter message
FieldDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.FieldDescriptorProto;
Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
FieldDescriptorProto
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for FieldDescriptorProto
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this FieldDescriptorProto to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.
Parameter message
FieldDescriptorProto
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a FieldDescriptorProto message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class FieldOptions
class FieldOptions implements IFieldOptions {}
Represents a FieldOptions.
constructor
constructor(properties?: IFieldOptions);
Constructs a new FieldOptions.
Parameter properties
Properties to set
property ctype
ctype: FieldOptions.CType | 'STRING' | 'CORD' | 'STRING_PIECE';
FieldOptions ctype.
property debugRedact
debugRedact: boolean;
FieldOptions debugRedact.
property deprecated
deprecated: boolean;
FieldOptions deprecated.
property editionDefaults
editionDefaults: FieldOptions.IEditionDefault[];
FieldOptions editionDefaults.
property features
features?: IFeatureSet;
FieldOptions features.
property jstype
jstype: FieldOptions.JSType | 'JS_NORMAL' | 'JS_STRING' | 'JS_NUMBER';
FieldOptions jstype.
property lazy
lazy: boolean;
FieldOptions lazy.
property packed
packed: boolean;
FieldOptions packed.
property retention
retention: | FieldOptions.OptionRetention | 'RETENTION_UNKNOWN' | 'RETENTION_RUNTIME' | 'RETENTION_SOURCE';
FieldOptions retention.
property targets
targets: FieldOptions.OptionTargetType[];
FieldOptions targets.
property uninterpretedOption
uninterpretedOption: IUninterpretedOption[];
FieldOptions uninterpretedOption.
property unverifiedLazy
unverifiedLazy: boolean;
FieldOptions unverifiedLazy.
property weak
weak: boolean;
FieldOptions weak.
method create
static create: ( properties?: google.protobuf.IFieldOptions) => google.protobuf.FieldOptions;
Creates a new FieldOptions instance using the specified properties.
Parameter properties
Properties to set
Returns
FieldOptions instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.FieldOptions;
Decodes a FieldOptions message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
FieldOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.FieldOptions;
Decodes a FieldOptions message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
FieldOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FieldOptions message. Does not implicitly verify messages.
Parameter message
FieldOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FieldOptions message, length delimited. Does not implicitly verify messages.
Parameter message
FieldOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.FieldOptions;
Creates a FieldOptions message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
FieldOptions
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for FieldOptions
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this FieldOptions to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a FieldOptions message. Also converts values to other types if specified.
Parameter message
FieldOptions
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a FieldOptions message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class FileDescriptorProto
class FileDescriptorProto implements IFileDescriptorProto {}
Represents a FileDescriptorProto.
constructor
constructor(properties?: IFileDescriptorProto);
Constructs a new FileDescriptorProto.
Parameter properties
Properties to set
property dependency
dependency: string[];
FileDescriptorProto dependency.
property edition
edition: | Edition | 'EDITION_UNKNOWN' | 'EDITION_PROTO2' | 'EDITION_PROTO3' | 'EDITION_2023' | 'EDITION_2024' | 'EDITION_1_TEST_ONLY' | 'EDITION_2_TEST_ONLY' | 'EDITION_99997_TEST_ONLY' | 'EDITION_99998_TEST_ONLY' | 'EDITION_99999_TEST_ONLY' | 'EDITION_MAX';
FileDescriptorProto edition.
property enumType
enumType: IEnumDescriptorProto[];
FileDescriptorProto enumType.
property extension
extension: IFieldDescriptorProto[];
FileDescriptorProto extension.
property messageType
messageType: IDescriptorProto[];
FileDescriptorProto messageType.
property name
name: string;
FileDescriptorProto name.
property options
options?: IFileOptions;
FileDescriptorProto options.
property package
package: string;
FileDescriptorProto package.
property publicDependency
publicDependency: number[];
FileDescriptorProto publicDependency.
property service
service: IServiceDescriptorProto[];
FileDescriptorProto service.
property sourceCodeInfo
sourceCodeInfo?: ISourceCodeInfo;
FileDescriptorProto sourceCodeInfo.
property syntax
syntax: string;
FileDescriptorProto syntax.
property weakDependency
weakDependency: number[];
FileDescriptorProto weakDependency.
method create
static create: ( properties?: google.protobuf.IFileDescriptorProto) => google.protobuf.FileDescriptorProto;
Creates a new FileDescriptorProto instance using the specified properties.
Parameter properties
Properties to set
Returns
FileDescriptorProto instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.FileDescriptorProto;
Decodes a FileDescriptorProto message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
FileDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.FileDescriptorProto;
Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
FileDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FileDescriptorProto message. Does not implicitly verify messages.
Parameter message
FileDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly verify messages.
Parameter message
FileDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.FileDescriptorProto;
Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
FileDescriptorProto
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for FileDescriptorProto
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this FileDescriptorProto to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified.
Parameter message
FileDescriptorProto
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a FileDescriptorProto message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class FileDescriptorSet
class FileDescriptorSet implements IFileDescriptorSet {}
Represents a FileDescriptorSet.
constructor
constructor(properties?: IFileDescriptorSet);
Constructs a new FileDescriptorSet.
Parameter properties
Properties to set
property file
file: IFileDescriptorProto[];
FileDescriptorSet file.
method create
static create: ( properties?: google.protobuf.IFileDescriptorSet) => google.protobuf.FileDescriptorSet;
Creates a new FileDescriptorSet instance using the specified properties.
Parameter properties
Properties to set
Returns
FileDescriptorSet instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.FileDescriptorSet;
Decodes a FileDescriptorSet message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
FileDescriptorSet
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.FileDescriptorSet;
Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
FileDescriptorSet
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FileDescriptorSet message. Does not implicitly verify messages.
Parameter message
FileDescriptorSet message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly verify messages.
Parameter message
FileDescriptorSet message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.FileDescriptorSet;
Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
FileDescriptorSet
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for FileDescriptorSet
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this FileDescriptorSet to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
Parameter message
FileDescriptorSet
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a FileDescriptorSet message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class FileOptions
class FileOptions implements IFileOptions {}
Represents a FileOptions.
constructor
constructor(properties?: IFileOptions);
Constructs a new FileOptions.
Parameter properties
Properties to set
property ccEnableArenas
ccEnableArenas: boolean;
FileOptions ccEnableArenas.
property ccGenericServices
ccGenericServices: boolean;
FileOptions ccGenericServices.
property csharpNamespace
csharpNamespace: string;
FileOptions csharpNamespace.
property deprecated
deprecated: boolean;
FileOptions deprecated.
property features
features?: IFeatureSet;
FileOptions features.
property goPackage
goPackage: string;
FileOptions goPackage.
property javaGenerateEqualsAndHash
javaGenerateEqualsAndHash: boolean;
FileOptions javaGenerateEqualsAndHash.
property javaGenericServices
javaGenericServices: boolean;
FileOptions javaGenericServices.
property javaMultipleFiles
javaMultipleFiles: boolean;
FileOptions javaMultipleFiles.
property javaOuterClassname
javaOuterClassname: string;
FileOptions javaOuterClassname.
property javaPackage
javaPackage: string;
FileOptions javaPackage.
property javaStringCheckUtf8
javaStringCheckUtf8: boolean;
FileOptions javaStringCheckUtf8.
property objcClassPrefix
objcClassPrefix: string;
FileOptions objcClassPrefix.
property optimizeFor
optimizeFor: FileOptions.OptimizeMode | 'SPEED' | 'CODE_SIZE' | 'LITE_RUNTIME';
FileOptions optimizeFor.
property phpClassPrefix
phpClassPrefix: string;
FileOptions phpClassPrefix.
property phpMetadataNamespace
phpMetadataNamespace: string;
FileOptions phpMetadataNamespace.
property phpNamespace
phpNamespace: string;
FileOptions phpNamespace.
property pyGenericServices
pyGenericServices: boolean;
FileOptions pyGenericServices.
property rubyPackage
rubyPackage: string;
FileOptions rubyPackage.
property swiftPrefix
swiftPrefix: string;
FileOptions swiftPrefix.
property uninterpretedOption
uninterpretedOption: IUninterpretedOption[];
FileOptions uninterpretedOption.
method create
static create: ( properties?: google.protobuf.IFileOptions) => google.protobuf.FileOptions;
Creates a new FileOptions instance using the specified properties.
Parameter properties
Properties to set
Returns
FileOptions instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.FileOptions;
Decodes a FileOptions message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
FileOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.FileOptions;
Decodes a FileOptions message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
FileOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IFileOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FileOptions message. Does not implicitly verify messages.
Parameter message
FileOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IFileOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FileOptions message, length delimited. Does not implicitly verify messages.
Parameter message
FileOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any }) => google.protobuf.FileOptions;
Creates a FileOptions message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
FileOptions
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for FileOptions
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this FileOptions to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a FileOptions message. Also converts values to other types if specified.
Parameter message
FileOptions
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a FileOptions message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class GeneratedCodeInfo
class GeneratedCodeInfo implements IGeneratedCodeInfo {}
Represents a GeneratedCodeInfo.
constructor
constructor(properties?: IGeneratedCodeInfo);
Constructs a new GeneratedCodeInfo.
Parameter properties
Properties to set
property annotation
annotation: GeneratedCodeInfo.IAnnotation[];
GeneratedCodeInfo annotation.
method create
static create: ( properties?: google.protobuf.IGeneratedCodeInfo) => google.protobuf.GeneratedCodeInfo;
Creates a new GeneratedCodeInfo instance using the specified properties.
Parameter properties
Properties to set
Returns
GeneratedCodeInfo instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.GeneratedCodeInfo;
Decodes a GeneratedCodeInfo message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
GeneratedCodeInfo
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.GeneratedCodeInfo;
Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
GeneratedCodeInfo
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified GeneratedCodeInfo message. Does not implicitly verify messages.
Parameter message
GeneratedCodeInfo message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly verify messages.
Parameter message
GeneratedCodeInfo message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.GeneratedCodeInfo;
Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
GeneratedCodeInfo
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for GeneratedCodeInfo
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this GeneratedCodeInfo to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified.
Parameter message
GeneratedCodeInfo
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a GeneratedCodeInfo message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class MessageOptions
class MessageOptions implements IMessageOptions {}
Represents a MessageOptions.
constructor
constructor(properties?: IMessageOptions);
Constructs a new MessageOptions.
Parameter properties
Properties to set
property deprecated
deprecated: boolean;
MessageOptions deprecated.
property deprecatedLegacyJsonFieldConflicts
deprecatedLegacyJsonFieldConflicts: boolean;
MessageOptions deprecatedLegacyJsonFieldConflicts.
property features
features?: IFeatureSet;
MessageOptions features.
property mapEntry
mapEntry: boolean;
MessageOptions mapEntry.
property messageSetWireFormat
messageSetWireFormat: boolean;
MessageOptions messageSetWireFormat.
property noStandardDescriptorAccessor
noStandardDescriptorAccessor: boolean;
MessageOptions noStandardDescriptorAccessor.
property uninterpretedOption
uninterpretedOption: IUninterpretedOption[];
MessageOptions uninterpretedOption.
method create
static create: ( properties?: google.protobuf.IMessageOptions) => google.protobuf.MessageOptions;
Creates a new MessageOptions instance using the specified properties.
Parameter properties
Properties to set
Returns
MessageOptions instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.MessageOptions;
Decodes a MessageOptions message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
MessageOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.MessageOptions;
Decodes a MessageOptions message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
MessageOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified MessageOptions message. Does not implicitly verify messages.
Parameter message
MessageOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified MessageOptions message, length delimited. Does not implicitly verify messages.
Parameter message
MessageOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.MessageOptions;
Creates a MessageOptions message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
MessageOptions
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for MessageOptions
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this MessageOptions to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a MessageOptions message. Also converts values to other types if specified.
Parameter message
MessageOptions
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a MessageOptions message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class MethodDescriptorProto
class MethodDescriptorProto implements IMethodDescriptorProto {}
Represents a MethodDescriptorProto.
constructor
constructor(properties?: IMethodDescriptorProto);
Constructs a new MethodDescriptorProto.
Parameter properties
Properties to set
property clientStreaming
clientStreaming: boolean;
MethodDescriptorProto clientStreaming.
property inputType
inputType: string;
MethodDescriptorProto inputType.
property name
name: string;
MethodDescriptorProto name.
property options
options?: IMethodOptions;
MethodDescriptorProto options.
property outputType
outputType: string;
MethodDescriptorProto outputType.
property serverStreaming
serverStreaming: boolean;
MethodDescriptorProto serverStreaming.
method create
static create: ( properties?: google.protobuf.IMethodDescriptorProto) => google.protobuf.MethodDescriptorProto;
Creates a new MethodDescriptorProto instance using the specified properties.
Parameter properties
Properties to set
Returns
MethodDescriptorProto instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.MethodDescriptorProto;
Decodes a MethodDescriptorProto message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
MethodDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.MethodDescriptorProto;
Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
MethodDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified MethodDescriptorProto message. Does not implicitly verify messages.
Parameter message
MethodDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly verify messages.
Parameter message
MethodDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.MethodDescriptorProto;
Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
MethodDescriptorProto
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for MethodDescriptorProto
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this MethodDescriptorProto to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified.
Parameter message
MethodDescriptorProto
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a MethodDescriptorProto message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class MethodOptions
class MethodOptions implements IMethodOptions {}
Represents a MethodOptions.
constructor
constructor(properties?: IMethodOptions);
Constructs a new MethodOptions.
Parameter properties
Properties to set
property deprecated
deprecated: boolean;
MethodOptions deprecated.
property features
features?: IFeatureSet;
MethodOptions features.
property idempotencyLevel
idempotencyLevel: | MethodOptions.IdempotencyLevel | 'IDEMPOTENCY_UNKNOWN' | 'NO_SIDE_EFFECTS' | 'IDEMPOTENT';
MethodOptions idempotencyLevel.
property uninterpretedOption
uninterpretedOption: IUninterpretedOption[];
MethodOptions uninterpretedOption.
method create
static create: ( properties?: google.protobuf.IMethodOptions) => google.protobuf.MethodOptions;
Creates a new MethodOptions instance using the specified properties.
Parameter properties
Properties to set
Returns
MethodOptions instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.MethodOptions;
Decodes a MethodOptions message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
MethodOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.MethodOptions;
Decodes a MethodOptions message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
MethodOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified MethodOptions message. Does not implicitly verify messages.
Parameter message
MethodOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified MethodOptions message, length delimited. Does not implicitly verify messages.
Parameter message
MethodOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.MethodOptions;
Creates a MethodOptions message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
MethodOptions
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for MethodOptions
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this MethodOptions to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a MethodOptions message. Also converts values to other types if specified.
Parameter message
MethodOptions
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a MethodOptions message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class OneofDescriptorProto
class OneofDescriptorProto implements IOneofDescriptorProto {}
Represents an OneofDescriptorProto.
constructor
constructor(properties?: IOneofDescriptorProto);
Constructs a new OneofDescriptorProto.
Parameter properties
Properties to set
property name
name: string;
OneofDescriptorProto name.
property options
options?: IOneofOptions;
OneofDescriptorProto options.
method create
static create: ( properties?: google.protobuf.IOneofDescriptorProto) => google.protobuf.OneofDescriptorProto;
Creates a new OneofDescriptorProto instance using the specified properties.
Parameter properties
Properties to set
Returns
OneofDescriptorProto instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.OneofDescriptorProto;
Decodes an OneofDescriptorProto message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
OneofDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.OneofDescriptorProto;
Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
OneofDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified OneofDescriptorProto message. Does not implicitly verify messages.
Parameter message
OneofDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly verify messages.
Parameter message
OneofDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.OneofDescriptorProto;
Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
OneofDescriptorProto
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for OneofDescriptorProto
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this OneofDescriptorProto to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified.
Parameter message
OneofDescriptorProto
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an OneofDescriptorProto message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class OneofOptions
class OneofOptions implements IOneofOptions {}
Represents an OneofOptions.
constructor
constructor(properties?: IOneofOptions);
Constructs a new OneofOptions.
Parameter properties
Properties to set
property features
features?: IFeatureSet;
OneofOptions features.
property uninterpretedOption
uninterpretedOption: IUninterpretedOption[];
OneofOptions uninterpretedOption.
method create
static create: ( properties?: google.protobuf.IOneofOptions) => google.protobuf.OneofOptions;
Creates a new OneofOptions instance using the specified properties.
Parameter properties
Properties to set
Returns
OneofOptions instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.OneofOptions;
Decodes an OneofOptions message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
OneofOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.OneofOptions;
Decodes an OneofOptions message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
OneofOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified OneofOptions message. Does not implicitly verify messages.
Parameter message
OneofOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified OneofOptions message, length delimited. Does not implicitly verify messages.
Parameter message
OneofOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.OneofOptions;
Creates an OneofOptions message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
OneofOptions
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for OneofOptions
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this OneofOptions to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an OneofOptions message. Also converts values to other types if specified.
Parameter message
OneofOptions
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an OneofOptions message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ServiceDescriptorProto
class ServiceDescriptorProto implements IServiceDescriptorProto {}
Represents a ServiceDescriptorProto.
constructor
constructor(properties?: IServiceDescriptorProto);
Constructs a new ServiceDescriptorProto.
Parameter properties
Properties to set
property method
method: IMethodDescriptorProto[];
ServiceDescriptorProto method.
property name
name: string;
ServiceDescriptorProto name.
property options
options?: IServiceOptions;
ServiceDescriptorProto options.
method create
static create: ( properties?: google.protobuf.IServiceDescriptorProto) => google.protobuf.ServiceDescriptorProto;
Creates a new ServiceDescriptorProto instance using the specified properties.
Parameter properties
Properties to set
Returns
ServiceDescriptorProto instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.ServiceDescriptorProto;
Decodes a ServiceDescriptorProto message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ServiceDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.ServiceDescriptorProto;
Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ServiceDescriptorProto
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ServiceDescriptorProto message. Does not implicitly verify messages.
Parameter message
ServiceDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly verify messages.
Parameter message
ServiceDescriptorProto message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.ServiceDescriptorProto;
Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ServiceDescriptorProto
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ServiceDescriptorProto
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ServiceDescriptorProto to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified.
Parameter message
ServiceDescriptorProto
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ServiceDescriptorProto message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ServiceOptions
class ServiceOptions implements IServiceOptions {}
Represents a ServiceOptions.
constructor
constructor(properties?: IServiceOptions);
Constructs a new ServiceOptions.
Parameter properties
Properties to set
property deprecated
deprecated: boolean;
ServiceOptions deprecated.
property features
features?: IFeatureSet;
ServiceOptions features.
property uninterpretedOption
uninterpretedOption: IUninterpretedOption[];
ServiceOptions uninterpretedOption.
method create
static create: ( properties?: google.protobuf.IServiceOptions) => google.protobuf.ServiceOptions;
Creates a new ServiceOptions instance using the specified properties.
Parameter properties
Properties to set
Returns
ServiceOptions instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.ServiceOptions;
Decodes a ServiceOptions message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ServiceOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.ServiceOptions;
Decodes a ServiceOptions message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ServiceOptions
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ServiceOptions message. Does not implicitly verify messages.
Parameter message
ServiceOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ServiceOptions message, length delimited. Does not implicitly verify messages.
Parameter message
ServiceOptions message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.ServiceOptions;
Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ServiceOptions
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ServiceOptions
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ServiceOptions to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ServiceOptions message. Also converts values to other types if specified.
Parameter message
ServiceOptions
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ServiceOptions message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class SourceCodeInfo
class SourceCodeInfo implements ISourceCodeInfo {}
Represents a SourceCodeInfo.
constructor
constructor(properties?: ISourceCodeInfo);
Constructs a new SourceCodeInfo.
Parameter properties
Properties to set
property location
location: SourceCodeInfo.ILocation[];
SourceCodeInfo location.
method create
static create: ( properties?: google.protobuf.ISourceCodeInfo) => google.protobuf.SourceCodeInfo;
Creates a new SourceCodeInfo instance using the specified properties.
Parameter properties
Properties to set
Returns
SourceCodeInfo instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.SourceCodeInfo;
Decodes a SourceCodeInfo message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
SourceCodeInfo
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.SourceCodeInfo;
Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
SourceCodeInfo
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified SourceCodeInfo message. Does not implicitly verify messages.
Parameter message
SourceCodeInfo message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly verify messages.
Parameter message
SourceCodeInfo message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.SourceCodeInfo;
Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
SourceCodeInfo
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for SourceCodeInfo
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this SourceCodeInfo to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified.
Parameter message
SourceCodeInfo
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a SourceCodeInfo message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class UninterpretedOption
class UninterpretedOption implements IUninterpretedOption {}
Represents an UninterpretedOption.
constructor
constructor(properties?: IUninterpretedOption);
Constructs a new UninterpretedOption.
Parameter properties
Properties to set
property aggregateValue
aggregateValue: string;
UninterpretedOption aggregateValue.
property doubleValue
doubleValue: number;
UninterpretedOption doubleValue.
property identifierValue
identifierValue: string;
UninterpretedOption identifierValue.
property name
name: UninterpretedOption.INamePart[];
UninterpretedOption name.
property negativeIntValue
negativeIntValue: any;
UninterpretedOption negativeIntValue.
property positiveIntValue
positiveIntValue: any;
UninterpretedOption positiveIntValue.
property stringValue
stringValue: string | Uint8Array;
UninterpretedOption stringValue.
method create
static create: ( properties?: google.protobuf.IUninterpretedOption) => google.protobuf.UninterpretedOption;
Creates a new UninterpretedOption instance using the specified properties.
Parameter properties
Properties to set
Returns
UninterpretedOption instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.UninterpretedOption;
Decodes an UninterpretedOption message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
UninterpretedOption
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.UninterpretedOption;
Decodes an UninterpretedOption message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
UninterpretedOption
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified UninterpretedOption message. Does not implicitly verify messages.
Parameter message
UninterpretedOption message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified UninterpretedOption message, length delimited. Does not implicitly verify messages.
Parameter message
UninterpretedOption message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.UninterpretedOption;
Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
UninterpretedOption
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for UninterpretedOption
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this UninterpretedOption to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified.
Parameter message
UninterpretedOption
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an UninterpretedOption message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface IDescriptorProto
interface IDescriptorProto {}
Properties of a DescriptorProto.
property enumType
enumType?: google.protobuf.IEnumDescriptorProto[] | null;
DescriptorProto enumType
property extension
extension?: google.protobuf.IFieldDescriptorProto[] | null;
DescriptorProto extension
property extensionRange
extensionRange?: google.protobuf.DescriptorProto.IExtensionRange[] | null;
DescriptorProto extensionRange
property field
field?: google.protobuf.IFieldDescriptorProto[] | null;
DescriptorProto field
property name
name?: string | null;
DescriptorProto name
property nestedType
nestedType?: google.protobuf.IDescriptorProto[] | null;
DescriptorProto nestedType
property oneofDecl
oneofDecl?: google.protobuf.IOneofDescriptorProto[] | null;
DescriptorProto oneofDecl
property options
options?: google.protobuf.IMessageOptions | null;
DescriptorProto options
property reservedName
reservedName?: string[] | null;
DescriptorProto reservedName
property reservedRange
reservedRange?: google.protobuf.DescriptorProto.IReservedRange[] | null;
DescriptorProto reservedRange
interface IDuration
interface IDuration {}
Properties of a Duration.
interface IEnumDescriptorProto
interface IEnumDescriptorProto {}
Properties of an EnumDescriptorProto.
property name
name?: string | null;
EnumDescriptorProto name
property options
options?: google.protobuf.IEnumOptions | null;
EnumDescriptorProto options
property reservedName
reservedName?: string[] | null;
EnumDescriptorProto reservedName
property reservedRange
reservedRange?: google.protobuf.EnumDescriptorProto.IEnumReservedRange[] | null;
EnumDescriptorProto reservedRange
property value
value?: google.protobuf.IEnumValueDescriptorProto[] | null;
EnumDescriptorProto value
interface IEnumOptions
interface IEnumOptions {}
Properties of an EnumOptions.
property allowAlias
allowAlias?: boolean | null;
EnumOptions allowAlias
property deprecated
deprecated?: boolean | null;
EnumOptions deprecated
property deprecatedLegacyJsonFieldConflicts
deprecatedLegacyJsonFieldConflicts?: boolean | null;
EnumOptions deprecatedLegacyJsonFieldConflicts
property features
features?: google.protobuf.IFeatureSet | null;
EnumOptions features
property uninterpretedOption
uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null;
EnumOptions uninterpretedOption
interface IEnumValueDescriptorProto
interface IEnumValueDescriptorProto {}
Properties of an EnumValueDescriptorProto.
interface IEnumValueOptions
interface IEnumValueOptions {}
Properties of an EnumValueOptions.
property debugRedact
debugRedact?: boolean | null;
EnumValueOptions debugRedact
property deprecated
deprecated?: boolean | null;
EnumValueOptions deprecated
property features
features?: google.protobuf.IFeatureSet | null;
EnumValueOptions features
property uninterpretedOption
uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null;
EnumValueOptions uninterpretedOption
interface IExtensionRangeOptions
interface IExtensionRangeOptions {}
Properties of an ExtensionRangeOptions.
property declaration
declaration?: google.protobuf.ExtensionRangeOptions.IDeclaration[] | null;
ExtensionRangeOptions declaration
property features
features?: google.protobuf.IFeatureSet | null;
ExtensionRangeOptions features
property uninterpretedOption
uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null;
ExtensionRangeOptions uninterpretedOption
property verification
verification?: | google.protobuf.ExtensionRangeOptions.VerificationState | keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState | null;
ExtensionRangeOptions verification
interface IFeatureSet
interface IFeatureSet {}
Properties of a FeatureSet.
property enumType
enumType?: | google.protobuf.FeatureSet.EnumType | keyof typeof google.protobuf.FeatureSet.EnumType | null;
FeatureSet enumType
property fieldPresence
fieldPresence?: | google.protobuf.FeatureSet.FieldPresence | keyof typeof google.protobuf.FeatureSet.FieldPresence | null;
FeatureSet fieldPresence
property jsonFormat
jsonFormat?: | google.protobuf.FeatureSet.JsonFormat | keyof typeof google.protobuf.FeatureSet.JsonFormat | null;
FeatureSet jsonFormat
property messageEncoding
messageEncoding?: | google.protobuf.FeatureSet.MessageEncoding | keyof typeof google.protobuf.FeatureSet.MessageEncoding | null;
FeatureSet messageEncoding
property repeatedFieldEncoding
repeatedFieldEncoding?: | google.protobuf.FeatureSet.RepeatedFieldEncoding | keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding | null;
FeatureSet repeatedFieldEncoding
property utf8Validation
utf8Validation?: | google.protobuf.FeatureSet.Utf8Validation | keyof typeof google.protobuf.FeatureSet.Utf8Validation | null;
FeatureSet utf8Validation
interface IFeatureSetDefaults
interface IFeatureSetDefaults {}
Properties of a FeatureSetDefaults.
property defaults
defaults?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[] | null;
FeatureSetDefaults defaults
property maximumEdition
maximumEdition?: | google.protobuf.Edition | keyof typeof google.protobuf.Edition | null;
FeatureSetDefaults maximumEdition
property minimumEdition
minimumEdition?: | google.protobuf.Edition | keyof typeof google.protobuf.Edition | null;
FeatureSetDefaults minimumEdition
interface IFieldDescriptorProto
interface IFieldDescriptorProto {}
Properties of a FieldDescriptorProto.
property defaultValue
defaultValue?: string | null;
FieldDescriptorProto defaultValue
property extendee
extendee?: string | null;
FieldDescriptorProto extendee
property jsonName
jsonName?: string | null;
FieldDescriptorProto jsonName
property label
label?: | google.protobuf.FieldDescriptorProto.Label | keyof typeof google.protobuf.FieldDescriptorProto.Label | null;
FieldDescriptorProto label
property name
name?: string | null;
FieldDescriptorProto name
property number
number?: number | null;
FieldDescriptorProto number
property oneofIndex
oneofIndex?: number | null;
FieldDescriptorProto oneofIndex
property options
options?: google.protobuf.IFieldOptions | null;
FieldDescriptorProto options
property proto3Optional
proto3Optional?: boolean | null;
FieldDescriptorProto proto3Optional
property type
type?: | google.protobuf.FieldDescriptorProto.Type | keyof typeof google.protobuf.FieldDescriptorProto.Type | null;
FieldDescriptorProto type
property typeName
typeName?: string | null;
FieldDescriptorProto typeName
interface IFieldOptions
interface IFieldOptions {}
Properties of a FieldOptions.
property ".google.api.fieldBehavior"
'.google.api.fieldBehavior'?: google.api.FieldBehavior[] | null;
FieldOptions .google.api.fieldBehavior
property ctype
ctype?: | google.protobuf.FieldOptions.CType | keyof typeof google.protobuf.FieldOptions.CType | null;
FieldOptions ctype
property debugRedact
debugRedact?: boolean | null;
FieldOptions debugRedact
property deprecated
deprecated?: boolean | null;
FieldOptions deprecated
property editionDefaults
editionDefaults?: google.protobuf.FieldOptions.IEditionDefault[] | null;
FieldOptions editionDefaults
property features
features?: google.protobuf.IFeatureSet | null;
FieldOptions features
property jstype
jstype?: | google.protobuf.FieldOptions.JSType | keyof typeof google.protobuf.FieldOptions.JSType | null;
FieldOptions jstype
property lazy
lazy?: boolean | null;
FieldOptions lazy
property packed
packed?: boolean | null;
FieldOptions packed
property retention
retention?: | google.protobuf.FieldOptions.OptionRetention | keyof typeof google.protobuf.FieldOptions.OptionRetention | null;
FieldOptions retention
property targets
targets?: google.protobuf.FieldOptions.OptionTargetType[] | null;
FieldOptions targets
property uninterpretedOption
uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null;
FieldOptions uninterpretedOption
property unverifiedLazy
unverifiedLazy?: boolean | null;
FieldOptions unverifiedLazy
property weak
weak?: boolean | null;
FieldOptions weak
interface IFileDescriptorProto
interface IFileDescriptorProto {}
Properties of a FileDescriptorProto.
property "package"
package?: string | null;
FileDescriptorProto package
property dependency
dependency?: string[] | null;
FileDescriptorProto dependency
property edition
edition?: google.protobuf.Edition | keyof typeof google.protobuf.Edition | null;
FileDescriptorProto edition
property enumType
enumType?: google.protobuf.IEnumDescriptorProto[] | null;
FileDescriptorProto enumType
property extension
extension?: google.protobuf.IFieldDescriptorProto[] | null;
FileDescriptorProto extension
property messageType
messageType?: google.protobuf.IDescriptorProto[] | null;
FileDescriptorProto messageType
property name
name?: string | null;
FileDescriptorProto name
property options
options?: google.protobuf.IFileOptions | null;
FileDescriptorProto options
property publicDependency
publicDependency?: number[] | null;
FileDescriptorProto publicDependency
property service
service?: google.protobuf.IServiceDescriptorProto[] | null;
FileDescriptorProto service
property sourceCodeInfo
sourceCodeInfo?: google.protobuf.ISourceCodeInfo | null;
FileDescriptorProto sourceCodeInfo
property syntax
syntax?: string | null;
FileDescriptorProto syntax
property weakDependency
weakDependency?: number[] | null;
FileDescriptorProto weakDependency
interface IFileDescriptorSet
interface IFileDescriptorSet {}
Properties of a FileDescriptorSet.
property file
file?: google.protobuf.IFileDescriptorProto[] | null;
FileDescriptorSet file
interface IFileOptions
interface IFileOptions {}
Properties of a FileOptions.
property ccEnableArenas
ccEnableArenas?: boolean | null;
FileOptions ccEnableArenas
property ccGenericServices
ccGenericServices?: boolean | null;
FileOptions ccGenericServices
property csharpNamespace
csharpNamespace?: string | null;
FileOptions csharpNamespace
property deprecated
deprecated?: boolean | null;
FileOptions deprecated
property features
features?: google.protobuf.IFeatureSet | null;
FileOptions features
property goPackage
goPackage?: string | null;
FileOptions goPackage
property javaGenerateEqualsAndHash
javaGenerateEqualsAndHash?: boolean | null;
FileOptions javaGenerateEqualsAndHash
property javaGenericServices
javaGenericServices?: boolean | null;
FileOptions javaGenericServices
property javaMultipleFiles
javaMultipleFiles?: boolean | null;
FileOptions javaMultipleFiles
property javaOuterClassname
javaOuterClassname?: string | null;
FileOptions javaOuterClassname
property javaPackage
javaPackage?: string | null;
FileOptions javaPackage
property javaStringCheckUtf8
javaStringCheckUtf8?: boolean | null;
FileOptions javaStringCheckUtf8
property objcClassPrefix
objcClassPrefix?: string | null;
FileOptions objcClassPrefix
property optimizeFor
optimizeFor?: | google.protobuf.FileOptions.OptimizeMode | keyof typeof google.protobuf.FileOptions.OptimizeMode | null;
FileOptions optimizeFor
property phpClassPrefix
phpClassPrefix?: string | null;
FileOptions phpClassPrefix
property phpMetadataNamespace
phpMetadataNamespace?: string | null;
FileOptions phpMetadataNamespace
property phpNamespace
phpNamespace?: string | null;
FileOptions phpNamespace
property pyGenericServices
pyGenericServices?: boolean | null;
FileOptions pyGenericServices
property rubyPackage
rubyPackage?: string | null;
FileOptions rubyPackage
property swiftPrefix
swiftPrefix?: string | null;
FileOptions swiftPrefix
property uninterpretedOption
uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null;
FileOptions uninterpretedOption
interface IGeneratedCodeInfo
interface IGeneratedCodeInfo {}
Properties of a GeneratedCodeInfo.
property annotation
annotation?: google.protobuf.GeneratedCodeInfo.IAnnotation[] | null;
GeneratedCodeInfo annotation
interface IMessageOptions
interface IMessageOptions {}
Properties of a MessageOptions.
property deprecated
deprecated?: boolean | null;
MessageOptions deprecated
property deprecatedLegacyJsonFieldConflicts
deprecatedLegacyJsonFieldConflicts?: boolean | null;
MessageOptions deprecatedLegacyJsonFieldConflicts
property features
features?: google.protobuf.IFeatureSet | null;
MessageOptions features
property mapEntry
mapEntry?: boolean | null;
MessageOptions mapEntry
property messageSetWireFormat
messageSetWireFormat?: boolean | null;
MessageOptions messageSetWireFormat
property noStandardDescriptorAccessor
noStandardDescriptorAccessor?: boolean | null;
MessageOptions noStandardDescriptorAccessor
property uninterpretedOption
uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null;
MessageOptions uninterpretedOption
interface IMethodDescriptorProto
interface IMethodDescriptorProto {}
Properties of a MethodDescriptorProto.
property clientStreaming
clientStreaming?: boolean | null;
MethodDescriptorProto clientStreaming
property inputType
inputType?: string | null;
MethodDescriptorProto inputType
property name
name?: string | null;
MethodDescriptorProto name
property options
options?: google.protobuf.IMethodOptions | null;
MethodDescriptorProto options
property outputType
outputType?: string | null;
MethodDescriptorProto outputType
property serverStreaming
serverStreaming?: boolean | null;
MethodDescriptorProto serverStreaming
interface IMethodOptions
interface IMethodOptions {}
Properties of a MethodOptions.
property ".google.api.http"
'.google.api.http'?: google.api.IHttpRule | null;
MethodOptions .google.api.http
property ".google.api.methodSignature"
'.google.api.methodSignature'?: string[] | null;
MethodOptions .google.api.methodSignature
property deprecated
deprecated?: boolean | null;
MethodOptions deprecated
property features
features?: google.protobuf.IFeatureSet | null;
MethodOptions features
property idempotencyLevel
idempotencyLevel?: | google.protobuf.MethodOptions.IdempotencyLevel | keyof typeof google.protobuf.MethodOptions.IdempotencyLevel | null;
MethodOptions idempotencyLevel
property uninterpretedOption
uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null;
MethodOptions uninterpretedOption
interface IOneofDescriptorProto
interface IOneofDescriptorProto {}
Properties of an OneofDescriptorProto.
interface IOneofOptions
interface IOneofOptions {}
Properties of an OneofOptions.
property features
features?: google.protobuf.IFeatureSet | null;
OneofOptions features
property uninterpretedOption
uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null;
OneofOptions uninterpretedOption
interface IServiceDescriptorProto
interface IServiceDescriptorProto {}
Properties of a ServiceDescriptorProto.
interface IServiceOptions
interface IServiceOptions {}
Properties of a ServiceOptions.
property ".google.api.defaultHost"
'.google.api.defaultHost'?: string | null;
ServiceOptions .google.api.defaultHost
property ".google.api.oauthScopes"
'.google.api.oauthScopes'?: string | null;
ServiceOptions .google.api.oauthScopes
property deprecated
deprecated?: boolean | null;
ServiceOptions deprecated
property features
features?: google.protobuf.IFeatureSet | null;
ServiceOptions features
property uninterpretedOption
uninterpretedOption?: google.protobuf.IUninterpretedOption[] | null;
ServiceOptions uninterpretedOption
interface ISourceCodeInfo
interface ISourceCodeInfo {}
Properties of a SourceCodeInfo.
property location
location?: google.protobuf.SourceCodeInfo.ILocation[] | null;
SourceCodeInfo location
interface IUninterpretedOption
interface IUninterpretedOption {}
Properties of an UninterpretedOption.
property aggregateValue
aggregateValue?: string | null;
UninterpretedOption aggregateValue
property doubleValue
doubleValue?: number | null;
UninterpretedOption doubleValue
property identifierValue
identifierValue?: string | null;
UninterpretedOption identifierValue
property name
name?: google.protobuf.UninterpretedOption.INamePart[] | null;
UninterpretedOption name
property negativeIntValue
negativeIntValue?: number | Long | string | null;
UninterpretedOption negativeIntValue
property positiveIntValue
positiveIntValue?: number | Long | string | null;
UninterpretedOption positiveIntValue
property stringValue
stringValue?: Uint8Array | string | null;
UninterpretedOption stringValue
enum Edition
enum Edition { EDITION_UNKNOWN = 0, EDITION_PROTO2 = 998, EDITION_PROTO3 = 999, EDITION_2023 = 1000, EDITION_2024 = 1001, EDITION_1_TEST_ONLY = 1, EDITION_2_TEST_ONLY = 2, EDITION_99997_TEST_ONLY = 99997, EDITION_99998_TEST_ONLY = 99998, EDITION_99999_TEST_ONLY = 99999, EDITION_MAX = 2147483647,}
Edition enum.
member EDITION_1_TEST_ONLY
EDITION_1_TEST_ONLY = 1
member EDITION_2_TEST_ONLY
EDITION_2_TEST_ONLY = 2
member EDITION_2023
EDITION_2023 = 1000
member EDITION_2024
EDITION_2024 = 1001
member EDITION_99997_TEST_ONLY
EDITION_99997_TEST_ONLY = 99997
member EDITION_99998_TEST_ONLY
EDITION_99998_TEST_ONLY = 99998
member EDITION_99999_TEST_ONLY
EDITION_99999_TEST_ONLY = 99999
member EDITION_MAX
EDITION_MAX = 2147483647
member EDITION_PROTO2
EDITION_PROTO2 = 998
member EDITION_PROTO3
EDITION_PROTO3 = 999
member EDITION_UNKNOWN
EDITION_UNKNOWN = 0
namespace protos.google.protobuf.DescriptorProto
namespace protos.google.protobuf.DescriptorProto {}
class ExtensionRange
class ExtensionRange implements IExtensionRange {}
Represents an ExtensionRange.
constructor
constructor(properties?: IExtensionRange);
Constructs a new ExtensionRange.
Parameter properties
Properties to set
property end
end: number;
ExtensionRange end.
property options
options?: IExtensionRangeOptions;
ExtensionRange options.
property start
start: number;
ExtensionRange start.
method create
static create: ( properties?: google.protobuf.DescriptorProto.IExtensionRange) => google.protobuf.DescriptorProto.ExtensionRange;
Creates a new ExtensionRange instance using the specified properties.
Parameter properties
Properties to set
Returns
ExtensionRange instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.DescriptorProto.ExtensionRange;
Decodes an ExtensionRange message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ExtensionRange
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.DescriptorProto.ExtensionRange;
Decodes an ExtensionRange message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ExtensionRange
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ExtensionRange message. Does not implicitly verify messages.
Parameter message
ExtensionRange message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ExtensionRange message, length delimited. Does not implicitly verify messages.
Parameter message
ExtensionRange message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.DescriptorProto.ExtensionRange;
Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ExtensionRange
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ExtensionRange
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ExtensionRange to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an ExtensionRange message. Also converts values to other types if specified.
Parameter message
ExtensionRange
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an ExtensionRange message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
class ReservedRange
class ReservedRange implements IReservedRange {}
Represents a ReservedRange.
constructor
constructor(properties?: IReservedRange);
Constructs a new ReservedRange.
Parameter properties
Properties to set
property end
end: number;
ReservedRange end.
property start
start: number;
ReservedRange start.
method create
static create: ( properties?: google.protobuf.DescriptorProto.IReservedRange) => google.protobuf.DescriptorProto.ReservedRange;
Creates a new ReservedRange instance using the specified properties.
Parameter properties
Properties to set
Returns
ReservedRange instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.DescriptorProto.ReservedRange;
Decodes a ReservedRange message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
ReservedRange
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.DescriptorProto.ReservedRange;
Decodes a ReservedRange message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
ReservedRange
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ReservedRange message. Does not implicitly verify messages.
Parameter message
ReservedRange message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified ReservedRange message, length delimited. Does not implicitly verify messages.
Parameter message
ReservedRange message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.DescriptorProto.ReservedRange;
Creates a ReservedRange message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
ReservedRange
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for ReservedRange
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this ReservedRange to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a ReservedRange message. Also converts values to other types if specified.
Parameter message
ReservedRange
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a ReservedRange message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface IExtensionRange
interface IExtensionRange {}
Properties of an ExtensionRange.
interface IReservedRange
interface IReservedRange {}
Properties of a ReservedRange.
namespace protos.google.protobuf.EnumDescriptorProto
namespace protos.google.protobuf.EnumDescriptorProto {}
class EnumReservedRange
class EnumReservedRange implements IEnumReservedRange {}
Represents an EnumReservedRange.
constructor
constructor(properties?: IEnumReservedRange);
Constructs a new EnumReservedRange.
Parameter properties
Properties to set
property end
end: number;
EnumReservedRange end.
property start
start: number;
EnumReservedRange start.
method create
static create: ( properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange) => google.protobuf.EnumDescriptorProto.EnumReservedRange;
Creates a new EnumReservedRange instance using the specified properties.
Parameter properties
Properties to set
Returns
EnumReservedRange instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.EnumDescriptorProto.EnumReservedRange;
Decodes an EnumReservedRange message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
EnumReservedRange
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.EnumDescriptorProto.EnumReservedRange;
Decodes an EnumReservedRange message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
EnumReservedRange
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EnumReservedRange message. Does not implicitly verify messages.
Parameter message
EnumReservedRange message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EnumReservedRange message, length delimited. Does not implicitly verify messages.
Parameter message
EnumReservedRange message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.EnumDescriptorProto.EnumReservedRange;
Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
EnumReservedRange
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for EnumReservedRange
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this EnumReservedRange to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified.
Parameter message
EnumReservedRange
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an EnumReservedRange message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface IEnumReservedRange
interface IEnumReservedRange {}
Properties of an EnumReservedRange.
namespace protos.google.protobuf.ExtensionRangeOptions
namespace protos.google.protobuf.ExtensionRangeOptions {}
class Declaration
class Declaration implements IDeclaration {}
Represents a Declaration.
constructor
constructor(properties?: IDeclaration);
Constructs a new Declaration.
Parameter properties
Properties to set
property fullName
fullName: string;
Declaration fullName.
property number
number: number;
Declaration number.
property repeated
repeated: boolean;
Declaration repeated.
property reserved
reserved: boolean;
Declaration reserved.
property type
type: string;
Declaration type.
method create
static create: ( properties?: google.protobuf.ExtensionRangeOptions.IDeclaration) => google.protobuf.ExtensionRangeOptions.Declaration;
Creates a new Declaration instance using the specified properties.
Parameter properties
Properties to set
Returns
Declaration instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.ExtensionRangeOptions.Declaration;
Decodes a Declaration message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Declaration
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.ExtensionRangeOptions.Declaration;
Decodes a Declaration message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Declaration
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Declaration message. Does not implicitly verify messages.
Parameter message
Declaration message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Declaration message, length delimited. Does not implicitly verify messages.
Parameter message
Declaration message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.ExtensionRangeOptions.Declaration;
Creates a Declaration message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Declaration
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Declaration
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Declaration to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Declaration message. Also converts values to other types if specified.
Parameter message
Declaration
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Declaration message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface IDeclaration
interface IDeclaration {}
Properties of a Declaration.
enum VerificationState
enum VerificationState { DECLARATION = 0, UNVERIFIED = 1,}
VerificationState enum.
member DECLARATION
DECLARATION = 0
member UNVERIFIED
UNVERIFIED = 1
namespace protos.google.protobuf.FeatureSet
namespace protos.google.protobuf.FeatureSet {}
enum EnumType
enum EnumType { ENUM_TYPE_UNKNOWN = 0, OPEN = 1, CLOSED = 2,}
EnumType enum.
enum FieldPresence
enum FieldPresence { FIELD_PRESENCE_UNKNOWN = 0, EXPLICIT = 1, IMPLICIT = 2, LEGACY_REQUIRED = 3,}
FieldPresence enum.
member EXPLICIT
EXPLICIT = 1
member FIELD_PRESENCE_UNKNOWN
FIELD_PRESENCE_UNKNOWN = 0
member IMPLICIT
IMPLICIT = 2
member LEGACY_REQUIRED
LEGACY_REQUIRED = 3
enum JsonFormat
enum JsonFormat { JSON_FORMAT_UNKNOWN = 0, ALLOW = 1, LEGACY_BEST_EFFORT = 2,}
JsonFormat enum.
member ALLOW
ALLOW = 1
member JSON_FORMAT_UNKNOWN
JSON_FORMAT_UNKNOWN = 0
member LEGACY_BEST_EFFORT
LEGACY_BEST_EFFORT = 2
enum MessageEncoding
enum MessageEncoding { MESSAGE_ENCODING_UNKNOWN = 0, LENGTH_PREFIXED = 1, DELIMITED = 2,}
MessageEncoding enum.
member DELIMITED
DELIMITED = 2
member LENGTH_PREFIXED
LENGTH_PREFIXED = 1
member MESSAGE_ENCODING_UNKNOWN
MESSAGE_ENCODING_UNKNOWN = 0
enum RepeatedFieldEncoding
enum RepeatedFieldEncoding { REPEATED_FIELD_ENCODING_UNKNOWN = 0, PACKED = 1, EXPANDED = 2,}
RepeatedFieldEncoding enum.
member EXPANDED
EXPANDED = 2
member PACKED
PACKED = 1
member REPEATED_FIELD_ENCODING_UNKNOWN
REPEATED_FIELD_ENCODING_UNKNOWN = 0
enum Utf8Validation
enum Utf8Validation { UTF8_VALIDATION_UNKNOWN = 0, VERIFY = 2, NONE = 3,}
Utf8Validation enum.
namespace protos.google.protobuf.FeatureSetDefaults
namespace protos.google.protobuf.FeatureSetDefaults {}
class FeatureSetEditionDefault
class FeatureSetEditionDefault implements IFeatureSetEditionDefault {}
Represents a FeatureSetEditionDefault.
constructor
constructor(properties?: IFeatureSetEditionDefault);
Constructs a new FeatureSetEditionDefault.
Parameter properties
Properties to set
property edition
edition: | Edition | 'EDITION_UNKNOWN' | 'EDITION_PROTO2' | 'EDITION_PROTO3' | 'EDITION_2023' | 'EDITION_2024' | 'EDITION_1_TEST_ONLY' | 'EDITION_2_TEST_ONLY' | 'EDITION_99997_TEST_ONLY' | 'EDITION_99998_TEST_ONLY' | 'EDITION_99999_TEST_ONLY' | 'EDITION_MAX';
FeatureSetEditionDefault edition.
property features
features?: IFeatureSet;
FeatureSetEditionDefault features.
method create
static create: ( properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault) => google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;
Creates a new FeatureSetEditionDefault instance using the specified properties.
Parameter properties
Properties to set
Returns
FeatureSetEditionDefault instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;
Decodes a FeatureSetEditionDefault message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
FeatureSetEditionDefault
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;
Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
FeatureSetEditionDefault
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FeatureSetEditionDefault message. Does not implicitly verify messages.
Parameter message
FeatureSetEditionDefault message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly verify messages.
Parameter message
FeatureSetEditionDefault message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;
Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
FeatureSetEditionDefault
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for FeatureSetEditionDefault
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this FeatureSetEditionDefault to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified.
Parameter message
FeatureSetEditionDefault
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a FeatureSetEditionDefault message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface IFeatureSetEditionDefault
interface IFeatureSetEditionDefault {}
Properties of a FeatureSetEditionDefault.
namespace protos.google.protobuf.FieldDescriptorProto
namespace protos.google.protobuf.FieldDescriptorProto {}
enum Label
enum Label { LABEL_OPTIONAL = 1, LABEL_REPEATED = 3, LABEL_REQUIRED = 2,}
Label enum.
member LABEL_OPTIONAL
LABEL_OPTIONAL = 1
member LABEL_REPEATED
LABEL_REPEATED = 3
member LABEL_REQUIRED
LABEL_REQUIRED = 2
enum Type
enum Type { TYPE_DOUBLE = 1, TYPE_FLOAT = 2, TYPE_INT64 = 3, TYPE_UINT64 = 4, TYPE_INT32 = 5, TYPE_FIXED64 = 6, TYPE_FIXED32 = 7, TYPE_BOOL = 8, TYPE_STRING = 9, TYPE_GROUP = 10, TYPE_MESSAGE = 11, TYPE_BYTES = 12, TYPE_UINT32 = 13, TYPE_ENUM = 14, TYPE_SFIXED32 = 15, TYPE_SFIXED64 = 16, TYPE_SINT32 = 17, TYPE_SINT64 = 18,}
Type enum.
member TYPE_BOOL
TYPE_BOOL = 8
member TYPE_BYTES
TYPE_BYTES = 12
member TYPE_DOUBLE
TYPE_DOUBLE = 1
member TYPE_ENUM
TYPE_ENUM = 14
member TYPE_FIXED32
TYPE_FIXED32 = 7
member TYPE_FIXED64
TYPE_FIXED64 = 6
member TYPE_FLOAT
TYPE_FLOAT = 2
member TYPE_GROUP
TYPE_GROUP = 10
member TYPE_INT32
TYPE_INT32 = 5
member TYPE_INT64
TYPE_INT64 = 3
member TYPE_MESSAGE
TYPE_MESSAGE = 11
member TYPE_SFIXED32
TYPE_SFIXED32 = 15
member TYPE_SFIXED64
TYPE_SFIXED64 = 16
member TYPE_SINT32
TYPE_SINT32 = 17
member TYPE_SINT64
TYPE_SINT64 = 18
member TYPE_STRING
TYPE_STRING = 9
member TYPE_UINT32
TYPE_UINT32 = 13
member TYPE_UINT64
TYPE_UINT64 = 4
namespace protos.google.protobuf.FieldOptions
namespace protos.google.protobuf.FieldOptions {}
class EditionDefault
class EditionDefault implements IEditionDefault {}
Represents an EditionDefault.
constructor
constructor(properties?: IEditionDefault);
Constructs a new EditionDefault.
Parameter properties
Properties to set
property edition
edition: | Edition | 'EDITION_UNKNOWN' | 'EDITION_PROTO2' | 'EDITION_PROTO3' | 'EDITION_2023' | 'EDITION_2024' | 'EDITION_1_TEST_ONLY' | 'EDITION_2_TEST_ONLY' | 'EDITION_99997_TEST_ONLY' | 'EDITION_99998_TEST_ONLY' | 'EDITION_99999_TEST_ONLY' | 'EDITION_MAX';
EditionDefault edition.
property value
value: string;
EditionDefault value.
method create
static create: ( properties?: google.protobuf.FieldOptions.IEditionDefault) => google.protobuf.FieldOptions.EditionDefault;
Creates a new EditionDefault instance using the specified properties.
Parameter properties
Properties to set
Returns
EditionDefault instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.FieldOptions.EditionDefault;
Decodes an EditionDefault message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
EditionDefault
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.FieldOptions.EditionDefault;
Decodes an EditionDefault message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
EditionDefault
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EditionDefault message. Does not implicitly verify messages.
Parameter message
EditionDefault message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified EditionDefault message, length delimited. Does not implicitly verify messages.
Parameter message
EditionDefault message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.FieldOptions.EditionDefault;
Creates an EditionDefault message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
EditionDefault
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for EditionDefault
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this EditionDefault to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an EditionDefault message. Also converts values to other types if specified.
Parameter message
EditionDefault
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an EditionDefault message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface IEditionDefault
interface IEditionDefault {}
Properties of an EditionDefault.
enum CType
enum CType { STRING = 0, CORD = 1, STRING_PIECE = 2,}
CType enum.
enum JSType
enum JSType { JS_NORMAL = 0, JS_STRING = 1, JS_NUMBER = 2,}
JSType enum.
enum OptionRetention
enum OptionRetention { RETENTION_UNKNOWN = 0, RETENTION_RUNTIME = 1, RETENTION_SOURCE = 2,}
OptionRetention enum.
member RETENTION_RUNTIME
RETENTION_RUNTIME = 1
member RETENTION_SOURCE
RETENTION_SOURCE = 2
member RETENTION_UNKNOWN
RETENTION_UNKNOWN = 0
enum OptionTargetType
enum OptionTargetType { TARGET_TYPE_UNKNOWN = 0, TARGET_TYPE_FILE = 1, TARGET_TYPE_EXTENSION_RANGE = 2, TARGET_TYPE_MESSAGE = 3, TARGET_TYPE_FIELD = 4, TARGET_TYPE_ONEOF = 5, TARGET_TYPE_ENUM = 6, TARGET_TYPE_ENUM_ENTRY = 7, TARGET_TYPE_SERVICE = 8, TARGET_TYPE_METHOD = 9,}
OptionTargetType enum.
member TARGET_TYPE_ENUM
TARGET_TYPE_ENUM = 6
member TARGET_TYPE_ENUM_ENTRY
TARGET_TYPE_ENUM_ENTRY = 7
member TARGET_TYPE_EXTENSION_RANGE
TARGET_TYPE_EXTENSION_RANGE = 2
member TARGET_TYPE_FIELD
TARGET_TYPE_FIELD = 4
member TARGET_TYPE_FILE
TARGET_TYPE_FILE = 1
member TARGET_TYPE_MESSAGE
TARGET_TYPE_MESSAGE = 3
member TARGET_TYPE_METHOD
TARGET_TYPE_METHOD = 9
member TARGET_TYPE_ONEOF
TARGET_TYPE_ONEOF = 5
member TARGET_TYPE_SERVICE
TARGET_TYPE_SERVICE = 8
member TARGET_TYPE_UNKNOWN
TARGET_TYPE_UNKNOWN = 0
namespace protos.google.protobuf.FileOptions
namespace protos.google.protobuf.FileOptions {}
enum OptimizeMode
enum OptimizeMode { SPEED = 1, CODE_SIZE = 2, LITE_RUNTIME = 3,}
OptimizeMode enum.
namespace protos.google.protobuf.GeneratedCodeInfo
namespace protos.google.protobuf.GeneratedCodeInfo {}
class Annotation
class Annotation implements IAnnotation {}
Represents an Annotation.
constructor
constructor(properties?: IAnnotation);
Constructs a new Annotation.
Parameter properties
Properties to set
property begin
begin: number;
Annotation begin.
property end
end: number;
Annotation end.
property path
path: number[];
Annotation path.
property semantic
semantic: 'NONE' | Annotation.Semantic | 'SET' | 'ALIAS';
Annotation semantic.
property sourceFile
sourceFile: string;
Annotation sourceFile.
method create
static create: ( properties?: google.protobuf.GeneratedCodeInfo.IAnnotation) => google.protobuf.GeneratedCodeInfo.Annotation;
Creates a new Annotation instance using the specified properties.
Parameter properties
Properties to set
Returns
Annotation instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.GeneratedCodeInfo.Annotation;
Decodes an Annotation message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Annotation
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.GeneratedCodeInfo.Annotation;
Decodes an Annotation message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Annotation
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Annotation message. Does not implicitly verify messages.
Parameter message
Annotation message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Annotation message, length delimited. Does not implicitly verify messages.
Parameter message
Annotation message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.GeneratedCodeInfo.Annotation;
Creates an Annotation message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Annotation
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Annotation
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Annotation to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from an Annotation message. Also converts values to other types if specified.
Parameter message
Annotation
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies an Annotation message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface IAnnotation
interface IAnnotation {}
Properties of an Annotation.
property begin
begin?: number | null;
Annotation begin
property end
end?: number | null;
Annotation end
property path
path?: number[] | null;
Annotation path
property semantic
semantic?: | google.protobuf.GeneratedCodeInfo.Annotation.Semantic | keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic | null;
Annotation semantic
property sourceFile
sourceFile?: string | null;
Annotation sourceFile
namespace protos.google.protobuf.GeneratedCodeInfo.Annotation
namespace protos.google.protobuf.GeneratedCodeInfo.Annotation {}
namespace protos.google.protobuf.MethodOptions
namespace protos.google.protobuf.MethodOptions {}
enum IdempotencyLevel
enum IdempotencyLevel { IDEMPOTENCY_UNKNOWN = 0, NO_SIDE_EFFECTS = 1, IDEMPOTENT = 2,}
IdempotencyLevel enum.
member IDEMPOTENCY_UNKNOWN
IDEMPOTENCY_UNKNOWN = 0
member IDEMPOTENT
IDEMPOTENT = 2
member NO_SIDE_EFFECTS
NO_SIDE_EFFECTS = 1
namespace protos.google.protobuf.SourceCodeInfo
namespace protos.google.protobuf.SourceCodeInfo {}
class Location
class Location implements ILocation {}
Represents a Location.
constructor
constructor(properties?: ILocation);
Constructs a new Location.
Parameter properties
Properties to set
property leadingComments
leadingComments: string;
Location leadingComments.
property leadingDetachedComments
leadingDetachedComments: string[];
Location leadingDetachedComments.
property path
path: number[];
Location path.
property span
span: number[];
Location span.
property trailingComments
trailingComments: string;
Location trailingComments.
method create
static create: ( properties?: google.protobuf.SourceCodeInfo.ILocation) => google.protobuf.SourceCodeInfo.Location;
Creates a new Location instance using the specified properties.
Parameter properties
Properties to set
Returns
Location instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.SourceCodeInfo.Location;
Decodes a Location message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
Location
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.SourceCodeInfo.Location;
Decodes a Location message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
Location
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Location message. Does not implicitly verify messages.
Parameter message
Location message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified Location message, length delimited. Does not implicitly verify messages.
Parameter message
Location message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.SourceCodeInfo.Location;
Creates a Location message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
Location
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for Location
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this Location to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a Location message. Also converts values to other types if specified.
Parameter message
Location
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a Location message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface ILocation
interface ILocation {}
Properties of a Location.
property leadingComments
leadingComments?: string | null;
Location leadingComments
property leadingDetachedComments
leadingDetachedComments?: string[] | null;
Location leadingDetachedComments
property path
path?: number[] | null;
Location path
property span
span?: number[] | null;
Location span
property trailingComments
trailingComments?: string | null;
Location trailingComments
namespace protos.google.protobuf.UninterpretedOption
namespace protos.google.protobuf.UninterpretedOption {}
class NamePart
class NamePart implements INamePart {}
Represents a NamePart.
constructor
constructor(properties?: INamePart);
Constructs a new NamePart.
Parameter properties
Properties to set
property isExtension
isExtension: boolean;
NamePart isExtension.
property namePart
namePart: string;
NamePart namePart.
method create
static create: ( properties?: google.protobuf.UninterpretedOption.INamePart) => google.protobuf.UninterpretedOption.NamePart;
Creates a new NamePart instance using the specified properties.
Parameter properties
Properties to set
Returns
NamePart instance
method decode
static decode: ( reader: $protobuf.Reader | Uint8Array, length?: number) => google.protobuf.UninterpretedOption.NamePart;
Decodes a NamePart message from the specified reader or buffer.
Parameter reader
Reader or buffer to decode from
Parameter length
Message length if known beforehand
Returns
NamePart
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method decodeDelimited
static decodeDelimited: ( reader: $protobuf.Reader | Uint8Array) => google.protobuf.UninterpretedOption.NamePart;
Decodes a NamePart message from the specified reader or buffer, length delimited.
Parameter reader
Reader or buffer to decode from
Returns
NamePart
Throws
{Error} If the payload is not a reader or valid buffer
Throws
{$protobuf.util.ProtocolError} If required fields are missing
method encode
static encode: ( message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified NamePart message. Does not implicitly verify messages.
Parameter message
NamePart message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method encodeDelimited
static encodeDelimited: ( message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer) => $protobuf.Writer;
Encodes the specified NamePart message, length delimited. Does not implicitly verify messages.
Parameter message
NamePart message or plain object to encode
Parameter writer
Writer to encode to
Returns
Writer
method fromObject
static fromObject: (object: { [k: string]: any;}) => google.protobuf.UninterpretedOption.NamePart;
Creates a NamePart message from a plain object. Also converts values to their respective internal types.
Parameter object
Plain object
Returns
NamePart
method getTypeUrl
static getTypeUrl: (typeUrlPrefix?: string) => string;
Gets the default type url for NamePart
Parameter typeUrlPrefix
your custom typeUrlPrefix(default "type.googleapis.com")
Returns
The default type url
method toJSON
toJSON: () => { [k: string]: any };
Converts this NamePart to JSON.
Returns
JSON object
method toObject
static toObject: ( message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions) => { [k: string]: any };
Creates a plain object from a NamePart message. Also converts values to other types if specified.
Parameter message
NamePart
Parameter options
Conversion options
Returns
Plain object
method verify
static verify: (message: { [k: string]: any }) => string | null;
Verifies a NamePart message.
Parameter message
Plain object to verify
Returns
null
if valid, otherwise the reason why it is not
interface INamePart
interface INamePart {}
Properties of a NamePart.
property isExtension
isExtension: boolean;
NamePart isExtension
property namePart
namePart: string;
NamePart namePart
namespace v1
module 'build/src/v1/index.d.ts' {}
class LanguageServiceClient
class LanguageServiceClient {}
Provides text analysis operations such as sentiment analysis and entity recognition. v1
constructor
constructor(opts?: ClientOptions, gaxInstance?: any);
Construct an instance of LanguageServiceClient.
Parameter options
The configuration object. The options accepted by the constructor are described in detail in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). The common options are:
Parameter
{object} [options.credentials] - Credentials object.
Parameter
{string} [options.credentials.client_email]
Parameter
{string} [options.credentials.private_key]
Parameter
{string} [options.email] - Account email address. Required when using a .pem or .p12 keyFilename.
Parameter
{string} [options.keyFilename] - Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.
Parameter
{number} [options.port] - The port on which to connect to the remote host.
Parameter
{string} [options.projectId] - The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports , your project ID will be detected automatically.
Parameter
{string} [options.apiEndpoint] - The domain name of the API remote host.
Parameter
{gax.ClientConfig} [options.clientConfig] - Client configuration override. Follows the structure of gapicConfig.
Parameter
{boolean} [options.fallback] - Use HTTP/1.1 REST mode. For more information, please check the .
Parameter gaxInstance
: loaded instance of
google-gax
. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new LanguageServiceClient({fallback: true}, gax); ```
property apiEndpoint
static readonly apiEndpoint: string;
The DNS address for this API service - same as servicePath.
Returns
{string} The DNS address for this service.
Deprecated
Use the apiEndpoint method of the client instance.
property apiEndpoint
readonly apiEndpoint: string;
The DNS address for this API service.
Returns
{string} The DNS address for this service.
property auth
auth: gax.GoogleAuth;
property descriptors
descriptors: Descriptors;
property innerApiCalls
innerApiCalls: { [name: string]: Function };
property languageServiceStub
languageServiceStub?: Promise<{ [name: string]: Function }>;
property port
static readonly port: number;
The port for this API service.
Returns
{number} The default port for this service.
property scopes
static readonly scopes: string[];
The scopes needed to make gRPC calls for every method defined in this service.
Returns
{string[]} List of default scopes.
property servicePath
static readonly servicePath: string;
The DNS address for this API service.
Returns
{string} The DNS address for this service.
Deprecated
Use the apiEndpoint method of the client instance.
property universeDomain
readonly universeDomain: string;
property warn
warn: (code: string, message: string, warnType?: string) => void;
method analyzeEntities
analyzeEntities: { ( request?: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, protos.google.cloud.language.v1.IAnalyzeEntitiesRequest | undefined, {} | undefined ] >; ( request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, {} > ): void; ( request: protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, callback: Callback< protos.google.cloud.language.v1.IAnalyzeEntitiesResponse, protos.google.cloud.language.v1.IAnalyzeEntitiesRequest, {} > ): void;};
Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1.EncodingType} request.encodingType The encoding type used by the API to calculate offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnalyzeEntitiesResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1/language_service.analyze_entities.js region_tag:language_v1_generated_LanguageService_AnalyzeEntities_async
method analyzeEntitySentiment
analyzeEntitySentiment: { ( request?: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, ( | protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest | undefined ), {} | undefined ] >; ( request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, {} > ): void; ( request: protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, callback: Callback< protos.google.cloud.language.v1.IAnalyzeEntitySentimentResponse, protos.google.cloud.language.v1.IAnalyzeEntitySentimentRequest, {} > ): void;};
Finds entities, similar to AnalyzeEntities in the text and analyzes sentiment associated with each entity and its mentions.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1.EncodingType} request.encodingType The encoding type used by the API to calculate offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnalyzeEntitySentimentResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1/language_service.analyze_entity_sentiment.js region_tag:language_v1_generated_LanguageService_AnalyzeEntitySentiment_async
method analyzeSentiment
analyzeSentiment: { ( request?: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IAnalyzeSentimentResponse, protos.google.cloud.language.v1.IAnalyzeSentimentRequest | undefined, {} | undefined ] >; ( request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IAnalyzeSentimentResponse, protos.google.cloud.language.v1.IAnalyzeSentimentRequest, {} > ): void; ( request: protos.google.cloud.language.v1.IAnalyzeSentimentRequest, callback: Callback< protos.google.cloud.language.v1.IAnalyzeSentimentResponse, protos.google.cloud.language.v1.IAnalyzeSentimentRequest, {} > ): void;};
Analyzes the sentiment of the provided text.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1.EncodingType} request.encodingType The encoding type used by the API to calculate sentence offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnalyzeSentimentResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1/language_service.analyze_sentiment.js region_tag:language_v1_generated_LanguageService_AnalyzeSentiment_async
method analyzeSyntax
analyzeSyntax: { ( request?: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, protos.google.cloud.language.v1.IAnalyzeSyntaxRequest | undefined, {} | undefined ] >; ( request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, {} > ): void; ( request: protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, callback: Callback< protos.google.cloud.language.v1.IAnalyzeSyntaxResponse, protos.google.cloud.language.v1.IAnalyzeSyntaxRequest, {} > ): void;};
Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1.EncodingType} request.encodingType The encoding type used by the API to calculate offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnalyzeSyntaxResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1/language_service.analyze_syntax.js region_tag:language_v1_generated_LanguageService_AnalyzeSyntax_async
method annotateText
annotateText: { ( request?: protos.google.cloud.language.v1.IAnnotateTextRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IAnnotateTextResponse, protos.google.cloud.language.v1.IAnnotateTextRequest | undefined, {} | undefined ] >; ( request: protos.google.cloud.language.v1.IAnnotateTextRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IAnnotateTextResponse, protos.google.cloud.language.v1.IAnnotateTextRequest, {} > ): void; ( request: protos.google.cloud.language.v1.IAnnotateTextRequest, callback: Callback< protos.google.cloud.language.v1.IAnnotateTextResponse, protos.google.cloud.language.v1.IAnnotateTextRequest, {} > ): void;};
A convenience method that provides all the features that analyzeSentiment, analyzeEntities, and analyzeSyntax provide in one call.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1.AnnotateTextRequest.Features} request.features Required. The enabled features.
Parameter
{google.cloud.language.v1.EncodingType} request.encodingType The encoding type used by the API to calculate offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnnotateTextResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1/language_service.annotate_text.js region_tag:language_v1_generated_LanguageService_AnnotateText_async
method classifyText
classifyText: { ( request?: protos.google.cloud.language.v1.IClassifyTextRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IClassifyTextResponse, protos.google.cloud.language.v1.IClassifyTextRequest | undefined, {} | undefined ] >; ( request: protos.google.cloud.language.v1.IClassifyTextRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IClassifyTextResponse, protos.google.cloud.language.v1.IClassifyTextRequest, {} > ): void; ( request: protos.google.cloud.language.v1.IClassifyTextRequest, callback: Callback< protos.google.cloud.language.v1.IClassifyTextResponse, protos.google.cloud.language.v1.IClassifyTextRequest, {} > ): void;};
Classifies a document into categories.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1.ClassificationModelOptions} request.classificationModelOptions Model options to use for classification. Defaults to v1 options if not specified.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing ClassifyTextResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1/language_service.classify_text.js region_tag:language_v1_generated_LanguageService_ClassifyText_async
method close
close: () => Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
{Promise} A promise that resolves when the client is closed.
method getProjectId
getProjectId: { (): Promise<string>; (callback: Callback<string, undefined, undefined>): void;};
method initialize
initialize: () => Promise<{ [name: string]: Function }>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns
{Promise} A promise that resolves to an authenticated service stub.
method moderateText
moderateText: { ( request?: protos.google.cloud.language.v1.IModerateTextRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1.IModerateTextResponse, protos.google.cloud.language.v1.IModerateTextRequest | undefined, {} | undefined ] >; ( request: protos.google.cloud.language.v1.IModerateTextRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1.IModerateTextResponse, protos.google.cloud.language.v1.IModerateTextRequest, {} > ): void; ( request: protos.google.cloud.language.v1.IModerateTextRequest, callback: Callback< protos.google.cloud.language.v1.IModerateTextResponse, protos.google.cloud.language.v1.IModerateTextRequest, {} > ): void;};
Moderates a document for harmful and sensitive categories.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1.Document} request.document Required. Input document.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing ModerateTextResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1/language_service.moderate_text.js region_tag:language_v1_generated_LanguageService_ModerateText_async
namespace v1beta2
module 'build/src/v1beta2/index.d.ts' {}
class LanguageServiceClient
class LanguageServiceClient {}
Provides text analysis operations such as sentiment analysis and entity recognition. v1beta2
constructor
constructor(opts?: ClientOptions, gaxInstance?: any);
Construct an instance of LanguageServiceClient.
Parameter options
The configuration object. The options accepted by the constructor are described in detail in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). The common options are:
Parameter
{object} [options.credentials] - Credentials object.
Parameter
{string} [options.credentials.client_email]
Parameter
{string} [options.credentials.private_key]
Parameter
{string} [options.email] - Account email address. Required when using a .pem or .p12 keyFilename.
Parameter
{string} [options.keyFilename] - Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.
Parameter
{number} [options.port] - The port on which to connect to the remote host.
Parameter
{string} [options.projectId] - The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports , your project ID will be detected automatically.
Parameter
{string} [options.apiEndpoint] - The domain name of the API remote host.
Parameter
{gax.ClientConfig} [options.clientConfig] - Client configuration override. Follows the structure of gapicConfig.
Parameter
{boolean} [options.fallback] - Use HTTP/1.1 REST mode. For more information, please check the .
Parameter gaxInstance
: loaded instance of
google-gax
. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new LanguageServiceClient({fallback: true}, gax); ```
property apiEndpoint
static readonly apiEndpoint: string;
The DNS address for this API service - same as servicePath.
Returns
{string} The DNS address for this service.
Deprecated
Use the apiEndpoint method of the client instance.
property apiEndpoint
readonly apiEndpoint: string;
The DNS address for this API service.
Returns
{string} The DNS address for this service.
property auth
auth: gax.GoogleAuth;
property descriptors
descriptors: Descriptors;
property innerApiCalls
innerApiCalls: { [name: string]: Function };
property languageServiceStub
languageServiceStub?: Promise<{ [name: string]: Function }>;
property port
static readonly port: number;
The port for this API service.
Returns
{number} The default port for this service.
property scopes
static readonly scopes: string[];
The scopes needed to make gRPC calls for every method defined in this service.
Returns
{string[]} List of default scopes.
property servicePath
static readonly servicePath: string;
The DNS address for this API service.
Returns
{string} The DNS address for this service.
Deprecated
Use the apiEndpoint method of the client instance.
property universeDomain
readonly universeDomain: string;
property warn
warn: (code: string, message: string, warnType?: string) => void;
method analyzeEntities
analyzeEntities: { ( request?: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, ( | protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest | undefined ), {} | undefined ] >; ( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, {} > ): void; ( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitiesResponse, protos.google.cloud.language.v1beta2.IAnalyzeEntitiesRequest, {} > ): void;};
Finds named entities (currently proper names and common nouns) in the text along with entity types, salience, mentions for each entity, and other properties.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1beta2.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1beta2.EncodingType} request.encodingType The encoding type used by the API to calculate offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnalyzeEntitiesResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1beta2/language_service.analyze_entities.js region_tag:language_v1beta2_generated_LanguageService_AnalyzeEntities_async
method analyzeEntitySentiment
analyzeEntitySentiment: { ( request?: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, ( | protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest | undefined ), {} | undefined ] >; ( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, {} > ): void; ( request: protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentResponse, protos.google.cloud.language.v1beta2.IAnalyzeEntitySentimentRequest, {} > ): void;};
Finds entities, similar to AnalyzeEntities in the text and analyzes sentiment associated with each entity and its mentions.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1beta2.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1beta2.EncodingType} request.encodingType The encoding type used by the API to calculate offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnalyzeEntitySentimentResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1beta2/language_service.analyze_entity_sentiment.js region_tag:language_v1beta2_generated_LanguageService_AnalyzeEntitySentiment_async
method analyzeSentiment
analyzeSentiment: { ( request?: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, ( | protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest | undefined ), {} | undefined ] >; ( request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, {} > ): void; ( request: protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeSentimentResponse, protos.google.cloud.language.v1beta2.IAnalyzeSentimentRequest, {} > ): void;};
Analyzes the sentiment of the provided text.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1beta2.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1beta2.EncodingType} request.encodingType The encoding type used by the API to calculate sentence offsets for the sentence sentiment.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnalyzeSentimentResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1beta2/language_service.analyze_sentiment.js region_tag:language_v1beta2_generated_LanguageService_AnalyzeSentiment_async
method analyzeSyntax
analyzeSyntax: { ( request?: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, ( | protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest | undefined ), {} | undefined ] >; ( request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, {} > ): void; ( request: protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, callback: Callback< protos.google.cloud.language.v1beta2.IAnalyzeSyntaxResponse, protos.google.cloud.language.v1beta2.IAnalyzeSyntaxRequest, {} > ): void;};
Analyzes the syntax of the text and provides sentence boundaries and tokenization along with part of speech tags, dependency trees, and other properties.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1beta2.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1beta2.EncodingType} request.encodingType The encoding type used by the API to calculate offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnalyzeSyntaxResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1beta2/language_service.analyze_syntax.js region_tag:language_v1beta2_generated_LanguageService_AnalyzeSyntax_async
method annotateText
annotateText: { ( request?: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IAnnotateTextResponse, ( | protos.google.cloud.language.v1beta2.IAnnotateTextRequest | undefined ), {} | undefined ] >; ( request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IAnnotateTextResponse, protos.google.cloud.language.v1beta2.IAnnotateTextRequest, {} > ): void; ( request: protos.google.cloud.language.v1beta2.IAnnotateTextRequest, callback: Callback< protos.google.cloud.language.v1beta2.IAnnotateTextResponse, protos.google.cloud.language.v1beta2.IAnnotateTextRequest, {} > ): void;};
A convenience method that provides all syntax, sentiment, entity, and classification features in one call.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1beta2.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1beta2.AnnotateTextRequest.Features} request.features Required. The enabled features.
Parameter
{google.cloud.language.v1beta2.EncodingType} request.encodingType The encoding type used by the API to calculate offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnnotateTextResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1beta2/language_service.annotate_text.js region_tag:language_v1beta2_generated_LanguageService_AnnotateText_async
method classifyText
classifyText: { ( request?: protos.google.cloud.language.v1beta2.IClassifyTextRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IClassifyTextResponse, ( | protos.google.cloud.language.v1beta2.IClassifyTextRequest | undefined ), {} | undefined ] >; ( request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IClassifyTextResponse, protos.google.cloud.language.v1beta2.IClassifyTextRequest, {} > ): void; ( request: protos.google.cloud.language.v1beta2.IClassifyTextRequest, callback: Callback< protos.google.cloud.language.v1beta2.IClassifyTextResponse, protos.google.cloud.language.v1beta2.IClassifyTextRequest, {} > ): void;};
Classifies a document into categories.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1beta2.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v1beta2.ClassificationModelOptions} request.classificationModelOptions Model options to use for classification. Defaults to v1 options if not specified.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing ClassifyTextResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1beta2/language_service.classify_text.js region_tag:language_v1beta2_generated_LanguageService_ClassifyText_async
method close
close: () => Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
{Promise} A promise that resolves when the client is closed.
method getProjectId
getProjectId: { (): Promise<string>; (callback: Callback<string, undefined, undefined>): void;};
method initialize
initialize: () => Promise<{ [name: string]: Function }>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns
{Promise} A promise that resolves to an authenticated service stub.
method moderateText
moderateText: { ( request?: protos.google.cloud.language.v1beta2.IModerateTextRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v1beta2.IModerateTextResponse, ( | protos.google.cloud.language.v1beta2.IModerateTextRequest | undefined ), {} | undefined ] >; ( request: protos.google.cloud.language.v1beta2.IModerateTextRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v1beta2.IModerateTextResponse, protos.google.cloud.language.v1beta2.IModerateTextRequest, {} > ): void; ( request: protos.google.cloud.language.v1beta2.IModerateTextRequest, callback: Callback< protos.google.cloud.language.v1beta2.IModerateTextResponse, protos.google.cloud.language.v1beta2.IModerateTextRequest, {} > ): void;};
Moderates a document for harmful and sensitive categories.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v1beta2.Document} request.document Required. Input document.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing ModerateTextResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v1beta2/language_service.moderate_text.js region_tag:language_v1beta2_generated_LanguageService_ModerateText_async
namespace v2
module 'build/src/v2/index.d.ts' {}
class LanguageServiceClient
class LanguageServiceClient {}
Provides text analysis operations such as sentiment analysis and entity recognition. v2
constructor
constructor(opts?: ClientOptions, gaxInstance?: any);
Construct an instance of LanguageServiceClient.
Parameter options
The configuration object. The options accepted by the constructor are described in detail in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). The common options are:
Parameter
{object} [options.credentials] - Credentials object.
Parameter
{string} [options.credentials.client_email]
Parameter
{string} [options.credentials.private_key]
Parameter
{string} [options.email] - Account email address. Required when using a .pem or .p12 keyFilename.
Parameter
{string} [options.keyFilename] - Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.
Parameter
{number} [options.port] - The port on which to connect to the remote host.
Parameter
{string} [options.projectId] - The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports , your project ID will be detected automatically.
Parameter
{string} [options.apiEndpoint] - The domain name of the API remote host.
Parameter
{gax.ClientConfig} [options.clientConfig] - Client configuration override. Follows the structure of gapicConfig.
Parameter
{boolean} [options.fallback] - Use HTTP/1.1 REST mode. For more information, please check the .
Parameter gaxInstance
: loaded instance of
google-gax
. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new LanguageServiceClient({fallback: true}, gax); ```
property apiEndpoint
static readonly apiEndpoint: string;
The DNS address for this API service - same as servicePath.
Returns
{string} The DNS address for this service.
Deprecated
Use the apiEndpoint method of the client instance.
property apiEndpoint
readonly apiEndpoint: string;
The DNS address for this API service.
Returns
{string} The DNS address for this service.
property auth
auth: gax.GoogleAuth;
property descriptors
descriptors: Descriptors;
property innerApiCalls
innerApiCalls: { [name: string]: Function };
property languageServiceStub
languageServiceStub?: Promise<{ [name: string]: Function }>;
property port
static readonly port: number;
The port for this API service.
Returns
{number} The default port for this service.
property scopes
static readonly scopes: string[];
The scopes needed to make gRPC calls for every method defined in this service.
Returns
{string[]} List of default scopes.
property servicePath
static readonly servicePath: string;
The DNS address for this API service.
Returns
{string} The DNS address for this service.
Deprecated
Use the apiEndpoint method of the client instance.
property universeDomain
readonly universeDomain: string;
property warn
warn: (code: string, message: string, warnType?: string) => void;
method analyzeEntities
analyzeEntities: { ( request?: protos.google.cloud.language.v2.IAnalyzeEntitiesRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v2.IAnalyzeEntitiesResponse, protos.google.cloud.language.v2.IAnalyzeEntitiesRequest | undefined, {} | undefined ] >; ( request: protos.google.cloud.language.v2.IAnalyzeEntitiesRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v2.IAnalyzeEntitiesResponse, protos.google.cloud.language.v2.IAnalyzeEntitiesRequest, {} > ): void; ( request: protos.google.cloud.language.v2.IAnalyzeEntitiesRequest, callback: Callback< protos.google.cloud.language.v2.IAnalyzeEntitiesResponse, protos.google.cloud.language.v2.IAnalyzeEntitiesRequest, {} > ): void;};
Finds named entities (currently proper names and common nouns) in the text along with entity types, probability, mentions for each entity, and other properties.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v2.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v2.EncodingType} request.encodingType The encoding type used by the API to calculate offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnalyzeEntitiesResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v2/language_service.analyze_entities.js region_tag:language_v2_generated_LanguageService_AnalyzeEntities_async
method analyzeSentiment
analyzeSentiment: { ( request?: protos.google.cloud.language.v2.IAnalyzeSentimentRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v2.IAnalyzeSentimentResponse, protos.google.cloud.language.v2.IAnalyzeSentimentRequest | undefined, {} | undefined ] >; ( request: protos.google.cloud.language.v2.IAnalyzeSentimentRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v2.IAnalyzeSentimentResponse, protos.google.cloud.language.v2.IAnalyzeSentimentRequest, {} > ): void; ( request: protos.google.cloud.language.v2.IAnalyzeSentimentRequest, callback: Callback< protos.google.cloud.language.v2.IAnalyzeSentimentResponse, protos.google.cloud.language.v2.IAnalyzeSentimentRequest, {} > ): void;};
Analyzes the sentiment of the provided text.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v2.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v2.EncodingType} request.encodingType The encoding type used by the API to calculate sentence offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnalyzeSentimentResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v2/language_service.analyze_sentiment.js region_tag:language_v2_generated_LanguageService_AnalyzeSentiment_async
method annotateText
annotateText: { ( request?: protos.google.cloud.language.v2.IAnnotateTextRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v2.IAnnotateTextResponse, protos.google.cloud.language.v2.IAnnotateTextRequest | undefined, {} | undefined ] >; ( request: protos.google.cloud.language.v2.IAnnotateTextRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v2.IAnnotateTextResponse, protos.google.cloud.language.v2.IAnnotateTextRequest, {} > ): void; ( request: protos.google.cloud.language.v2.IAnnotateTextRequest, callback: Callback< protos.google.cloud.language.v2.IAnnotateTextResponse, protos.google.cloud.language.v2.IAnnotateTextRequest, {} > ): void;};
A convenience method that provides all features in one call.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v2.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v2.AnnotateTextRequest.Features} request.features Required. The enabled features.
Parameter
{google.cloud.language.v2.EncodingType} request.encodingType The encoding type used by the API to calculate offsets.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing AnnotateTextResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v2/language_service.annotate_text.js region_tag:language_v2_generated_LanguageService_AnnotateText_async
method classifyText
classifyText: { ( request?: protos.google.cloud.language.v2.IClassifyTextRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v2.IClassifyTextResponse, protos.google.cloud.language.v2.IClassifyTextRequest | undefined, {} | undefined ] >; ( request: protos.google.cloud.language.v2.IClassifyTextRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v2.IClassifyTextResponse, protos.google.cloud.language.v2.IClassifyTextRequest, {} > ): void; ( request: protos.google.cloud.language.v2.IClassifyTextRequest, callback: Callback< protos.google.cloud.language.v2.IClassifyTextResponse, protos.google.cloud.language.v2.IClassifyTextRequest, {} > ): void;};
Classifies a document into categories.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v2.Document} request.document Required. Input document.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing ClassifyTextResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v2/language_service.classify_text.js region_tag:language_v2_generated_LanguageService_ClassifyText_async
method close
close: () => Promise<void>;
Terminate the gRPC channel and close the client.
The client will no longer be usable and all future behavior is undefined.
Returns
{Promise} A promise that resolves when the client is closed.
method getProjectId
getProjectId: { (): Promise<string>; (callback: Callback<string, undefined, undefined>): void;};
method initialize
initialize: () => Promise<{ [name: string]: Function }>;
Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.
You can await on this method if you want to make sure the client is initialized.
Returns
{Promise} A promise that resolves to an authenticated service stub.
method moderateText
moderateText: { ( request?: protos.google.cloud.language.v2.IModerateTextRequest, options?: CallOptions ): Promise< [ protos.google.cloud.language.v2.IModerateTextResponse, protos.google.cloud.language.v2.IModerateTextRequest | undefined, {} | undefined ] >; ( request: protos.google.cloud.language.v2.IModerateTextRequest, options: CallOptions, callback: Callback< protos.google.cloud.language.v2.IModerateTextResponse, protos.google.cloud.language.v2.IModerateTextRequest, {} > ): void; ( request: protos.google.cloud.language.v2.IModerateTextRequest, callback: Callback< protos.google.cloud.language.v2.IModerateTextResponse, protos.google.cloud.language.v2.IModerateTextRequest, {} > ): void;};
Moderates a document for harmful and sensitive categories.
Parameter request
The request object that will be sent.
Parameter
{google.cloud.language.v2.Document} request.document Required. Input document.
Parameter
{google.cloud.language.v2.ModerateTextRequest.ModelVersion} [request.modelVersion] Optional. The model version to use for ModerateText.
Parameter options
Call options. See CallOptions for more details.
Returns
{Promise} - The promise which resolves to an array. The first element of the array is an object representing ModerateTextResponse. Please see the documentation for more details and examples.
Example 1
include:samples/generated/v2/language_service.moderate_text.js region_tag:language_v2_generated_LanguageService_ModerateText_async
Package Files (8)
Dependencies (1)
Dev Dependencies (16)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@google-cloud/language
.
- Markdown[](https://www.jsdocs.io/package/@google-cloud/language)
- HTML<a href="https://www.jsdocs.io/package/@google-cloud/language"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 27234 ms. - Missing or incorrect documentation? Open an issue for this package.