Class Openapiv2.Operation

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Openapiv2.OperationOrBuilder, Serializable
Enclosing class:
Openapiv2

public static final class Openapiv2.Operation extends com.google.protobuf.GeneratedMessageV3 implements Openapiv2.OperationOrBuilder
 `Operation` is a representation of OpenAPI v2 specification's Operation object.
 See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#operationObject
 Example:
  service EchoService {
    rpc Echo(SimpleMessage) returns (SimpleMessage) {
      option (google.api.http) = {
        get: "/v1/example/echo/{id}"
      };
      option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
        summary: "Get a message.";
        operation_id: "getMessage";
        tags: "echo";
        responses: {
          key: "200"
            value: {
            description: "OK";
          }
        }
      };
    }
  }
 
Protobuf type grpc.gateway.protoc_gen_openapiv2.options.Operation
See Also:
  • Field Details

  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getUnknownFields

      public final com.google.protobuf.UnknownFieldSet getUnknownFields()
      Specified by:
      getUnknownFields in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getUnknownFields in class com.google.protobuf.GeneratedMessageV3
    • 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
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • getTagsList

      public com.google.protobuf.ProtocolStringList getTagsList()
       A list of tags for API documentation control. Tags can be used for logical
       grouping of operations by resources or any other qualifier.
       
      repeated string tags = 1;
      Specified by:
      getTagsList in interface Openapiv2.OperationOrBuilder
      Returns:
      A list containing the tags.
    • getTagsCount

      public int getTagsCount()
       A list of tags for API documentation control. Tags can be used for logical
       grouping of operations by resources or any other qualifier.
       
      repeated string tags = 1;
      Specified by:
      getTagsCount in interface Openapiv2.OperationOrBuilder
      Returns:
      The count of tags.
    • getTags

      public String getTags(int index)
       A list of tags for API documentation control. Tags can be used for logical
       grouping of operations by resources or any other qualifier.
       
      repeated string tags = 1;
      Specified by:
      getTags in interface Openapiv2.OperationOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The tags at the given index.
    • getTagsBytes

      public com.google.protobuf.ByteString getTagsBytes(int index)
       A list of tags for API documentation control. Tags can be used for logical
       grouping of operations by resources or any other qualifier.
       
      repeated string tags = 1;
      Specified by:
      getTagsBytes in interface Openapiv2.OperationOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the tags at the given index.
    • getSummary

      public String getSummary()
       A short summary of what the operation does. For maximum readability in the
       swagger-ui, this field SHOULD be less than 120 characters.
       
      string summary = 2;
      Specified by:
      getSummary in interface Openapiv2.OperationOrBuilder
      Returns:
      The summary.
    • getSummaryBytes

      public com.google.protobuf.ByteString getSummaryBytes()
       A short summary of what the operation does. For maximum readability in the
       swagger-ui, this field SHOULD be less than 120 characters.
       
      string summary = 2;
      Specified by:
      getSummaryBytes in interface Openapiv2.OperationOrBuilder
      Returns:
      The bytes for summary.
    • getDescription

      public String getDescription()
       A verbose explanation of the operation behavior. GFM syntax can be used for
       rich text representation.
       
      string description = 3;
      Specified by:
      getDescription in interface Openapiv2.OperationOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       A verbose explanation of the operation behavior. GFM syntax can be used for
       rich text representation.
       
      string description = 3;
      Specified by:
      getDescriptionBytes in interface Openapiv2.OperationOrBuilder
      Returns:
      The bytes for description.
    • hasExternalDocs

      public boolean hasExternalDocs()
       Additional external documentation for this operation.
       
      .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
      Specified by:
      hasExternalDocs in interface Openapiv2.OperationOrBuilder
      Returns:
      Whether the externalDocs field is set.
    • getExternalDocs

      public Openapiv2.ExternalDocumentation getExternalDocs()
       Additional external documentation for this operation.
       
      .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
      Specified by:
      getExternalDocs in interface Openapiv2.OperationOrBuilder
      Returns:
      The externalDocs.
    • getExternalDocsOrBuilder

      public Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder()
       Additional external documentation for this operation.
       
      .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
      Specified by:
      getExternalDocsOrBuilder in interface Openapiv2.OperationOrBuilder
    • getOperationId

      public String getOperationId()
       Unique string used to identify the operation. The id MUST be unique among
       all operations described in the API. Tools and libraries MAY use the
       operationId to uniquely identify an operation, therefore, it is recommended
       to follow common programming naming conventions.
       
      string operation_id = 5;
      Specified by:
      getOperationId in interface Openapiv2.OperationOrBuilder
      Returns:
      The operationId.
    • getOperationIdBytes

      public com.google.protobuf.ByteString getOperationIdBytes()
       Unique string used to identify the operation. The id MUST be unique among
       all operations described in the API. Tools and libraries MAY use the
       operationId to uniquely identify an operation, therefore, it is recommended
       to follow common programming naming conventions.
       
      string operation_id = 5;
      Specified by:
      getOperationIdBytes in interface Openapiv2.OperationOrBuilder
      Returns:
      The bytes for operationId.
    • getConsumesList

      public com.google.protobuf.ProtocolStringList getConsumesList()
       A list of MIME types the operation can consume. This overrides the consumes
       definition at the OpenAPI Object. An empty value MAY be used to clear the
       global definition. Value MUST be as described under Mime Types.
       
      repeated string consumes = 6;
      Specified by:
      getConsumesList in interface Openapiv2.OperationOrBuilder
      Returns:
      A list containing the consumes.
    • getConsumesCount

      public int getConsumesCount()
       A list of MIME types the operation can consume. This overrides the consumes
       definition at the OpenAPI Object. An empty value MAY be used to clear the
       global definition. Value MUST be as described under Mime Types.
       
      repeated string consumes = 6;
      Specified by:
      getConsumesCount in interface Openapiv2.OperationOrBuilder
      Returns:
      The count of consumes.
    • getConsumes

      public String getConsumes(int index)
       A list of MIME types the operation can consume. This overrides the consumes
       definition at the OpenAPI Object. An empty value MAY be used to clear the
       global definition. Value MUST be as described under Mime Types.
       
      repeated string consumes = 6;
      Specified by:
      getConsumes in interface Openapiv2.OperationOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The consumes at the given index.
    • getConsumesBytes

      public com.google.protobuf.ByteString getConsumesBytes(int index)
       A list of MIME types the operation can consume. This overrides the consumes
       definition at the OpenAPI Object. An empty value MAY be used to clear the
       global definition. Value MUST be as described under Mime Types.
       
      repeated string consumes = 6;
      Specified by:
      getConsumesBytes in interface Openapiv2.OperationOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the consumes at the given index.
    • getProducesList

      public com.google.protobuf.ProtocolStringList getProducesList()
       A list of MIME types the operation can produce. This overrides the produces
       definition at the OpenAPI Object. An empty value MAY be used to clear the
       global definition. Value MUST be as described under Mime Types.
       
      repeated string produces = 7;
      Specified by:
      getProducesList in interface Openapiv2.OperationOrBuilder
      Returns:
      A list containing the produces.
    • getProducesCount

      public int getProducesCount()
       A list of MIME types the operation can produce. This overrides the produces
       definition at the OpenAPI Object. An empty value MAY be used to clear the
       global definition. Value MUST be as described under Mime Types.
       
      repeated string produces = 7;
      Specified by:
      getProducesCount in interface Openapiv2.OperationOrBuilder
      Returns:
      The count of produces.
    • getProduces

      public String getProduces(int index)
       A list of MIME types the operation can produce. This overrides the produces
       definition at the OpenAPI Object. An empty value MAY be used to clear the
       global definition. Value MUST be as described under Mime Types.
       
      repeated string produces = 7;
      Specified by:
      getProduces in interface Openapiv2.OperationOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The produces at the given index.
    • getProducesBytes

      public com.google.protobuf.ByteString getProducesBytes(int index)
       A list of MIME types the operation can produce. This overrides the produces
       definition at the OpenAPI Object. An empty value MAY be used to clear the
       global definition. Value MUST be as described under Mime Types.
       
      repeated string produces = 7;
      Specified by:
      getProducesBytes in interface Openapiv2.OperationOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The bytes of the produces at the given index.
    • getResponsesCount

      public int getResponsesCount()
      Description copied from interface: Openapiv2.OperationOrBuilder
       The list of possible responses as they are returned from executing this
       operation.
       
      map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
      Specified by:
      getResponsesCount in interface Openapiv2.OperationOrBuilder
    • containsResponses

      public boolean containsResponses(String key)
       The list of possible responses as they are returned from executing this
       operation.
       
      map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
      Specified by:
      containsResponses in interface Openapiv2.OperationOrBuilder
    • getResponses

      @Deprecated public Map<String,Openapiv2.Response> getResponses()
      Deprecated.
      Use getResponsesMap() instead.
      Specified by:
      getResponses in interface Openapiv2.OperationOrBuilder
    • getResponsesMap

      public Map<String,Openapiv2.Response> getResponsesMap()
       The list of possible responses as they are returned from executing this
       operation.
       
      map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
      Specified by:
      getResponsesMap in interface Openapiv2.OperationOrBuilder
    • getResponsesOrDefault

      public Openapiv2.Response getResponsesOrDefault(String key, Openapiv2.Response defaultValue)
       The list of possible responses as they are returned from executing this
       operation.
       
      map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
      Specified by:
      getResponsesOrDefault in interface Openapiv2.OperationOrBuilder
    • getResponsesOrThrow

      public Openapiv2.Response getResponsesOrThrow(String key)
       The list of possible responses as they are returned from executing this
       operation.
       
      map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
      Specified by:
      getResponsesOrThrow in interface Openapiv2.OperationOrBuilder
    • getSchemesList

      public List<Openapiv2.Scheme> getSchemesList()
       The transfer protocol for the operation. Values MUST be from the list:
       "http", "https", "ws", "wss". The value overrides the OpenAPI Object
       schemes definition.
       
      repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10;
      Specified by:
      getSchemesList in interface Openapiv2.OperationOrBuilder
      Returns:
      A list containing the schemes.
    • getSchemesCount

      public int getSchemesCount()
       The transfer protocol for the operation. Values MUST be from the list:
       "http", "https", "ws", "wss". The value overrides the OpenAPI Object
       schemes definition.
       
      repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10;
      Specified by:
      getSchemesCount in interface Openapiv2.OperationOrBuilder
      Returns:
      The count of schemes.
    • getSchemes

      public Openapiv2.Scheme getSchemes(int index)
       The transfer protocol for the operation. Values MUST be from the list:
       "http", "https", "ws", "wss". The value overrides the OpenAPI Object
       schemes definition.
       
      repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10;
      Specified by:
      getSchemes in interface Openapiv2.OperationOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The schemes at the given index.
    • getSchemesValueList

      public List<Integer> getSchemesValueList()
       The transfer protocol for the operation. Values MUST be from the list:
       "http", "https", "ws", "wss". The value overrides the OpenAPI Object
       schemes definition.
       
      repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10;
      Specified by:
      getSchemesValueList in interface Openapiv2.OperationOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for schemes.
    • getSchemesValue

      public int getSchemesValue(int index)
       The transfer protocol for the operation. Values MUST be from the list:
       "http", "https", "ws", "wss". The value overrides the OpenAPI Object
       schemes definition.
       
      repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 10;
      Specified by:
      getSchemesValue in interface Openapiv2.OperationOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of schemes at the given index.
    • getDeprecated

      public boolean getDeprecated()
       Declares this operation to be deprecated. Usage of the declared operation
       should be refrained. Default value is false.
       
      bool deprecated = 11;
      Specified by:
      getDeprecated in interface Openapiv2.OperationOrBuilder
      Returns:
      The deprecated.
    • getSecurityList

      public List<Openapiv2.SecurityRequirement> getSecurityList()
       A declaration of which security schemes are applied for this operation. The
       list of values describes alternative security schemes that can be used
       (that is, there is a logical OR between the security requirements). This
       definition overrides any declared top-level security. To remove a top-level
       security declaration, an empty array can be used.
       
      repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
      Specified by:
      getSecurityList in interface Openapiv2.OperationOrBuilder
    • getSecurityOrBuilderList

      public List<? extends Openapiv2.SecurityRequirementOrBuilder> getSecurityOrBuilderList()
       A declaration of which security schemes are applied for this operation. The
       list of values describes alternative security schemes that can be used
       (that is, there is a logical OR between the security requirements). This
       definition overrides any declared top-level security. To remove a top-level
       security declaration, an empty array can be used.
       
      repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
      Specified by:
      getSecurityOrBuilderList in interface Openapiv2.OperationOrBuilder
    • getSecurityCount

      public int getSecurityCount()
       A declaration of which security schemes are applied for this operation. The
       list of values describes alternative security schemes that can be used
       (that is, there is a logical OR between the security requirements). This
       definition overrides any declared top-level security. To remove a top-level
       security declaration, an empty array can be used.
       
      repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
      Specified by:
      getSecurityCount in interface Openapiv2.OperationOrBuilder
    • getSecurity

      public Openapiv2.SecurityRequirement getSecurity(int index)
       A declaration of which security schemes are applied for this operation. The
       list of values describes alternative security schemes that can be used
       (that is, there is a logical OR between the security requirements). This
       definition overrides any declared top-level security. To remove a top-level
       security declaration, an empty array can be used.
       
      repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
      Specified by:
      getSecurity in interface Openapiv2.OperationOrBuilder
    • getSecurityOrBuilder

      public Openapiv2.SecurityRequirementOrBuilder getSecurityOrBuilder(int index)
       A declaration of which security schemes are applied for this operation. The
       list of values describes alternative security schemes that can be used
       (that is, there is a logical OR between the security requirements). This
       definition overrides any declared top-level security. To remove a top-level
       security declaration, an empty array can be used.
       
      repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
      Specified by:
      getSecurityOrBuilder in interface Openapiv2.OperationOrBuilder
    • getExtensionsCount

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

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

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

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

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

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

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Openapiv2.Operation parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Openapiv2.Operation parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Openapiv2.Operation parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Openapiv2.Operation parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Openapiv2.Operation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Openapiv2.Operation parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Openapiv2.Operation parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Openapiv2.Operation parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Openapiv2.Operation parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Openapiv2.Operation parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Openapiv2.Operation parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Openapiv2.Operation parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Openapiv2.Operation.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Openapiv2.Operation.Builder newBuilder()
    • newBuilder

      public static Openapiv2.Operation.Builder newBuilder(Openapiv2.Operation prototype)
    • toBuilder

      public Openapiv2.Operation.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Openapiv2.Operation.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static Openapiv2.Operation getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Openapiv2.Operation> parser()
    • getParserForType

      public com.google.protobuf.Parser<Openapiv2.Operation> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

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