grpc.gateway.protoc_gen_openapiv2.options.Openapiv2 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdk Show documentation
Show all versions of sdk Show documentation
SDK for the PassKit gRPC API that can be used to create, configure and manage Membership, Loyalty, Event Ticket, Coupon, Transit and Boarding Pass content for mobile wallet applications, including Apple Pay and Google Pay.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: protoc-gen-openapiv2/options/openapiv2.proto
package grpc.gateway.protoc_gen_openapiv2.options;
public final class Openapiv2 {
private Openapiv2() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
*
* Scheme describes the schemes supported by the OpenAPI Swagger
* and Operation objects.
*
*
* Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.Scheme}
*/
public enum Scheme
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
* HTTP = 1;
*/
HTTP(1),
/**
* HTTPS = 2;
*/
HTTPS(2),
/**
* WS = 3;
*/
WS(3),
/**
* WSS = 4;
*/
WSS(4),
UNRECOGNIZED(-1),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
* HTTP = 1;
*/
public static final int HTTP_VALUE = 1;
/**
* HTTPS = 2;
*/
public static final int HTTPS_VALUE = 2;
/**
* WS = 3;
*/
public static final int WS_VALUE = 3;
/**
* WSS = 4;
*/
public static final int WSS_VALUE = 4;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Scheme valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Scheme forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return HTTP;
case 2: return HTTPS;
case 3: return WS;
case 4: return WSS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Scheme> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Scheme findValueByNumber(int number) {
return Scheme.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.getDescriptor().getEnumTypes().get(0);
}
private static final Scheme[] VALUES = values();
public static Scheme valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Scheme(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.Scheme)
}
public interface SwaggerOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Swagger)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specifies the OpenAPI Specification version being used. It can be
* used by the OpenAPI UI and other clients to interpret the API listing. The
* value MUST be "2.0".
*
*
* string swagger = 1;
* @return The swagger.
*/
java.lang.String getSwagger();
/**
*
* Specifies the OpenAPI Specification version being used. It can be
* used by the OpenAPI UI and other clients to interpret the API listing. The
* value MUST be "2.0".
*
*
* string swagger = 1;
* @return The bytes for swagger.
*/
com.google.protobuf.ByteString
getSwaggerBytes();
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
* @return Whether the info field is set.
*/
boolean hasInfo();
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
* @return The info.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info getInfo();
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.InfoOrBuilder getInfoOrBuilder();
/**
*
* The host (name or ip) serving the API. This MUST be the host only and does
* not include the scheme nor sub-paths. It MAY include a port. If the host is
* not included, the host serving the documentation is to be used (including
* the port). The host does not support path templating.
*
*
* string host = 3;
* @return The host.
*/
java.lang.String getHost();
/**
*
* The host (name or ip) serving the API. This MUST be the host only and does
* not include the scheme nor sub-paths. It MAY include a port. If the host is
* not included, the host serving the documentation is to be used (including
* the port). The host does not support path templating.
*
*
* string host = 3;
* @return The bytes for host.
*/
com.google.protobuf.ByteString
getHostBytes();
/**
*
* The base path on which the API is served, which is relative to the host. If
* it is not included, the API is served directly under the host. The value
* MUST start with a leading slash (/). The basePath does not support path
* templating.
* Note that using `base_path` does not change the endpoint paths that are
* generated in the resulting OpenAPI file. If you wish to use `base_path`
* with relatively generated OpenAPI paths, the `base_path` prefix must be
* manually removed from your `google.api.http` paths and your code changed to
* serve the API from the `base_path`.
*
*
* string base_path = 4;
* @return The basePath.
*/
java.lang.String getBasePath();
/**
*
* The base path on which the API is served, which is relative to the host. If
* it is not included, the API is served directly under the host. The value
* MUST start with a leading slash (/). The basePath does not support path
* templating.
* Note that using `base_path` does not change the endpoint paths that are
* generated in the resulting OpenAPI file. If you wish to use `base_path`
* with relatively generated OpenAPI paths, the `base_path` prefix must be
* manually removed from your `google.api.http` paths and your code changed to
* serve the API from the `base_path`.
*
*
* string base_path = 4;
* @return The bytes for basePath.
*/
com.google.protobuf.ByteString
getBasePathBytes();
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @return A list containing the schemes.
*/
java.util.List getSchemesList();
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @return The count of schemes.
*/
int getSchemesCount();
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param index The index of the element to return.
* @return The schemes at the given index.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme getSchemes(int index);
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @return A list containing the enum numeric values on the wire for schemes.
*/
java.util.List
getSchemesValueList();
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of schemes at the given index.
*/
int getSchemesValue(int index);
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @return A list containing the consumes.
*/
java.util.List
getConsumesList();
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @return The count of consumes.
*/
int getConsumesCount();
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @param index The index of the element to return.
* @return The consumes at the given index.
*/
java.lang.String getConsumes(int index);
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @param index The index of the value to return.
* @return The bytes of the consumes at the given index.
*/
com.google.protobuf.ByteString
getConsumesBytes(int index);
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @return A list containing the produces.
*/
java.util.List
getProducesList();
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @return The count of produces.
*/
int getProducesCount();
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @param index The index of the element to return.
* @return The produces at the given index.
*/
java.lang.String getProduces(int index);
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @param index The index of the value to return.
* @return The bytes of the produces at the given index.
*/
com.google.protobuf.ByteString
getProducesBytes(int index);
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
int getResponsesCount();
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
boolean containsResponses(
java.lang.String key);
/**
* Use {@link #getResponsesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getResponses();
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
java.util.Map
getResponsesMap();
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrDefault(
java.lang.String key,
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response defaultValue);
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrThrow(
java.lang.String key);
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
* @return Whether the securityDefinitions field is set.
*/
boolean hasSecurityDefinitions();
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
* @return The securityDefinitions.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions getSecurityDefinitions();
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder();
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
java.util.List
getSecurityList();
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement getSecurity(int index);
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
int getSecurityCount();
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
java.util.List extends grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder>
getSecurityOrBuilderList();
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder getSecurityOrBuilder(
int index);
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
* @return Whether the externalDocs field is set.
*/
boolean hasExternalDocs();
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
* @return The externalDocs.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs();
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder();
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
int getExtensionsCount();
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
boolean containsExtensions(
java.lang.String key);
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getExtensions();
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
java.util.Map
getExtensionsMap();
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue);
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key);
}
/**
*
* `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
* 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";
* };
* };
* schemes: HTTPS;
* consumes: "application/json";
* produces: "application/json";
* };
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Swagger}
*/
public static final class Swagger extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Swagger)
SwaggerOrBuilder {
private static final long serialVersionUID = 0L;
// Use Swagger.newBuilder() to construct.
private Swagger(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Swagger() {
swagger_ = "";
host_ = "";
basePath_ = "";
schemes_ = java.util.Collections.emptyList();
consumes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
produces_ = com.google.protobuf.LazyStringArrayList.EMPTY;
security_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Swagger();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Swagger(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
swagger_ = s;
break;
}
case 18: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.Builder subBuilder = null;
if (info_ != null) {
subBuilder = info_.toBuilder();
}
info_ = input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(info_);
info_ = subBuilder.buildPartial();
}
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
host_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
basePath_ = s;
break;
}
case 40: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
schemes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
schemes_.add(rawValue);
break;
}
case 42: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
schemes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
schemes_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
consumes_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
consumes_.add(s);
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
produces_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
produces_.add(s);
break;
}
case 82: {
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
responses_ = com.google.protobuf.MapField.newMapField(
ResponsesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000008;
}
com.google.protobuf.MapEntry
responses__ = input.readMessage(
ResponsesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
responses_.getMutableMap().put(
responses__.getKey(), responses__.getValue());
break;
}
case 90: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.Builder subBuilder = null;
if (securityDefinitions_ != null) {
subBuilder = securityDefinitions_.toBuilder();
}
securityDefinitions_ = input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(securityDefinitions_);
securityDefinitions_ = subBuilder.buildPartial();
}
break;
}
case 98: {
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
security_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
security_.add(
input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.parser(), extensionRegistry));
break;
}
case 114: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder subBuilder = null;
if (externalDocs_ != null) {
subBuilder = externalDocs_.toBuilder();
}
externalDocs_ = input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(externalDocs_);
externalDocs_ = subBuilder.buildPartial();
}
break;
}
case 122: {
if (!((mutable_bitField0_ & 0x00000020) != 0)) {
extensions_ = com.google.protobuf.MapField.newMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000020;
}
com.google.protobuf.MapEntry
extensions__ = input.readMessage(
ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
extensions_.getMutableMap().put(
extensions__.getKey(), extensions__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
schemes_ = java.util.Collections.unmodifiableList(schemes_);
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
consumes_ = consumes_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
produces_ = produces_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000010) != 0)) {
security_ = java.util.Collections.unmodifiableList(security_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 10:
return internalGetResponses();
case 15:
return internalGetExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger.Builder.class);
}
public static final int SWAGGER_FIELD_NUMBER = 1;
private volatile java.lang.Object swagger_;
/**
*
* Specifies the OpenAPI Specification version being used. It can be
* used by the OpenAPI UI and other clients to interpret the API listing. The
* value MUST be "2.0".
*
*
* string swagger = 1;
* @return The swagger.
*/
@java.lang.Override
public java.lang.String getSwagger() {
java.lang.Object ref = swagger_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
swagger_ = s;
return s;
}
}
/**
*
* Specifies the OpenAPI Specification version being used. It can be
* used by the OpenAPI UI and other clients to interpret the API listing. The
* value MUST be "2.0".
*
*
* string swagger = 1;
* @return The bytes for swagger.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSwaggerBytes() {
java.lang.Object ref = swagger_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
swagger_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INFO_FIELD_NUMBER = 2;
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info info_;
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
* @return Whether the info field is set.
*/
@java.lang.Override
public boolean hasInfo() {
return info_ != null;
}
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
* @return The info.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info getInfo() {
return info_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.getDefaultInstance() : info_;
}
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.InfoOrBuilder getInfoOrBuilder() {
return getInfo();
}
public static final int HOST_FIELD_NUMBER = 3;
private volatile java.lang.Object host_;
/**
*
* The host (name or ip) serving the API. This MUST be the host only and does
* not include the scheme nor sub-paths. It MAY include a port. If the host is
* not included, the host serving the documentation is to be used (including
* the port). The host does not support path templating.
*
*
* string host = 3;
* @return The host.
*/
@java.lang.Override
public java.lang.String getHost() {
java.lang.Object ref = host_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
host_ = s;
return s;
}
}
/**
*
* The host (name or ip) serving the API. This MUST be the host only and does
* not include the scheme nor sub-paths. It MAY include a port. If the host is
* not included, the host serving the documentation is to be used (including
* the port). The host does not support path templating.
*
*
* string host = 3;
* @return The bytes for host.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHostBytes() {
java.lang.Object ref = host_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
host_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BASE_PATH_FIELD_NUMBER = 4;
private volatile java.lang.Object basePath_;
/**
*
* The base path on which the API is served, which is relative to the host. If
* it is not included, the API is served directly under the host. The value
* MUST start with a leading slash (/). The basePath does not support path
* templating.
* Note that using `base_path` does not change the endpoint paths that are
* generated in the resulting OpenAPI file. If you wish to use `base_path`
* with relatively generated OpenAPI paths, the `base_path` prefix must be
* manually removed from your `google.api.http` paths and your code changed to
* serve the API from the `base_path`.
*
*
* string base_path = 4;
* @return The basePath.
*/
@java.lang.Override
public java.lang.String getBasePath() {
java.lang.Object ref = basePath_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
basePath_ = s;
return s;
}
}
/**
*
* The base path on which the API is served, which is relative to the host. If
* it is not included, the API is served directly under the host. The value
* MUST start with a leading slash (/). The basePath does not support path
* templating.
* Note that using `base_path` does not change the endpoint paths that are
* generated in the resulting OpenAPI file. If you wish to use `base_path`
* with relatively generated OpenAPI paths, the `base_path` prefix must be
* manually removed from your `google.api.http` paths and your code changed to
* serve the API from the `base_path`.
*
*
* string base_path = 4;
* @return The bytes for basePath.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getBasePathBytes() {
java.lang.Object ref = basePath_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
basePath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SCHEMES_FIELD_NUMBER = 5;
private java.util.List schemes_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme> schemes_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme>() {
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme result = grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme.valueOf(from);
return result == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme.UNRECOGNIZED : result;
}
};
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @return A list containing the schemes.
*/
@java.lang.Override
public java.util.List getSchemesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme>(schemes_, schemes_converter_);
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @return The count of schemes.
*/
@java.lang.Override
public int getSchemesCount() {
return schemes_.size();
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param index The index of the element to return.
* @return The schemes at the given index.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme getSchemes(int index) {
return schemes_converter_.convert(schemes_.get(index));
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @return A list containing the enum numeric values on the wire for schemes.
*/
@java.lang.Override
public java.util.List
getSchemesValueList() {
return schemes_;
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of schemes at the given index.
*/
@java.lang.Override
public int getSchemesValue(int index) {
return schemes_.get(index);
}
private int schemesMemoizedSerializedSize;
public static final int CONSUMES_FIELD_NUMBER = 6;
private com.google.protobuf.LazyStringList consumes_;
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @return A list containing the consumes.
*/
public com.google.protobuf.ProtocolStringList
getConsumesList() {
return consumes_;
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @return The count of consumes.
*/
public int getConsumesCount() {
return consumes_.size();
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @param index The index of the element to return.
* @return The consumes at the given index.
*/
public java.lang.String getConsumes(int index) {
return consumes_.get(index);
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @param index The index of the value to return.
* @return The bytes of the consumes at the given index.
*/
public com.google.protobuf.ByteString
getConsumesBytes(int index) {
return consumes_.getByteString(index);
}
public static final int PRODUCES_FIELD_NUMBER = 7;
private com.google.protobuf.LazyStringList produces_;
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @return A list containing the produces.
*/
public com.google.protobuf.ProtocolStringList
getProducesList() {
return produces_;
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @return The count of produces.
*/
public int getProducesCount() {
return produces_.size();
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @param index The index of the element to return.
* @return The produces at the given index.
*/
public java.lang.String getProduces(int index) {
return produces_.get(index);
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @param index The index of the value to return.
* @return The bytes of the produces at the given index.
*/
public com.google.protobuf.ByteString
getProducesBytes(int index) {
return produces_.getByteString(index);
}
public static final int RESPONSES_FIELD_NUMBER = 10;
private static final class ResponsesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ResponsesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response> responses_;
private com.google.protobuf.MapField
internalGetResponses() {
if (responses_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ResponsesDefaultEntryHolder.defaultEntry);
}
return responses_;
}
public int getResponsesCount() {
return internalGetResponses().getMap().size();
}
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
@java.lang.Override
public boolean containsResponses(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetResponses().getMap().containsKey(key);
}
/**
* Use {@link #getResponsesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getResponses() {
return getResponsesMap();
}
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
@java.lang.Override
public java.util.Map getResponsesMap() {
return internalGetResponses().getMap();
}
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrDefault(
java.lang.String key,
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetResponses().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetResponses().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int SECURITY_DEFINITIONS_FIELD_NUMBER = 11;
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions securityDefinitions_;
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
* @return Whether the securityDefinitions field is set.
*/
@java.lang.Override
public boolean hasSecurityDefinitions() {
return securityDefinitions_ != null;
}
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
* @return The securityDefinitions.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions getSecurityDefinitions() {
return securityDefinitions_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.getDefaultInstance() : securityDefinitions_;
}
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder() {
return getSecurityDefinitions();
}
public static final int SECURITY_FIELD_NUMBER = 12;
private java.util.List security_;
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
@java.lang.Override
public java.util.List getSecurityList() {
return security_;
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
@java.lang.Override
public java.util.List extends grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder>
getSecurityOrBuilderList() {
return security_;
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
@java.lang.Override
public int getSecurityCount() {
return security_.size();
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement getSecurity(int index) {
return security_.get(index);
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder getSecurityOrBuilder(
int index) {
return security_.get(index);
}
public static final int EXTERNAL_DOCS_FIELD_NUMBER = 14;
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation externalDocs_;
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
* @return Whether the externalDocs field is set.
*/
@java.lang.Override
public boolean hasExternalDocs() {
return externalDocs_ != null;
}
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
* @return The externalDocs.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs() {
return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
}
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() {
return getExternalDocs();
}
public static final int EXTENSIONS_FIELD_NUMBER = 15;
private static final class ExtensionsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.google.protobuf.Value> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_ExtensionsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.google.protobuf.Value.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Value> extensions_;
private com.google.protobuf.MapField
internalGetExtensions() {
if (extensions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
return extensions_;
}
public int getExtensionsCount() {
return internalGetExtensions().getMap().size();
}
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public java.util.Map getExtensionsMap() {
return internalGetExtensions().getMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!getSwaggerBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, swagger_);
}
if (info_ != null) {
output.writeMessage(2, getInfo());
}
if (!getHostBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, host_);
}
if (!getBasePathBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, basePath_);
}
if (getSchemesList().size() > 0) {
output.writeUInt32NoTag(42);
output.writeUInt32NoTag(schemesMemoizedSerializedSize);
}
for (int i = 0; i < schemes_.size(); i++) {
output.writeEnumNoTag(schemes_.get(i));
}
for (int i = 0; i < consumes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, consumes_.getRaw(i));
}
for (int i = 0; i < produces_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, produces_.getRaw(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetResponses(),
ResponsesDefaultEntryHolder.defaultEntry,
10);
if (securityDefinitions_ != null) {
output.writeMessage(11, getSecurityDefinitions());
}
for (int i = 0; i < security_.size(); i++) {
output.writeMessage(12, security_.get(i));
}
if (externalDocs_ != null) {
output.writeMessage(14, getExternalDocs());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetExtensions(),
ExtensionsDefaultEntryHolder.defaultEntry,
15);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getSwaggerBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, swagger_);
}
if (info_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getInfo());
}
if (!getHostBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, host_);
}
if (!getBasePathBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, basePath_);
}
{
int dataSize = 0;
for (int i = 0; i < schemes_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(schemes_.get(i));
}
size += dataSize;
if (!getSchemesList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}schemesMemoizedSerializedSize = dataSize;
}
{
int dataSize = 0;
for (int i = 0; i < consumes_.size(); i++) {
dataSize += computeStringSizeNoTag(consumes_.getRaw(i));
}
size += dataSize;
size += 1 * getConsumesList().size();
}
{
int dataSize = 0;
for (int i = 0; i < produces_.size(); i++) {
dataSize += computeStringSizeNoTag(produces_.getRaw(i));
}
size += dataSize;
size += 1 * getProducesList().size();
}
for (java.util.Map.Entry entry
: internalGetResponses().getMap().entrySet()) {
com.google.protobuf.MapEntry
responses__ = ResponsesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(10, responses__);
}
if (securityDefinitions_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getSecurityDefinitions());
}
for (int i = 0; i < security_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, security_.get(i));
}
if (externalDocs_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, getExternalDocs());
}
for (java.util.Map.Entry entry
: internalGetExtensions().getMap().entrySet()) {
com.google.protobuf.MapEntry
extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, extensions__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger)) {
return super.equals(obj);
}
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger other = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger) obj;
if (!getSwagger()
.equals(other.getSwagger())) return false;
if (hasInfo() != other.hasInfo()) return false;
if (hasInfo()) {
if (!getInfo()
.equals(other.getInfo())) return false;
}
if (!getHost()
.equals(other.getHost())) return false;
if (!getBasePath()
.equals(other.getBasePath())) return false;
if (!schemes_.equals(other.schemes_)) return false;
if (!getConsumesList()
.equals(other.getConsumesList())) return false;
if (!getProducesList()
.equals(other.getProducesList())) return false;
if (!internalGetResponses().equals(
other.internalGetResponses())) return false;
if (hasSecurityDefinitions() != other.hasSecurityDefinitions()) return false;
if (hasSecurityDefinitions()) {
if (!getSecurityDefinitions()
.equals(other.getSecurityDefinitions())) return false;
}
if (!getSecurityList()
.equals(other.getSecurityList())) return false;
if (hasExternalDocs() != other.hasExternalDocs()) return false;
if (hasExternalDocs()) {
if (!getExternalDocs()
.equals(other.getExternalDocs())) return false;
}
if (!internalGetExtensions().equals(
other.internalGetExtensions())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SWAGGER_FIELD_NUMBER;
hash = (53 * hash) + getSwagger().hashCode();
if (hasInfo()) {
hash = (37 * hash) + INFO_FIELD_NUMBER;
hash = (53 * hash) + getInfo().hashCode();
}
hash = (37 * hash) + HOST_FIELD_NUMBER;
hash = (53 * hash) + getHost().hashCode();
hash = (37 * hash) + BASE_PATH_FIELD_NUMBER;
hash = (53 * hash) + getBasePath().hashCode();
if (getSchemesCount() > 0) {
hash = (37 * hash) + SCHEMES_FIELD_NUMBER;
hash = (53 * hash) + schemes_.hashCode();
}
if (getConsumesCount() > 0) {
hash = (37 * hash) + CONSUMES_FIELD_NUMBER;
hash = (53 * hash) + getConsumesList().hashCode();
}
if (getProducesCount() > 0) {
hash = (37 * hash) + PRODUCES_FIELD_NUMBER;
hash = (53 * hash) + getProducesList().hashCode();
}
if (!internalGetResponses().getMap().isEmpty()) {
hash = (37 * hash) + RESPONSES_FIELD_NUMBER;
hash = (53 * hash) + internalGetResponses().hashCode();
}
if (hasSecurityDefinitions()) {
hash = (37 * hash) + SECURITY_DEFINITIONS_FIELD_NUMBER;
hash = (53 * hash) + getSecurityDefinitions().hashCode();
}
if (getSecurityCount() > 0) {
hash = (37 * hash) + SECURITY_FIELD_NUMBER;
hash = (53 * hash) + getSecurityList().hashCode();
}
if (hasExternalDocs()) {
hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER;
hash = (53 * hash) + getExternalDocs().hashCode();
}
if (!internalGetExtensions().getMap().isEmpty()) {
hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER;
hash = (53 * hash) + internalGetExtensions().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `Swagger` is a representation of OpenAPI v2 specification's Swagger object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#swaggerObject
* 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";
* };
* };
* schemes: HTTPS;
* consumes: "application/json";
* produces: "application/json";
* };
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Swagger}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Swagger)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SwaggerOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 10:
return internalGetResponses();
case 15:
return internalGetExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 10:
return internalGetMutableResponses();
case 15:
return internalGetMutableExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSecurityFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
swagger_ = "";
if (infoBuilder_ == null) {
info_ = null;
} else {
info_ = null;
infoBuilder_ = null;
}
host_ = "";
basePath_ = "";
schemes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
consumes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
produces_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
internalGetMutableResponses().clear();
if (securityDefinitionsBuilder_ == null) {
securityDefinitions_ = null;
} else {
securityDefinitions_ = null;
securityDefinitionsBuilder_ = null;
}
if (securityBuilder_ == null) {
security_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
} else {
securityBuilder_.clear();
}
if (externalDocsBuilder_ == null) {
externalDocs_ = null;
} else {
externalDocs_ = null;
externalDocsBuilder_ = null;
}
internalGetMutableExtensions().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Swagger_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger(this);
int from_bitField0_ = bitField0_;
result.swagger_ = swagger_;
if (infoBuilder_ == null) {
result.info_ = info_;
} else {
result.info_ = infoBuilder_.build();
}
result.host_ = host_;
result.basePath_ = basePath_;
if (((bitField0_ & 0x00000001) != 0)) {
schemes_ = java.util.Collections.unmodifiableList(schemes_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.schemes_ = schemes_;
if (((bitField0_ & 0x00000002) != 0)) {
consumes_ = consumes_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.consumes_ = consumes_;
if (((bitField0_ & 0x00000004) != 0)) {
produces_ = produces_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.produces_ = produces_;
result.responses_ = internalGetResponses();
result.responses_.makeImmutable();
if (securityDefinitionsBuilder_ == null) {
result.securityDefinitions_ = securityDefinitions_;
} else {
result.securityDefinitions_ = securityDefinitionsBuilder_.build();
}
if (securityBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0)) {
security_ = java.util.Collections.unmodifiableList(security_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.security_ = security_;
} else {
result.security_ = securityBuilder_.build();
}
if (externalDocsBuilder_ == null) {
result.externalDocs_ = externalDocs_;
} else {
result.externalDocs_ = externalDocsBuilder_.build();
}
result.extensions_ = internalGetExtensions();
result.extensions_.makeImmutable();
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger.getDefaultInstance()) return this;
if (!other.getSwagger().isEmpty()) {
swagger_ = other.swagger_;
onChanged();
}
if (other.hasInfo()) {
mergeInfo(other.getInfo());
}
if (!other.getHost().isEmpty()) {
host_ = other.host_;
onChanged();
}
if (!other.getBasePath().isEmpty()) {
basePath_ = other.basePath_;
onChanged();
}
if (!other.schemes_.isEmpty()) {
if (schemes_.isEmpty()) {
schemes_ = other.schemes_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSchemesIsMutable();
schemes_.addAll(other.schemes_);
}
onChanged();
}
if (!other.consumes_.isEmpty()) {
if (consumes_.isEmpty()) {
consumes_ = other.consumes_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureConsumesIsMutable();
consumes_.addAll(other.consumes_);
}
onChanged();
}
if (!other.produces_.isEmpty()) {
if (produces_.isEmpty()) {
produces_ = other.produces_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureProducesIsMutable();
produces_.addAll(other.produces_);
}
onChanged();
}
internalGetMutableResponses().mergeFrom(
other.internalGetResponses());
if (other.hasSecurityDefinitions()) {
mergeSecurityDefinitions(other.getSecurityDefinitions());
}
if (securityBuilder_ == null) {
if (!other.security_.isEmpty()) {
if (security_.isEmpty()) {
security_ = other.security_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureSecurityIsMutable();
security_.addAll(other.security_);
}
onChanged();
}
} else {
if (!other.security_.isEmpty()) {
if (securityBuilder_.isEmpty()) {
securityBuilder_.dispose();
securityBuilder_ = null;
security_ = other.security_;
bitField0_ = (bitField0_ & ~0x00000010);
securityBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSecurityFieldBuilder() : null;
} else {
securityBuilder_.addAllMessages(other.security_);
}
}
}
if (other.hasExternalDocs()) {
mergeExternalDocs(other.getExternalDocs());
}
internalGetMutableExtensions().mergeFrom(
other.internalGetExtensions());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object swagger_ = "";
/**
*
* Specifies the OpenAPI Specification version being used. It can be
* used by the OpenAPI UI and other clients to interpret the API listing. The
* value MUST be "2.0".
*
*
* string swagger = 1;
* @return The swagger.
*/
public java.lang.String getSwagger() {
java.lang.Object ref = swagger_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
swagger_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Specifies the OpenAPI Specification version being used. It can be
* used by the OpenAPI UI and other clients to interpret the API listing. The
* value MUST be "2.0".
*
*
* string swagger = 1;
* @return The bytes for swagger.
*/
public com.google.protobuf.ByteString
getSwaggerBytes() {
java.lang.Object ref = swagger_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
swagger_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Specifies the OpenAPI Specification version being used. It can be
* used by the OpenAPI UI and other clients to interpret the API listing. The
* value MUST be "2.0".
*
*
* string swagger = 1;
* @param value The swagger to set.
* @return This builder for chaining.
*/
public Builder setSwagger(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
swagger_ = value;
onChanged();
return this;
}
/**
*
* Specifies the OpenAPI Specification version being used. It can be
* used by the OpenAPI UI and other clients to interpret the API listing. The
* value MUST be "2.0".
*
*
* string swagger = 1;
* @return This builder for chaining.
*/
public Builder clearSwagger() {
swagger_ = getDefaultInstance().getSwagger();
onChanged();
return this;
}
/**
*
* Specifies the OpenAPI Specification version being used. It can be
* used by the OpenAPI UI and other clients to interpret the API listing. The
* value MUST be "2.0".
*
*
* string swagger = 1;
* @param value The bytes for swagger to set.
* @return This builder for chaining.
*/
public Builder setSwaggerBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
swagger_ = value;
onChanged();
return this;
}
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info info_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.InfoOrBuilder> infoBuilder_;
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
* @return Whether the info field is set.
*/
public boolean hasInfo() {
return infoBuilder_ != null || info_ != null;
}
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
* @return The info.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info getInfo() {
if (infoBuilder_ == null) {
return info_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.getDefaultInstance() : info_;
} else {
return infoBuilder_.getMessage();
}
}
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
*/
public Builder setInfo(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info value) {
if (infoBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
info_ = value;
onChanged();
} else {
infoBuilder_.setMessage(value);
}
return this;
}
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
*/
public Builder setInfo(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.Builder builderForValue) {
if (infoBuilder_ == null) {
info_ = builderForValue.build();
onChanged();
} else {
infoBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
*/
public Builder mergeInfo(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info value) {
if (infoBuilder_ == null) {
if (info_ != null) {
info_ =
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.newBuilder(info_).mergeFrom(value).buildPartial();
} else {
info_ = value;
}
onChanged();
} else {
infoBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
*/
public Builder clearInfo() {
if (infoBuilder_ == null) {
info_ = null;
onChanged();
} else {
info_ = null;
infoBuilder_ = null;
}
return this;
}
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.Builder getInfoBuilder() {
onChanged();
return getInfoFieldBuilder().getBuilder();
}
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.InfoOrBuilder getInfoOrBuilder() {
if (infoBuilder_ != null) {
return infoBuilder_.getMessageOrBuilder();
} else {
return info_ == null ?
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.getDefaultInstance() : info_;
}
}
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Info info = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.InfoOrBuilder>
getInfoFieldBuilder() {
if (infoBuilder_ == null) {
infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.InfoOrBuilder>(
getInfo(),
getParentForChildren(),
isClean());
info_ = null;
}
return infoBuilder_;
}
private java.lang.Object host_ = "";
/**
*
* The host (name or ip) serving the API. This MUST be the host only and does
* not include the scheme nor sub-paths. It MAY include a port. If the host is
* not included, the host serving the documentation is to be used (including
* the port). The host does not support path templating.
*
*
* string host = 3;
* @return The host.
*/
public java.lang.String getHost() {
java.lang.Object ref = host_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
host_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The host (name or ip) serving the API. This MUST be the host only and does
* not include the scheme nor sub-paths. It MAY include a port. If the host is
* not included, the host serving the documentation is to be used (including
* the port). The host does not support path templating.
*
*
* string host = 3;
* @return The bytes for host.
*/
public com.google.protobuf.ByteString
getHostBytes() {
java.lang.Object ref = host_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
host_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The host (name or ip) serving the API. This MUST be the host only and does
* not include the scheme nor sub-paths. It MAY include a port. If the host is
* not included, the host serving the documentation is to be used (including
* the port). The host does not support path templating.
*
*
* string host = 3;
* @param value The host to set.
* @return This builder for chaining.
*/
public Builder setHost(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
host_ = value;
onChanged();
return this;
}
/**
*
* The host (name or ip) serving the API. This MUST be the host only and does
* not include the scheme nor sub-paths. It MAY include a port. If the host is
* not included, the host serving the documentation is to be used (including
* the port). The host does not support path templating.
*
*
* string host = 3;
* @return This builder for chaining.
*/
public Builder clearHost() {
host_ = getDefaultInstance().getHost();
onChanged();
return this;
}
/**
*
* The host (name or ip) serving the API. This MUST be the host only and does
* not include the scheme nor sub-paths. It MAY include a port. If the host is
* not included, the host serving the documentation is to be used (including
* the port). The host does not support path templating.
*
*
* string host = 3;
* @param value The bytes for host to set.
* @return This builder for chaining.
*/
public Builder setHostBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
host_ = value;
onChanged();
return this;
}
private java.lang.Object basePath_ = "";
/**
*
* The base path on which the API is served, which is relative to the host. If
* it is not included, the API is served directly under the host. The value
* MUST start with a leading slash (/). The basePath does not support path
* templating.
* Note that using `base_path` does not change the endpoint paths that are
* generated in the resulting OpenAPI file. If you wish to use `base_path`
* with relatively generated OpenAPI paths, the `base_path` prefix must be
* manually removed from your `google.api.http` paths and your code changed to
* serve the API from the `base_path`.
*
*
* string base_path = 4;
* @return The basePath.
*/
public java.lang.String getBasePath() {
java.lang.Object ref = basePath_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
basePath_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The base path on which the API is served, which is relative to the host. If
* it is not included, the API is served directly under the host. The value
* MUST start with a leading slash (/). The basePath does not support path
* templating.
* Note that using `base_path` does not change the endpoint paths that are
* generated in the resulting OpenAPI file. If you wish to use `base_path`
* with relatively generated OpenAPI paths, the `base_path` prefix must be
* manually removed from your `google.api.http` paths and your code changed to
* serve the API from the `base_path`.
*
*
* string base_path = 4;
* @return The bytes for basePath.
*/
public com.google.protobuf.ByteString
getBasePathBytes() {
java.lang.Object ref = basePath_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
basePath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The base path on which the API is served, which is relative to the host. If
* it is not included, the API is served directly under the host. The value
* MUST start with a leading slash (/). The basePath does not support path
* templating.
* Note that using `base_path` does not change the endpoint paths that are
* generated in the resulting OpenAPI file. If you wish to use `base_path`
* with relatively generated OpenAPI paths, the `base_path` prefix must be
* manually removed from your `google.api.http` paths and your code changed to
* serve the API from the `base_path`.
*
*
* string base_path = 4;
* @param value The basePath to set.
* @return This builder for chaining.
*/
public Builder setBasePath(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
basePath_ = value;
onChanged();
return this;
}
/**
*
* The base path on which the API is served, which is relative to the host. If
* it is not included, the API is served directly under the host. The value
* MUST start with a leading slash (/). The basePath does not support path
* templating.
* Note that using `base_path` does not change the endpoint paths that are
* generated in the resulting OpenAPI file. If you wish to use `base_path`
* with relatively generated OpenAPI paths, the `base_path` prefix must be
* manually removed from your `google.api.http` paths and your code changed to
* serve the API from the `base_path`.
*
*
* string base_path = 4;
* @return This builder for chaining.
*/
public Builder clearBasePath() {
basePath_ = getDefaultInstance().getBasePath();
onChanged();
return this;
}
/**
*
* The base path on which the API is served, which is relative to the host. If
* it is not included, the API is served directly under the host. The value
* MUST start with a leading slash (/). The basePath does not support path
* templating.
* Note that using `base_path` does not change the endpoint paths that are
* generated in the resulting OpenAPI file. If you wish to use `base_path`
* with relatively generated OpenAPI paths, the `base_path` prefix must be
* manually removed from your `google.api.http` paths and your code changed to
* serve the API from the `base_path`.
*
*
* string base_path = 4;
* @param value The bytes for basePath to set.
* @return This builder for chaining.
*/
public Builder setBasePathBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
basePath_ = value;
onChanged();
return this;
}
private java.util.List schemes_ =
java.util.Collections.emptyList();
private void ensureSchemesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
schemes_ = new java.util.ArrayList(schemes_);
bitField0_ |= 0x00000001;
}
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @return A list containing the schemes.
*/
public java.util.List getSchemesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme>(schemes_, schemes_converter_);
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @return The count of schemes.
*/
public int getSchemesCount() {
return schemes_.size();
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param index The index of the element to return.
* @return The schemes at the given index.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme getSchemes(int index) {
return schemes_converter_.convert(schemes_.get(index));
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param index The index to set the value at.
* @param value The schemes to set.
* @return This builder for chaining.
*/
public Builder setSchemes(
int index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme value) {
if (value == null) {
throw new NullPointerException();
}
ensureSchemesIsMutable();
schemes_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param value The schemes to add.
* @return This builder for chaining.
*/
public Builder addSchemes(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme value) {
if (value == null) {
throw new NullPointerException();
}
ensureSchemesIsMutable();
schemes_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param values The schemes to add.
* @return This builder for chaining.
*/
public Builder addAllSchemes(
java.lang.Iterable extends grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme> values) {
ensureSchemesIsMutable();
for (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme value : values) {
schemes_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @return This builder for chaining.
*/
public Builder clearSchemes() {
schemes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @return A list containing the enum numeric values on the wire for schemes.
*/
public java.util.List
getSchemesValueList() {
return java.util.Collections.unmodifiableList(schemes_);
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of schemes at the given index.
*/
public int getSchemesValue(int index) {
return schemes_.get(index);
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of schemes at the given index.
* @return This builder for chaining.
*/
public Builder setSchemesValue(
int index, int value) {
ensureSchemesIsMutable();
schemes_.set(index, value);
onChanged();
return this;
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param value The enum numeric value on the wire for schemes to add.
* @return This builder for chaining.
*/
public Builder addSchemesValue(int value) {
ensureSchemesIsMutable();
schemes_.add(value);
onChanged();
return this;
}
/**
*
* The transfer protocol of the API. Values MUST be from the list: "http",
* "https", "ws", "wss". If the schemes is not included, the default scheme to
* be used is the one used to access the OpenAPI definition itself.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.Scheme schemes = 5;
* @param values The enum numeric values on the wire for schemes to add.
* @return This builder for chaining.
*/
public Builder addAllSchemesValue(
java.lang.Iterable values) {
ensureSchemesIsMutable();
for (int value : values) {
schemes_.add(value);
}
onChanged();
return this;
}
private com.google.protobuf.LazyStringList consumes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureConsumesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
consumes_ = new com.google.protobuf.LazyStringArrayList(consumes_);
bitField0_ |= 0x00000002;
}
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @return A list containing the consumes.
*/
public com.google.protobuf.ProtocolStringList
getConsumesList() {
return consumes_.getUnmodifiableView();
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @return The count of consumes.
*/
public int getConsumesCount() {
return consumes_.size();
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @param index The index of the element to return.
* @return The consumes at the given index.
*/
public java.lang.String getConsumes(int index) {
return consumes_.get(index);
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @param index The index of the value to return.
* @return The bytes of the consumes at the given index.
*/
public com.google.protobuf.ByteString
getConsumesBytes(int index) {
return consumes_.getByteString(index);
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @param index The index to set the value at.
* @param value The consumes to set.
* @return This builder for chaining.
*/
public Builder setConsumes(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConsumesIsMutable();
consumes_.set(index, value);
onChanged();
return this;
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @param value The consumes to add.
* @return This builder for chaining.
*/
public Builder addConsumes(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConsumesIsMutable();
consumes_.add(value);
onChanged();
return this;
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @param values The consumes to add.
* @return This builder for chaining.
*/
public Builder addAllConsumes(
java.lang.Iterable values) {
ensureConsumesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, consumes_);
onChanged();
return this;
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @return This builder for chaining.
*/
public Builder clearConsumes() {
consumes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* A list of MIME types the APIs can consume. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string consumes = 6;
* @param value The bytes of the consumes to add.
* @return This builder for chaining.
*/
public Builder addConsumesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureConsumesIsMutable();
consumes_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList produces_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureProducesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
produces_ = new com.google.protobuf.LazyStringArrayList(produces_);
bitField0_ |= 0x00000004;
}
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @return A list containing the produces.
*/
public com.google.protobuf.ProtocolStringList
getProducesList() {
return produces_.getUnmodifiableView();
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @return The count of produces.
*/
public int getProducesCount() {
return produces_.size();
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @param index The index of the element to return.
* @return The produces at the given index.
*/
public java.lang.String getProduces(int index) {
return produces_.get(index);
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @param index The index of the value to return.
* @return The bytes of the produces at the given index.
*/
public com.google.protobuf.ByteString
getProducesBytes(int index) {
return produces_.getByteString(index);
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @param index The index to set the value at.
* @param value The produces to set.
* @return This builder for chaining.
*/
public Builder setProduces(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureProducesIsMutable();
produces_.set(index, value);
onChanged();
return this;
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @param value The produces to add.
* @return This builder for chaining.
*/
public Builder addProduces(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureProducesIsMutable();
produces_.add(value);
onChanged();
return this;
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @param values The produces to add.
* @return This builder for chaining.
*/
public Builder addAllProduces(
java.lang.Iterable values) {
ensureProducesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, produces_);
onChanged();
return this;
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @return This builder for chaining.
*/
public Builder clearProduces() {
produces_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* A list of MIME types the APIs can produce. This is global to all APIs but
* can be overridden on specific API calls. Value MUST be as described under
* Mime Types.
*
*
* repeated string produces = 7;
* @param value The bytes of the produces to add.
* @return This builder for chaining.
*/
public Builder addProducesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureProducesIsMutable();
produces_.add(value);
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response> responses_;
private com.google.protobuf.MapField
internalGetResponses() {
if (responses_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ResponsesDefaultEntryHolder.defaultEntry);
}
return responses_;
}
private com.google.protobuf.MapField
internalGetMutableResponses() {
onChanged();;
if (responses_ == null) {
responses_ = com.google.protobuf.MapField.newMapField(
ResponsesDefaultEntryHolder.defaultEntry);
}
if (!responses_.isMutable()) {
responses_ = responses_.copy();
}
return responses_;
}
public int getResponsesCount() {
return internalGetResponses().getMap().size();
}
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
@java.lang.Override
public boolean containsResponses(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetResponses().getMap().containsKey(key);
}
/**
* Use {@link #getResponsesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getResponses() {
return getResponsesMap();
}
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
@java.lang.Override
public java.util.Map getResponsesMap() {
return internalGetResponses().getMap();
}
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrDefault(
java.lang.String key,
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetResponses().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetResponses().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearResponses() {
internalGetMutableResponses().getMutableMap()
.clear();
return this;
}
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
public Builder removeResponses(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableResponses().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableResponses() {
return internalGetMutableResponses().getMutableMap();
}
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
public Builder putResponses(
java.lang.String key,
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableResponses().getMutableMap()
.put(key, value);
return this;
}
/**
*
* An object to hold responses that can be used across operations. This
* property does not define global responses for all operations.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 10;
*/
public Builder putAllResponses(
java.util.Map values) {
internalGetMutableResponses().getMutableMap()
.putAll(values);
return this;
}
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions securityDefinitions_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitionsOrBuilder> securityDefinitionsBuilder_;
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
* @return Whether the securityDefinitions field is set.
*/
public boolean hasSecurityDefinitions() {
return securityDefinitionsBuilder_ != null || securityDefinitions_ != null;
}
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
* @return The securityDefinitions.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions getSecurityDefinitions() {
if (securityDefinitionsBuilder_ == null) {
return securityDefinitions_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.getDefaultInstance() : securityDefinitions_;
} else {
return securityDefinitionsBuilder_.getMessage();
}
}
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
*/
public Builder setSecurityDefinitions(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions value) {
if (securityDefinitionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
securityDefinitions_ = value;
onChanged();
} else {
securityDefinitionsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
*/
public Builder setSecurityDefinitions(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.Builder builderForValue) {
if (securityDefinitionsBuilder_ == null) {
securityDefinitions_ = builderForValue.build();
onChanged();
} else {
securityDefinitionsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
*/
public Builder mergeSecurityDefinitions(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions value) {
if (securityDefinitionsBuilder_ == null) {
if (securityDefinitions_ != null) {
securityDefinitions_ =
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.newBuilder(securityDefinitions_).mergeFrom(value).buildPartial();
} else {
securityDefinitions_ = value;
}
onChanged();
} else {
securityDefinitionsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
*/
public Builder clearSecurityDefinitions() {
if (securityDefinitionsBuilder_ == null) {
securityDefinitions_ = null;
onChanged();
} else {
securityDefinitions_ = null;
securityDefinitionsBuilder_ = null;
}
return this;
}
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.Builder getSecurityDefinitionsBuilder() {
onChanged();
return getSecurityDefinitionsFieldBuilder().getBuilder();
}
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitionsOrBuilder getSecurityDefinitionsOrBuilder() {
if (securityDefinitionsBuilder_ != null) {
return securityDefinitionsBuilder_.getMessageOrBuilder();
} else {
return securityDefinitions_ == null ?
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.getDefaultInstance() : securityDefinitions_;
}
}
/**
*
* Security scheme definitions that can be used across the specification.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.SecurityDefinitions security_definitions = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitionsOrBuilder>
getSecurityDefinitionsFieldBuilder() {
if (securityDefinitionsBuilder_ == null) {
securityDefinitionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitionsOrBuilder>(
getSecurityDefinitions(),
getParentForChildren(),
isClean());
securityDefinitions_ = null;
}
return securityDefinitionsBuilder_;
}
private java.util.List security_ =
java.util.Collections.emptyList();
private void ensureSecurityIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
security_ = new java.util.ArrayList(security_);
bitField0_ |= 0x00000010;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder> securityBuilder_;
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public java.util.List getSecurityList() {
if (securityBuilder_ == null) {
return java.util.Collections.unmodifiableList(security_);
} else {
return securityBuilder_.getMessageList();
}
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public int getSecurityCount() {
if (securityBuilder_ == null) {
return security_.size();
} else {
return securityBuilder_.getCount();
}
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement getSecurity(int index) {
if (securityBuilder_ == null) {
return security_.get(index);
} else {
return securityBuilder_.getMessage(index);
}
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public Builder setSecurity(
int index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement value) {
if (securityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityIsMutable();
security_.set(index, value);
onChanged();
} else {
securityBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public Builder setSecurity(
int index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder builderForValue) {
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
security_.set(index, builderForValue.build());
onChanged();
} else {
securityBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public Builder addSecurity(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement value) {
if (securityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityIsMutable();
security_.add(value);
onChanged();
} else {
securityBuilder_.addMessage(value);
}
return this;
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public Builder addSecurity(
int index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement value) {
if (securityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityIsMutable();
security_.add(index, value);
onChanged();
} else {
securityBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public Builder addSecurity(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder builderForValue) {
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
security_.add(builderForValue.build());
onChanged();
} else {
securityBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public Builder addSecurity(
int index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder builderForValue) {
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
security_.add(index, builderForValue.build());
onChanged();
} else {
securityBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public Builder addAllSecurity(
java.lang.Iterable extends grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement> values) {
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, security_);
onChanged();
} else {
securityBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public Builder clearSecurity() {
if (securityBuilder_ == null) {
security_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
} else {
securityBuilder_.clear();
}
return this;
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public Builder removeSecurity(int index) {
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
security_.remove(index);
onChanged();
} else {
securityBuilder_.remove(index);
}
return this;
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder getSecurityBuilder(
int index) {
return getSecurityFieldBuilder().getBuilder(index);
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder getSecurityOrBuilder(
int index) {
if (securityBuilder_ == null) {
return security_.get(index); } else {
return securityBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public java.util.List extends grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder>
getSecurityOrBuilderList() {
if (securityBuilder_ != null) {
return securityBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(security_);
}
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder addSecurityBuilder() {
return getSecurityFieldBuilder().addBuilder(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.getDefaultInstance());
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder addSecurityBuilder(
int index) {
return getSecurityFieldBuilder().addBuilder(
index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.getDefaultInstance());
}
/**
*
* A declaration of which security schemes are applied for the API as a whole.
* The list of values describes alternative security schemes that can be used
* (that is, there is a logical OR between the security requirements).
* Individual operations can override this definition.
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.SecurityRequirement security = 12;
*/
public java.util.List
getSecurityBuilderList() {
return getSecurityFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder>
getSecurityFieldBuilder() {
if (securityBuilder_ == null) {
securityBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder>(
security_,
((bitField0_ & 0x00000010) != 0),
getParentForChildren(),
isClean());
security_ = null;
}
return securityBuilder_;
}
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation externalDocs_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder> externalDocsBuilder_;
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
* @return Whether the externalDocs field is set.
*/
public boolean hasExternalDocs() {
return externalDocsBuilder_ != null || externalDocs_ != null;
}
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
* @return The externalDocs.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs() {
if (externalDocsBuilder_ == null) {
return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
} else {
return externalDocsBuilder_.getMessage();
}
}
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
*/
public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation value) {
if (externalDocsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
externalDocs_ = value;
onChanged();
} else {
externalDocsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
*/
public Builder setExternalDocs(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder builderForValue) {
if (externalDocsBuilder_ == null) {
externalDocs_ = builderForValue.build();
onChanged();
} else {
externalDocsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
*/
public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation value) {
if (externalDocsBuilder_ == null) {
if (externalDocs_ != null) {
externalDocs_ =
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.newBuilder(externalDocs_).mergeFrom(value).buildPartial();
} else {
externalDocs_ = value;
}
onChanged();
} else {
externalDocsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
*/
public Builder clearExternalDocs() {
if (externalDocsBuilder_ == null) {
externalDocs_ = null;
onChanged();
} else {
externalDocs_ = null;
externalDocsBuilder_ = null;
}
return this;
}
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder getExternalDocsBuilder() {
onChanged();
return getExternalDocsFieldBuilder().getBuilder();
}
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() {
if (externalDocsBuilder_ != null) {
return externalDocsBuilder_.getMessageOrBuilder();
} else {
return externalDocs_ == null ?
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
}
}
/**
*
* Additional external documentation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder>
getExternalDocsFieldBuilder() {
if (externalDocsBuilder_ == null) {
externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder>(
getExternalDocs(),
getParentForChildren(),
isClean());
externalDocs_ = null;
}
return externalDocsBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Value> extensions_;
private com.google.protobuf.MapField
internalGetExtensions() {
if (extensions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
return extensions_;
}
private com.google.protobuf.MapField
internalGetMutableExtensions() {
onChanged();;
if (extensions_ == null) {
extensions_ = com.google.protobuf.MapField.newMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
if (!extensions_.isMutable()) {
extensions_ = extensions_.copy();
}
return extensions_;
}
public int getExtensionsCount() {
return internalGetExtensions().getMap().size();
}
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public java.util.Map getExtensionsMap() {
return internalGetExtensions().getMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearExtensions() {
internalGetMutableExtensions().getMutableMap()
.clear();
return this;
}
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
public Builder removeExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableExtensions().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableExtensions() {
return internalGetMutableExtensions().getMutableMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
public Builder putExtensions(
java.lang.String key,
com.google.protobuf.Value value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableExtensions().getMutableMap()
.put(key, value);
return this;
}
/**
* map<string, .google.protobuf.Value> extensions = 15;
*/
public Builder putAllExtensions(
java.util.Map values) {
internalGetMutableExtensions().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Swagger)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Swagger)
private static final grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger();
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Swagger parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Swagger(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface OperationOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Operation)
com.google.protobuf.MessageOrBuilder {
/**
*
* 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;
* @return A list containing the tags.
*/
java.util.List
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;
* @return The count of tags.
*/
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;
* @param index The index of the element to return.
* @return The tags at the given index.
*/
java.lang.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;
* @param index The index of the value to return.
* @return The bytes of the tags at the given index.
*/
com.google.protobuf.ByteString
getTagsBytes(int index);
/**
*
* 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;
* @return The summary.
*/
java.lang.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;
* @return The bytes for summary.
*/
com.google.protobuf.ByteString
getSummaryBytes();
/**
*
* A verbose explanation of the operation behavior. GFM syntax can be used for
* rich text representation.
*
*
* string description = 3;
* @return The description.
*/
java.lang.String getDescription();
/**
*
* A verbose explanation of the operation behavior. GFM syntax can be used for
* rich text representation.
*
*
* string description = 3;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
* @return Whether the externalDocs field is set.
*/
boolean hasExternalDocs();
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
* @return The externalDocs.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs();
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder();
/**
*
* 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;
* @return The operationId.
*/
java.lang.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;
* @return The bytes for operationId.
*/
com.google.protobuf.ByteString
getOperationIdBytes();
/**
*
* 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;
* @return A list containing the consumes.
*/
java.util.List
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;
* @return The count of consumes.
*/
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;
* @param index The index of the element to return.
* @return The consumes at the given index.
*/
java.lang.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;
* @param index The index of the value to return.
* @return The bytes of the consumes at the given index.
*/
com.google.protobuf.ByteString
getConsumesBytes(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;
* @return A list containing the produces.
*/
java.util.List
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;
* @return The count of produces.
*/
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;
* @param index The index of the element to return.
* @return The produces at the given index.
*/
java.lang.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;
* @param index The index of the value to return.
* @return The bytes of the produces at the given index.
*/
com.google.protobuf.ByteString
getProducesBytes(int index);
/**
*
* The list of possible responses as they are returned from executing this
* operation.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
*/
int getResponsesCount();
/**
*
* The list of possible responses as they are returned from executing this
* operation.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
*/
boolean containsResponses(
java.lang.String key);
/**
* Use {@link #getResponsesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getResponses();
/**
*
* The list of possible responses as they are returned from executing this
* operation.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
*/
java.util.Map
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;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrDefault(
java.lang.String key,
grpc.gateway.protoc_gen_openapiv2.options.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;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrThrow(
java.lang.String key);
/**
*
* 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;
* @return A list containing the schemes.
*/
java.util.List 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;
* @return The count of schemes.
*/
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;
* @param index The index of the element to return.
* @return The schemes at the given index.
*/
grpc.gateway.protoc_gen_openapiv2.options.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;
* @return A list containing the enum numeric values on the wire for schemes.
*/
java.util.List
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;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of schemes at the given index.
*/
int getSchemesValue(int index);
/**
*
* Declares this operation to be deprecated. Usage of the declared operation
* should be refrained. Default value is false.
*
*
* bool deprecated = 11;
* @return The deprecated.
*/
boolean getDeprecated();
/**
*
* 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;
*/
java.util.List
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;
*/
grpc.gateway.protoc_gen_openapiv2.options.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;
*/
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;
*/
java.util.List extends grpc.gateway.protoc_gen_openapiv2.options.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;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder getSecurityOrBuilder(
int index);
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
int getExtensionsCount();
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
boolean containsExtensions(
java.lang.String key);
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getExtensions();
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
java.util.Map
getExtensionsMap();
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue);
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key);
}
/**
*
* `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 {@code grpc.gateway.protoc_gen_openapiv2.options.Operation}
*/
public static final class Operation extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Operation)
OperationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Operation.newBuilder() to construct.
private Operation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Operation() {
tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
summary_ = "";
description_ = "";
operationId_ = "";
consumes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
produces_ = com.google.protobuf.LazyStringArrayList.EMPTY;
schemes_ = java.util.Collections.emptyList();
security_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Operation();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Operation(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
tags_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
tags_.add(s);
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
summary_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 34: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder subBuilder = null;
if (externalDocs_ != null) {
subBuilder = externalDocs_.toBuilder();
}
externalDocs_ = input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(externalDocs_);
externalDocs_ = subBuilder.buildPartial();
}
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
operationId_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
consumes_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
consumes_.add(s);
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
produces_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
produces_.add(s);
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
responses_ = com.google.protobuf.MapField.newMapField(
ResponsesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000008;
}
com.google.protobuf.MapEntry
responses__ = input.readMessage(
ResponsesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
responses_.getMutableMap().put(
responses__.getKey(), responses__.getValue());
break;
}
case 80: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
schemes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
schemes_.add(rawValue);
break;
}
case 82: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
schemes_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
schemes_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
case 88: {
deprecated_ = input.readBool();
break;
}
case 98: {
if (!((mutable_bitField0_ & 0x00000020) != 0)) {
security_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000020;
}
security_.add(
input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.parser(), extensionRegistry));
break;
}
case 106: {
if (!((mutable_bitField0_ & 0x00000040) != 0)) {
extensions_ = com.google.protobuf.MapField.newMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000040;
}
com.google.protobuf.MapEntry
extensions__ = input.readMessage(
ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
extensions_.getMutableMap().put(
extensions__.getKey(), extensions__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
tags_ = tags_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
consumes_ = consumes_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
produces_ = produces_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000010) != 0)) {
schemes_ = java.util.Collections.unmodifiableList(schemes_);
}
if (((mutable_bitField0_ & 0x00000020) != 0)) {
security_ = java.util.Collections.unmodifiableList(security_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 9:
return internalGetResponses();
case 13:
return internalGetExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation.Builder.class);
}
public static final int TAGS_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList tags_;
/**
*
* 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;
* @return A list containing the tags.
*/
public com.google.protobuf.ProtocolStringList
getTagsList() {
return tags_;
}
/**
*
* 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;
* @return The count of tags.
*/
public int getTagsCount() {
return tags_.size();
}
/**
*
* 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;
* @param index The index of the element to return.
* @return The tags at the given index.
*/
public java.lang.String getTags(int index) {
return tags_.get(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;
* @param index The index of the value to return.
* @return The bytes of the tags at the given index.
*/
public com.google.protobuf.ByteString
getTagsBytes(int index) {
return tags_.getByteString(index);
}
public static final int SUMMARY_FIELD_NUMBER = 2;
private volatile java.lang.Object summary_;
/**
*
* 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;
* @return The summary.
*/
@java.lang.Override
public java.lang.String getSummary() {
java.lang.Object ref = summary_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
summary_ = s;
return s;
}
}
/**
*
* 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;
* @return The bytes for summary.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSummaryBytes() {
java.lang.Object ref = summary_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
summary_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 3;
private volatile java.lang.Object description_;
/**
*
* A verbose explanation of the operation behavior. GFM syntax can be used for
* rich text representation.
*
*
* string description = 3;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
* A verbose explanation of the operation behavior. GFM syntax can be used for
* rich text representation.
*
*
* string description = 3;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXTERNAL_DOCS_FIELD_NUMBER = 4;
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation externalDocs_;
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
* @return Whether the externalDocs field is set.
*/
@java.lang.Override
public boolean hasExternalDocs() {
return externalDocs_ != null;
}
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
* @return The externalDocs.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs() {
return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
}
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() {
return getExternalDocs();
}
public static final int OPERATION_ID_FIELD_NUMBER = 5;
private volatile java.lang.Object operationId_;
/**
*
* 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;
* @return The operationId.
*/
@java.lang.Override
public java.lang.String getOperationId() {
java.lang.Object ref = operationId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
operationId_ = s;
return s;
}
}
/**
*
* 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;
* @return The bytes for operationId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getOperationIdBytes() {
java.lang.Object ref = operationId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
operationId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONSUMES_FIELD_NUMBER = 6;
private com.google.protobuf.LazyStringList consumes_;
/**
*
* 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;
* @return A list containing the consumes.
*/
public com.google.protobuf.ProtocolStringList
getConsumesList() {
return consumes_;
}
/**
*
* 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;
* @return The count of consumes.
*/
public int getConsumesCount() {
return consumes_.size();
}
/**
*
* 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;
* @param index The index of the element to return.
* @return The consumes at the given index.
*/
public java.lang.String getConsumes(int index) {
return consumes_.get(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;
* @param index The index of the value to return.
* @return The bytes of the consumes at the given index.
*/
public com.google.protobuf.ByteString
getConsumesBytes(int index) {
return consumes_.getByteString(index);
}
public static final int PRODUCES_FIELD_NUMBER = 7;
private com.google.protobuf.LazyStringList produces_;
/**
*
* 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;
* @return A list containing the produces.
*/
public com.google.protobuf.ProtocolStringList
getProducesList() {
return produces_;
}
/**
*
* 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;
* @return The count of produces.
*/
public int getProducesCount() {
return produces_.size();
}
/**
*
* 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;
* @param index The index of the element to return.
* @return The produces at the given index.
*/
public java.lang.String getProduces(int index) {
return produces_.get(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;
* @param index The index of the value to return.
* @return The bytes of the produces at the given index.
*/
public com.google.protobuf.ByteString
getProducesBytes(int index) {
return produces_.getByteString(index);
}
public static final int RESPONSES_FIELD_NUMBER = 9;
private static final class ResponsesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ResponsesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response> responses_;
private com.google.protobuf.MapField
internalGetResponses() {
if (responses_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ResponsesDefaultEntryHolder.defaultEntry);
}
return responses_;
}
public int getResponsesCount() {
return internalGetResponses().getMap().size();
}
/**
*
* The list of possible responses as they are returned from executing this
* operation.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
*/
@java.lang.Override
public boolean containsResponses(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetResponses().getMap().containsKey(key);
}
/**
* Use {@link #getResponsesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getResponses() {
return 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;
*/
@java.lang.Override
public java.util.Map getResponsesMap() {
return internalGetResponses().getMap();
}
/**
*
* The list of possible responses as they are returned from executing this
* operation.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrDefault(
java.lang.String key,
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetResponses().getMap();
return map.containsKey(key) ? map.get(key) : 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;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetResponses().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int SCHEMES_FIELD_NUMBER = 10;
private java.util.List schemes_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme> schemes_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme>() {
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme result = grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme.valueOf(from);
return result == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme.UNRECOGNIZED : result;
}
};
/**
*
* 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;
* @return A list containing the schemes.
*/
@java.lang.Override
public java.util.List getSchemesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme>(schemes_, schemes_converter_);
}
/**
*
* 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;
* @return The count of schemes.
*/
@java.lang.Override
public int getSchemesCount() {
return schemes_.size();
}
/**
*
* 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;
* @param index The index of the element to return.
* @return The schemes at the given index.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme getSchemes(int index) {
return schemes_converter_.convert(schemes_.get(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;
* @return A list containing the enum numeric values on the wire for schemes.
*/
@java.lang.Override
public java.util.List
getSchemesValueList() {
return schemes_;
}
/**
*
* 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;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of schemes at the given index.
*/
@java.lang.Override
public int getSchemesValue(int index) {
return schemes_.get(index);
}
private int schemesMemoizedSerializedSize;
public static final int DEPRECATED_FIELD_NUMBER = 11;
private boolean deprecated_;
/**
*
* Declares this operation to be deprecated. Usage of the declared operation
* should be refrained. Default value is false.
*
*
* bool deprecated = 11;
* @return The deprecated.
*/
@java.lang.Override
public boolean getDeprecated() {
return deprecated_;
}
public static final int SECURITY_FIELD_NUMBER = 12;
private java.util.List security_;
/**
*
* 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;
*/
@java.lang.Override
public java.util.List getSecurityList() {
return security_;
}
/**
*
* 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;
*/
@java.lang.Override
public java.util.List extends grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder>
getSecurityOrBuilderList() {
return security_;
}
/**
*
* 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;
*/
@java.lang.Override
public int getSecurityCount() {
return security_.size();
}
/**
*
* 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;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement getSecurity(int index) {
return security_.get(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;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder getSecurityOrBuilder(
int index) {
return security_.get(index);
}
public static final int EXTENSIONS_FIELD_NUMBER = 13;
private static final class ExtensionsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.google.protobuf.Value> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_ExtensionsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.google.protobuf.Value.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Value> extensions_;
private com.google.protobuf.MapField
internalGetExtensions() {
if (extensions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
return extensions_;
}
public int getExtensionsCount() {
return internalGetExtensions().getMap().size();
}
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public java.util.Map getExtensionsMap() {
return internalGetExtensions().getMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
for (int i = 0; i < tags_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tags_.getRaw(i));
}
if (!getSummaryBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, summary_);
}
if (!getDescriptionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
if (externalDocs_ != null) {
output.writeMessage(4, getExternalDocs());
}
if (!getOperationIdBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, operationId_);
}
for (int i = 0; i < consumes_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, consumes_.getRaw(i));
}
for (int i = 0; i < produces_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, produces_.getRaw(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetResponses(),
ResponsesDefaultEntryHolder.defaultEntry,
9);
if (getSchemesList().size() > 0) {
output.writeUInt32NoTag(82);
output.writeUInt32NoTag(schemesMemoizedSerializedSize);
}
for (int i = 0; i < schemes_.size(); i++) {
output.writeEnumNoTag(schemes_.get(i));
}
if (deprecated_ != false) {
output.writeBool(11, deprecated_);
}
for (int i = 0; i < security_.size(); i++) {
output.writeMessage(12, security_.get(i));
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetExtensions(),
ExtensionsDefaultEntryHolder.defaultEntry,
13);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < tags_.size(); i++) {
dataSize += computeStringSizeNoTag(tags_.getRaw(i));
}
size += dataSize;
size += 1 * getTagsList().size();
}
if (!getSummaryBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, summary_);
}
if (!getDescriptionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
if (externalDocs_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getExternalDocs());
}
if (!getOperationIdBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, operationId_);
}
{
int dataSize = 0;
for (int i = 0; i < consumes_.size(); i++) {
dataSize += computeStringSizeNoTag(consumes_.getRaw(i));
}
size += dataSize;
size += 1 * getConsumesList().size();
}
{
int dataSize = 0;
for (int i = 0; i < produces_.size(); i++) {
dataSize += computeStringSizeNoTag(produces_.getRaw(i));
}
size += dataSize;
size += 1 * getProducesList().size();
}
for (java.util.Map.Entry entry
: internalGetResponses().getMap().entrySet()) {
com.google.protobuf.MapEntry
responses__ = ResponsesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, responses__);
}
{
int dataSize = 0;
for (int i = 0; i < schemes_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(schemes_.get(i));
}
size += dataSize;
if (!getSchemesList().isEmpty()) { size += 1;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}schemesMemoizedSerializedSize = dataSize;
}
if (deprecated_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(11, deprecated_);
}
for (int i = 0; i < security_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, security_.get(i));
}
for (java.util.Map.Entry entry
: internalGetExtensions().getMap().entrySet()) {
com.google.protobuf.MapEntry
extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, extensions__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation)) {
return super.equals(obj);
}
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation other = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation) obj;
if (!getTagsList()
.equals(other.getTagsList())) return false;
if (!getSummary()
.equals(other.getSummary())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (hasExternalDocs() != other.hasExternalDocs()) return false;
if (hasExternalDocs()) {
if (!getExternalDocs()
.equals(other.getExternalDocs())) return false;
}
if (!getOperationId()
.equals(other.getOperationId())) return false;
if (!getConsumesList()
.equals(other.getConsumesList())) return false;
if (!getProducesList()
.equals(other.getProducesList())) return false;
if (!internalGetResponses().equals(
other.internalGetResponses())) return false;
if (!schemes_.equals(other.schemes_)) return false;
if (getDeprecated()
!= other.getDeprecated()) return false;
if (!getSecurityList()
.equals(other.getSecurityList())) return false;
if (!internalGetExtensions().equals(
other.internalGetExtensions())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getTagsCount() > 0) {
hash = (37 * hash) + TAGS_FIELD_NUMBER;
hash = (53 * hash) + getTagsList().hashCode();
}
hash = (37 * hash) + SUMMARY_FIELD_NUMBER;
hash = (53 * hash) + getSummary().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (hasExternalDocs()) {
hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER;
hash = (53 * hash) + getExternalDocs().hashCode();
}
hash = (37 * hash) + OPERATION_ID_FIELD_NUMBER;
hash = (53 * hash) + getOperationId().hashCode();
if (getConsumesCount() > 0) {
hash = (37 * hash) + CONSUMES_FIELD_NUMBER;
hash = (53 * hash) + getConsumesList().hashCode();
}
if (getProducesCount() > 0) {
hash = (37 * hash) + PRODUCES_FIELD_NUMBER;
hash = (53 * hash) + getProducesList().hashCode();
}
if (!internalGetResponses().getMap().isEmpty()) {
hash = (37 * hash) + RESPONSES_FIELD_NUMBER;
hash = (53 * hash) + internalGetResponses().hashCode();
}
if (getSchemesCount() > 0) {
hash = (37 * hash) + SCHEMES_FIELD_NUMBER;
hash = (53 * hash) + schemes_.hashCode();
}
hash = (37 * hash) + DEPRECATED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDeprecated());
if (getSecurityCount() > 0) {
hash = (37 * hash) + SECURITY_FIELD_NUMBER;
hash = (53 * hash) + getSecurityList().hashCode();
}
if (!internalGetExtensions().getMap().isEmpty()) {
hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER;
hash = (53 * hash) + internalGetExtensions().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `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 {@code grpc.gateway.protoc_gen_openapiv2.options.Operation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Operation)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.OperationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 9:
return internalGetResponses();
case 13:
return internalGetExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 9:
return internalGetMutableResponses();
case 13:
return internalGetMutableExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getSecurityFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
summary_ = "";
description_ = "";
if (externalDocsBuilder_ == null) {
externalDocs_ = null;
} else {
externalDocs_ = null;
externalDocsBuilder_ = null;
}
operationId_ = "";
consumes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
produces_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
internalGetMutableResponses().clear();
schemes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
deprecated_ = false;
if (securityBuilder_ == null) {
security_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
} else {
securityBuilder_.clear();
}
internalGetMutableExtensions().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Operation_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
tags_ = tags_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.tags_ = tags_;
result.summary_ = summary_;
result.description_ = description_;
if (externalDocsBuilder_ == null) {
result.externalDocs_ = externalDocs_;
} else {
result.externalDocs_ = externalDocsBuilder_.build();
}
result.operationId_ = operationId_;
if (((bitField0_ & 0x00000002) != 0)) {
consumes_ = consumes_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.consumes_ = consumes_;
if (((bitField0_ & 0x00000004) != 0)) {
produces_ = produces_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.produces_ = produces_;
result.responses_ = internalGetResponses();
result.responses_.makeImmutable();
if (((bitField0_ & 0x00000010) != 0)) {
schemes_ = java.util.Collections.unmodifiableList(schemes_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.schemes_ = schemes_;
result.deprecated_ = deprecated_;
if (securityBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)) {
security_ = java.util.Collections.unmodifiableList(security_);
bitField0_ = (bitField0_ & ~0x00000020);
}
result.security_ = security_;
} else {
result.security_ = securityBuilder_.build();
}
result.extensions_ = internalGetExtensions();
result.extensions_.makeImmutable();
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation.getDefaultInstance()) return this;
if (!other.tags_.isEmpty()) {
if (tags_.isEmpty()) {
tags_ = other.tags_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureTagsIsMutable();
tags_.addAll(other.tags_);
}
onChanged();
}
if (!other.getSummary().isEmpty()) {
summary_ = other.summary_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.hasExternalDocs()) {
mergeExternalDocs(other.getExternalDocs());
}
if (!other.getOperationId().isEmpty()) {
operationId_ = other.operationId_;
onChanged();
}
if (!other.consumes_.isEmpty()) {
if (consumes_.isEmpty()) {
consumes_ = other.consumes_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureConsumesIsMutable();
consumes_.addAll(other.consumes_);
}
onChanged();
}
if (!other.produces_.isEmpty()) {
if (produces_.isEmpty()) {
produces_ = other.produces_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureProducesIsMutable();
produces_.addAll(other.produces_);
}
onChanged();
}
internalGetMutableResponses().mergeFrom(
other.internalGetResponses());
if (!other.schemes_.isEmpty()) {
if (schemes_.isEmpty()) {
schemes_ = other.schemes_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureSchemesIsMutable();
schemes_.addAll(other.schemes_);
}
onChanged();
}
if (other.getDeprecated() != false) {
setDeprecated(other.getDeprecated());
}
if (securityBuilder_ == null) {
if (!other.security_.isEmpty()) {
if (security_.isEmpty()) {
security_ = other.security_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureSecurityIsMutable();
security_.addAll(other.security_);
}
onChanged();
}
} else {
if (!other.security_.isEmpty()) {
if (securityBuilder_.isEmpty()) {
securityBuilder_.dispose();
securityBuilder_ = null;
security_ = other.security_;
bitField0_ = (bitField0_ & ~0x00000020);
securityBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSecurityFieldBuilder() : null;
} else {
securityBuilder_.addAllMessages(other.security_);
}
}
}
internalGetMutableExtensions().mergeFrom(
other.internalGetExtensions());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringList tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureTagsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
tags_ = new com.google.protobuf.LazyStringArrayList(tags_);
bitField0_ |= 0x00000001;
}
}
/**
*
* 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;
* @return A list containing the tags.
*/
public com.google.protobuf.ProtocolStringList
getTagsList() {
return tags_.getUnmodifiableView();
}
/**
*
* 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;
* @return The count of tags.
*/
public int getTagsCount() {
return tags_.size();
}
/**
*
* 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;
* @param index The index of the element to return.
* @return The tags at the given index.
*/
public java.lang.String getTags(int index) {
return tags_.get(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;
* @param index The index of the value to return.
* @return The bytes of the tags at the given index.
*/
public com.google.protobuf.ByteString
getTagsBytes(int index) {
return tags_.getByteString(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;
* @param index The index to set the value at.
* @param value The tags to set.
* @return This builder for chaining.
*/
public Builder setTags(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTagsIsMutable();
tags_.set(index, value);
onChanged();
return this;
}
/**
*
* 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;
* @param value The tags to add.
* @return This builder for chaining.
*/
public Builder addTags(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureTagsIsMutable();
tags_.add(value);
onChanged();
return this;
}
/**
*
* 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;
* @param values The tags to add.
* @return This builder for chaining.
*/
public Builder addAllTags(
java.lang.Iterable values) {
ensureTagsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tags_);
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearTags() {
tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* 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;
* @param value The bytes of the tags to add.
* @return This builder for chaining.
*/
public Builder addTagsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureTagsIsMutable();
tags_.add(value);
onChanged();
return this;
}
private java.lang.Object summary_ = "";
/**
*
* 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;
* @return The summary.
*/
public java.lang.String getSummary() {
java.lang.Object ref = summary_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
summary_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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;
* @return The bytes for summary.
*/
public com.google.protobuf.ByteString
getSummaryBytes() {
java.lang.Object ref = summary_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
summary_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* 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;
* @param value The summary to set.
* @return This builder for chaining.
*/
public Builder setSummary(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
summary_ = value;
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearSummary() {
summary_ = getDefaultInstance().getSummary();
onChanged();
return this;
}
/**
*
* 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;
* @param value The bytes for summary to set.
* @return This builder for chaining.
*/
public Builder setSummaryBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
summary_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* A verbose explanation of the operation behavior. GFM syntax can be used for
* rich text representation.
*
*
* string description = 3;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A verbose explanation of the operation behavior. GFM syntax can be used for
* rich text representation.
*
*
* string description = 3;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A verbose explanation of the operation behavior. GFM syntax can be used for
* rich text representation.
*
*
* string description = 3;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* A verbose explanation of the operation behavior. GFM syntax can be used for
* rich text representation.
*
*
* string description = 3;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* A verbose explanation of the operation behavior. GFM syntax can be used for
* rich text representation.
*
*
* string description = 3;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation externalDocs_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder> externalDocsBuilder_;
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
* @return Whether the externalDocs field is set.
*/
public boolean hasExternalDocs() {
return externalDocsBuilder_ != null || externalDocs_ != null;
}
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
* @return The externalDocs.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs() {
if (externalDocsBuilder_ == null) {
return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
} else {
return externalDocsBuilder_.getMessage();
}
}
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
*/
public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation value) {
if (externalDocsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
externalDocs_ = value;
onChanged();
} else {
externalDocsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
*/
public Builder setExternalDocs(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder builderForValue) {
if (externalDocsBuilder_ == null) {
externalDocs_ = builderForValue.build();
onChanged();
} else {
externalDocsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
*/
public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation value) {
if (externalDocsBuilder_ == null) {
if (externalDocs_ != null) {
externalDocs_ =
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.newBuilder(externalDocs_).mergeFrom(value).buildPartial();
} else {
externalDocs_ = value;
}
onChanged();
} else {
externalDocsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
*/
public Builder clearExternalDocs() {
if (externalDocsBuilder_ == null) {
externalDocs_ = null;
onChanged();
} else {
externalDocs_ = null;
externalDocsBuilder_ = null;
}
return this;
}
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder getExternalDocsBuilder() {
onChanged();
return getExternalDocsFieldBuilder().getBuilder();
}
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() {
if (externalDocsBuilder_ != null) {
return externalDocsBuilder_.getMessageOrBuilder();
} else {
return externalDocs_ == null ?
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
}
}
/**
*
* Additional external documentation for this operation.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder>
getExternalDocsFieldBuilder() {
if (externalDocsBuilder_ == null) {
externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder>(
getExternalDocs(),
getParentForChildren(),
isClean());
externalDocs_ = null;
}
return externalDocsBuilder_;
}
private java.lang.Object operationId_ = "";
/**
*
* 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;
* @return The operationId.
*/
public java.lang.String getOperationId() {
java.lang.Object ref = operationId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
operationId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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;
* @return The bytes for operationId.
*/
public com.google.protobuf.ByteString
getOperationIdBytes() {
java.lang.Object ref = operationId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
operationId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* 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;
* @param value The operationId to set.
* @return This builder for chaining.
*/
public Builder setOperationId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
operationId_ = value;
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearOperationId() {
operationId_ = getDefaultInstance().getOperationId();
onChanged();
return this;
}
/**
*
* 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;
* @param value The bytes for operationId to set.
* @return This builder for chaining.
*/
public Builder setOperationIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
operationId_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList consumes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureConsumesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
consumes_ = new com.google.protobuf.LazyStringArrayList(consumes_);
bitField0_ |= 0x00000002;
}
}
/**
*
* 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;
* @return A list containing the consumes.
*/
public com.google.protobuf.ProtocolStringList
getConsumesList() {
return consumes_.getUnmodifiableView();
}
/**
*
* 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;
* @return The count of consumes.
*/
public int getConsumesCount() {
return consumes_.size();
}
/**
*
* 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;
* @param index The index of the element to return.
* @return The consumes at the given index.
*/
public java.lang.String getConsumes(int index) {
return consumes_.get(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;
* @param index The index of the value to return.
* @return The bytes of the consumes at the given index.
*/
public com.google.protobuf.ByteString
getConsumesBytes(int index) {
return consumes_.getByteString(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;
* @param index The index to set the value at.
* @param value The consumes to set.
* @return This builder for chaining.
*/
public Builder setConsumes(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConsumesIsMutable();
consumes_.set(index, value);
onChanged();
return this;
}
/**
*
* 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;
* @param value The consumes to add.
* @return This builder for chaining.
*/
public Builder addConsumes(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConsumesIsMutable();
consumes_.add(value);
onChanged();
return this;
}
/**
*
* 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;
* @param values The consumes to add.
* @return This builder for chaining.
*/
public Builder addAllConsumes(
java.lang.Iterable values) {
ensureConsumesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, consumes_);
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearConsumes() {
consumes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* 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;
* @param value The bytes of the consumes to add.
* @return This builder for chaining.
*/
public Builder addConsumesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureConsumesIsMutable();
consumes_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList produces_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureProducesIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
produces_ = new com.google.protobuf.LazyStringArrayList(produces_);
bitField0_ |= 0x00000004;
}
}
/**
*
* 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;
* @return A list containing the produces.
*/
public com.google.protobuf.ProtocolStringList
getProducesList() {
return produces_.getUnmodifiableView();
}
/**
*
* 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;
* @return The count of produces.
*/
public int getProducesCount() {
return produces_.size();
}
/**
*
* 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;
* @param index The index of the element to return.
* @return The produces at the given index.
*/
public java.lang.String getProduces(int index) {
return produces_.get(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;
* @param index The index of the value to return.
* @return The bytes of the produces at the given index.
*/
public com.google.protobuf.ByteString
getProducesBytes(int index) {
return produces_.getByteString(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;
* @param index The index to set the value at.
* @param value The produces to set.
* @return This builder for chaining.
*/
public Builder setProduces(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureProducesIsMutable();
produces_.set(index, value);
onChanged();
return this;
}
/**
*
* 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;
* @param value The produces to add.
* @return This builder for chaining.
*/
public Builder addProduces(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureProducesIsMutable();
produces_.add(value);
onChanged();
return this;
}
/**
*
* 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;
* @param values The produces to add.
* @return This builder for chaining.
*/
public Builder addAllProduces(
java.lang.Iterable values) {
ensureProducesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, produces_);
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearProduces() {
produces_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* 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;
* @param value The bytes of the produces to add.
* @return This builder for chaining.
*/
public Builder addProducesBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureProducesIsMutable();
produces_.add(value);
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response> responses_;
private com.google.protobuf.MapField
internalGetResponses() {
if (responses_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ResponsesDefaultEntryHolder.defaultEntry);
}
return responses_;
}
private com.google.protobuf.MapField
internalGetMutableResponses() {
onChanged();;
if (responses_ == null) {
responses_ = com.google.protobuf.MapField.newMapField(
ResponsesDefaultEntryHolder.defaultEntry);
}
if (!responses_.isMutable()) {
responses_ = responses_.copy();
}
return responses_;
}
public int getResponsesCount() {
return internalGetResponses().getMap().size();
}
/**
*
* The list of possible responses as they are returned from executing this
* operation.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
*/
@java.lang.Override
public boolean containsResponses(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetResponses().getMap().containsKey(key);
}
/**
* Use {@link #getResponsesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getResponses() {
return 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;
*/
@java.lang.Override
public java.util.Map getResponsesMap() {
return internalGetResponses().getMap();
}
/**
*
* The list of possible responses as they are returned from executing this
* operation.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrDefault(
java.lang.String key,
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetResponses().getMap();
return map.containsKey(key) ? map.get(key) : 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;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getResponsesOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetResponses().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearResponses() {
internalGetMutableResponses().getMutableMap()
.clear();
return this;
}
/**
*
* The list of possible responses as they are returned from executing this
* operation.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
*/
public Builder removeResponses(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableResponses().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableResponses() {
return internalGetMutableResponses().getMutableMap();
}
/**
*
* The list of possible responses as they are returned from executing this
* operation.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
*/
public Builder putResponses(
java.lang.String key,
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableResponses().getMutableMap()
.put(key, value);
return this;
}
/**
*
* The list of possible responses as they are returned from executing this
* operation.
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Response> responses = 9;
*/
public Builder putAllResponses(
java.util.Map values) {
internalGetMutableResponses().getMutableMap()
.putAll(values);
return this;
}
private java.util.List schemes_ =
java.util.Collections.emptyList();
private void ensureSchemesIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
schemes_ = new java.util.ArrayList(schemes_);
bitField0_ |= 0x00000010;
}
}
/**
*
* 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;
* @return A list containing the schemes.
*/
public java.util.List getSchemesList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme>(schemes_, schemes_converter_);
}
/**
*
* 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;
* @return The count of schemes.
*/
public int getSchemesCount() {
return schemes_.size();
}
/**
*
* 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;
* @param index The index of the element to return.
* @return The schemes at the given index.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme getSchemes(int index) {
return schemes_converter_.convert(schemes_.get(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;
* @param index The index to set the value at.
* @param value The schemes to set.
* @return This builder for chaining.
*/
public Builder setSchemes(
int index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme value) {
if (value == null) {
throw new NullPointerException();
}
ensureSchemesIsMutable();
schemes_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* 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;
* @param value The schemes to add.
* @return This builder for chaining.
*/
public Builder addSchemes(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme value) {
if (value == null) {
throw new NullPointerException();
}
ensureSchemesIsMutable();
schemes_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* 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;
* @param values The schemes to add.
* @return This builder for chaining.
*/
public Builder addAllSchemes(
java.lang.Iterable extends grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme> values) {
ensureSchemesIsMutable();
for (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme value : values) {
schemes_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* 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;
* @return This builder for chaining.
*/
public Builder clearSchemes() {
schemes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* 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;
* @return A list containing the enum numeric values on the wire for schemes.
*/
public java.util.List
getSchemesValueList() {
return java.util.Collections.unmodifiableList(schemes_);
}
/**
*
* 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;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of schemes at the given index.
*/
public int getSchemesValue(int index) {
return schemes_.get(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;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of schemes at the given index.
* @return This builder for chaining.
*/
public Builder setSchemesValue(
int index, int value) {
ensureSchemesIsMutable();
schemes_.set(index, value);
onChanged();
return this;
}
/**
*
* 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;
* @param value The enum numeric value on the wire for schemes to add.
* @return This builder for chaining.
*/
public Builder addSchemesValue(int value) {
ensureSchemesIsMutable();
schemes_.add(value);
onChanged();
return this;
}
/**
*
* 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;
* @param values The enum numeric values on the wire for schemes to add.
* @return This builder for chaining.
*/
public Builder addAllSchemesValue(
java.lang.Iterable values) {
ensureSchemesIsMutable();
for (int value : values) {
schemes_.add(value);
}
onChanged();
return this;
}
private boolean deprecated_ ;
/**
*
* Declares this operation to be deprecated. Usage of the declared operation
* should be refrained. Default value is false.
*
*
* bool deprecated = 11;
* @return The deprecated.
*/
@java.lang.Override
public boolean getDeprecated() {
return deprecated_;
}
/**
*
* Declares this operation to be deprecated. Usage of the declared operation
* should be refrained. Default value is false.
*
*
* bool deprecated = 11;
* @param value The deprecated to set.
* @return This builder for chaining.
*/
public Builder setDeprecated(boolean value) {
deprecated_ = value;
onChanged();
return this;
}
/**
*
* Declares this operation to be deprecated. Usage of the declared operation
* should be refrained. Default value is false.
*
*
* bool deprecated = 11;
* @return This builder for chaining.
*/
public Builder clearDeprecated() {
deprecated_ = false;
onChanged();
return this;
}
private java.util.List security_ =
java.util.Collections.emptyList();
private void ensureSecurityIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
security_ = new java.util.ArrayList(security_);
bitField0_ |= 0x00000020;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder> securityBuilder_;
/**
*
* 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;
*/
public java.util.List getSecurityList() {
if (securityBuilder_ == null) {
return java.util.Collections.unmodifiableList(security_);
} else {
return securityBuilder_.getMessageList();
}
}
/**
*
* 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;
*/
public int getSecurityCount() {
if (securityBuilder_ == null) {
return security_.size();
} else {
return securityBuilder_.getCount();
}
}
/**
*
* 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;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement getSecurity(int index) {
if (securityBuilder_ == null) {
return security_.get(index);
} else {
return securityBuilder_.getMessage(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;
*/
public Builder setSecurity(
int index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement value) {
if (securityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityIsMutable();
security_.set(index, value);
onChanged();
} else {
securityBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* 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;
*/
public Builder setSecurity(
int index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder builderForValue) {
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
security_.set(index, builderForValue.build());
onChanged();
} else {
securityBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 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;
*/
public Builder addSecurity(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement value) {
if (securityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityIsMutable();
security_.add(value);
onChanged();
} else {
securityBuilder_.addMessage(value);
}
return this;
}
/**
*
* 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;
*/
public Builder addSecurity(
int index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement value) {
if (securityBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityIsMutable();
security_.add(index, value);
onChanged();
} else {
securityBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* 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;
*/
public Builder addSecurity(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder builderForValue) {
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
security_.add(builderForValue.build());
onChanged();
} else {
securityBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* 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;
*/
public Builder addSecurity(
int index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder builderForValue) {
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
security_.add(index, builderForValue.build());
onChanged();
} else {
securityBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* 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;
*/
public Builder addAllSecurity(
java.lang.Iterable extends grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement> values) {
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, security_);
onChanged();
} else {
securityBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* 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;
*/
public Builder clearSecurity() {
if (securityBuilder_ == null) {
security_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
} else {
securityBuilder_.clear();
}
return this;
}
/**
*
* 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;
*/
public Builder removeSecurity(int index) {
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
security_.remove(index);
onChanged();
} else {
securityBuilder_.remove(index);
}
return this;
}
/**
*
* 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;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder getSecurityBuilder(
int index) {
return getSecurityFieldBuilder().getBuilder(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;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder getSecurityOrBuilder(
int index) {
if (securityBuilder_ == null) {
return security_.get(index); } else {
return securityBuilder_.getMessageOrBuilder(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;
*/
public java.util.List extends grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder>
getSecurityOrBuilderList() {
if (securityBuilder_ != null) {
return securityBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(security_);
}
}
/**
*
* 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;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder addSecurityBuilder() {
return getSecurityFieldBuilder().addBuilder(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.getDefaultInstance());
}
/**
*
* 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;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder addSecurityBuilder(
int index) {
return getSecurityFieldBuilder().addBuilder(
index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.getDefaultInstance());
}
/**
*
* 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;
*/
public java.util.List
getSecurityBuilderList() {
return getSecurityFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder>
getSecurityFieldBuilder() {
if (securityBuilder_ == null) {
securityBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirementOrBuilder>(
security_,
((bitField0_ & 0x00000020) != 0),
getParentForChildren(),
isClean());
security_ = null;
}
return securityBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Value> extensions_;
private com.google.protobuf.MapField
internalGetExtensions() {
if (extensions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
return extensions_;
}
private com.google.protobuf.MapField
internalGetMutableExtensions() {
onChanged();;
if (extensions_ == null) {
extensions_ = com.google.protobuf.MapField.newMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
if (!extensions_.isMutable()) {
extensions_ = extensions_.copy();
}
return extensions_;
}
public int getExtensionsCount() {
return internalGetExtensions().getMap().size();
}
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public java.util.Map getExtensionsMap() {
return internalGetExtensions().getMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearExtensions() {
internalGetMutableExtensions().getMutableMap()
.clear();
return this;
}
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
public Builder removeExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableExtensions().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableExtensions() {
return internalGetMutableExtensions().getMutableMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
public Builder putExtensions(
java.lang.String key,
com.google.protobuf.Value value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableExtensions().getMutableMap()
.put(key, value);
return this;
}
/**
* map<string, .google.protobuf.Value> extensions = 13;
*/
public Builder putAllExtensions(
java.util.Map values) {
internalGetMutableExtensions().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Operation)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Operation)
private static final grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation();
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Operation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Operation(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Response)
com.google.protobuf.MessageOrBuilder {
/**
*
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
*
*
* string description = 1;
* @return The description.
*/
java.lang.String getDescription();
/**
*
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
*
*
* string description = 1;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
* @return Whether the schema field is set.
*/
boolean hasSchema();
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
* @return The schema.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema getSchema();
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SchemaOrBuilder getSchemaOrBuilder();
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
int getExamplesCount();
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
boolean containsExamples(
java.lang.String key);
/**
* Use {@link #getExamplesMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getExamples();
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
java.util.Map
getExamplesMap();
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
java.lang.String getExamplesOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
java.lang.String getExamplesOrThrow(
java.lang.String key);
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
int getExtensionsCount();
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
boolean containsExtensions(
java.lang.String key);
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getExtensions();
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
java.util.Map
getExtensionsMap();
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue);
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key);
}
/**
*
* `Response` is a representation of OpenAPI v2 specification's Response object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Response}
*/
public static final class Response extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Response)
ResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use Response.newBuilder() to construct.
private Response(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Response() {
description_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Response();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Response(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 18: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.Builder subBuilder = null;
if (schema_ != null) {
subBuilder = schema_.toBuilder();
}
schema_ = input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(schema_);
schema_ = subBuilder.buildPartial();
}
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
examples_ = com.google.protobuf.MapField.newMapField(
ExamplesDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
examples__ = input.readMessage(
ExamplesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
examples_.getMutableMap().put(
examples__.getKey(), examples__.getValue());
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
extensions_ = com.google.protobuf.MapField.newMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
extensions__ = input.readMessage(
ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
extensions_.getMutableMap().put(
extensions__.getKey(), extensions__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetExamples();
case 5:
return internalGetExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response.Builder.class);
}
public static final int DESCRIPTION_FIELD_NUMBER = 1;
private volatile java.lang.Object description_;
/**
*
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
*
*
* string description = 1;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
*
*
* string description = 1;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SCHEMA_FIELD_NUMBER = 2;
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema schema_;
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
* @return Whether the schema field is set.
*/
@java.lang.Override
public boolean hasSchema() {
return schema_ != null;
}
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
* @return The schema.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema getSchema() {
return schema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.getDefaultInstance() : schema_;
}
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SchemaOrBuilder getSchemaOrBuilder() {
return getSchema();
}
public static final int EXAMPLES_FIELD_NUMBER = 4;
private static final class ExamplesDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExamplesEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> examples_;
private com.google.protobuf.MapField
internalGetExamples() {
if (examples_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExamplesDefaultEntryHolder.defaultEntry);
}
return examples_;
}
public int getExamplesCount() {
return internalGetExamples().getMap().size();
}
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
@java.lang.Override
public boolean containsExamples(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetExamples().getMap().containsKey(key);
}
/**
* Use {@link #getExamplesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExamples() {
return getExamplesMap();
}
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
@java.lang.Override
public java.util.Map getExamplesMap() {
return internalGetExamples().getMap();
}
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
@java.lang.Override
public java.lang.String getExamplesOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExamples().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
@java.lang.Override
public java.lang.String getExamplesOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExamples().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int EXTENSIONS_FIELD_NUMBER = 5;
private static final class ExtensionsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.google.protobuf.Value> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_ExtensionsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.google.protobuf.Value.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Value> extensions_;
private com.google.protobuf.MapField
internalGetExtensions() {
if (extensions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
return extensions_;
}
public int getExtensionsCount() {
return internalGetExtensions().getMap().size();
}
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
@java.lang.Override
public java.util.Map getExtensionsMap() {
return internalGetExtensions().getMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getDescriptionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_);
}
if (schema_ != null) {
output.writeMessage(2, getSchema());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetExamples(),
ExamplesDefaultEntryHolder.defaultEntry,
4);
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetExtensions(),
ExtensionsDefaultEntryHolder.defaultEntry,
5);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDescriptionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_);
}
if (schema_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getSchema());
}
for (java.util.Map.Entry entry
: internalGetExamples().getMap().entrySet()) {
com.google.protobuf.MapEntry
examples__ = ExamplesDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, examples__);
}
for (java.util.Map.Entry entry
: internalGetExtensions().getMap().entrySet()) {
com.google.protobuf.MapEntry
extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, extensions__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response)) {
return super.equals(obj);
}
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response other = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response) obj;
if (!getDescription()
.equals(other.getDescription())) return false;
if (hasSchema() != other.hasSchema()) return false;
if (hasSchema()) {
if (!getSchema()
.equals(other.getSchema())) return false;
}
if (!internalGetExamples().equals(
other.internalGetExamples())) return false;
if (!internalGetExtensions().equals(
other.internalGetExtensions())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (hasSchema()) {
hash = (37 * hash) + SCHEMA_FIELD_NUMBER;
hash = (53 * hash) + getSchema().hashCode();
}
if (!internalGetExamples().getMap().isEmpty()) {
hash = (37 * hash) + EXAMPLES_FIELD_NUMBER;
hash = (53 * hash) + internalGetExamples().hashCode();
}
if (!internalGetExtensions().getMap().isEmpty()) {
hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER;
hash = (53 * hash) + internalGetExtensions().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `Response` is a representation of OpenAPI v2 specification's Response object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#responseObject
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Response}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Response)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetExamples();
case 5:
return internalGetExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 4:
return internalGetMutableExamples();
case 5:
return internalGetMutableExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
description_ = "";
if (schemaBuilder_ == null) {
schema_ = null;
} else {
schema_ = null;
schemaBuilder_ = null;
}
internalGetMutableExamples().clear();
internalGetMutableExtensions().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response(this);
int from_bitField0_ = bitField0_;
result.description_ = description_;
if (schemaBuilder_ == null) {
result.schema_ = schema_;
} else {
result.schema_ = schemaBuilder_.build();
}
result.examples_ = internalGetExamples();
result.examples_.makeImmutable();
result.extensions_ = internalGetExtensions();
result.extensions_.makeImmutable();
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response.getDefaultInstance()) return this;
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.hasSchema()) {
mergeSchema(other.getSchema());
}
internalGetMutableExamples().mergeFrom(
other.internalGetExamples());
internalGetMutableExtensions().mergeFrom(
other.internalGetExtensions());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object description_ = "";
/**
*
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
*
*
* string description = 1;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
*
*
* string description = 1;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
*
*
* string description = 1;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
*
*
* string description = 1;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
*
*
* string description = 1;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema schema_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SchemaOrBuilder> schemaBuilder_;
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
* @return Whether the schema field is set.
*/
public boolean hasSchema() {
return schemaBuilder_ != null || schema_ != null;
}
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
* @return The schema.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema getSchema() {
if (schemaBuilder_ == null) {
return schema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.getDefaultInstance() : schema_;
} else {
return schemaBuilder_.getMessage();
}
}
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
*/
public Builder setSchema(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema value) {
if (schemaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
schema_ = value;
onChanged();
} else {
schemaBuilder_.setMessage(value);
}
return this;
}
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
*/
public Builder setSchema(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.Builder builderForValue) {
if (schemaBuilder_ == null) {
schema_ = builderForValue.build();
onChanged();
} else {
schemaBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
*/
public Builder mergeSchema(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema value) {
if (schemaBuilder_ == null) {
if (schema_ != null) {
schema_ =
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.newBuilder(schema_).mergeFrom(value).buildPartial();
} else {
schema_ = value;
}
onChanged();
} else {
schemaBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
*/
public Builder clearSchema() {
if (schemaBuilder_ == null) {
schema_ = null;
onChanged();
} else {
schema_ = null;
schemaBuilder_ = null;
}
return this;
}
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.Builder getSchemaBuilder() {
onChanged();
return getSchemaFieldBuilder().getBuilder();
}
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SchemaOrBuilder getSchemaOrBuilder() {
if (schemaBuilder_ != null) {
return schemaBuilder_.getMessageOrBuilder();
} else {
return schema_ == null ?
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.getDefaultInstance() : schema_;
}
}
/**
*
* `Schema` optionally defines the structure of the response.
* If `Schema` is not provided, it means there is no content to the response.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Schema schema = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SchemaOrBuilder>
getSchemaFieldBuilder() {
if (schemaBuilder_ == null) {
schemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SchemaOrBuilder>(
getSchema(),
getParentForChildren(),
isClean());
schema_ = null;
}
return schemaBuilder_;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> examples_;
private com.google.protobuf.MapField
internalGetExamples() {
if (examples_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExamplesDefaultEntryHolder.defaultEntry);
}
return examples_;
}
private com.google.protobuf.MapField
internalGetMutableExamples() {
onChanged();;
if (examples_ == null) {
examples_ = com.google.protobuf.MapField.newMapField(
ExamplesDefaultEntryHolder.defaultEntry);
}
if (!examples_.isMutable()) {
examples_ = examples_.copy();
}
return examples_;
}
public int getExamplesCount() {
return internalGetExamples().getMap().size();
}
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
@java.lang.Override
public boolean containsExamples(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetExamples().getMap().containsKey(key);
}
/**
* Use {@link #getExamplesMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExamples() {
return getExamplesMap();
}
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
@java.lang.Override
public java.util.Map getExamplesMap() {
return internalGetExamples().getMap();
}
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
@java.lang.Override
public java.lang.String getExamplesOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExamples().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
@java.lang.Override
public java.lang.String getExamplesOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExamples().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearExamples() {
internalGetMutableExamples().getMutableMap()
.clear();
return this;
}
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
public Builder removeExamples(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableExamples().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableExamples() {
return internalGetMutableExamples().getMutableMap();
}
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
public Builder putExamples(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableExamples().getMutableMap()
.put(key, value);
return this;
}
/**
*
* `Examples` gives per-mimetype response examples.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object
*
*
* map<string, string> examples = 4;
*/
public Builder putAllExamples(
java.util.Map values) {
internalGetMutableExamples().getMutableMap()
.putAll(values);
return this;
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Value> extensions_;
private com.google.protobuf.MapField
internalGetExtensions() {
if (extensions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
return extensions_;
}
private com.google.protobuf.MapField
internalGetMutableExtensions() {
onChanged();;
if (extensions_ == null) {
extensions_ = com.google.protobuf.MapField.newMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
if (!extensions_.isMutable()) {
extensions_ = extensions_.copy();
}
return extensions_;
}
public int getExtensionsCount() {
return internalGetExtensions().getMap().size();
}
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
@java.lang.Override
public java.util.Map getExtensionsMap() {
return internalGetExtensions().getMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearExtensions() {
internalGetMutableExtensions().getMutableMap()
.clear();
return this;
}
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
public Builder removeExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableExtensions().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableExtensions() {
return internalGetMutableExtensions().getMutableMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
public Builder putExtensions(
java.lang.String key,
com.google.protobuf.Value value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableExtensions().getMutableMap()
.put(key, value);
return this;
}
/**
* map<string, .google.protobuf.Value> extensions = 5;
*/
public Builder putAllExtensions(
java.util.Map values) {
internalGetMutableExtensions().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Response)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Response)
private static final grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response();
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Response parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Response(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface InfoOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Info)
com.google.protobuf.MessageOrBuilder {
/**
*
* The title of the application.
*
*
* string title = 1;
* @return The title.
*/
java.lang.String getTitle();
/**
*
* The title of the application.
*
*
* string title = 1;
* @return The bytes for title.
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* A short description of the application. GFM syntax can be used for rich
* text representation.
*
*
* string description = 2;
* @return The description.
*/
java.lang.String getDescription();
/**
*
* A short description of the application. GFM syntax can be used for rich
* text representation.
*
*
* string description = 2;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* The Terms of Service for the API.
*
*
* string terms_of_service = 3;
* @return The termsOfService.
*/
java.lang.String getTermsOfService();
/**
*
* The Terms of Service for the API.
*
*
* string terms_of_service = 3;
* @return The bytes for termsOfService.
*/
com.google.protobuf.ByteString
getTermsOfServiceBytes();
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
* @return Whether the contact field is set.
*/
boolean hasContact();
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
* @return The contact.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact getContact();
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ContactOrBuilder getContactOrBuilder();
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
* @return Whether the license field is set.
*/
boolean hasLicense();
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
* @return The license.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License getLicense();
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.LicenseOrBuilder getLicenseOrBuilder();
/**
*
* Provides the version of the application API (not to be confused
* with the specification version).
*
*
* string version = 6;
* @return The version.
*/
java.lang.String getVersion();
/**
*
* Provides the version of the application API (not to be confused
* with the specification version).
*
*
* string version = 6;
* @return The bytes for version.
*/
com.google.protobuf.ByteString
getVersionBytes();
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
int getExtensionsCount();
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
boolean containsExtensions(
java.lang.String key);
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getExtensions();
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
java.util.Map
getExtensionsMap();
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue);
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key);
}
/**
*
* `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 {@code grpc.gateway.protoc_gen_openapiv2.options.Info}
*/
public static final class Info extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Info)
InfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use Info.newBuilder() to construct.
private Info(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Info() {
title_ = "";
description_ = "";
termsOfService_ = "";
version_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Info();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Info(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
termsOfService_ = s;
break;
}
case 34: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.Builder subBuilder = null;
if (contact_ != null) {
subBuilder = contact_.toBuilder();
}
contact_ = input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(contact_);
contact_ = subBuilder.buildPartial();
}
break;
}
case 42: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.Builder subBuilder = null;
if (license_ != null) {
subBuilder = license_.toBuilder();
}
license_ = input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(license_);
license_ = subBuilder.buildPartial();
}
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
version_ = s;
break;
}
case 58: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
extensions_ = com.google.protobuf.MapField.newMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
extensions__ = input.readMessage(
ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
extensions_.getMutableMap().put(
extensions__.getKey(), extensions__.getValue());
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 7:
return internalGetExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.Builder.class);
}
public static final int TITLE_FIELD_NUMBER = 1;
private volatile java.lang.Object title_;
/**
*
* The title of the application.
*
*
* string title = 1;
* @return The title.
*/
@java.lang.Override
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
}
}
/**
*
* The title of the application.
*
*
* string title = 1;
* @return The bytes for title.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 2;
private volatile java.lang.Object description_;
/**
*
* A short description of the application. GFM syntax can be used for rich
* text representation.
*
*
* string description = 2;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
* A short description of the application. GFM syntax can be used for rich
* text representation.
*
*
* string description = 2;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TERMS_OF_SERVICE_FIELD_NUMBER = 3;
private volatile java.lang.Object termsOfService_;
/**
*
* The Terms of Service for the API.
*
*
* string terms_of_service = 3;
* @return The termsOfService.
*/
@java.lang.Override
public java.lang.String getTermsOfService() {
java.lang.Object ref = termsOfService_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
termsOfService_ = s;
return s;
}
}
/**
*
* The Terms of Service for the API.
*
*
* string terms_of_service = 3;
* @return The bytes for termsOfService.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTermsOfServiceBytes() {
java.lang.Object ref = termsOfService_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
termsOfService_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONTACT_FIELD_NUMBER = 4;
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact contact_;
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
* @return Whether the contact field is set.
*/
@java.lang.Override
public boolean hasContact() {
return contact_ != null;
}
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
* @return The contact.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact getContact() {
return contact_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.getDefaultInstance() : contact_;
}
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ContactOrBuilder getContactOrBuilder() {
return getContact();
}
public static final int LICENSE_FIELD_NUMBER = 5;
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License license_;
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
* @return Whether the license field is set.
*/
@java.lang.Override
public boolean hasLicense() {
return license_ != null;
}
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
* @return The license.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License getLicense() {
return license_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.getDefaultInstance() : license_;
}
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.LicenseOrBuilder getLicenseOrBuilder() {
return getLicense();
}
public static final int VERSION_FIELD_NUMBER = 6;
private volatile java.lang.Object version_;
/**
*
* Provides the version of the application API (not to be confused
* with the specification version).
*
*
* string version = 6;
* @return The version.
*/
@java.lang.Override
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
}
}
/**
*
* Provides the version of the application API (not to be confused
* with the specification version).
*
*
* string version = 6;
* @return The bytes for version.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXTENSIONS_FIELD_NUMBER = 7;
private static final class ExtensionsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.google.protobuf.Value> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_ExtensionsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.google.protobuf.Value.getDefaultInstance());
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Value> extensions_;
private com.google.protobuf.MapField
internalGetExtensions() {
if (extensions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
return extensions_;
}
public int getExtensionsCount() {
return internalGetExtensions().getMap().size();
}
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public java.util.Map getExtensionsMap() {
return internalGetExtensions().getMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
if (!getDescriptionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
if (!getTermsOfServiceBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, termsOfService_);
}
if (contact_ != null) {
output.writeMessage(4, getContact());
}
if (license_ != null) {
output.writeMessage(5, getLicense());
}
if (!getVersionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, version_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetExtensions(),
ExtensionsDefaultEntryHolder.defaultEntry,
7);
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getTitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
if (!getDescriptionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
if (!getTermsOfServiceBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, termsOfService_);
}
if (contact_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getContact());
}
if (license_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getLicense());
}
if (!getVersionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, version_);
}
for (java.util.Map.Entry entry
: internalGetExtensions().getMap().entrySet()) {
com.google.protobuf.MapEntry
extensions__ = ExtensionsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, extensions__);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info)) {
return super.equals(obj);
}
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info other = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info) obj;
if (!getTitle()
.equals(other.getTitle())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!getTermsOfService()
.equals(other.getTermsOfService())) return false;
if (hasContact() != other.hasContact()) return false;
if (hasContact()) {
if (!getContact()
.equals(other.getContact())) return false;
}
if (hasLicense() != other.hasLicense()) return false;
if (hasLicense()) {
if (!getLicense()
.equals(other.getLicense())) return false;
}
if (!getVersion()
.equals(other.getVersion())) return false;
if (!internalGetExtensions().equals(
other.internalGetExtensions())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + TERMS_OF_SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getTermsOfService().hashCode();
if (hasContact()) {
hash = (37 * hash) + CONTACT_FIELD_NUMBER;
hash = (53 * hash) + getContact().hashCode();
}
if (hasLicense()) {
hash = (37 * hash) + LICENSE_FIELD_NUMBER;
hash = (53 * hash) + getLicense().hashCode();
}
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersion().hashCode();
if (!internalGetExtensions().getMap().isEmpty()) {
hash = (37 * hash) + EXTENSIONS_FIELD_NUMBER;
hash = (53 * hash) + internalGetExtensions().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `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 {@code grpc.gateway.protoc_gen_openapiv2.options.Info}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Info)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.InfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 7:
return internalGetExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 7:
return internalGetMutableExtensions();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
title_ = "";
description_ = "";
termsOfService_ = "";
if (contactBuilder_ == null) {
contact_ = null;
} else {
contact_ = null;
contactBuilder_ = null;
}
if (licenseBuilder_ == null) {
license_ = null;
} else {
license_ = null;
licenseBuilder_ = null;
}
version_ = "";
internalGetMutableExtensions().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Info_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info(this);
int from_bitField0_ = bitField0_;
result.title_ = title_;
result.description_ = description_;
result.termsOfService_ = termsOfService_;
if (contactBuilder_ == null) {
result.contact_ = contact_;
} else {
result.contact_ = contactBuilder_.build();
}
if (licenseBuilder_ == null) {
result.license_ = license_;
} else {
result.license_ = licenseBuilder_.build();
}
result.version_ = version_;
result.extensions_ = internalGetExtensions();
result.extensions_.makeImmutable();
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.getDefaultInstance()) return this;
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (!other.getTermsOfService().isEmpty()) {
termsOfService_ = other.termsOfService_;
onChanged();
}
if (other.hasContact()) {
mergeContact(other.getContact());
}
if (other.hasLicense()) {
mergeLicense(other.getLicense());
}
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
onChanged();
}
internalGetMutableExtensions().mergeFrom(
other.internalGetExtensions());
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object title_ = "";
/**
*
* The title of the application.
*
*
* string title = 1;
* @return The title.
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The title of the application.
*
*
* string title = 1;
* @return The bytes for title.
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The title of the application.
*
*
* string title = 1;
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* The title of the application.
*
*
* string title = 1;
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* The title of the application.
*
*
* string title = 1;
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* A short description of the application. GFM syntax can be used for rich
* text representation.
*
*
* string description = 2;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A short description of the application. GFM syntax can be used for rich
* text representation.
*
*
* string description = 2;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A short description of the application. GFM syntax can be used for rich
* text representation.
*
*
* string description = 2;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* A short description of the application. GFM syntax can be used for rich
* text representation.
*
*
* string description = 2;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* A short description of the application. GFM syntax can be used for rich
* text representation.
*
*
* string description = 2;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private java.lang.Object termsOfService_ = "";
/**
*
* The Terms of Service for the API.
*
*
* string terms_of_service = 3;
* @return The termsOfService.
*/
public java.lang.String getTermsOfService() {
java.lang.Object ref = termsOfService_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
termsOfService_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The Terms of Service for the API.
*
*
* string terms_of_service = 3;
* @return The bytes for termsOfService.
*/
public com.google.protobuf.ByteString
getTermsOfServiceBytes() {
java.lang.Object ref = termsOfService_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
termsOfService_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The Terms of Service for the API.
*
*
* string terms_of_service = 3;
* @param value The termsOfService to set.
* @return This builder for chaining.
*/
public Builder setTermsOfService(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
termsOfService_ = value;
onChanged();
return this;
}
/**
*
* The Terms of Service for the API.
*
*
* string terms_of_service = 3;
* @return This builder for chaining.
*/
public Builder clearTermsOfService() {
termsOfService_ = getDefaultInstance().getTermsOfService();
onChanged();
return this;
}
/**
*
* The Terms of Service for the API.
*
*
* string terms_of_service = 3;
* @param value The bytes for termsOfService to set.
* @return This builder for chaining.
*/
public Builder setTermsOfServiceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
termsOfService_ = value;
onChanged();
return this;
}
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact contact_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ContactOrBuilder> contactBuilder_;
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
* @return Whether the contact field is set.
*/
public boolean hasContact() {
return contactBuilder_ != null || contact_ != null;
}
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
* @return The contact.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact getContact() {
if (contactBuilder_ == null) {
return contact_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.getDefaultInstance() : contact_;
} else {
return contactBuilder_.getMessage();
}
}
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
*/
public Builder setContact(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact value) {
if (contactBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
contact_ = value;
onChanged();
} else {
contactBuilder_.setMessage(value);
}
return this;
}
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
*/
public Builder setContact(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.Builder builderForValue) {
if (contactBuilder_ == null) {
contact_ = builderForValue.build();
onChanged();
} else {
contactBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
*/
public Builder mergeContact(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact value) {
if (contactBuilder_ == null) {
if (contact_ != null) {
contact_ =
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.newBuilder(contact_).mergeFrom(value).buildPartial();
} else {
contact_ = value;
}
onChanged();
} else {
contactBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
*/
public Builder clearContact() {
if (contactBuilder_ == null) {
contact_ = null;
onChanged();
} else {
contact_ = null;
contactBuilder_ = null;
}
return this;
}
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.Builder getContactBuilder() {
onChanged();
return getContactFieldBuilder().getBuilder();
}
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ContactOrBuilder getContactOrBuilder() {
if (contactBuilder_ != null) {
return contactBuilder_.getMessageOrBuilder();
} else {
return contact_ == null ?
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.getDefaultInstance() : contact_;
}
}
/**
*
* The contact information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Contact contact = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ContactOrBuilder>
getContactFieldBuilder() {
if (contactBuilder_ == null) {
contactBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ContactOrBuilder>(
getContact(),
getParentForChildren(),
isClean());
contact_ = null;
}
return contactBuilder_;
}
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License license_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.LicenseOrBuilder> licenseBuilder_;
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
* @return Whether the license field is set.
*/
public boolean hasLicense() {
return licenseBuilder_ != null || license_ != null;
}
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
* @return The license.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License getLicense() {
if (licenseBuilder_ == null) {
return license_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.getDefaultInstance() : license_;
} else {
return licenseBuilder_.getMessage();
}
}
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
*/
public Builder setLicense(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License value) {
if (licenseBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
license_ = value;
onChanged();
} else {
licenseBuilder_.setMessage(value);
}
return this;
}
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
*/
public Builder setLicense(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.Builder builderForValue) {
if (licenseBuilder_ == null) {
license_ = builderForValue.build();
onChanged();
} else {
licenseBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
*/
public Builder mergeLicense(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License value) {
if (licenseBuilder_ == null) {
if (license_ != null) {
license_ =
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.newBuilder(license_).mergeFrom(value).buildPartial();
} else {
license_ = value;
}
onChanged();
} else {
licenseBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
*/
public Builder clearLicense() {
if (licenseBuilder_ == null) {
license_ = null;
onChanged();
} else {
license_ = null;
licenseBuilder_ = null;
}
return this;
}
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.Builder getLicenseBuilder() {
onChanged();
return getLicenseFieldBuilder().getBuilder();
}
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.LicenseOrBuilder getLicenseOrBuilder() {
if (licenseBuilder_ != null) {
return licenseBuilder_.getMessageOrBuilder();
} else {
return license_ == null ?
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.getDefaultInstance() : license_;
}
}
/**
*
* The license information for the exposed API.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.LicenseOrBuilder>
getLicenseFieldBuilder() {
if (licenseBuilder_ == null) {
licenseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.LicenseOrBuilder>(
getLicense(),
getParentForChildren(),
isClean());
license_ = null;
}
return licenseBuilder_;
}
private java.lang.Object version_ = "";
/**
*
* Provides the version of the application API (not to be confused
* with the specification version).
*
*
* string version = 6;
* @return The version.
*/
public java.lang.String getVersion() {
java.lang.Object ref = version_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
version_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Provides the version of the application API (not to be confused
* with the specification version).
*
*
* string version = 6;
* @return The bytes for version.
*/
public com.google.protobuf.ByteString
getVersionBytes() {
java.lang.Object ref = version_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
version_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Provides the version of the application API (not to be confused
* with the specification version).
*
*
* string version = 6;
* @param value The version to set.
* @return This builder for chaining.
*/
public Builder setVersion(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
version_ = value;
onChanged();
return this;
}
/**
*
* Provides the version of the application API (not to be confused
* with the specification version).
*
*
* string version = 6;
* @return This builder for chaining.
*/
public Builder clearVersion() {
version_ = getDefaultInstance().getVersion();
onChanged();
return this;
}
/**
*
* Provides the version of the application API (not to be confused
* with the specification version).
*
*
* string version = 6;
* @param value The bytes for version to set.
* @return This builder for chaining.
*/
public Builder setVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
version_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, com.google.protobuf.Value> extensions_;
private com.google.protobuf.MapField
internalGetExtensions() {
if (extensions_ == null) {
return com.google.protobuf.MapField.emptyMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
return extensions_;
}
private com.google.protobuf.MapField
internalGetMutableExtensions() {
onChanged();;
if (extensions_ == null) {
extensions_ = com.google.protobuf.MapField.newMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
if (!extensions_.isMutable()) {
extensions_ = extensions_.copy();
}
return extensions_;
}
public int getExtensionsCount() {
return internalGetExtensions().getMap().size();
}
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public java.util.Map getExtensionsMap() {
return internalGetExtensions().getMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrDefault(
java.lang.String key,
com.google.protobuf.Value defaultValue) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearExtensions() {
internalGetMutableExtensions().getMutableMap()
.clear();
return this;
}
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
public Builder removeExtensions(
java.lang.String key) {
if (key == null) { throw new java.lang.NullPointerException(); }
internalGetMutableExtensions().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableExtensions() {
return internalGetMutableExtensions().getMutableMap();
}
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
public Builder putExtensions(
java.lang.String key,
com.google.protobuf.Value value) {
if (key == null) { throw new java.lang.NullPointerException(); }
if (value == null) { throw new java.lang.NullPointerException(); }
internalGetMutableExtensions().getMutableMap()
.put(key, value);
return this;
}
/**
* map<string, .google.protobuf.Value> extensions = 7;
*/
public Builder putAllExtensions(
java.util.Map values) {
internalGetMutableExtensions().getMutableMap()
.putAll(values);
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Info)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Info)
private static final grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info();
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Info parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Info(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ContactOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Contact)
com.google.protobuf.MessageOrBuilder {
/**
*
* The identifying name of the contact person/organization.
*
*
* string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
*
* The identifying name of the contact person/organization.
*
*
* string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* The URL pointing to the contact information. MUST be in the format of a
* URL.
*
*
* string url = 2;
* @return The url.
*/
java.lang.String getUrl();
/**
*
* The URL pointing to the contact information. MUST be in the format of a
* URL.
*
*
* string url = 2;
* @return The bytes for url.
*/
com.google.protobuf.ByteString
getUrlBytes();
/**
*
* The email address of the contact person/organization. MUST be in the format
* of an email address.
*
*
* string email = 3;
* @return The email.
*/
java.lang.String getEmail();
/**
*
* The email address of the contact person/organization. MUST be in the format
* of an email address.
*
*
* string email = 3;
* @return The bytes for email.
*/
com.google.protobuf.ByteString
getEmailBytes();
}
/**
*
* `Contact` is a representation of OpenAPI v2 specification's Contact object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
* Example:
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* info: {
* ...
* contact: {
* name: "gRPC-Gateway project";
* url: "https://github.com/grpc-ecosystem/grpc-gateway";
* email: "none@example.com";
* };
* ...
* };
* ...
* };
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Contact}
*/
public static final class Contact extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Contact)
ContactOrBuilder {
private static final long serialVersionUID = 0L;
// Use Contact.newBuilder() to construct.
private Contact(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Contact() {
name_ = "";
url_ = "";
email_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Contact();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Contact(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
url_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
email_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* The identifying name of the contact person/organization.
*
*
* string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* The identifying name of the contact person/organization.
*
*
* string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int URL_FIELD_NUMBER = 2;
private volatile java.lang.Object url_;
/**
*
* The URL pointing to the contact information. MUST be in the format of a
* URL.
*
*
* string url = 2;
* @return The url.
*/
@java.lang.Override
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
}
}
/**
*
* The URL pointing to the contact information. MUST be in the format of a
* URL.
*
*
* string url = 2;
* @return The bytes for url.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EMAIL_FIELD_NUMBER = 3;
private volatile java.lang.Object email_;
/**
*
* The email address of the contact person/organization. MUST be in the format
* of an email address.
*
*
* string email = 3;
* @return The email.
*/
@java.lang.Override
public java.lang.String getEmail() {
java.lang.Object ref = email_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
email_ = s;
return s;
}
}
/**
*
* The email address of the contact person/organization. MUST be in the format
* of an email address.
*
*
* string email = 3;
* @return The bytes for email.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getEmailBytes() {
java.lang.Object ref = email_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
email_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getUrlBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_);
}
if (!getEmailBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, email_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getUrlBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_);
}
if (!getEmailBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, email_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact)) {
return super.equals(obj);
}
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact other = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getUrl()
.equals(other.getUrl())) return false;
if (!getEmail()
.equals(other.getEmail())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
hash = (37 * hash) + EMAIL_FIELD_NUMBER;
hash = (53 * hash) + getEmail().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `Contact` is a representation of OpenAPI v2 specification's Contact object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#contactObject
* Example:
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* info: {
* ...
* contact: {
* name: "gRPC-Gateway project";
* url: "https://github.com/grpc-ecosystem/grpc-gateway";
* email: "none@example.com";
* };
* ...
* };
* ...
* };
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Contact}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Contact)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ContactOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
url_ = "";
email_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Contact_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact(this);
result.name_ = name_;
result.url_ = url_;
result.email_ = email_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
onChanged();
}
if (!other.getEmail().isEmpty()) {
email_ = other.email_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
*
* The identifying name of the contact person/organization.
*
*
* string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The identifying name of the contact person/organization.
*
*
* string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The identifying name of the contact person/organization.
*
*
* string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* The identifying name of the contact person/organization.
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* The identifying name of the contact person/organization.
*
*
* string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object url_ = "";
/**
*
* The URL pointing to the contact information. MUST be in the format of a
* URL.
*
*
* string url = 2;
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The URL pointing to the contact information. MUST be in the format of a
* URL.
*
*
* string url = 2;
* @return The bytes for url.
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The URL pointing to the contact information. MUST be in the format of a
* URL.
*
*
* string url = 2;
* @param value The url to set.
* @return This builder for chaining.
*/
public Builder setUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
url_ = value;
onChanged();
return this;
}
/**
*
* The URL pointing to the contact information. MUST be in the format of a
* URL.
*
*
* string url = 2;
* @return This builder for chaining.
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
onChanged();
return this;
}
/**
*
* The URL pointing to the contact information. MUST be in the format of a
* URL.
*
*
* string url = 2;
* @param value The bytes for url to set.
* @return This builder for chaining.
*/
public Builder setUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
url_ = value;
onChanged();
return this;
}
private java.lang.Object email_ = "";
/**
*
* The email address of the contact person/organization. MUST be in the format
* of an email address.
*
*
* string email = 3;
* @return The email.
*/
public java.lang.String getEmail() {
java.lang.Object ref = email_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
email_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The email address of the contact person/organization. MUST be in the format
* of an email address.
*
*
* string email = 3;
* @return The bytes for email.
*/
public com.google.protobuf.ByteString
getEmailBytes() {
java.lang.Object ref = email_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
email_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The email address of the contact person/organization. MUST be in the format
* of an email address.
*
*
* string email = 3;
* @param value The email to set.
* @return This builder for chaining.
*/
public Builder setEmail(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
email_ = value;
onChanged();
return this;
}
/**
*
* The email address of the contact person/organization. MUST be in the format
* of an email address.
*
*
* string email = 3;
* @return This builder for chaining.
*/
public Builder clearEmail() {
email_ = getDefaultInstance().getEmail();
onChanged();
return this;
}
/**
*
* The email address of the contact person/organization. MUST be in the format
* of an email address.
*
*
* string email = 3;
* @param value The bytes for email to set.
* @return This builder for chaining.
*/
public Builder setEmailBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
email_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Contact)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Contact)
private static final grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact();
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Contact parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Contact(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Contact getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface LicenseOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.License)
com.google.protobuf.MessageOrBuilder {
/**
*
* The license name used for the API.
*
*
* string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
*
* The license name used for the API.
*
*
* string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* A URL to the license used for the API. MUST be in the format of a URL.
*
*
* string url = 2;
* @return The url.
*/
java.lang.String getUrl();
/**
*
* A URL to the license used for the API. MUST be in the format of a URL.
*
*
* string url = 2;
* @return The bytes for url.
*/
com.google.protobuf.ByteString
getUrlBytes();
}
/**
*
* `License` is a representation of OpenAPI v2 specification's License object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
* Example:
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* info: {
* ...
* license: {
* name: "BSD 3-Clause License";
* url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
* };
* ...
* };
* ...
* };
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.License}
*/
public static final class License extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.License)
LicenseOrBuilder {
private static final long serialVersionUID = 0L;
// Use License.newBuilder() to construct.
private License(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private License() {
name_ = "";
url_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new License();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private License(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
url_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
* The license name used for the API.
*
*
* string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* The license name used for the API.
*
*
* string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int URL_FIELD_NUMBER = 2;
private volatile java.lang.Object url_;
/**
*
* A URL to the license used for the API. MUST be in the format of a URL.
*
*
* string url = 2;
* @return The url.
*/
@java.lang.Override
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
}
}
/**
*
* A URL to the license used for the API. MUST be in the format of a URL.
*
*
* string url = 2;
* @return The bytes for url.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!getUrlBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!getUrlBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License)) {
return super.equals(obj);
}
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License other = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License) obj;
if (!getName()
.equals(other.getName())) return false;
if (!getUrl()
.equals(other.getUrl())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `License` is a representation of OpenAPI v2 specification's License object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#licenseObject
* Example:
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* info: {
* ...
* license: {
* name: "BSD 3-Clause License";
* url: "https://github.com/grpc-ecosystem/grpc-gateway/blob/master/LICENSE.txt";
* };
* ...
* };
* ...
* };
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.License}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.License)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.LicenseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
url_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_License_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License(this);
result.name_ = name_;
result.url_ = url_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object name_ = "";
/**
*
* The license name used for the API.
*
*
* string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The license name used for the API.
*
*
* string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The license name used for the API.
*
*
* string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* The license name used for the API.
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* The license name used for the API.
*
*
* string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object url_ = "";
/**
*
* A URL to the license used for the API. MUST be in the format of a URL.
*
*
* string url = 2;
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A URL to the license used for the API. MUST be in the format of a URL.
*
*
* string url = 2;
* @return The bytes for url.
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A URL to the license used for the API. MUST be in the format of a URL.
*
*
* string url = 2;
* @param value The url to set.
* @return This builder for chaining.
*/
public Builder setUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
url_ = value;
onChanged();
return this;
}
/**
*
* A URL to the license used for the API. MUST be in the format of a URL.
*
*
* string url = 2;
* @return This builder for chaining.
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
onChanged();
return this;
}
/**
*
* A URL to the license used for the API. MUST be in the format of a URL.
*
*
* string url = 2;
* @param value The bytes for url to set.
* @return This builder for chaining.
*/
public Builder setUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
url_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.License)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.License)
private static final grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License();
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public License parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new License(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExternalDocumentationOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)
com.google.protobuf.MessageOrBuilder {
/**
*
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
*
*
* string description = 1;
* @return The description.
*/
java.lang.String getDescription();
/**
*
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
*
*
* string description = 1;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* The URL for the target documentation. Value MUST be in the format
* of a URL.
*
*
* string url = 2;
* @return The url.
*/
java.lang.String getUrl();
/**
*
* The URL for the target documentation. Value MUST be in the format
* of a URL.
*
*
* string url = 2;
* @return The bytes for url.
*/
com.google.protobuf.ByteString
getUrlBytes();
}
/**
*
* `ExternalDocumentation` is a representation of OpenAPI v2 specification's
* ExternalDocumentation object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
* Example:
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* ...
* external_docs: {
* description: "More about gRPC-Gateway";
* url: "https://github.com/grpc-ecosystem/grpc-gateway";
* }
* ...
* };
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation}
*/
public static final class ExternalDocumentation extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)
ExternalDocumentationOrBuilder {
private static final long serialVersionUID = 0L;
// Use ExternalDocumentation.newBuilder() to construct.
private ExternalDocumentation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ExternalDocumentation() {
description_ = "";
url_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ExternalDocumentation();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ExternalDocumentation(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
url_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder.class);
}
public static final int DESCRIPTION_FIELD_NUMBER = 1;
private volatile java.lang.Object description_;
/**
*
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
*
*
* string description = 1;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
*
*
* string description = 1;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int URL_FIELD_NUMBER = 2;
private volatile java.lang.Object url_;
/**
*
* The URL for the target documentation. Value MUST be in the format
* of a URL.
*
*
* string url = 2;
* @return The url.
*/
@java.lang.Override
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
}
}
/**
*
* The URL for the target documentation. Value MUST be in the format
* of a URL.
*
*
* string url = 2;
* @return The bytes for url.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getDescriptionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_);
}
if (!getUrlBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, url_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDescriptionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_);
}
if (!getUrlBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, url_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation)) {
return super.equals(obj);
}
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation other = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation) obj;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!getUrl()
.equals(other.getUrl())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + URL_FIELD_NUMBER;
hash = (53 * hash) + getUrl().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `ExternalDocumentation` is a representation of OpenAPI v2 specification's
* ExternalDocumentation object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#externalDocumentationObject
* Example:
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
* ...
* external_docs: {
* description: "More about gRPC-Gateway";
* url: "https://github.com/grpc-ecosystem/grpc-gateway";
* }
* ...
* };
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
description_ = "";
url_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_ExternalDocumentation_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation(this);
result.description_ = description_;
result.url_ = url_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance()) return this;
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (!other.getUrl().isEmpty()) {
url_ = other.url_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object description_ = "";
/**
*
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
*
*
* string description = 1;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
*
*
* string description = 1;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
*
*
* string description = 1;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
*
*
* string description = 1;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* A short description of the target documentation. GFM syntax can be used for
* rich text representation.
*
*
* string description = 1;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private java.lang.Object url_ = "";
/**
*
* The URL for the target documentation. Value MUST be in the format
* of a URL.
*
*
* string url = 2;
* @return The url.
*/
public java.lang.String getUrl() {
java.lang.Object ref = url_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
url_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The URL for the target documentation. Value MUST be in the format
* of a URL.
*
*
* string url = 2;
* @return The bytes for url.
*/
public com.google.protobuf.ByteString
getUrlBytes() {
java.lang.Object ref = url_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
url_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The URL for the target documentation. Value MUST be in the format
* of a URL.
*
*
* string url = 2;
* @param value The url to set.
* @return This builder for chaining.
*/
public Builder setUrl(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
url_ = value;
onChanged();
return this;
}
/**
*
* The URL for the target documentation. Value MUST be in the format
* of a URL.
*
*
* string url = 2;
* @return This builder for chaining.
*/
public Builder clearUrl() {
url_ = getDefaultInstance().getUrl();
onChanged();
return this;
}
/**
*
* The URL for the target documentation. Value MUST be in the format
* of a URL.
*
*
* string url = 2;
* @param value The bytes for url to set.
* @return This builder for chaining.
*/
public Builder setUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
url_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation)
private static final grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation();
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExternalDocumentation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ExternalDocumentation(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SchemaOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Schema)
com.google.protobuf.MessageOrBuilder {
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
* @return Whether the jsonSchema field is set.
*/
boolean hasJsonSchema();
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
* @return The jsonSchema.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema getJsonSchema();
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchemaOrBuilder getJsonSchemaOrBuilder();
/**
*
* Adds support for polymorphism. The discriminator is the schema property
* name that is used to differentiate between other schema that inherit this
* schema. The property name used MUST be defined at this schema and it MUST
* be in the required property list. When used, the value MUST be the name of
* this schema or any schema that inherits it.
*
*
* string discriminator = 2;
* @return The discriminator.
*/
java.lang.String getDiscriminator();
/**
*
* Adds support for polymorphism. The discriminator is the schema property
* name that is used to differentiate between other schema that inherit this
* schema. The property name used MUST be defined at this schema and it MUST
* be in the required property list. When used, the value MUST be the name of
* this schema or any schema that inherits it.
*
*
* string discriminator = 2;
* @return The bytes for discriminator.
*/
com.google.protobuf.ByteString
getDiscriminatorBytes();
/**
*
* Relevant only for Schema "properties" definitions. Declares the property as
* "read only". This means that it MAY be sent as part of a response but MUST
* NOT be sent as part of the request. Properties marked as readOnly being
* true SHOULD NOT be in the required list of the defined schema. Default
* value is false.
*
*
* bool read_only = 3;
* @return The readOnly.
*/
boolean getReadOnly();
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
* @return Whether the externalDocs field is set.
*/
boolean hasExternalDocs();
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
* @return The externalDocs.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs();
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder();
/**
*
* A free-form property to include an example of an instance for this schema in JSON.
* This is copied verbatim to the output.
*
*
* string example = 6;
* @return The example.
*/
java.lang.String getExample();
/**
*
* A free-form property to include an example of an instance for this schema in JSON.
* This is copied verbatim to the output.
*
*
* string example = 6;
* @return The bytes for example.
*/
com.google.protobuf.ByteString
getExampleBytes();
}
/**
*
* `Schema` is a representation of OpenAPI v2 specification's Schema object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Schema}
*/
public static final class Schema extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Schema)
SchemaOrBuilder {
private static final long serialVersionUID = 0L;
// Use Schema.newBuilder() to construct.
private Schema(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Schema() {
discriminator_ = "";
example_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Schema();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Schema(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.Builder subBuilder = null;
if (jsonSchema_ != null) {
subBuilder = jsonSchema_.toBuilder();
}
jsonSchema_ = input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(jsonSchema_);
jsonSchema_ = subBuilder.buildPartial();
}
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
discriminator_ = s;
break;
}
case 24: {
readOnly_ = input.readBool();
break;
}
case 42: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder subBuilder = null;
if (externalDocs_ != null) {
subBuilder = externalDocs_.toBuilder();
}
externalDocs_ = input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(externalDocs_);
externalDocs_ = subBuilder.buildPartial();
}
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
example_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.Builder.class);
}
public static final int JSON_SCHEMA_FIELD_NUMBER = 1;
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema jsonSchema_;
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
* @return Whether the jsonSchema field is set.
*/
@java.lang.Override
public boolean hasJsonSchema() {
return jsonSchema_ != null;
}
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
* @return The jsonSchema.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema getJsonSchema() {
return jsonSchema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.getDefaultInstance() : jsonSchema_;
}
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchemaOrBuilder getJsonSchemaOrBuilder() {
return getJsonSchema();
}
public static final int DISCRIMINATOR_FIELD_NUMBER = 2;
private volatile java.lang.Object discriminator_;
/**
*
* Adds support for polymorphism. The discriminator is the schema property
* name that is used to differentiate between other schema that inherit this
* schema. The property name used MUST be defined at this schema and it MUST
* be in the required property list. When used, the value MUST be the name of
* this schema or any schema that inherits it.
*
*
* string discriminator = 2;
* @return The discriminator.
*/
@java.lang.Override
public java.lang.String getDiscriminator() {
java.lang.Object ref = discriminator_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
discriminator_ = s;
return s;
}
}
/**
*
* Adds support for polymorphism. The discriminator is the schema property
* name that is used to differentiate between other schema that inherit this
* schema. The property name used MUST be defined at this schema and it MUST
* be in the required property list. When used, the value MUST be the name of
* this schema or any schema that inherits it.
*
*
* string discriminator = 2;
* @return The bytes for discriminator.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDiscriminatorBytes() {
java.lang.Object ref = discriminator_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
discriminator_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int READ_ONLY_FIELD_NUMBER = 3;
private boolean readOnly_;
/**
*
* Relevant only for Schema "properties" definitions. Declares the property as
* "read only". This means that it MAY be sent as part of a response but MUST
* NOT be sent as part of the request. Properties marked as readOnly being
* true SHOULD NOT be in the required list of the defined schema. Default
* value is false.
*
*
* bool read_only = 3;
* @return The readOnly.
*/
@java.lang.Override
public boolean getReadOnly() {
return readOnly_;
}
public static final int EXTERNAL_DOCS_FIELD_NUMBER = 5;
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation externalDocs_;
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
* @return Whether the externalDocs field is set.
*/
@java.lang.Override
public boolean hasExternalDocs() {
return externalDocs_ != null;
}
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
* @return The externalDocs.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs() {
return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
}
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() {
return getExternalDocs();
}
public static final int EXAMPLE_FIELD_NUMBER = 6;
private volatile java.lang.Object example_;
/**
*
* A free-form property to include an example of an instance for this schema in JSON.
* This is copied verbatim to the output.
*
*
* string example = 6;
* @return The example.
*/
@java.lang.Override
public java.lang.String getExample() {
java.lang.Object ref = example_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
example_ = s;
return s;
}
}
/**
*
* A free-form property to include an example of an instance for this schema in JSON.
* This is copied verbatim to the output.
*
*
* string example = 6;
* @return The bytes for example.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getExampleBytes() {
java.lang.Object ref = example_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
example_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (jsonSchema_ != null) {
output.writeMessage(1, getJsonSchema());
}
if (!getDiscriminatorBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, discriminator_);
}
if (readOnly_ != false) {
output.writeBool(3, readOnly_);
}
if (externalDocs_ != null) {
output.writeMessage(5, getExternalDocs());
}
if (!getExampleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, example_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (jsonSchema_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getJsonSchema());
}
if (!getDiscriminatorBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, discriminator_);
}
if (readOnly_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, readOnly_);
}
if (externalDocs_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getExternalDocs());
}
if (!getExampleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, example_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema)) {
return super.equals(obj);
}
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema other = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema) obj;
if (hasJsonSchema() != other.hasJsonSchema()) return false;
if (hasJsonSchema()) {
if (!getJsonSchema()
.equals(other.getJsonSchema())) return false;
}
if (!getDiscriminator()
.equals(other.getDiscriminator())) return false;
if (getReadOnly()
!= other.getReadOnly()) return false;
if (hasExternalDocs() != other.hasExternalDocs()) return false;
if (hasExternalDocs()) {
if (!getExternalDocs()
.equals(other.getExternalDocs())) return false;
}
if (!getExample()
.equals(other.getExample())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasJsonSchema()) {
hash = (37 * hash) + JSON_SCHEMA_FIELD_NUMBER;
hash = (53 * hash) + getJsonSchema().hashCode();
}
hash = (37 * hash) + DISCRIMINATOR_FIELD_NUMBER;
hash = (53 * hash) + getDiscriminator().hashCode();
hash = (37 * hash) + READ_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getReadOnly());
if (hasExternalDocs()) {
hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER;
hash = (53 * hash) + getExternalDocs().hashCode();
}
hash = (37 * hash) + EXAMPLE_FIELD_NUMBER;
hash = (53 * hash) + getExample().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `Schema` is a representation of OpenAPI v2 specification's Schema object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Schema}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Schema)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SchemaOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (jsonSchemaBuilder_ == null) {
jsonSchema_ = null;
} else {
jsonSchema_ = null;
jsonSchemaBuilder_ = null;
}
discriminator_ = "";
readOnly_ = false;
if (externalDocsBuilder_ == null) {
externalDocs_ = null;
} else {
externalDocs_ = null;
externalDocsBuilder_ = null;
}
example_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Schema_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema(this);
if (jsonSchemaBuilder_ == null) {
result.jsonSchema_ = jsonSchema_;
} else {
result.jsonSchema_ = jsonSchemaBuilder_.build();
}
result.discriminator_ = discriminator_;
result.readOnly_ = readOnly_;
if (externalDocsBuilder_ == null) {
result.externalDocs_ = externalDocs_;
} else {
result.externalDocs_ = externalDocsBuilder_.build();
}
result.example_ = example_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.getDefaultInstance()) return this;
if (other.hasJsonSchema()) {
mergeJsonSchema(other.getJsonSchema());
}
if (!other.getDiscriminator().isEmpty()) {
discriminator_ = other.discriminator_;
onChanged();
}
if (other.getReadOnly() != false) {
setReadOnly(other.getReadOnly());
}
if (other.hasExternalDocs()) {
mergeExternalDocs(other.getExternalDocs());
}
if (!other.getExample().isEmpty()) {
example_ = other.example_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema jsonSchema_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchemaOrBuilder> jsonSchemaBuilder_;
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
* @return Whether the jsonSchema field is set.
*/
public boolean hasJsonSchema() {
return jsonSchemaBuilder_ != null || jsonSchema_ != null;
}
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
* @return The jsonSchema.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema getJsonSchema() {
if (jsonSchemaBuilder_ == null) {
return jsonSchema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.getDefaultInstance() : jsonSchema_;
} else {
return jsonSchemaBuilder_.getMessage();
}
}
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
*/
public Builder setJsonSchema(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema value) {
if (jsonSchemaBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
jsonSchema_ = value;
onChanged();
} else {
jsonSchemaBuilder_.setMessage(value);
}
return this;
}
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
*/
public Builder setJsonSchema(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.Builder builderForValue) {
if (jsonSchemaBuilder_ == null) {
jsonSchema_ = builderForValue.build();
onChanged();
} else {
jsonSchemaBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
*/
public Builder mergeJsonSchema(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema value) {
if (jsonSchemaBuilder_ == null) {
if (jsonSchema_ != null) {
jsonSchema_ =
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.newBuilder(jsonSchema_).mergeFrom(value).buildPartial();
} else {
jsonSchema_ = value;
}
onChanged();
} else {
jsonSchemaBuilder_.mergeFrom(value);
}
return this;
}
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
*/
public Builder clearJsonSchema() {
if (jsonSchemaBuilder_ == null) {
jsonSchema_ = null;
onChanged();
} else {
jsonSchema_ = null;
jsonSchemaBuilder_ = null;
}
return this;
}
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.Builder getJsonSchemaBuilder() {
onChanged();
return getJsonSchemaFieldBuilder().getBuilder();
}
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchemaOrBuilder getJsonSchemaOrBuilder() {
if (jsonSchemaBuilder_ != null) {
return jsonSchemaBuilder_.getMessageOrBuilder();
} else {
return jsonSchema_ == null ?
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.getDefaultInstance() : jsonSchema_;
}
}
/**
* .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema json_schema = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchemaOrBuilder>
getJsonSchemaFieldBuilder() {
if (jsonSchemaBuilder_ == null) {
jsonSchemaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchemaOrBuilder>(
getJsonSchema(),
getParentForChildren(),
isClean());
jsonSchema_ = null;
}
return jsonSchemaBuilder_;
}
private java.lang.Object discriminator_ = "";
/**
*
* Adds support for polymorphism. The discriminator is the schema property
* name that is used to differentiate between other schema that inherit this
* schema. The property name used MUST be defined at this schema and it MUST
* be in the required property list. When used, the value MUST be the name of
* this schema or any schema that inherits it.
*
*
* string discriminator = 2;
* @return The discriminator.
*/
public java.lang.String getDiscriminator() {
java.lang.Object ref = discriminator_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
discriminator_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Adds support for polymorphism. The discriminator is the schema property
* name that is used to differentiate between other schema that inherit this
* schema. The property name used MUST be defined at this schema and it MUST
* be in the required property list. When used, the value MUST be the name of
* this schema or any schema that inherits it.
*
*
* string discriminator = 2;
* @return The bytes for discriminator.
*/
public com.google.protobuf.ByteString
getDiscriminatorBytes() {
java.lang.Object ref = discriminator_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
discriminator_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Adds support for polymorphism. The discriminator is the schema property
* name that is used to differentiate between other schema that inherit this
* schema. The property name used MUST be defined at this schema and it MUST
* be in the required property list. When used, the value MUST be the name of
* this schema or any schema that inherits it.
*
*
* string discriminator = 2;
* @param value The discriminator to set.
* @return This builder for chaining.
*/
public Builder setDiscriminator(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
discriminator_ = value;
onChanged();
return this;
}
/**
*
* Adds support for polymorphism. The discriminator is the schema property
* name that is used to differentiate between other schema that inherit this
* schema. The property name used MUST be defined at this schema and it MUST
* be in the required property list. When used, the value MUST be the name of
* this schema or any schema that inherits it.
*
*
* string discriminator = 2;
* @return This builder for chaining.
*/
public Builder clearDiscriminator() {
discriminator_ = getDefaultInstance().getDiscriminator();
onChanged();
return this;
}
/**
*
* Adds support for polymorphism. The discriminator is the schema property
* name that is used to differentiate between other schema that inherit this
* schema. The property name used MUST be defined at this schema and it MUST
* be in the required property list. When used, the value MUST be the name of
* this schema or any schema that inherits it.
*
*
* string discriminator = 2;
* @param value The bytes for discriminator to set.
* @return This builder for chaining.
*/
public Builder setDiscriminatorBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
discriminator_ = value;
onChanged();
return this;
}
private boolean readOnly_ ;
/**
*
* Relevant only for Schema "properties" definitions. Declares the property as
* "read only". This means that it MAY be sent as part of a response but MUST
* NOT be sent as part of the request. Properties marked as readOnly being
* true SHOULD NOT be in the required list of the defined schema. Default
* value is false.
*
*
* bool read_only = 3;
* @return The readOnly.
*/
@java.lang.Override
public boolean getReadOnly() {
return readOnly_;
}
/**
*
* Relevant only for Schema "properties" definitions. Declares the property as
* "read only". This means that it MAY be sent as part of a response but MUST
* NOT be sent as part of the request. Properties marked as readOnly being
* true SHOULD NOT be in the required list of the defined schema. Default
* value is false.
*
*
* bool read_only = 3;
* @param value The readOnly to set.
* @return This builder for chaining.
*/
public Builder setReadOnly(boolean value) {
readOnly_ = value;
onChanged();
return this;
}
/**
*
* Relevant only for Schema "properties" definitions. Declares the property as
* "read only". This means that it MAY be sent as part of a response but MUST
* NOT be sent as part of the request. Properties marked as readOnly being
* true SHOULD NOT be in the required list of the defined schema. Default
* value is false.
*
*
* bool read_only = 3;
* @return This builder for chaining.
*/
public Builder clearReadOnly() {
readOnly_ = false;
onChanged();
return this;
}
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation externalDocs_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder> externalDocsBuilder_;
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
* @return Whether the externalDocs field is set.
*/
public boolean hasExternalDocs() {
return externalDocsBuilder_ != null || externalDocs_ != null;
}
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
* @return The externalDocs.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs() {
if (externalDocsBuilder_ == null) {
return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
} else {
return externalDocsBuilder_.getMessage();
}
}
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
*/
public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation value) {
if (externalDocsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
externalDocs_ = value;
onChanged();
} else {
externalDocsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
*/
public Builder setExternalDocs(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder builderForValue) {
if (externalDocsBuilder_ == null) {
externalDocs_ = builderForValue.build();
onChanged();
} else {
externalDocsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
*/
public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation value) {
if (externalDocsBuilder_ == null) {
if (externalDocs_ != null) {
externalDocs_ =
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.newBuilder(externalDocs_).mergeFrom(value).buildPartial();
} else {
externalDocs_ = value;
}
onChanged();
} else {
externalDocsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
*/
public Builder clearExternalDocs() {
if (externalDocsBuilder_ == null) {
externalDocs_ = null;
onChanged();
} else {
externalDocs_ = null;
externalDocsBuilder_ = null;
}
return this;
}
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder getExternalDocsBuilder() {
onChanged();
return getExternalDocsFieldBuilder().getBuilder();
}
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() {
if (externalDocsBuilder_ != null) {
return externalDocsBuilder_.getMessageOrBuilder();
} else {
return externalDocs_ == null ?
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
}
}
/**
*
* Additional external documentation for this schema.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder>
getExternalDocsFieldBuilder() {
if (externalDocsBuilder_ == null) {
externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder>(
getExternalDocs(),
getParentForChildren(),
isClean());
externalDocs_ = null;
}
return externalDocsBuilder_;
}
private java.lang.Object example_ = "";
/**
*
* A free-form property to include an example of an instance for this schema in JSON.
* This is copied verbatim to the output.
*
*
* string example = 6;
* @return The example.
*/
public java.lang.String getExample() {
java.lang.Object ref = example_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
example_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A free-form property to include an example of an instance for this schema in JSON.
* This is copied verbatim to the output.
*
*
* string example = 6;
* @return The bytes for example.
*/
public com.google.protobuf.ByteString
getExampleBytes() {
java.lang.Object ref = example_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
example_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A free-form property to include an example of an instance for this schema in JSON.
* This is copied verbatim to the output.
*
*
* string example = 6;
* @param value The example to set.
* @return This builder for chaining.
*/
public Builder setExample(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
example_ = value;
onChanged();
return this;
}
/**
*
* A free-form property to include an example of an instance for this schema in JSON.
* This is copied verbatim to the output.
*
*
* string example = 6;
* @return This builder for chaining.
*/
public Builder clearExample() {
example_ = getDefaultInstance().getExample();
onChanged();
return this;
}
/**
*
* A free-form property to include an example of an instance for this schema in JSON.
* This is copied verbatim to the output.
*
*
* string example = 6;
* @param value The bytes for example to set.
* @return This builder for chaining.
*/
public Builder setExampleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
example_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Schema)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Schema)
private static final grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema();
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Schema parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Schema(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface JSONSchemaOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)
com.google.protobuf.MessageOrBuilder {
/**
*
* 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 = 3;
* @return The ref.
*/
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 = 3;
* @return The bytes for ref.
*/
com.google.protobuf.ByteString
getRefBytes();
/**
*
* The title of the schema.
*
*
* string title = 5;
* @return The title.
*/
java.lang.String getTitle();
/**
*
* The title of the schema.
*
*
* string title = 5;
* @return The bytes for title.
*/
com.google.protobuf.ByteString
getTitleBytes();
/**
*
* A short description of the schema.
*
*
* string description = 6;
* @return The description.
*/
java.lang.String getDescription();
/**
*
* A short description of the schema.
*
*
* string description = 6;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* string default = 7;
* @return The default.
*/
java.lang.String getDefault();
/**
* string default = 7;
* @return The bytes for default.
*/
com.google.protobuf.ByteString
getDefaultBytes();
/**
* bool read_only = 8;
* @return The readOnly.
*/
boolean getReadOnly();
/**
* double multiple_of = 10;
* @return The multipleOf.
*/
double getMultipleOf();
/**
*
* Maximum represents an inclusive upper limit for a numeric instance. The
* value of MUST be a number,
*
*
* double maximum = 11;
* @return The maximum.
*/
double getMaximum();
/**
* bool exclusive_maximum = 12;
* @return The exclusiveMaximum.
*/
boolean getExclusiveMaximum();
/**
*
* minimum represents an inclusive lower limit for a numeric instance. The
* value of MUST be a number,
*
*
* double minimum = 13;
* @return The minimum.
*/
double getMinimum();
/**
* bool exclusive_minimum = 14;
* @return The exclusiveMinimum.
*/
boolean getExclusiveMinimum();
/**
* uint64 max_length = 15;
* @return The maxLength.
*/
long getMaxLength();
/**
* uint64 min_length = 16;
* @return The minLength.
*/
long getMinLength();
/**
* string pattern = 17;
* @return The pattern.
*/
java.lang.String getPattern();
/**
* string pattern = 17;
* @return The bytes for pattern.
*/
com.google.protobuf.ByteString
getPatternBytes();
/**
* uint64 max_items = 20;
* @return The maxItems.
*/
long getMaxItems();
/**
* uint64 min_items = 21;
* @return The minItems.
*/
long getMinItems();
/**
* bool unique_items = 22;
* @return The uniqueItems.
*/
boolean getUniqueItems();
/**
* uint64 max_properties = 24;
* @return The maxProperties.
*/
long getMaxProperties();
/**
* uint64 min_properties = 25;
* @return The minProperties.
*/
long getMinProperties();
/**
* repeated string required = 26;
* @return A list containing the required.
*/
java.util.List
getRequiredList();
/**
* repeated string required = 26;
* @return The count of required.
*/
int getRequiredCount();
/**
* repeated string required = 26;
* @param index The index of the element to return.
* @return The required at the given index.
*/
java.lang.String getRequired(int index);
/**
* repeated string required = 26;
* @param index The index of the value to return.
* @return The bytes of the required at the given index.
*/
com.google.protobuf.ByteString
getRequiredBytes(int index);
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @return A list containing the array.
*/
java.util.List
getArrayList();
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @return The count of array.
*/
int getArrayCount();
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @param index The index of the element to return.
* @return The array at the given index.
*/
java.lang.String getArray(int index);
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @param index The index of the value to return.
* @return The bytes of the array at the given index.
*/
com.google.protobuf.ByteString
getArrayBytes(int index);
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @return A list containing the type.
*/
java.util.List getTypeList();
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @return The count of type.
*/
int getTypeCount();
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param index The index of the element to return.
* @return The type at the given index.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes getType(int index);
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @return A list containing the enum numeric values on the wire for type.
*/
java.util.List
getTypeValueList();
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of type at the given index.
*/
int getTypeValue(int index);
}
/**
*
* `JSONSchema` represents properties from JSON Schema taken, and as used, in
* the OpenAPI v2 spec.
* This includes changes made by OpenAPI v2.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
* See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
* https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
* Example:
* message SimpleMessage {
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
* json_schema: {
* title: "SimpleMessage"
* description: "A simple message."
* required: ["id"]
* }
* };
* // Id represents the message identifier.
* string id = 1; [
* (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
* {description: "The unique identifier of the simple message."
* }];
* }
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema}
*/
public static final class JSONSchema extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)
JSONSchemaOrBuilder {
private static final long serialVersionUID = 0L;
// Use JSONSchema.newBuilder() to construct.
private JSONSchema(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private JSONSchema() {
ref_ = "";
title_ = "";
description_ = "";
default_ = "";
pattern_ = "";
required_ = com.google.protobuf.LazyStringArrayList.EMPTY;
array_ = com.google.protobuf.LazyStringArrayList.EMPTY;
type_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new JSONSchema();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private JSONSchema(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 26: {
java.lang.String s = input.readStringRequireUtf8();
ref_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
title_ = s;
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
default_ = s;
break;
}
case 64: {
readOnly_ = input.readBool();
break;
}
case 81: {
multipleOf_ = input.readDouble();
break;
}
case 89: {
maximum_ = input.readDouble();
break;
}
case 96: {
exclusiveMaximum_ = input.readBool();
break;
}
case 105: {
minimum_ = input.readDouble();
break;
}
case 112: {
exclusiveMinimum_ = input.readBool();
break;
}
case 120: {
maxLength_ = input.readUInt64();
break;
}
case 128: {
minLength_ = input.readUInt64();
break;
}
case 138: {
java.lang.String s = input.readStringRequireUtf8();
pattern_ = s;
break;
}
case 160: {
maxItems_ = input.readUInt64();
break;
}
case 168: {
minItems_ = input.readUInt64();
break;
}
case 176: {
uniqueItems_ = input.readBool();
break;
}
case 192: {
maxProperties_ = input.readUInt64();
break;
}
case 200: {
minProperties_ = input.readUInt64();
break;
}
case 210: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
required_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
required_.add(s);
break;
}
case 274: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
array_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
array_.add(s);
break;
}
case 280: {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
type_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
type_.add(rawValue);
break;
}
case 282: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int rawValue = input.readEnum();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
type_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
type_.add(rawValue);
}
input.popLimit(oldLimit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
required_ = required_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
array_ = array_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
type_ = java.util.Collections.unmodifiableList(type_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.Builder.class);
}
/**
* Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes}
*/
public enum JSONSchemaSimpleTypes
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
* ARRAY = 1;
*/
ARRAY(1),
/**
* BOOLEAN = 2;
*/
BOOLEAN(2),
/**
* INTEGER = 3;
*/
INTEGER(3),
/**
* NULL = 4;
*/
NULL(4),
/**
* NUMBER = 5;
*/
NUMBER(5),
/**
* OBJECT = 6;
*/
OBJECT(6),
/**
* STRING = 7;
*/
STRING(7),
UNRECOGNIZED(-1),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
* ARRAY = 1;
*/
public static final int ARRAY_VALUE = 1;
/**
* BOOLEAN = 2;
*/
public static final int BOOLEAN_VALUE = 2;
/**
* INTEGER = 3;
*/
public static final int INTEGER_VALUE = 3;
/**
* NULL = 4;
*/
public static final int NULL_VALUE = 4;
/**
* NUMBER = 5;
*/
public static final int NUMBER_VALUE = 5;
/**
* OBJECT = 6;
*/
public static final int OBJECT_VALUE = 6;
/**
* STRING = 7;
*/
public static final int STRING_VALUE = 7;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static JSONSchemaSimpleTypes valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static JSONSchemaSimpleTypes forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return ARRAY;
case 2: return BOOLEAN;
case 3: return INTEGER;
case 4: return NULL;
case 5: return NUMBER;
case 6: return OBJECT;
case 7: return STRING;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
JSONSchemaSimpleTypes> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public JSONSchemaSimpleTypes findValueByNumber(int number) {
return JSONSchemaSimpleTypes.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.getDescriptor().getEnumTypes().get(0);
}
private static final JSONSchemaSimpleTypes[] VALUES = values();
public static JSONSchemaSimpleTypes valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private JSONSchemaSimpleTypes(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes)
}
public static final int REF_FIELD_NUMBER = 3;
private volatile java.lang.Object ref_;
/**
*
* 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 = 3;
* @return The ref.
*/
@java.lang.Override
public java.lang.String getRef() {
java.lang.Object ref = ref_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ref_ = s;
return s;
}
}
/**
*
* 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 = 3;
* @return The bytes for ref.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRefBytes() {
java.lang.Object ref = ref_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ref_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TITLE_FIELD_NUMBER = 5;
private volatile java.lang.Object title_;
/**
*
* The title of the schema.
*
*
* string title = 5;
* @return The title.
*/
@java.lang.Override
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
}
}
/**
*
* The title of the schema.
*
*
* string title = 5;
* @return The bytes for title.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 6;
private volatile java.lang.Object description_;
/**
*
* A short description of the schema.
*
*
* string description = 6;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
* A short description of the schema.
*
*
* string description = 6;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEFAULT_FIELD_NUMBER = 7;
private volatile java.lang.Object default_;
/**
* string default = 7;
* @return The default.
*/
@java.lang.Override
public java.lang.String getDefault() {
java.lang.Object ref = default_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
default_ = s;
return s;
}
}
/**
* string default = 7;
* @return The bytes for default.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDefaultBytes() {
java.lang.Object ref = default_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
default_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int READ_ONLY_FIELD_NUMBER = 8;
private boolean readOnly_;
/**
* bool read_only = 8;
* @return The readOnly.
*/
@java.lang.Override
public boolean getReadOnly() {
return readOnly_;
}
public static final int MULTIPLE_OF_FIELD_NUMBER = 10;
private double multipleOf_;
/**
* double multiple_of = 10;
* @return The multipleOf.
*/
@java.lang.Override
public double getMultipleOf() {
return multipleOf_;
}
public static final int MAXIMUM_FIELD_NUMBER = 11;
private double maximum_;
/**
*
* Maximum represents an inclusive upper limit for a numeric instance. The
* value of MUST be a number,
*
*
* double maximum = 11;
* @return The maximum.
*/
@java.lang.Override
public double getMaximum() {
return maximum_;
}
public static final int EXCLUSIVE_MAXIMUM_FIELD_NUMBER = 12;
private boolean exclusiveMaximum_;
/**
* bool exclusive_maximum = 12;
* @return The exclusiveMaximum.
*/
@java.lang.Override
public boolean getExclusiveMaximum() {
return exclusiveMaximum_;
}
public static final int MINIMUM_FIELD_NUMBER = 13;
private double minimum_;
/**
*
* minimum represents an inclusive lower limit for a numeric instance. The
* value of MUST be a number,
*
*
* double minimum = 13;
* @return The minimum.
*/
@java.lang.Override
public double getMinimum() {
return minimum_;
}
public static final int EXCLUSIVE_MINIMUM_FIELD_NUMBER = 14;
private boolean exclusiveMinimum_;
/**
* bool exclusive_minimum = 14;
* @return The exclusiveMinimum.
*/
@java.lang.Override
public boolean getExclusiveMinimum() {
return exclusiveMinimum_;
}
public static final int MAX_LENGTH_FIELD_NUMBER = 15;
private long maxLength_;
/**
* uint64 max_length = 15;
* @return The maxLength.
*/
@java.lang.Override
public long getMaxLength() {
return maxLength_;
}
public static final int MIN_LENGTH_FIELD_NUMBER = 16;
private long minLength_;
/**
* uint64 min_length = 16;
* @return The minLength.
*/
@java.lang.Override
public long getMinLength() {
return minLength_;
}
public static final int PATTERN_FIELD_NUMBER = 17;
private volatile java.lang.Object pattern_;
/**
* string pattern = 17;
* @return The pattern.
*/
@java.lang.Override
public java.lang.String getPattern() {
java.lang.Object ref = pattern_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
pattern_ = s;
return s;
}
}
/**
* string pattern = 17;
* @return The bytes for pattern.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPatternBytes() {
java.lang.Object ref = pattern_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
pattern_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MAX_ITEMS_FIELD_NUMBER = 20;
private long maxItems_;
/**
* uint64 max_items = 20;
* @return The maxItems.
*/
@java.lang.Override
public long getMaxItems() {
return maxItems_;
}
public static final int MIN_ITEMS_FIELD_NUMBER = 21;
private long minItems_;
/**
* uint64 min_items = 21;
* @return The minItems.
*/
@java.lang.Override
public long getMinItems() {
return minItems_;
}
public static final int UNIQUE_ITEMS_FIELD_NUMBER = 22;
private boolean uniqueItems_;
/**
* bool unique_items = 22;
* @return The uniqueItems.
*/
@java.lang.Override
public boolean getUniqueItems() {
return uniqueItems_;
}
public static final int MAX_PROPERTIES_FIELD_NUMBER = 24;
private long maxProperties_;
/**
* uint64 max_properties = 24;
* @return The maxProperties.
*/
@java.lang.Override
public long getMaxProperties() {
return maxProperties_;
}
public static final int MIN_PROPERTIES_FIELD_NUMBER = 25;
private long minProperties_;
/**
* uint64 min_properties = 25;
* @return The minProperties.
*/
@java.lang.Override
public long getMinProperties() {
return minProperties_;
}
public static final int REQUIRED_FIELD_NUMBER = 26;
private com.google.protobuf.LazyStringList required_;
/**
* repeated string required = 26;
* @return A list containing the required.
*/
public com.google.protobuf.ProtocolStringList
getRequiredList() {
return required_;
}
/**
* repeated string required = 26;
* @return The count of required.
*/
public int getRequiredCount() {
return required_.size();
}
/**
* repeated string required = 26;
* @param index The index of the element to return.
* @return The required at the given index.
*/
public java.lang.String getRequired(int index) {
return required_.get(index);
}
/**
* repeated string required = 26;
* @param index The index of the value to return.
* @return The bytes of the required at the given index.
*/
public com.google.protobuf.ByteString
getRequiredBytes(int index) {
return required_.getByteString(index);
}
public static final int ARRAY_FIELD_NUMBER = 34;
private com.google.protobuf.LazyStringList array_;
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @return A list containing the array.
*/
public com.google.protobuf.ProtocolStringList
getArrayList() {
return array_;
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @return The count of array.
*/
public int getArrayCount() {
return array_.size();
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @param index The index of the element to return.
* @return The array at the given index.
*/
public java.lang.String getArray(int index) {
return array_.get(index);
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @param index The index of the value to return.
* @return The bytes of the array at the given index.
*/
public com.google.protobuf.ByteString
getArrayBytes(int index) {
return array_.getByteString(index);
}
public static final int TYPE_FIELD_NUMBER = 35;
private java.util.List type_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes> type_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes>() {
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes convert(java.lang.Integer from) {
@SuppressWarnings("deprecation")
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes result = grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes.valueOf(from);
return result == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes.UNRECOGNIZED : result;
}
};
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @return A list containing the type.
*/
@java.lang.Override
public java.util.List getTypeList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes>(type_, type_converter_);
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @return The count of type.
*/
@java.lang.Override
public int getTypeCount() {
return type_.size();
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param index The index of the element to return.
* @return The type at the given index.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes getType(int index) {
return type_converter_.convert(type_.get(index));
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @return A list containing the enum numeric values on the wire for type.
*/
@java.lang.Override
public java.util.List
getTypeValueList() {
return type_;
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of type at the given index.
*/
@java.lang.Override
public int getTypeValue(int index) {
return type_.get(index);
}
private int typeMemoizedSerializedSize;
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
if (!getRefBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ref_);
}
if (!getTitleBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, title_);
}
if (!getDescriptionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_);
}
if (!getDefaultBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, default_);
}
if (readOnly_ != false) {
output.writeBool(8, readOnly_);
}
if (multipleOf_ != 0D) {
output.writeDouble(10, multipleOf_);
}
if (maximum_ != 0D) {
output.writeDouble(11, maximum_);
}
if (exclusiveMaximum_ != false) {
output.writeBool(12, exclusiveMaximum_);
}
if (minimum_ != 0D) {
output.writeDouble(13, minimum_);
}
if (exclusiveMinimum_ != false) {
output.writeBool(14, exclusiveMinimum_);
}
if (maxLength_ != 0L) {
output.writeUInt64(15, maxLength_);
}
if (minLength_ != 0L) {
output.writeUInt64(16, minLength_);
}
if (!getPatternBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 17, pattern_);
}
if (maxItems_ != 0L) {
output.writeUInt64(20, maxItems_);
}
if (minItems_ != 0L) {
output.writeUInt64(21, minItems_);
}
if (uniqueItems_ != false) {
output.writeBool(22, uniqueItems_);
}
if (maxProperties_ != 0L) {
output.writeUInt64(24, maxProperties_);
}
if (minProperties_ != 0L) {
output.writeUInt64(25, minProperties_);
}
for (int i = 0; i < required_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 26, required_.getRaw(i));
}
for (int i = 0; i < array_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 34, array_.getRaw(i));
}
if (getTypeList().size() > 0) {
output.writeUInt32NoTag(282);
output.writeUInt32NoTag(typeMemoizedSerializedSize);
}
for (int i = 0; i < type_.size(); i++) {
output.writeEnumNoTag(type_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getRefBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ref_);
}
if (!getTitleBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, title_);
}
if (!getDescriptionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_);
}
if (!getDefaultBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, default_);
}
if (readOnly_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(8, readOnly_);
}
if (multipleOf_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(10, multipleOf_);
}
if (maximum_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(11, maximum_);
}
if (exclusiveMaximum_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(12, exclusiveMaximum_);
}
if (minimum_ != 0D) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(13, minimum_);
}
if (exclusiveMinimum_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(14, exclusiveMinimum_);
}
if (maxLength_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(15, maxLength_);
}
if (minLength_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(16, minLength_);
}
if (!getPatternBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, pattern_);
}
if (maxItems_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(20, maxItems_);
}
if (minItems_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(21, minItems_);
}
if (uniqueItems_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(22, uniqueItems_);
}
if (maxProperties_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(24, maxProperties_);
}
if (minProperties_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(25, minProperties_);
}
{
int dataSize = 0;
for (int i = 0; i < required_.size(); i++) {
dataSize += computeStringSizeNoTag(required_.getRaw(i));
}
size += dataSize;
size += 2 * getRequiredList().size();
}
{
int dataSize = 0;
for (int i = 0; i < array_.size(); i++) {
dataSize += computeStringSizeNoTag(array_.getRaw(i));
}
size += dataSize;
size += 2 * getArrayList().size();
}
{
int dataSize = 0;
for (int i = 0; i < type_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(type_.get(i));
}
size += dataSize;
if (!getTypeList().isEmpty()) { size += 2;
size += com.google.protobuf.CodedOutputStream
.computeUInt32SizeNoTag(dataSize);
}typeMemoizedSerializedSize = dataSize;
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema)) {
return super.equals(obj);
}
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema other = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema) obj;
if (!getRef()
.equals(other.getRef())) return false;
if (!getTitle()
.equals(other.getTitle())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!getDefault()
.equals(other.getDefault())) return false;
if (getReadOnly()
!= other.getReadOnly()) return false;
if (java.lang.Double.doubleToLongBits(getMultipleOf())
!= java.lang.Double.doubleToLongBits(
other.getMultipleOf())) return false;
if (java.lang.Double.doubleToLongBits(getMaximum())
!= java.lang.Double.doubleToLongBits(
other.getMaximum())) return false;
if (getExclusiveMaximum()
!= other.getExclusiveMaximum()) return false;
if (java.lang.Double.doubleToLongBits(getMinimum())
!= java.lang.Double.doubleToLongBits(
other.getMinimum())) return false;
if (getExclusiveMinimum()
!= other.getExclusiveMinimum()) return false;
if (getMaxLength()
!= other.getMaxLength()) return false;
if (getMinLength()
!= other.getMinLength()) return false;
if (!getPattern()
.equals(other.getPattern())) return false;
if (getMaxItems()
!= other.getMaxItems()) return false;
if (getMinItems()
!= other.getMinItems()) return false;
if (getUniqueItems()
!= other.getUniqueItems()) return false;
if (getMaxProperties()
!= other.getMaxProperties()) return false;
if (getMinProperties()
!= other.getMinProperties()) return false;
if (!getRequiredList()
.equals(other.getRequiredList())) return false;
if (!getArrayList()
.equals(other.getArrayList())) return false;
if (!type_.equals(other.type_)) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + REF_FIELD_NUMBER;
hash = (53 * hash) + getRef().hashCode();
hash = (37 * hash) + TITLE_FIELD_NUMBER;
hash = (53 * hash) + getTitle().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
hash = (37 * hash) + DEFAULT_FIELD_NUMBER;
hash = (53 * hash) + getDefault().hashCode();
hash = (37 * hash) + READ_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getReadOnly());
hash = (37 * hash) + MULTIPLE_OF_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMultipleOf()));
hash = (37 * hash) + MAXIMUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMaximum()));
hash = (37 * hash) + EXCLUSIVE_MAXIMUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getExclusiveMaximum());
hash = (37 * hash) + MINIMUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getMinimum()));
hash = (37 * hash) + EXCLUSIVE_MINIMUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getExclusiveMinimum());
hash = (37 * hash) + MAX_LENGTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxLength());
hash = (37 * hash) + MIN_LENGTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMinLength());
hash = (37 * hash) + PATTERN_FIELD_NUMBER;
hash = (53 * hash) + getPattern().hashCode();
hash = (37 * hash) + MAX_ITEMS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxItems());
hash = (37 * hash) + MIN_ITEMS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMinItems());
hash = (37 * hash) + UNIQUE_ITEMS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getUniqueItems());
hash = (37 * hash) + MAX_PROPERTIES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxProperties());
hash = (37 * hash) + MIN_PROPERTIES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMinProperties());
if (getRequiredCount() > 0) {
hash = (37 * hash) + REQUIRED_FIELD_NUMBER;
hash = (53 * hash) + getRequiredList().hashCode();
}
if (getArrayCount() > 0) {
hash = (37 * hash) + ARRAY_FIELD_NUMBER;
hash = (53 * hash) + getArrayList().hashCode();
}
if (getTypeCount() > 0) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_.hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `JSONSchema` represents properties from JSON Schema taken, and as used, in
* the OpenAPI v2 spec.
* This includes changes made by OpenAPI v2.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#schemaObject
* See also: https://cswr.github.io/JsonSchema/spec/basic_types/,
* https://github.com/json-schema-org/json-schema-spec/blob/master/schema.json
* Example:
* message SimpleMessage {
* option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_schema) = {
* json_schema: {
* title: "SimpleMessage"
* description: "A simple message."
* required: ["id"]
* }
* };
* // Id represents the message identifier.
* string id = 1; [
* (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
* {description: "The unique identifier of the simple message."
* }];
* }
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.JSONSchema}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchemaOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
ref_ = "";
title_ = "";
description_ = "";
default_ = "";
readOnly_ = false;
multipleOf_ = 0D;
maximum_ = 0D;
exclusiveMaximum_ = false;
minimum_ = 0D;
exclusiveMinimum_ = false;
maxLength_ = 0L;
minLength_ = 0L;
pattern_ = "";
maxItems_ = 0L;
minItems_ = 0L;
uniqueItems_ = false;
maxProperties_ = 0L;
minProperties_ = 0L;
required_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
array_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
type_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_JSONSchema_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema(this);
int from_bitField0_ = bitField0_;
result.ref_ = ref_;
result.title_ = title_;
result.description_ = description_;
result.default_ = default_;
result.readOnly_ = readOnly_;
result.multipleOf_ = multipleOf_;
result.maximum_ = maximum_;
result.exclusiveMaximum_ = exclusiveMaximum_;
result.minimum_ = minimum_;
result.exclusiveMinimum_ = exclusiveMinimum_;
result.maxLength_ = maxLength_;
result.minLength_ = minLength_;
result.pattern_ = pattern_;
result.maxItems_ = maxItems_;
result.minItems_ = minItems_;
result.uniqueItems_ = uniqueItems_;
result.maxProperties_ = maxProperties_;
result.minProperties_ = minProperties_;
if (((bitField0_ & 0x00000001) != 0)) {
required_ = required_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.required_ = required_;
if (((bitField0_ & 0x00000002) != 0)) {
array_ = array_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.array_ = array_;
if (((bitField0_ & 0x00000004) != 0)) {
type_ = java.util.Collections.unmodifiableList(type_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.type_ = type_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.getDefaultInstance()) return this;
if (!other.getRef().isEmpty()) {
ref_ = other.ref_;
onChanged();
}
if (!other.getTitle().isEmpty()) {
title_ = other.title_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (!other.getDefault().isEmpty()) {
default_ = other.default_;
onChanged();
}
if (other.getReadOnly() != false) {
setReadOnly(other.getReadOnly());
}
if (other.getMultipleOf() != 0D) {
setMultipleOf(other.getMultipleOf());
}
if (other.getMaximum() != 0D) {
setMaximum(other.getMaximum());
}
if (other.getExclusiveMaximum() != false) {
setExclusiveMaximum(other.getExclusiveMaximum());
}
if (other.getMinimum() != 0D) {
setMinimum(other.getMinimum());
}
if (other.getExclusiveMinimum() != false) {
setExclusiveMinimum(other.getExclusiveMinimum());
}
if (other.getMaxLength() != 0L) {
setMaxLength(other.getMaxLength());
}
if (other.getMinLength() != 0L) {
setMinLength(other.getMinLength());
}
if (!other.getPattern().isEmpty()) {
pattern_ = other.pattern_;
onChanged();
}
if (other.getMaxItems() != 0L) {
setMaxItems(other.getMaxItems());
}
if (other.getMinItems() != 0L) {
setMinItems(other.getMinItems());
}
if (other.getUniqueItems() != false) {
setUniqueItems(other.getUniqueItems());
}
if (other.getMaxProperties() != 0L) {
setMaxProperties(other.getMaxProperties());
}
if (other.getMinProperties() != 0L) {
setMinProperties(other.getMinProperties());
}
if (!other.required_.isEmpty()) {
if (required_.isEmpty()) {
required_ = other.required_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureRequiredIsMutable();
required_.addAll(other.required_);
}
onChanged();
}
if (!other.array_.isEmpty()) {
if (array_.isEmpty()) {
array_ = other.array_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureArrayIsMutable();
array_.addAll(other.array_);
}
onChanged();
}
if (!other.type_.isEmpty()) {
if (type_.isEmpty()) {
type_ = other.type_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureTypeIsMutable();
type_.addAll(other.type_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object ref_ = "";
/**
*
* 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 = 3;
* @return The ref.
*/
public java.lang.String getRef() {
java.lang.Object ref = ref_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ref_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* 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 = 3;
* @return The bytes for ref.
*/
public com.google.protobuf.ByteString
getRefBytes() {
java.lang.Object ref = ref_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ref_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* 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 = 3;
* @param value The ref to set.
* @return This builder for chaining.
*/
public Builder setRef(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ref_ = value;
onChanged();
return this;
}
/**
*
* 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 = 3;
* @return This builder for chaining.
*/
public Builder clearRef() {
ref_ = getDefaultInstance().getRef();
onChanged();
return this;
}
/**
*
* 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 = 3;
* @param value The bytes for ref to set.
* @return This builder for chaining.
*/
public Builder setRefBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ref_ = value;
onChanged();
return this;
}
private java.lang.Object title_ = "";
/**
*
* The title of the schema.
*
*
* string title = 5;
* @return The title.
*/
public java.lang.String getTitle() {
java.lang.Object ref = title_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
title_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The title of the schema.
*
*
* string title = 5;
* @return The bytes for title.
*/
public com.google.protobuf.ByteString
getTitleBytes() {
java.lang.Object ref = title_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
title_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The title of the schema.
*
*
* string title = 5;
* @param value The title to set.
* @return This builder for chaining.
*/
public Builder setTitle(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
title_ = value;
onChanged();
return this;
}
/**
*
* The title of the schema.
*
*
* string title = 5;
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
onChanged();
return this;
}
/**
*
* The title of the schema.
*
*
* string title = 5;
* @param value The bytes for title to set.
* @return This builder for chaining.
*/
public Builder setTitleBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
title_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* A short description of the schema.
*
*
* string description = 6;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A short description of the schema.
*
*
* string description = 6;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A short description of the schema.
*
*
* string description = 6;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* A short description of the schema.
*
*
* string description = 6;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* A short description of the schema.
*
*
* string description = 6;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private java.lang.Object default_ = "";
/**
* string default = 7;
* @return The default.
*/
public java.lang.String getDefault() {
java.lang.Object ref = default_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
default_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string default = 7;
* @return The bytes for default.
*/
public com.google.protobuf.ByteString
getDefaultBytes() {
java.lang.Object ref = default_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
default_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string default = 7;
* @param value The default to set.
* @return This builder for chaining.
*/
public Builder setDefault(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
default_ = value;
onChanged();
return this;
}
/**
* string default = 7;
* @return This builder for chaining.
*/
public Builder clearDefault() {
default_ = getDefaultInstance().getDefault();
onChanged();
return this;
}
/**
* string default = 7;
* @param value The bytes for default to set.
* @return This builder for chaining.
*/
public Builder setDefaultBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
default_ = value;
onChanged();
return this;
}
private boolean readOnly_ ;
/**
* bool read_only = 8;
* @return The readOnly.
*/
@java.lang.Override
public boolean getReadOnly() {
return readOnly_;
}
/**
* bool read_only = 8;
* @param value The readOnly to set.
* @return This builder for chaining.
*/
public Builder setReadOnly(boolean value) {
readOnly_ = value;
onChanged();
return this;
}
/**
* bool read_only = 8;
* @return This builder for chaining.
*/
public Builder clearReadOnly() {
readOnly_ = false;
onChanged();
return this;
}
private double multipleOf_ ;
/**
* double multiple_of = 10;
* @return The multipleOf.
*/
@java.lang.Override
public double getMultipleOf() {
return multipleOf_;
}
/**
* double multiple_of = 10;
* @param value The multipleOf to set.
* @return This builder for chaining.
*/
public Builder setMultipleOf(double value) {
multipleOf_ = value;
onChanged();
return this;
}
/**
* double multiple_of = 10;
* @return This builder for chaining.
*/
public Builder clearMultipleOf() {
multipleOf_ = 0D;
onChanged();
return this;
}
private double maximum_ ;
/**
*
* Maximum represents an inclusive upper limit for a numeric instance. The
* value of MUST be a number,
*
*
* double maximum = 11;
* @return The maximum.
*/
@java.lang.Override
public double getMaximum() {
return maximum_;
}
/**
*
* Maximum represents an inclusive upper limit for a numeric instance. The
* value of MUST be a number,
*
*
* double maximum = 11;
* @param value The maximum to set.
* @return This builder for chaining.
*/
public Builder setMaximum(double value) {
maximum_ = value;
onChanged();
return this;
}
/**
*
* Maximum represents an inclusive upper limit for a numeric instance. The
* value of MUST be a number,
*
*
* double maximum = 11;
* @return This builder for chaining.
*/
public Builder clearMaximum() {
maximum_ = 0D;
onChanged();
return this;
}
private boolean exclusiveMaximum_ ;
/**
* bool exclusive_maximum = 12;
* @return The exclusiveMaximum.
*/
@java.lang.Override
public boolean getExclusiveMaximum() {
return exclusiveMaximum_;
}
/**
* bool exclusive_maximum = 12;
* @param value The exclusiveMaximum to set.
* @return This builder for chaining.
*/
public Builder setExclusiveMaximum(boolean value) {
exclusiveMaximum_ = value;
onChanged();
return this;
}
/**
* bool exclusive_maximum = 12;
* @return This builder for chaining.
*/
public Builder clearExclusiveMaximum() {
exclusiveMaximum_ = false;
onChanged();
return this;
}
private double minimum_ ;
/**
*
* minimum represents an inclusive lower limit for a numeric instance. The
* value of MUST be a number,
*
*
* double minimum = 13;
* @return The minimum.
*/
@java.lang.Override
public double getMinimum() {
return minimum_;
}
/**
*
* minimum represents an inclusive lower limit for a numeric instance. The
* value of MUST be a number,
*
*
* double minimum = 13;
* @param value The minimum to set.
* @return This builder for chaining.
*/
public Builder setMinimum(double value) {
minimum_ = value;
onChanged();
return this;
}
/**
*
* minimum represents an inclusive lower limit for a numeric instance. The
* value of MUST be a number,
*
*
* double minimum = 13;
* @return This builder for chaining.
*/
public Builder clearMinimum() {
minimum_ = 0D;
onChanged();
return this;
}
private boolean exclusiveMinimum_ ;
/**
* bool exclusive_minimum = 14;
* @return The exclusiveMinimum.
*/
@java.lang.Override
public boolean getExclusiveMinimum() {
return exclusiveMinimum_;
}
/**
* bool exclusive_minimum = 14;
* @param value The exclusiveMinimum to set.
* @return This builder for chaining.
*/
public Builder setExclusiveMinimum(boolean value) {
exclusiveMinimum_ = value;
onChanged();
return this;
}
/**
* bool exclusive_minimum = 14;
* @return This builder for chaining.
*/
public Builder clearExclusiveMinimum() {
exclusiveMinimum_ = false;
onChanged();
return this;
}
private long maxLength_ ;
/**
* uint64 max_length = 15;
* @return The maxLength.
*/
@java.lang.Override
public long getMaxLength() {
return maxLength_;
}
/**
* uint64 max_length = 15;
* @param value The maxLength to set.
* @return This builder for chaining.
*/
public Builder setMaxLength(long value) {
maxLength_ = value;
onChanged();
return this;
}
/**
* uint64 max_length = 15;
* @return This builder for chaining.
*/
public Builder clearMaxLength() {
maxLength_ = 0L;
onChanged();
return this;
}
private long minLength_ ;
/**
* uint64 min_length = 16;
* @return The minLength.
*/
@java.lang.Override
public long getMinLength() {
return minLength_;
}
/**
* uint64 min_length = 16;
* @param value The minLength to set.
* @return This builder for chaining.
*/
public Builder setMinLength(long value) {
minLength_ = value;
onChanged();
return this;
}
/**
* uint64 min_length = 16;
* @return This builder for chaining.
*/
public Builder clearMinLength() {
minLength_ = 0L;
onChanged();
return this;
}
private java.lang.Object pattern_ = "";
/**
* string pattern = 17;
* @return The pattern.
*/
public java.lang.String getPattern() {
java.lang.Object ref = pattern_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
pattern_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string pattern = 17;
* @return The bytes for pattern.
*/
public com.google.protobuf.ByteString
getPatternBytes() {
java.lang.Object ref = pattern_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
pattern_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string pattern = 17;
* @param value The pattern to set.
* @return This builder for chaining.
*/
public Builder setPattern(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
pattern_ = value;
onChanged();
return this;
}
/**
* string pattern = 17;
* @return This builder for chaining.
*/
public Builder clearPattern() {
pattern_ = getDefaultInstance().getPattern();
onChanged();
return this;
}
/**
* string pattern = 17;
* @param value The bytes for pattern to set.
* @return This builder for chaining.
*/
public Builder setPatternBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
pattern_ = value;
onChanged();
return this;
}
private long maxItems_ ;
/**
* uint64 max_items = 20;
* @return The maxItems.
*/
@java.lang.Override
public long getMaxItems() {
return maxItems_;
}
/**
* uint64 max_items = 20;
* @param value The maxItems to set.
* @return This builder for chaining.
*/
public Builder setMaxItems(long value) {
maxItems_ = value;
onChanged();
return this;
}
/**
* uint64 max_items = 20;
* @return This builder for chaining.
*/
public Builder clearMaxItems() {
maxItems_ = 0L;
onChanged();
return this;
}
private long minItems_ ;
/**
* uint64 min_items = 21;
* @return The minItems.
*/
@java.lang.Override
public long getMinItems() {
return minItems_;
}
/**
* uint64 min_items = 21;
* @param value The minItems to set.
* @return This builder for chaining.
*/
public Builder setMinItems(long value) {
minItems_ = value;
onChanged();
return this;
}
/**
* uint64 min_items = 21;
* @return This builder for chaining.
*/
public Builder clearMinItems() {
minItems_ = 0L;
onChanged();
return this;
}
private boolean uniqueItems_ ;
/**
* bool unique_items = 22;
* @return The uniqueItems.
*/
@java.lang.Override
public boolean getUniqueItems() {
return uniqueItems_;
}
/**
* bool unique_items = 22;
* @param value The uniqueItems to set.
* @return This builder for chaining.
*/
public Builder setUniqueItems(boolean value) {
uniqueItems_ = value;
onChanged();
return this;
}
/**
* bool unique_items = 22;
* @return This builder for chaining.
*/
public Builder clearUniqueItems() {
uniqueItems_ = false;
onChanged();
return this;
}
private long maxProperties_ ;
/**
* uint64 max_properties = 24;
* @return The maxProperties.
*/
@java.lang.Override
public long getMaxProperties() {
return maxProperties_;
}
/**
* uint64 max_properties = 24;
* @param value The maxProperties to set.
* @return This builder for chaining.
*/
public Builder setMaxProperties(long value) {
maxProperties_ = value;
onChanged();
return this;
}
/**
* uint64 max_properties = 24;
* @return This builder for chaining.
*/
public Builder clearMaxProperties() {
maxProperties_ = 0L;
onChanged();
return this;
}
private long minProperties_ ;
/**
* uint64 min_properties = 25;
* @return The minProperties.
*/
@java.lang.Override
public long getMinProperties() {
return minProperties_;
}
/**
* uint64 min_properties = 25;
* @param value The minProperties to set.
* @return This builder for chaining.
*/
public Builder setMinProperties(long value) {
minProperties_ = value;
onChanged();
return this;
}
/**
* uint64 min_properties = 25;
* @return This builder for chaining.
*/
public Builder clearMinProperties() {
minProperties_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList required_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureRequiredIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
required_ = new com.google.protobuf.LazyStringArrayList(required_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated string required = 26;
* @return A list containing the required.
*/
public com.google.protobuf.ProtocolStringList
getRequiredList() {
return required_.getUnmodifiableView();
}
/**
* repeated string required = 26;
* @return The count of required.
*/
public int getRequiredCount() {
return required_.size();
}
/**
* repeated string required = 26;
* @param index The index of the element to return.
* @return The required at the given index.
*/
public java.lang.String getRequired(int index) {
return required_.get(index);
}
/**
* repeated string required = 26;
* @param index The index of the value to return.
* @return The bytes of the required at the given index.
*/
public com.google.protobuf.ByteString
getRequiredBytes(int index) {
return required_.getByteString(index);
}
/**
* repeated string required = 26;
* @param index The index to set the value at.
* @param value The required to set.
* @return This builder for chaining.
*/
public Builder setRequired(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRequiredIsMutable();
required_.set(index, value);
onChanged();
return this;
}
/**
* repeated string required = 26;
* @param value The required to add.
* @return This builder for chaining.
*/
public Builder addRequired(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRequiredIsMutable();
required_.add(value);
onChanged();
return this;
}
/**
* repeated string required = 26;
* @param values The required to add.
* @return This builder for chaining.
*/
public Builder addAllRequired(
java.lang.Iterable values) {
ensureRequiredIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, required_);
onChanged();
return this;
}
/**
* repeated string required = 26;
* @return This builder for chaining.
*/
public Builder clearRequired() {
required_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* repeated string required = 26;
* @param value The bytes of the required to add.
* @return This builder for chaining.
*/
public Builder addRequiredBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureRequiredIsMutable();
required_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList array_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureArrayIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
array_ = new com.google.protobuf.LazyStringArrayList(array_);
bitField0_ |= 0x00000002;
}
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @return A list containing the array.
*/
public com.google.protobuf.ProtocolStringList
getArrayList() {
return array_.getUnmodifiableView();
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @return The count of array.
*/
public int getArrayCount() {
return array_.size();
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @param index The index of the element to return.
* @return The array at the given index.
*/
public java.lang.String getArray(int index) {
return array_.get(index);
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @param index The index of the value to return.
* @return The bytes of the array at the given index.
*/
public com.google.protobuf.ByteString
getArrayBytes(int index) {
return array_.getByteString(index);
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @param index The index to set the value at.
* @param value The array to set.
* @return This builder for chaining.
*/
public Builder setArray(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureArrayIsMutable();
array_.set(index, value);
onChanged();
return this;
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @param value The array to add.
* @return This builder for chaining.
*/
public Builder addArray(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureArrayIsMutable();
array_.add(value);
onChanged();
return this;
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @param values The array to add.
* @return This builder for chaining.
*/
public Builder addAllArray(
java.lang.Iterable values) {
ensureArrayIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, array_);
onChanged();
return this;
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @return This builder for chaining.
*/
public Builder clearArray() {
array_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Items in 'array' must be unique.
*
*
* repeated string array = 34;
* @param value The bytes of the array to add.
* @return This builder for chaining.
*/
public Builder addArrayBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureArrayIsMutable();
array_.add(value);
onChanged();
return this;
}
private java.util.List type_ =
java.util.Collections.emptyList();
private void ensureTypeIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
type_ = new java.util.ArrayList(type_);
bitField0_ |= 0x00000004;
}
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @return A list containing the type.
*/
public java.util.List getTypeList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes>(type_, type_converter_);
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @return The count of type.
*/
public int getTypeCount() {
return type_.size();
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param index The index of the element to return.
* @return The type at the given index.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes getType(int index) {
return type_converter_.convert(type_.get(index));
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param index The index to set the value at.
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(
int index, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes value) {
if (value == null) {
throw new NullPointerException();
}
ensureTypeIsMutable();
type_.set(index, value.getNumber());
onChanged();
return this;
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param value The type to add.
* @return This builder for chaining.
*/
public Builder addType(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes value) {
if (value == null) {
throw new NullPointerException();
}
ensureTypeIsMutable();
type_.add(value.getNumber());
onChanged();
return this;
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param values The type to add.
* @return This builder for chaining.
*/
public Builder addAllType(
java.lang.Iterable extends grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes> values) {
ensureTypeIsMutable();
for (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema.JSONSchemaSimpleTypes value : values) {
type_.add(value.getNumber());
}
onChanged();
return this;
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @return A list containing the enum numeric values on the wire for type.
*/
public java.util.List
getTypeValueList() {
return java.util.Collections.unmodifiableList(type_);
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of type at the given index.
*/
public int getTypeValue(int index) {
return type_.get(index);
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param index The index of the value to return.
* @return The enum numeric value on the wire of type at the given index.
* @return This builder for chaining.
*/
public Builder setTypeValue(
int index, int value) {
ensureTypeIsMutable();
type_.set(index, value);
onChanged();
return this;
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param value The enum numeric value on the wire for type to add.
* @return This builder for chaining.
*/
public Builder addTypeValue(int value) {
ensureTypeIsMutable();
type_.add(value);
onChanged();
return this;
}
/**
* repeated .grpc.gateway.protoc_gen_openapiv2.options.JSONSchema.JSONSchemaSimpleTypes type = 35;
* @param values The enum numeric values on the wire for type to add.
* @return This builder for chaining.
*/
public Builder addAllTypeValue(
java.lang.Iterable values) {
ensureTypeIsMutable();
for (int value : values) {
type_.add(value);
}
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.JSONSchema)
private static final grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema();
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public JSONSchema parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new JSONSchema(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.JSONSchema getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TagOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Tag)
com.google.protobuf.MessageOrBuilder {
/**
*
* A short description for the tag. GFM syntax can be used for rich text
* representation.
*
*
* string description = 2;
* @return The description.
*/
java.lang.String getDescription();
/**
*
* A short description for the tag. GFM syntax can be used for rich text
* representation.
*
*
* string description = 2;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
* @return Whether the externalDocs field is set.
*/
boolean hasExternalDocs();
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
* @return The externalDocs.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs();
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder();
}
/**
*
* `Tag` is a representation of OpenAPI v2 specification's Tag object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Tag}
*/
public static final class Tag extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Tag)
TagOrBuilder {
private static final long serialVersionUID = 0L;
// Use Tag.newBuilder() to construct.
private Tag(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Tag() {
description_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Tag();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Tag(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 18: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 26: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder subBuilder = null;
if (externalDocs_ != null) {
subBuilder = externalDocs_.toBuilder();
}
externalDocs_ = input.readMessage(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(externalDocs_);
externalDocs_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag.Builder.class);
}
public static final int DESCRIPTION_FIELD_NUMBER = 2;
private volatile java.lang.Object description_;
/**
*
* A short description for the tag. GFM syntax can be used for rich text
* representation.
*
*
* string description = 2;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
* A short description for the tag. GFM syntax can be used for rich text
* representation.
*
*
* string description = 2;
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXTERNAL_DOCS_FIELD_NUMBER = 3;
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation externalDocs_;
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
* @return Whether the externalDocs field is set.
*/
@java.lang.Override
public boolean hasExternalDocs() {
return externalDocs_ != null;
}
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
* @return The externalDocs.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs() {
return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
}
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() {
return getExternalDocs();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getDescriptionBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
if (externalDocs_ != null) {
output.writeMessage(3, getExternalDocs());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getDescriptionBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
if (externalDocs_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getExternalDocs());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag)) {
return super.equals(obj);
}
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag other = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag) obj;
if (!getDescription()
.equals(other.getDescription())) return false;
if (hasExternalDocs() != other.hasExternalDocs()) return false;
if (hasExternalDocs()) {
if (!getExternalDocs()
.equals(other.getExternalDocs())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (hasExternalDocs()) {
hash = (37 * hash) + EXTERNAL_DOCS_FIELD_NUMBER;
hash = (53 * hash) + getExternalDocs().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* `Tag` is a representation of OpenAPI v2 specification's Tag object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#tagObject
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Tag}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Tag)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.TagOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
description_ = "";
if (externalDocsBuilder_ == null) {
externalDocs_ = null;
} else {
externalDocs_ = null;
externalDocsBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Tag_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag(this);
result.description_ = description_;
if (externalDocsBuilder_ == null) {
result.externalDocs_ = externalDocs_;
} else {
result.externalDocs_ = externalDocsBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag.getDefaultInstance()) return this;
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
if (other.hasExternalDocs()) {
mergeExternalDocs(other.getExternalDocs());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object description_ = "";
/**
*
* A short description for the tag. GFM syntax can be used for rich text
* representation.
*
*
* string description = 2;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A short description for the tag. GFM syntax can be used for rich text
* representation.
*
*
* string description = 2;
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A short description for the tag. GFM syntax can be used for rich text
* representation.
*
*
* string description = 2;
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* A short description for the tag. GFM syntax can be used for rich text
* representation.
*
*
* string description = 2;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* A short description for the tag. GFM syntax can be used for rich text
* representation.
*
*
* string description = 2;
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation externalDocs_;
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder> externalDocsBuilder_;
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
* @return Whether the externalDocs field is set.
*/
public boolean hasExternalDocs() {
return externalDocsBuilder_ != null || externalDocs_ != null;
}
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
* @return The externalDocs.
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation getExternalDocs() {
if (externalDocsBuilder_ == null) {
return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
} else {
return externalDocsBuilder_.getMessage();
}
}
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
*/
public Builder setExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation value) {
if (externalDocsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
externalDocs_ = value;
onChanged();
} else {
externalDocsBuilder_.setMessage(value);
}
return this;
}
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
*/
public Builder setExternalDocs(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder builderForValue) {
if (externalDocsBuilder_ == null) {
externalDocs_ = builderForValue.build();
onChanged();
} else {
externalDocsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
*/
public Builder mergeExternalDocs(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation value) {
if (externalDocsBuilder_ == null) {
if (externalDocs_ != null) {
externalDocs_ =
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.newBuilder(externalDocs_).mergeFrom(value).buildPartial();
} else {
externalDocs_ = value;
}
onChanged();
} else {
externalDocsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
*/
public Builder clearExternalDocs() {
if (externalDocsBuilder_ == null) {
externalDocs_ = null;
onChanged();
} else {
externalDocs_ = null;
externalDocsBuilder_ = null;
}
return this;
}
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder getExternalDocsBuilder() {
onChanged();
return getExternalDocsFieldBuilder().getBuilder();
}
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
*/
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() {
if (externalDocsBuilder_ != null) {
return externalDocsBuilder_.getMessageOrBuilder();
} else {
return externalDocs_ == null ?
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
}
}
/**
*
* Additional external documentation for this tag.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder>
getExternalDocsFieldBuilder() {
if (externalDocsBuilder_ == null) {
externalDocsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder>(
getExternalDocs(),
getParentForChildren(),
isClean());
externalDocs_ = null;
}
return externalDocsBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:grpc.gateway.protoc_gen_openapiv2.options.Tag)
}
// @@protoc_insertion_point(class_scope:grpc.gateway.protoc_gen_openapiv2.options.Tag)
private static final grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag();
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Tag parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Tag(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser