Class Openapiv2.EnumSchema.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Openapiv2.EnumSchema.Builder>
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.EnumSchema.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Openapiv2.EnumSchemaOrBuilder,Cloneable
- Enclosing class:
- Openapiv2.EnumSchema
public static final class Openapiv2.EnumSchema.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Openapiv2.EnumSchema.Builder>
implements Openapiv2.EnumSchemaOrBuilder
`EnumSchema` is subset of fields from the OpenAPI v2 specification's Schema object.
Only fields that are applicable to Enums are included
See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
Example:
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_enum) = {
...
title: "MyEnum";
description:"This is my nice enum";
example: "ZERO";
required: true;
...
};
Protobuf type grpc.gateway.protoc_gen_openapiv2.options.EnumSchema-
Method Summary
Modifier and TypeMethodDescriptionbuild()clear()string default = 2;A short description of the schema.string example = 7;Additional external documentation for this schema.bool read_only = 5;clearRef()Ref is used to define an external reference to include in the message.bool required = 4;The title of the schema.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.string default = 2;com.google.protobuf.ByteStringstring default = 2;A short description of the schema.com.google.protobuf.ByteStringA short description of the schema.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptorstring example = 7;com.google.protobuf.ByteStringstring example = 7;Deprecated.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.Additional external documentation for this schema.Additional external documentation for this schema.Additional external documentation for this schema.Deprecated.booleanbool read_only = 5;getRef()Ref is used to define an external reference to include in the message.com.google.protobuf.ByteStringRef is used to define an external reference to include in the message.booleanbool required = 4;getTitle()The title of the schema.com.google.protobuf.ByteStringThe title of the schema.booleanAdditional external documentation for this schema.protected com.google.protobuf.GeneratedMessage.FieldAccessorTableprotected com.google.protobuf.MapFieldReflectionAccessorinternalGetMapFieldReflection(int number) protected com.google.protobuf.MapFieldReflectionAccessorinternalGetMutableMapFieldReflection(int number) final booleanAdditional external documentation for this schema.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeFrom(Openapiv2.EnumSchema other) 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.setDefault(String value) string default = 2;setDefaultBytes(com.google.protobuf.ByteString value) string default = 2;setDescription(String value) A short description of the schema.setDescriptionBytes(com.google.protobuf.ByteString value) A short description of the schema.setExample(String value) string example = 7;setExampleBytes(com.google.protobuf.ByteString value) string example = 7;Additional external documentation for this schema.setExternalDocs(Openapiv2.ExternalDocumentation.Builder builderForValue) Additional external documentation for this schema.setReadOnly(boolean value) bool read_only = 5;Ref is used to define an external reference to include in the message.setRefBytes(com.google.protobuf.ByteString value) Ref is used to define an external reference to include in the message.setRequired(boolean value) bool required = 4;The title of the schema.setTitleBytes(com.google.protobuf.ByteString value) The title of the schema.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.EnumSchema.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number) - Overrides:
internalGetMutableMapFieldReflectionin classcom.google.protobuf.GeneratedMessage.Builder<Openapiv2.EnumSchema.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Openapiv2.EnumSchema.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.EnumSchema.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.EnumSchema.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.EnumSchema.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Openapiv2.EnumSchema.Builder>
-
mergeFrom
public Openapiv2.EnumSchema.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.EnumSchema.Builder>- Throws:
IOException
-
getDescription
A short description of the schema.
string description = 1;- Specified by:
getDescriptionin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The description.
-
getDescriptionBytes
public com.google.protobuf.ByteString getDescriptionBytes()A short description of the schema.
string description = 1;- Specified by:
getDescriptionBytesin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The bytes for description.
-
setDescription
A short description of the schema.
string description = 1;- Parameters:
value- The description to set.- Returns:
- This builder for chaining.
-
clearDescription
A short description of the schema.
string description = 1;- Returns:
- This builder for chaining.
-
setDescriptionBytes
A short description of the schema.
string description = 1;- Parameters:
value- The bytes for description to set.- Returns:
- This builder for chaining.
-
getDefault
string default = 2;- Specified by:
getDefaultin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The default.
-
getDefaultBytes
public com.google.protobuf.ByteString getDefaultBytes()string default = 2;- Specified by:
getDefaultBytesin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The bytes for default.
-
setDefault
string default = 2;- Parameters:
value- The default to set.- Returns:
- This builder for chaining.
-
clearDefault
string default = 2;- Returns:
- This builder for chaining.
-
setDefaultBytes
string default = 2;- Parameters:
value- The bytes for default to set.- Returns:
- This builder for chaining.
-
getTitle
The title of the schema.
string title = 3;- Specified by:
getTitlein interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The title.
-
getTitleBytes
public com.google.protobuf.ByteString getTitleBytes()The title of the schema.
string title = 3;- Specified by:
getTitleBytesin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The bytes for title.
-
setTitle
The title of the schema.
string title = 3;- Parameters:
value- The title to set.- Returns:
- This builder for chaining.
-
clearTitle
The title of the schema.
string title = 3;- Returns:
- This builder for chaining.
-
setTitleBytes
The title of the schema.
string title = 3;- Parameters:
value- The bytes for title to set.- Returns:
- This builder for chaining.
-
getRequired
public boolean getRequired()bool required = 4;- Specified by:
getRequiredin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The required.
-
setRequired
bool required = 4;- Parameters:
value- The required to set.- Returns:
- This builder for chaining.
-
clearRequired
bool required = 4;- Returns:
- This builder for chaining.
-
getReadOnly
public boolean getReadOnly()bool read_only = 5;- Specified by:
getReadOnlyin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The readOnly.
-
setReadOnly
bool read_only = 5;- Parameters:
value- The readOnly to set.- Returns:
- This builder for chaining.
-
clearReadOnly
bool read_only = 5;- Returns:
- This builder for chaining.
-
hasExternalDocs
public boolean hasExternalDocs()Additional external documentation for this schema.
.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6;- Specified by:
hasExternalDocsin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- Whether the externalDocs field is set.
-
getExternalDocs
Additional external documentation for this schema.
.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6;- Specified by:
getExternalDocsin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The externalDocs.
-
setExternalDocs
Additional external documentation for this schema.
.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6; -
setExternalDocs
public Openapiv2.EnumSchema.Builder setExternalDocs(Openapiv2.ExternalDocumentation.Builder builderForValue) Additional external documentation for this schema.
.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6; -
mergeExternalDocs
Additional external documentation for this schema.
.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6; -
clearExternalDocs
Additional external documentation for this schema.
.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6; -
getExternalDocsBuilder
Additional external documentation for this schema.
.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6; -
getExternalDocsOrBuilder
Additional external documentation for this schema.
.grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6;- Specified by:
getExternalDocsOrBuilderin interfaceOpenapiv2.EnumSchemaOrBuilder
-
getExample
string example = 7;- Specified by:
getExamplein interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The example.
-
getExampleBytes
public com.google.protobuf.ByteString getExampleBytes()string example = 7;- Specified by:
getExampleBytesin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The bytes for example.
-
setExample
string example = 7;- Parameters:
value- The example to set.- Returns:
- This builder for chaining.
-
clearExample
string example = 7;- Returns:
- This builder for chaining.
-
setExampleBytes
string example = 7;- Parameters:
value- The bytes for example to set.- Returns:
- This builder for chaining.
-
getRef
Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`.
string ref = 8;- Specified by:
getRefin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The ref.
-
getRefBytes
public com.google.protobuf.ByteString getRefBytes()Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`.
string ref = 8;- Specified by:
getRefBytesin interfaceOpenapiv2.EnumSchemaOrBuilder- Returns:
- The bytes for ref.
-
setRef
Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`.
string ref = 8;- Parameters:
value- The ref to set.- Returns:
- This builder for chaining.
-
clearRef
Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`.
string ref = 8;- Returns:
- This builder for chaining.
-
setRefBytes
Ref is used to define an external reference to include in the message. This could be a fully qualified proto message reference, and that type must be imported into the protofile. If no message is identified, the Ref will be used verbatim in the output. For example: `ref: ".google.protobuf.Timestamp"`.
string ref = 8;- Parameters:
value- The bytes for ref to set.- Returns:
- This builder for chaining.
-
getExtensionsCount
public int getExtensionsCount()Description copied from interface:Openapiv2.EnumSchemaOrBuilderCustom 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 = 9;- Specified by:
getExtensionsCountin interfaceOpenapiv2.EnumSchemaOrBuilder
-
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 = 9;- Specified by:
containsExtensionsin interfaceOpenapiv2.EnumSchemaOrBuilder
-
getExtensions
Deprecated.UsegetExtensionsMap()instead.- Specified by:
getExtensionsin interfaceOpenapiv2.EnumSchemaOrBuilder
-
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 = 9;- Specified by:
getExtensionsMapin interfaceOpenapiv2.EnumSchemaOrBuilder
-
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 = 9;- Specified by:
getExtensionsOrDefaultin interfaceOpenapiv2.EnumSchemaOrBuilder
-
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 = 9;- Specified by:
getExtensionsOrThrowin interfaceOpenapiv2.EnumSchemaOrBuilder
-
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 = 9; -
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 = 9; -
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 = 9; -
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 = 9;
-