public final class Info extends com.google.protobuf.GeneratedMessage implements InfoOrBuilder
`Info` is a representation of OpenAPI v2 specification's Info object.
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#infoObject
Example:
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
info: {
title: "Echo API";
version: "1.0";
description: "";
contact: {
name: "gRPC-Gateway project";
url: "https://github.com/grpc-ecosystem/grpc-gateway";
email: "none@example.com";
};
license: {
name: "BSD 3-Clause License";
url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/main/LICENSE";
};
};
...
};
Protobuf type grpc.gateway.protoc_gen_openapiv2.options.Info| Modifier and Type | Class and Description |
|---|---|
static class |
Info.Builder
`Info` is a representation of OpenAPI v2 specification's Info object.
|
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
CONTACT_FIELD_NUMBER |
static int |
DESCRIPTION_FIELD_NUMBER |
static int |
EXTENSIONS_FIELD_NUMBER |
static int |
LICENSE_FIELD_NUMBER |
static int |
TERMS_OF_SERVICE_FIELD_NUMBER |
static int |
TITLE_FIELD_NUMBER |
static int |
VERSION_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsExtensions(java.lang.String key)
Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
|
boolean |
equals(java.lang.Object obj) |
Contact |
getContact()
The contact information for the exposed API.
|
ContactOrBuilder |
getContactOrBuilder()
The contact information for the exposed API.
|
static Info |
getDefaultInstance() |
Info |
getDefaultInstanceForType() |
java.lang.String |
getDescription()
A short description of the application.
|
com.google.protobuf.ByteString |
getDescriptionBytes()
A short description of the application.
|
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
java.util.Map<java.lang.String,com.google.protobuf.Value> |
getExtensions()
Deprecated.
|
int |
getExtensionsCount()
Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
|
java.util.Map<java.lang.String,com.google.protobuf.Value> |
getExtensionsMap()
Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
|
com.google.protobuf.Value |
getExtensionsOrDefault(java.lang.String key,
com.google.protobuf.Value defaultValue)
Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
|
com.google.protobuf.Value |
getExtensionsOrThrow(java.lang.String key)
Custom properties that start with "x-" such as "x-foo" used to describe
extra functionality that is not covered by the standard OpenAPI Specification.
|
License |
getLicense()
The license information for the exposed API.
|
LicenseOrBuilder |
getLicenseOrBuilder()
The license information for the exposed API.
|
com.google.protobuf.Parser<Info> |
getParserForType() |
int |
getSerializedSize() |
java.lang.String |
getTermsOfService()
The Terms of Service for the API.
|
com.google.protobuf.ByteString |
getTermsOfServiceBytes()
The Terms of Service for the API.
|
java.lang.String |
getTitle()
The title of the application.
|
com.google.protobuf.ByteString |
getTitleBytes()
The title of the application.
|
java.lang.String |
getVersion()
Provides the version of the application API (not to be confused
with the specification version).
|
com.google.protobuf.ByteString |
getVersionBytes()
Provides the version of the application API (not to be confused
with the specification version).
|
boolean |
hasContact()
The contact information for the exposed API.
|
int |
hashCode() |
boolean |
hasLicense()
The license information for the exposed API.
|
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapFieldReflectionAccessor |
internalGetMapFieldReflection(int number) |
boolean |
isInitialized() |
static Info.Builder |
newBuilder() |
static Info.Builder |
newBuilder(Info prototype) |
Info.Builder |
newBuilderForType() |
protected Info.Builder |
newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) |
static Info |
parseDelimitedFrom(java.io.InputStream input) |
static Info |
parseDelimitedFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Info |
parseFrom(byte[] data) |
static Info |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Info |
parseFrom(java.nio.ByteBuffer data) |
static Info |
parseFrom(java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Info |
parseFrom(com.google.protobuf.ByteString data) |
static Info |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Info |
parseFrom(com.google.protobuf.CodedInputStream input) |
static Info |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static Info |
parseFrom(java.io.InputStream input) |
static Info |
parseFrom(java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<Info> |
parser() |
Info.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashFields, toStringaddAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int TITLE_FIELD_NUMBER
public static final int DESCRIPTION_FIELD_NUMBER
public static final int TERMS_OF_SERVICE_FIELD_NUMBER
public static final int CONTACT_FIELD_NUMBER
public static final int LICENSE_FIELD_NUMBER
public static final int VERSION_FIELD_NUMBER
public static final int EXTENSIONS_FIELD_NUMBER
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessageprotected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessagepublic java.lang.String getTitle()
The title of the application.
string title = 1 [json_name = "title"];getTitle in interface InfoOrBuilderpublic com.google.protobuf.ByteString getTitleBytes()
The title of the application.
string title = 1 [json_name = "title"];getTitleBytes in interface InfoOrBuilderpublic java.lang.String getDescription()
A short description of the application. GFM syntax can be used for rich text representation.
string description = 2 [json_name = "description"];getDescription in interface InfoOrBuilderpublic com.google.protobuf.ByteString getDescriptionBytes()
A short description of the application. GFM syntax can be used for rich text representation.
string description = 2 [json_name = "description"];getDescriptionBytes in interface InfoOrBuilderpublic java.lang.String getTermsOfService()
The Terms of Service for the API.
string terms_of_service = 3 [json_name = "termsOfService"];getTermsOfService in interface InfoOrBuilderpublic com.google.protobuf.ByteString getTermsOfServiceBytes()
The Terms of Service for the API.
string terms_of_service = 3 [json_name = "termsOfService"];getTermsOfServiceBytes in interface InfoOrBuilderpublic boolean hasContact()
The contact information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"];hasContact in interface InfoOrBuilderpublic Contact getContact()
The contact information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"];getContact in interface InfoOrBuilderpublic ContactOrBuilder getContactOrBuilder()
The contact information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4 [json_name = "contact"];getContactOrBuilder in interface InfoOrBuilderpublic boolean hasLicense()
The license information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"];hasLicense in interface InfoOrBuilderpublic License getLicense()
The license information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"];getLicense in interface InfoOrBuilderpublic LicenseOrBuilder getLicenseOrBuilder()
The license information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.License license = 5 [json_name = "license"];getLicenseOrBuilder in interface InfoOrBuilderpublic java.lang.String getVersion()
Provides the version of the application API (not to be confused with the specification version).
string version = 6 [json_name = "version"];getVersion in interface InfoOrBuilderpublic com.google.protobuf.ByteString getVersionBytes()
Provides the version of the application API (not to be confused with the specification version).
string version = 6 [json_name = "version"];getVersionBytes in interface InfoOrBuilderpublic int getExtensionsCount()
InfoOrBuilderCustom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"];getExtensionsCount in interface InfoOrBuilderpublic boolean containsExtensions(java.lang.String key)
Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"];containsExtensions in interface InfoOrBuilder@Deprecated public java.util.Map<java.lang.String,com.google.protobuf.Value> getExtensions()
getExtensionsMap() instead.getExtensions in interface InfoOrBuilderpublic java.util.Map<java.lang.String,com.google.protobuf.Value> getExtensionsMap()
Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"];getExtensionsMap in interface InfoOrBuilderpublic com.google.protobuf.Value getExtensionsOrDefault(java.lang.String key,
com.google.protobuf.Value defaultValue)
Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"];getExtensionsOrDefault in interface InfoOrBuilderpublic com.google.protobuf.Value getExtensionsOrThrow(java.lang.String key)
Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification. See: https://swagger.io/docs/specification/2-0/swagger-extensions/
map<string, .google.protobuf.Value> extensions = 7 [json_name = "extensions"];getExtensionsOrThrow in interface InfoOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessagepublic void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessagejava.io.IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessagepublic boolean equals(java.lang.Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static Info parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Info parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Info parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Info parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Info parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Info parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static Info parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Info parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Info parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Info parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Info parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Info parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic Info.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static Info.Builder newBuilder()
public static Info.Builder newBuilder(Info prototype)
public Info.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected Info.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
newBuilderForType in class com.google.protobuf.AbstractMessagepublic static Info getDefaultInstance()
public static com.google.protobuf.Parser<Info> parser()
public com.google.protobuf.Parser<Info> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessagepublic Info getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder