Class Openapiv2.Info.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Openapiv2.Info.Builder>
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Openapiv2.InfoOrBuilder,Cloneable
- Enclosing class:
- Openapiv2.Info
public static final class Openapiv2.Info.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Openapiv2.Info.Builder>
implements Openapiv2.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-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()The contact information for the exposed API.A short description of the application.The license information for the exposed API.The Terms of Service for the API.The title of the application.Provides the version of the application API (not to be confused with the specification version).booleancontainsExtensions(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.The contact information for the exposed API.The contact information for the exposed API.The contact information for the exposed API.A short description of the application.com.google.protobuf.ByteStringA short description of the application.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorDeprecated.intCustom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification.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.ValuegetExtensionsOrDefault(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.ValueCustom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification.The license information for the exposed API.The license information for the exposed API.The license information for the exposed API.Deprecated.The Terms of Service for the API.com.google.protobuf.ByteStringThe Terms of Service for the API.getTitle()The title of the application.com.google.protobuf.ByteStringThe title of the application.Provides the version of the application API (not to be confused with the specification version).com.google.protobuf.ByteStringProvides the version of the application API (not to be confused with the specification version).booleanThe contact information for the exposed API.booleanThe license information for the exposed API.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanmergeContact(Openapiv2.Contact value) The contact information for the exposed API.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(Openapiv2.Info other) mergeLicense(Openapiv2.License value) The license information for the exposed API.putAllExtensions(Map<String, com.google.protobuf.Value> values) Custom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification.putExtensions(String key, com.google.protobuf.Value value) 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.BuilderCustom properties that start with "x-" such as "x-foo" used to describe extra functionality that is not covered by the standard OpenAPI Specification.removeExtensions(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.setContact(Openapiv2.Contact value) The contact information for the exposed API.setContact(Openapiv2.Contact.Builder builderForValue) The contact information for the exposed API.setDescription(String value) A short description of the application.setDescriptionBytes(com.google.protobuf.ByteString value) A short description of the application.setLicense(Openapiv2.License value) The license information for the exposed API.setLicense(Openapiv2.License.Builder builderForValue) The license information for the exposed API.setTermsOfService(String value) The Terms of Service for the API.setTermsOfServiceBytes(com.google.protobuf.ByteString value) The Terms of Service for the API.The title of the application.setTitleBytes(com.google.protobuf.ByteString value) The title of the application.setVersion(String value) Provides the version of the application API (not to be confused with the specification version).setVersionBytes(com.google.protobuf.ByteString value) Provides the version of the application API (not to be confused with the specification version).Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number) - Overrides:
internalGetMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<Openapiv2.Info.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<Openapiv2.Info.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Openapiv2.Info.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Openapiv2.Info.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Openapiv2.Info.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Openapiv2.Info.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Openapiv2.Info.Builder>
-
mergeFrom
public Openapiv2.Info.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Openapiv2.Info.Builder>- Throws:
IOException
-
getTitle
The title of the application.
string title = 1;- Specified by:
getTitlein interfaceOpenapiv2.InfoOrBuilder- Returns:
- The title.
-
getTitleBytes
public com.google.protobuf.ByteString getTitleBytes()The title of the application.
string title = 1;- Specified by:
getTitleBytesin interfaceOpenapiv2.InfoOrBuilder- Returns:
- The bytes for title.
-
setTitle
The title of the application.
string title = 1;- Parameters:
value- The title to set.- Returns:
- This builder for chaining.
-
clearTitle
The title of the application.
string title = 1;- Returns:
- This builder for chaining.
-
setTitleBytes
The title of the application.
string title = 1;- Parameters:
value- The bytes for title to set.- Returns:
- This builder for chaining.
-
getDescription
A short description of the application. GFM syntax can be used for rich text representation.
string description = 2;- Specified by:
getDescriptionin interfaceOpenapiv2.InfoOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()A short description of the application. GFM syntax can be used for rich text representation.
string description = 2;- Specified by:
getDescriptionBytesin interfaceOpenapiv2.InfoOrBuilder- Returns:
- The bytes for description.
-
setDescription
A short description of the application. GFM syntax can be used for rich text representation.
string description = 2;- Parameters:
value- The description to set.- Returns:
- This builder for chaining.
-
clearDescription
A short description of the application. GFM syntax can be used for rich text representation.
string description = 2;- Returns:
- This builder for chaining.
-
setDescriptionBytes
A short description of the application. GFM syntax can be used for rich text representation.
string description = 2;- Parameters:
value- The bytes for description to set.- Returns:
- This builder for chaining.
-
getTermsOfService
The Terms of Service for the API.
string terms_of_service = 3;- Specified by:
getTermsOfServicein interfaceOpenapiv2.InfoOrBuilder- Returns:
- The termsOfService.
-
getTermsOfServiceBytes
public com.google.protobuf.ByteString getTermsOfServiceBytes()The Terms of Service for the API.
string terms_of_service = 3;- Specified by:
getTermsOfServiceBytesin interfaceOpenapiv2.InfoOrBuilder- Returns:
- The bytes for termsOfService.
-
setTermsOfService
The Terms of Service for the API.
string terms_of_service = 3;- Parameters:
value- The termsOfService to set.- Returns:
- This builder for chaining.
-
clearTermsOfService
The Terms of Service for the API.
string terms_of_service = 3;- Returns:
- This builder for chaining.
-
setTermsOfServiceBytes
The Terms of Service for the API.
string terms_of_service = 3;- Parameters:
value- The bytes for termsOfService to set.- Returns:
- This builder for chaining.
-
hasContact
public boolean hasContact()The contact information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;- Specified by:
hasContactin interfaceOpenapiv2.InfoOrBuilder- Returns:
- Whether the contact field is set.
-
getContact
The contact information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;- Specified by:
getContactin interfaceOpenapiv2.InfoOrBuilder- Returns:
- The contact.
-
setContact
The contact information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4; -
setContact
The contact information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4; -
mergeContact
The contact information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4; -
clearContact
The contact information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4; -
getContactBuilder
The contact information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4; -
getContactOrBuilder
The contact information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;- Specified by:
getContactOrBuilderin interfaceOpenapiv2.InfoOrBuilder
-
hasLicense
public boolean hasLicense()The license information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.License license = 5;- Specified by:
hasLicensein interfaceOpenapiv2.InfoOrBuilder- Returns:
- Whether the license field is set.
-
getLicense
The license information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.License license = 5;- Specified by:
getLicensein interfaceOpenapiv2.InfoOrBuilder- Returns:
- The license.
-
setLicense
The license information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.License license = 5; -
setLicense
The license information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.License license = 5; -
mergeLicense
The license information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.License license = 5; -
clearLicense
The license information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.License license = 5; -
getLicenseBuilder
The license information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.License license = 5; -
getLicenseOrBuilder
The license information for the exposed API.
.grpc.gateway.protoc_gen_openapiv2.options.License license = 5;- Specified by:
getLicenseOrBuilderin interfaceOpenapiv2.InfoOrBuilder
-
getVersion
Provides the version of the application API (not to be confused with the specification version).
string version = 6;- Specified by:
getVersionin interfaceOpenapiv2.InfoOrBuilder- Returns:
- The version.
-
getVersionBytes
public com.google.protobuf.ByteString getVersionBytes()Provides the version of the application API (not to be confused with the specification version).
string version = 6;- Specified by:
getVersionBytesin interfaceOpenapiv2.InfoOrBuilder- Returns:
- The bytes for version.
-
setVersion
Provides the version of the application API (not to be confused with the specification version).
string version = 6;- Parameters:
value- The version to set.- Returns:
- This builder for chaining.
-
clearVersion
Provides the version of the application API (not to be confused with the specification version).
string version = 6;- Returns:
- This builder for chaining.
-
setVersionBytes
Provides the version of the application API (not to be confused with the specification version).
string version = 6;- Parameters:
value- The bytes for version to set.- Returns:
- This builder for chaining.
-
getExtensionsCount
public int getExtensionsCount()Description copied from interface:Openapiv2.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;- Specified by:
getExtensionsCountin interfaceOpenapiv2.InfoOrBuilder
-
containsExtensions
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;- Specified by:
containsExtensionsin interfaceOpenapiv2.InfoOrBuilder
-
getExtensions
Deprecated.UsegetExtensionsMap()instead.- Specified by:
getExtensionsin interfaceOpenapiv2.InfoOrBuilder
-
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;- Specified by:
getExtensionsMapin interfaceOpenapiv2.InfoOrBuilder
-
getExtensionsOrDefault
public com.google.protobuf.Value getExtensionsOrDefault(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;- Specified by:
getExtensionsOrDefaultin interfaceOpenapiv2.InfoOrBuilder
-
getExtensionsOrThrow
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;- Specified by:
getExtensionsOrThrowin interfaceOpenapiv2.InfoOrBuilder
-
clearExtensions
-
removeExtensions
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; -
getMutableExtensions
Deprecated.Use alternate mutation accessors instead. -
putExtensions
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; -
putAllExtensions
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; -
putExtensionsBuilderIfAbsent
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;
-