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 Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Openapiv2.EnumSchema.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Openapiv2.EnumSchema.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Openapiv2.EnumSchema.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Openapiv2.EnumSchema.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Openapiv2.EnumSchema.Builder>
    • getDefaultInstanceForType

      public Openapiv2.EnumSchema getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Openapiv2.EnumSchema build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Openapiv2.EnumSchema buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Openapiv2.EnumSchema.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Openapiv2.EnumSchema.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Openapiv2.EnumSchema.Builder>
      Throws:
      IOException
    • getDescription

      public String getDescription()
       A short description of the schema.
       
      string description = 1;
      Specified by:
      getDescription in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       A short description of the schema.
       
      string description = 1;
      Specified by:
      getDescriptionBytes in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public Openapiv2.EnumSchema.Builder setDescription(String value)
       A short description of the schema.
       
      string description = 1;
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public Openapiv2.EnumSchema.Builder clearDescription()
       A short description of the schema.
       
      string description = 1;
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public Openapiv2.EnumSchema.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       A short description of the schema.
       
      string description = 1;
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getDefault

      public String getDefault()
      string default = 2;
      Specified by:
      getDefault in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The default.
    • getDefaultBytes

      public com.google.protobuf.ByteString getDefaultBytes()
      string default = 2;
      Specified by:
      getDefaultBytes in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The bytes for default.
    • setDefault

      public Openapiv2.EnumSchema.Builder setDefault(String value)
      string default = 2;
      Parameters:
      value - The default to set.
      Returns:
      This builder for chaining.
    • clearDefault

      public Openapiv2.EnumSchema.Builder clearDefault()
      string default = 2;
      Returns:
      This builder for chaining.
    • setDefaultBytes

      public Openapiv2.EnumSchema.Builder setDefaultBytes(com.google.protobuf.ByteString value)
      string default = 2;
      Parameters:
      value - The bytes for default to set.
      Returns:
      This builder for chaining.
    • getTitle

      public String getTitle()
       The title of the schema.
       
      string title = 3;
      Specified by:
      getTitle in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The title.
    • getTitleBytes

      public com.google.protobuf.ByteString getTitleBytes()
       The title of the schema.
       
      string title = 3;
      Specified by:
      getTitleBytes in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The bytes for title.
    • setTitle

      public Openapiv2.EnumSchema.Builder setTitle(String value)
       The title of the schema.
       
      string title = 3;
      Parameters:
      value - The title to set.
      Returns:
      This builder for chaining.
    • clearTitle

      public Openapiv2.EnumSchema.Builder clearTitle()
       The title of the schema.
       
      string title = 3;
      Returns:
      This builder for chaining.
    • setTitleBytes

      public Openapiv2.EnumSchema.Builder setTitleBytes(com.google.protobuf.ByteString value)
       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:
      getRequired in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The required.
    • setRequired

      public Openapiv2.EnumSchema.Builder setRequired(boolean value)
      bool required = 4;
      Parameters:
      value - The required to set.
      Returns:
      This builder for chaining.
    • clearRequired

      public Openapiv2.EnumSchema.Builder clearRequired()
      bool required = 4;
      Returns:
      This builder for chaining.
    • getReadOnly

      public boolean getReadOnly()
      bool read_only = 5;
      Specified by:
      getReadOnly in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The readOnly.
    • setReadOnly

      public Openapiv2.EnumSchema.Builder setReadOnly(boolean value)
      bool read_only = 5;
      Parameters:
      value - The readOnly to set.
      Returns:
      This builder for chaining.
    • clearReadOnly

      public Openapiv2.EnumSchema.Builder 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:
      hasExternalDocs in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      Whether the externalDocs field is set.
    • getExternalDocs

      public Openapiv2.ExternalDocumentation getExternalDocs()
       Additional external documentation for this schema.
       
      .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6;
      Specified by:
      getExternalDocs in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The externalDocs.
    • setExternalDocs

       Additional external documentation for this schema.
       
      .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6;
    • setExternalDocs

       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

      public Openapiv2.EnumSchema.Builder clearExternalDocs()
       Additional external documentation for this schema.
       
      .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6;
    • getExternalDocsBuilder

      public Openapiv2.ExternalDocumentation.Builder getExternalDocsBuilder()
       Additional external documentation for this schema.
       
      .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6;
    • getExternalDocsOrBuilder

      public Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder()
       Additional external documentation for this schema.
       
      .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 6;
      Specified by:
      getExternalDocsOrBuilder in interface Openapiv2.EnumSchemaOrBuilder
    • getExample

      public String getExample()
      string example = 7;
      Specified by:
      getExample in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The example.
    • getExampleBytes

      public com.google.protobuf.ByteString getExampleBytes()
      string example = 7;
      Specified by:
      getExampleBytes in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The bytes for example.
    • setExample

      public Openapiv2.EnumSchema.Builder setExample(String value)
      string example = 7;
      Parameters:
      value - The example to set.
      Returns:
      This builder for chaining.
    • clearExample

      public Openapiv2.EnumSchema.Builder clearExample()
      string example = 7;
      Returns:
      This builder for chaining.
    • setExampleBytes

      public Openapiv2.EnumSchema.Builder setExampleBytes(com.google.protobuf.ByteString value)
      string example = 7;
      Parameters:
      value - The bytes for example to set.
      Returns:
      This builder for chaining.
    • getRef

      public String 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:
      getRef in interface Openapiv2.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:
      getRefBytes in interface Openapiv2.EnumSchemaOrBuilder
      Returns:
      The bytes for ref.
    • setRef

      public Openapiv2.EnumSchema.Builder setRef(String value)
       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

      public Openapiv2.EnumSchema.Builder 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

      public Openapiv2.EnumSchema.Builder setRefBytes(com.google.protobuf.ByteString value)
       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.EnumSchemaOrBuilder
       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:
      getExtensionsCount in interface Openapiv2.EnumSchemaOrBuilder
    • containsExtensions

      public boolean containsExtensions(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 = 9;
      Specified by:
      containsExtensions in interface Openapiv2.EnumSchemaOrBuilder
    • getExtensions

      @Deprecated public Map<String,com.google.protobuf.Value> getExtensions()
      Deprecated.
      Use getExtensionsMap() instead.
      Specified by:
      getExtensions in interface Openapiv2.EnumSchemaOrBuilder
    • getExtensionsMap

      public Map<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 = 9;
      Specified by:
      getExtensionsMap in interface Openapiv2.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:
      getExtensionsOrDefault in interface Openapiv2.EnumSchemaOrBuilder
    • getExtensionsOrThrow

      public com.google.protobuf.Value getExtensionsOrThrow(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 = 9;
      Specified by:
      getExtensionsOrThrow in interface Openapiv2.EnumSchemaOrBuilder
    • clearExtensions

      public Openapiv2.EnumSchema.Builder clearExtensions()
    • removeExtensions

      public Openapiv2.EnumSchema.Builder 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.
       See: https://swagger.io/docs/specification/2-0/swagger-extensions/
       
      map<string, .google.protobuf.Value> extensions = 9;
    • getMutableExtensions

      @Deprecated public Map<String,com.google.protobuf.Value> getMutableExtensions()
      Deprecated.
      Use alternate mutation accessors instead.
    • putExtensions

      public Openapiv2.EnumSchema.Builder 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.
       See: https://swagger.io/docs/specification/2-0/swagger-extensions/
       
      map<string, .google.protobuf.Value> extensions = 9;
    • putAllExtensions

      public Openapiv2.EnumSchema.Builder 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.
       See: https://swagger.io/docs/specification/2-0/swagger-extensions/
       
      map<string, .google.protobuf.Value> extensions = 9;
    • putExtensionsBuilderIfAbsent

      public com.google.protobuf.Value.Builder putExtensionsBuilderIfAbsent(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 = 9;