Class 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.GeneratedMessageV3.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_swagger.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/master/LICENSE.txt";
          };
        };
        ...
      };
     
    Protobuf type grpc.gateway.protoc_gen_swagger.options.Info
    • Constructor Detail

      • Builder

        private Builder()
      • Builder

        private Builder​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Openapiv2.Info.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Openapiv2.Info.Builder>
      • internalGetFieldAccessorTable

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

        public Openapiv2.Info.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.Info.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.Info.Builder>
      • getDefaultInstanceForType

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

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

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

        private void buildPartial0​(Openapiv2.Info result)
      • clone

        public Openapiv2.Info.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.Info.Builder>
      • setField

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

        public Openapiv2.Info.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.Info.Builder>
      • clearOneof

        public Openapiv2.Info.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.Info.Builder>
      • setRepeatedField

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

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

        public Openapiv2.Info.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.Info.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.Info.Builder>
      • mergeFrom

        public Openapiv2.Info.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.Info.Builder>
        Throws:
        IOException
      • getTitleBytes

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

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

        public Openapiv2.Info.Builder clearTitle()
         The title of the application.
         
        string title = 1;
        Returns:
        This builder for chaining.
      • setTitleBytes

        public Openapiv2.Info.Builder setTitleBytes​(com.google.protobuf.ByteString value)
         The title of the application.
         
        string title = 1;
        Parameters:
        value - The bytes for title to set.
        Returns:
        This builder for chaining.
      • getDescription

        public String getDescription()
         A short description of the application. GFM syntax can be used for rich
         text representation.
         
        string description = 2;
        Specified by:
        getDescription in interface Openapiv2.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:
        getDescriptionBytes in interface Openapiv2.InfoOrBuilder
        Returns:
        The bytes for description.
      • setDescription

        public Openapiv2.Info.Builder setDescription​(String value)
         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

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

        public Openapiv2.Info.Builder setDescriptionBytes​(com.google.protobuf.ByteString value)
         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.
      • getTermsOfServiceBytes

        public com.google.protobuf.ByteString getTermsOfServiceBytes()
         The Terms of Service for the API.
         
        string terms_of_service = 3;
        Specified by:
        getTermsOfServiceBytes in interface Openapiv2.InfoOrBuilder
        Returns:
        The bytes for termsOfService.
      • setTermsOfService

        public Openapiv2.Info.Builder setTermsOfService​(String value)
         The Terms of Service for the API.
         
        string terms_of_service = 3;
        Parameters:
        value - The termsOfService to set.
        Returns:
        This builder for chaining.
      • clearTermsOfService

        public Openapiv2.Info.Builder clearTermsOfService()
         The Terms of Service for the API.
         
        string terms_of_service = 3;
        Returns:
        This builder for chaining.
      • setTermsOfServiceBytes

        public Openapiv2.Info.Builder setTermsOfServiceBytes​(com.google.protobuf.ByteString value)
         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_swagger.options.Contact contact = 4;
        Specified by:
        hasContact in interface Openapiv2.InfoOrBuilder
        Returns:
        Whether the contact field is set.
      • mergeContact

        public Openapiv2.Info.Builder mergeContact​(Openapiv2.Contact value)
         The contact information for the exposed API.
         
        .grpc.gateway.protoc_gen_swagger.options.Contact contact = 4;
      • clearContact

        public Openapiv2.Info.Builder clearContact()
         The contact information for the exposed API.
         
        .grpc.gateway.protoc_gen_swagger.options.Contact contact = 4;
      • getContactBuilder

        public Openapiv2.Contact.Builder getContactBuilder()
         The contact information for the exposed API.
         
        .grpc.gateway.protoc_gen_swagger.options.Contact contact = 4;
      • hasLicense

        public boolean hasLicense()
         The license information for the exposed API.
         
        .grpc.gateway.protoc_gen_swagger.options.License license = 5;
        Specified by:
        hasLicense in interface Openapiv2.InfoOrBuilder
        Returns:
        Whether the license field is set.
      • mergeLicense

        public Openapiv2.Info.Builder mergeLicense​(Openapiv2.License value)
         The license information for the exposed API.
         
        .grpc.gateway.protoc_gen_swagger.options.License license = 5;
      • clearLicense

        public Openapiv2.Info.Builder clearLicense()
         The license information for the exposed API.
         
        .grpc.gateway.protoc_gen_swagger.options.License license = 5;
      • getLicenseBuilder

        public Openapiv2.License.Builder getLicenseBuilder()
         The license information for the exposed API.
         
        .grpc.gateway.protoc_gen_swagger.options.License license = 5;
      • getVersion

        public String getVersion()
         Provides the version of the application API (not to be confused
         with the specification version).
         
        string version = 6;
        Specified by:
        getVersion in interface Openapiv2.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:
        getVersionBytes in interface Openapiv2.InfoOrBuilder
        Returns:
        The bytes for version.
      • setVersion

        public Openapiv2.Info.Builder setVersion​(String value)
         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

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

        public Openapiv2.Info.Builder setVersionBytes​(com.google.protobuf.ByteString value)
         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.
      • internalGetExtensions

        private com.google.protobuf.MapField<String,​com.google.protobuf.Value> internalGetExtensions()
      • internalGetMutableExtensions

        private com.google.protobuf.MapField<String,​com.google.protobuf.Value> internalGetMutableExtensions()
      • getExtensionsOrDefault

        public com.google.protobuf.Value getExtensionsOrDefault​(String key,
                                                                com.google.protobuf.Value defaultValue)
        map<string, .google.protobuf.Value> extensions = 7;
        Specified by:
        getExtensionsOrDefault in interface Openapiv2.InfoOrBuilder
      • getMutableExtensions

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

        public Openapiv2.Info.Builder putExtensions​(String key,
                                                    com.google.protobuf.Value value)
        map<string, .google.protobuf.Value> extensions = 7;
      • putAllExtensions

        public Openapiv2.Info.Builder putAllExtensions​(Map<String,​com.google.protobuf.Value> values)
        map<string, .google.protobuf.Value> extensions = 7;
      • setUnknownFields

        public final Openapiv2.Info.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.Info.Builder>
      • mergeUnknownFields

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