Class Openapiv2.Info.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.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.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_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/master/LICENSE.txt";
      };
    };
    ...
  };
 
Protobuf type grpc.gateway.protoc_gen_openapiv2.options.Info
  • Method Details

    • 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
    • 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>
    • mergeFrom

      public Openapiv2.Info.Builder mergeFrom(Openapiv2.Info other)
    • 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
    • getTitle

      public String getTitle()
       The title of the application.
       
      string title = 1;
      Specified by:
      getTitle in interface Openapiv2.InfoOrBuilder
      Returns:
      The title.
    • 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.
    • getTermsOfService

      public String getTermsOfService()
       The Terms of Service for the API.
       
      string terms_of_service = 3;
      Specified by:
      getTermsOfService in interface Openapiv2.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:
      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_openapiv2.options.Contact contact = 4;
      Specified by:
      hasContact in interface Openapiv2.InfoOrBuilder
      Returns:
      Whether the contact field is set.
    • getContact

      public Openapiv2.Contact getContact()
       The contact information for the exposed API.
       
      .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
      Specified by:
      getContact in interface Openapiv2.InfoOrBuilder
      Returns:
      The contact.
    • setContact

      public Openapiv2.Info.Builder setContact(Openapiv2.Contact value)
       The contact information for the exposed API.
       
      .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
    • setContact

      public Openapiv2.Info.Builder setContact(Openapiv2.Contact.Builder builderForValue)
       The contact information for the exposed API.
       
      .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
    • mergeContact

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

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

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

      public Openapiv2.ContactOrBuilder getContactOrBuilder()
       The contact information for the exposed API.
       
      .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
      Specified by:
      getContactOrBuilder in interface Openapiv2.InfoOrBuilder
    • hasLicense

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

      public Openapiv2.License getLicense()
       The license information for the exposed API.
       
      .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
      Specified by:
      getLicense in interface Openapiv2.InfoOrBuilder
      Returns:
      The license.
    • setLicense

      public Openapiv2.Info.Builder setLicense(Openapiv2.License value)
       The license information for the exposed API.
       
      .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
    • setLicense

      public Openapiv2.Info.Builder setLicense(Openapiv2.License.Builder builderForValue)
       The license information for the exposed API.
       
      .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
    • mergeLicense

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

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

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

      public Openapiv2.LicenseOrBuilder getLicenseOrBuilder()
       The license information for the exposed API.
       
      .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
      Specified by:
      getLicenseOrBuilder in interface Openapiv2.InfoOrBuilder
    • 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.
    • getExtensionsCount

      public int getExtensionsCount()
      Description copied from interface: Openapiv2.InfoOrBuilder
      map<string, .google.protobuf.Value> extensions = 7;
      Specified by:
      getExtensionsCount in interface Openapiv2.InfoOrBuilder
    • containsExtensions

      public boolean containsExtensions(String key)
      map<string, .google.protobuf.Value> extensions = 7;
      Specified by:
      containsExtensions in interface Openapiv2.InfoOrBuilder
    • getExtensions

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

      public Map<String,Value> getExtensionsMap()
      map<string, .google.protobuf.Value> extensions = 7;
      Specified by:
      getExtensionsMap in interface Openapiv2.InfoOrBuilder
    • getExtensionsOrDefault

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

      public Value getExtensionsOrThrow(String key)
      map<string, .google.protobuf.Value> extensions = 7;
      Specified by:
      getExtensionsOrThrow in interface Openapiv2.InfoOrBuilder
    • clearExtensions

      public Openapiv2.Info.Builder clearExtensions()
    • removeExtensions

      public Openapiv2.Info.Builder removeExtensions(String key)
      map<string, .google.protobuf.Value> extensions = 7;
    • getMutableExtensions

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

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

      public Openapiv2.Info.Builder putAllExtensions(Map<String,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>