Class 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, java.lang.Cloneable
    Enclosing class:
    Openapiv2.EnumSchema

    public static final class Openapiv2.EnumSchema.Builder
    extends com.google.protobuf.GeneratedMessageV3.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 Detail

      • 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.GeneratedMessageV3.Builder<Openapiv2.EnumSchema.Builder>
      • internalGetMutableMapFieldReflection

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

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

        public 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public Openapiv2.EnumSchema.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Openapiv2.EnumSchema.Builder>
      • setField

        public Openapiv2.EnumSchema.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Openapiv2.EnumSchema.Builder>
      • clearField

        public Openapiv2.EnumSchema.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Openapiv2.EnumSchema.Builder>
      • clearOneof

        public Openapiv2.EnumSchema.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Openapiv2.EnumSchema.Builder>
      • setRepeatedField

        public Openapiv2.EnumSchema.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             int index,
                                                             java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Openapiv2.EnumSchema.Builder>
      • addRepeatedField

        public Openapiv2.EnumSchema.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                             java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Openapiv2.EnumSchema.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Openapiv2.EnumSchema.Builder>
      • mergeFrom

        public Openapiv2.EnumSchema.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                               throws java.io.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:
        java.io.IOException
      • getDescription

        public java.lang.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​(java.lang.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.
      • setDefault

        public Openapiv2.EnumSchema.Builder setDefault​(java.lang.String value)
        string default = 2;
        Parameters:
        value - The default to set.
        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.
      • 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​(java.lang.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.
      • setRequired

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

        public Openapiv2.EnumSchema.Builder setReadOnly​(boolean value)
        bool read_only = 5;
        Parameters:
        value - The readOnly to set.
        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.
      • 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;
      • setExample

        public Openapiv2.EnumSchema.Builder setExample​(java.lang.String value)
        string example = 7;
        Parameters:
        value - The example to set.
        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 java.lang.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​(java.lang.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​(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 = 9;
        Specified by:
        containsExtensions in interface Openapiv2.EnumSchemaOrBuilder
      • getExtensionsMap

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

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

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

        public Openapiv2.EnumSchema.Builder removeExtensions​(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 = 9;
      • getMutableExtensions

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

        public Openapiv2.EnumSchema.Builder putExtensions​(java.lang.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​(java.util.Map<java.lang.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​(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 = 9;
      • setUnknownFields

        public final Openapiv2.EnumSchema.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Openapiv2.EnumSchema.Builder>
      • mergeUnknownFields

        public final Openapiv2.EnumSchema.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Openapiv2.EnumSchema.Builder>