Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// 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".
*
* 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.
*
* 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.
*
* 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`.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* 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();
tags_ = 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;
}
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;
@SuppressWarnings("serial")
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".
*
* 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 info_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info.getDefaultInstance() : info_;
}
public static final int HOST_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
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.
*
* 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;
@SuppressWarnings("serial")
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`.
*
* 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;
@SuppressWarnings("serial")
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) {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme result = grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme.forNumber(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;
@SuppressWarnings("serial")
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;
@SuppressWarnings("serial")
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());
}
@SuppressWarnings("serial")
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 NullPointerException("map key"); }
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.
*
* 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 securityDefinitions_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityDefinitions.getDefaultInstance() : securityDefinitions_;
}
public static final int SECURITY_FIELD_NUMBER = 12;
@SuppressWarnings("serial")
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.
*
* 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.
*
* 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.
*
* 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 TAGS_FIELD_NUMBER = 13;
@SuppressWarnings("serial")
private java.util.List tags_;
/**
*
* A list of tags for API documentation control. Tags can be used for logical
* grouping of operations by resources or any other qualifier.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.ExternalDocumentation external_docs = 14;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentationOrBuilder getExternalDocsOrBuilder() {
return externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
}
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());
}
@SuppressWarnings("serial")
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();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(swagger_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, swagger_);
}
if (info_ != null) {
output.writeMessage(2, getInfo());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, host_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(basePath_)) {
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));
}
for (int i = 0; i < tags_.size(); i++) {
output.writeMessage(13, tags_.get(i));
}
if (externalDocs_ != null) {
output.writeMessage(14, getExternalDocs());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetExtensions(),
ExtensionsDefaultEntryHolder.defaultEntry,
15);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(swagger_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, swagger_);
}
if (info_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getInfo());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, host_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(basePath_)) {
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));
}
for (int i = 0; i < tags_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(13, tags_.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 += getUnknownFields().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 (!getTagsList()
.equals(other.getTagsList())) 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 (!getUnknownFields().equals(other.getUnknownFields())) 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 (getTagsCount() > 0) {
hash = (37 * hash) + TAGS_FIELD_NUMBER;
hash = (53 * hash) + getTagsList().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) + getUnknownFields().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;
}
/**
*
*
* 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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
swagger_ = "";
info_ = null;
if (infoBuilder_ != null) {
infoBuilder_.dispose();
infoBuilder_ = null;
}
host_ = "";
basePath_ = "";
schemes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);
consumes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000020);
produces_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000040);
internalGetMutableResponses().clear();
securityDefinitions_ = null;
if (securityDefinitionsBuilder_ != null) {
securityDefinitionsBuilder_.dispose();
securityDefinitionsBuilder_ = null;
}
if (securityBuilder_ == null) {
security_ = java.util.Collections.emptyList();
} else {
security_ = null;
securityBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000200);
if (tagsBuilder_ == null) {
tags_ = java.util.Collections.emptyList();
} else {
tags_ = null;
tagsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000400);
externalDocs_ = null;
if (externalDocsBuilder_ != null) {
externalDocsBuilder_.dispose();
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);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger result) {
if (((bitField0_ & 0x00000010) != 0)) {
schemes_ = java.util.Collections.unmodifiableList(schemes_);
bitField0_ = (bitField0_ & ~0x00000010);
}
result.schemes_ = schemes_;
if (((bitField0_ & 0x00000020) != 0)) {
consumes_ = consumes_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000020);
}
result.consumes_ = consumes_;
if (((bitField0_ & 0x00000040) != 0)) {
produces_ = produces_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000040);
}
result.produces_ = produces_;
if (securityBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0)) {
security_ = java.util.Collections.unmodifiableList(security_);
bitField0_ = (bitField0_ & ~0x00000200);
}
result.security_ = security_;
} else {
result.security_ = securityBuilder_.build();
}
if (tagsBuilder_ == null) {
if (((bitField0_ & 0x00000400) != 0)) {
tags_ = java.util.Collections.unmodifiableList(tags_);
bitField0_ = (bitField0_ & ~0x00000400);
}
result.tags_ = tags_;
} else {
result.tags_ = tagsBuilder_.build();
}
}
private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Swagger result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.swagger_ = swagger_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.info_ = infoBuilder_ == null
? info_
: infoBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.host_ = host_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.basePath_ = basePath_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.responses_ = internalGetResponses();
result.responses_.makeImmutable();
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.securityDefinitions_ = securityDefinitionsBuilder_ == null
? securityDefinitions_
: securityDefinitionsBuilder_.build();
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.externalDocs_ = externalDocsBuilder_ == null
? externalDocs_
: externalDocsBuilder_.build();
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.extensions_ = internalGetExtensions();
result.extensions_.makeImmutable();
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasInfo()) {
mergeInfo(other.getInfo());
}
if (!other.getHost().isEmpty()) {
host_ = other.host_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getBasePath().isEmpty()) {
basePath_ = other.basePath_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.schemes_.isEmpty()) {
if (schemes_.isEmpty()) {
schemes_ = other.schemes_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureSchemesIsMutable();
schemes_.addAll(other.schemes_);
}
onChanged();
}
if (!other.consumes_.isEmpty()) {
if (consumes_.isEmpty()) {
consumes_ = other.consumes_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureConsumesIsMutable();
consumes_.addAll(other.consumes_);
}
onChanged();
}
if (!other.produces_.isEmpty()) {
if (produces_.isEmpty()) {
produces_ = other.produces_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureProducesIsMutable();
produces_.addAll(other.produces_);
}
onChanged();
}
internalGetMutableResponses().mergeFrom(
other.internalGetResponses());
bitField0_ |= 0x00000080;
if (other.hasSecurityDefinitions()) {
mergeSecurityDefinitions(other.getSecurityDefinitions());
}
if (securityBuilder_ == null) {
if (!other.security_.isEmpty()) {
if (security_.isEmpty()) {
security_ = other.security_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureSecurityIsMutable();
security_.addAll(other.security_);
}
onChanged();
}
} else {
if (!other.security_.isEmpty()) {
if (securityBuilder_.isEmpty()) {
securityBuilder_.dispose();
securityBuilder_ = null;
security_ = other.security_;
bitField0_ = (bitField0_ & ~0x00000200);
securityBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSecurityFieldBuilder() : null;
} else {
securityBuilder_.addAllMessages(other.security_);
}
}
}
if (tagsBuilder_ == null) {
if (!other.tags_.isEmpty()) {
if (tags_.isEmpty()) {
tags_ = other.tags_;
bitField0_ = (bitField0_ & ~0x00000400);
} else {
ensureTagsIsMutable();
tags_.addAll(other.tags_);
}
onChanged();
}
} else {
if (!other.tags_.isEmpty()) {
if (tagsBuilder_.isEmpty()) {
tagsBuilder_.dispose();
tagsBuilder_ = null;
tags_ = other.tags_;
bitField0_ = (bitField0_ & ~0x00000400);
tagsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getTagsFieldBuilder() : null;
} else {
tagsBuilder_.addAllMessages(other.tags_);
}
}
}
if (other.hasExternalDocs()) {
mergeExternalDocs(other.getExternalDocs());
}
internalGetMutableExtensions().mergeFrom(
other.internalGetExtensions());
bitField0_ |= 0x00001000;
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
swagger_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getInfoFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
host_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
basePath_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 40: {
int tmpRaw = input.readEnum();
ensureSchemesIsMutable();
schemes_.add(tmpRaw);
break;
} // case 40
case 42: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
ensureSchemesIsMutable();
schemes_.add(tmpRaw);
}
input.popLimit(oldLimit);
break;
} // case 42
case 50: {
java.lang.String s = input.readStringRequireUtf8();
ensureConsumesIsMutable();
consumes_.add(s);
break;
} // case 50
case 58: {
java.lang.String s = input.readStringRequireUtf8();
ensureProducesIsMutable();
produces_.add(s);
break;
} // case 58
case 82: {
com.google.protobuf.MapEntry
responses__ = input.readMessage(
ResponsesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableResponses().getMutableMap().put(
responses__.getKey(), responses__.getValue());
bitField0_ |= 0x00000080;
break;
} // case 82
case 90: {
input.readMessage(
getSecurityDefinitionsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 90
case 98: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement m =
input.readMessage(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.parser(),
extensionRegistry);
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
security_.add(m);
} else {
securityBuilder_.addMessage(m);
}
break;
} // case 98
case 106: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag m =
input.readMessage(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Tag.parser(),
extensionRegistry);
if (tagsBuilder_ == null) {
ensureTagsIsMutable();
tags_.add(m);
} else {
tagsBuilder_.addMessage(m);
}
break;
} // case 106
case 114: {
input.readMessage(
getExternalDocsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000800;
break;
} // case 114
case 122: {
com.google.protobuf.MapEntry
extensions__ = input.readMessage(
ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableExtensions().getMutableMap().put(
extensions__.getKey(), extensions__.getValue());
bitField0_ |= 0x00001000;
break;
} // case 122
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
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".
*
* 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;
bitField0_ |= 0x00000001;
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".
*
* 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;
bitField0_ |= 0x00000001;
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 ((bitField0_ & 0x00000002) != 0);
}
/**
*
* 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;
} else {
infoBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Provides metadata about the API. The metadata can be used by the
* clients if needed.
*
* 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.
*
* 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;
bitField0_ |= 0x00000004;
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.
*
* 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;
bitField0_ |= 0x00000004;
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`.
*
* 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;
bitField0_ |= 0x00000008;
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`.
*
* 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;
bitField0_ |= 0x00000008;
onChanged();
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 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.
*
* 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 to set the value at.
* @param value The enum numeric value on the wire for schemes to set.
* @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_ & 0x00000020) != 0)) {
consumes_ = new com.google.protobuf.LazyStringArrayList(consumes_);
bitField0_ |= 0x00000020;
}
}
/**
*
* 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.
*
* 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_ & 0x00000040) != 0)) {
produces_ = new com.google.protobuf.LazyStringArrayList(produces_);
bitField0_ |= 0x00000040;
}
}
/**
*
* 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.
*
* 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() {
if (responses_ == null) {
responses_ = com.google.protobuf.MapField.newMapField(
ResponsesDefaultEntryHolder.defaultEntry);
}
if (!responses_.isMutable()) {
responses_ = responses_.copy();
}
bitField0_ |= 0x00000080;
onChanged();
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 NullPointerException("map key"); }
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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 15;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearExtensions() {
bitField0_ = (bitField0_ & ~0x00001000);
internalGetMutableExtensions().getMutableMap()
.clear();
return this;
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 15;
*/
public Builder removeExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableExtensions().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableExtensions() {
bitField0_ |= 0x00001000;
return internalGetMutableExtensions().getMutableMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 15;
*/
public Builder putExtensions(
java.lang.String key,
com.google.protobuf.Value value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableExtensions().getMutableMap()
.put(key, value);
bitField0_ |= 0x00001000;
return this;
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 15;
*/
public Builder putAllExtensions(
java.util.Map values) {
internalGetMutableExtensions().getMutableMap()
.putAll(values);
bitField0_ |= 0x00001000;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14;
* @return Whether the parameters field is set.
*/
boolean hasParameters();
/**
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
*
* 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;
}
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;
@SuppressWarnings("serial")
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;
@SuppressWarnings("serial")
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.
*
* 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 externalDocs_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ExternalDocumentation.getDefaultInstance() : externalDocs_;
}
public static final int OPERATION_ID_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
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.
*
* 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;
@SuppressWarnings("serial")
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;
@SuppressWarnings("serial")
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());
}
@SuppressWarnings("serial")
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 NullPointerException("map key"); }
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.
*
* 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 NullPointerException("map key"); }
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;
@SuppressWarnings("serial")
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) {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme result = grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Scheme.forNumber(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_ = false;
/**
*
* 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;
@SuppressWarnings("serial")
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.
*
* 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.
*
* 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.
*
* 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());
}
@SuppressWarnings("serial")
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();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int PARAMETERS_FIELD_NUMBER = 14;
private grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters parameters_;
/**
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14;
* @return Whether the parameters field is set.
*/
@java.lang.Override
public boolean hasParameters() {
return parameters_ != null;
}
/**
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ParametersOrBuilder getParametersOrBuilder() {
return parameters_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters.getDefaultInstance() : parameters_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, summary_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
if (externalDocs_ != null) {
output.writeMessage(4, getExternalDocs());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) {
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);
if (parameters_ != null) {
output.writeMessage(14, getParameters());
}
getUnknownFields().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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(summary_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, summary_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
if (externalDocs_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getExternalDocs());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(operationId_)) {
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__);
}
if (parameters_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, getParameters());
}
size += getUnknownFields().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 (hasParameters() != other.hasParameters()) return false;
if (hasParameters()) {
if (!getParameters()
.equals(other.getParameters())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) 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();
}
if (hasParameters()) {
hash = (37 * hash) + PARAMETERS_FIELD_NUMBER;
hash = (53 * hash) + getParameters().hashCode();
}
hash = (29 * hash) + getUnknownFields().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;
}
/**
*
*
* 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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
summary_ = "";
description_ = "";
externalDocs_ = null;
if (externalDocsBuilder_ != null) {
externalDocsBuilder_.dispose();
externalDocsBuilder_ = null;
}
operationId_ = "";
consumes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000020);
produces_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000040);
internalGetMutableResponses().clear();
schemes_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
deprecated_ = false;
if (securityBuilder_ == null) {
security_ = java.util.Collections.emptyList();
} else {
security_ = null;
securityBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000400);
internalGetMutableExtensions().clear();
parameters_ = null;
if (parametersBuilder_ != null) {
parametersBuilder_.dispose();
parametersBuilder_ = 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_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);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation result) {
if (((bitField0_ & 0x00000001) != 0)) {
tags_ = tags_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.tags_ = tags_;
if (((bitField0_ & 0x00000020) != 0)) {
consumes_ = consumes_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000020);
}
result.consumes_ = consumes_;
if (((bitField0_ & 0x00000040) != 0)) {
produces_ = produces_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000040);
}
result.produces_ = produces_;
if (((bitField0_ & 0x00000100) != 0)) {
schemes_ = java.util.Collections.unmodifiableList(schemes_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.schemes_ = schemes_;
if (securityBuilder_ == null) {
if (((bitField0_ & 0x00000400) != 0)) {
security_ = java.util.Collections.unmodifiableList(security_);
bitField0_ = (bitField0_ & ~0x00000400);
}
result.security_ = security_;
} else {
result.security_ = securityBuilder_.build();
}
}
private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Operation result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.summary_ = summary_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.externalDocs_ = externalDocsBuilder_ == null
? externalDocs_
: externalDocsBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.operationId_ = operationId_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.responses_ = internalGetResponses();
result.responses_.makeImmutable();
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.deprecated_ = deprecated_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.extensions_ = internalGetExtensions();
result.extensions_.makeImmutable();
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.parameters_ = parametersBuilder_ == null
? parameters_
: parametersBuilder_.build();
}
}
@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_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasExternalDocs()) {
mergeExternalDocs(other.getExternalDocs());
}
if (!other.getOperationId().isEmpty()) {
operationId_ = other.operationId_;
bitField0_ |= 0x00000010;
onChanged();
}
if (!other.consumes_.isEmpty()) {
if (consumes_.isEmpty()) {
consumes_ = other.consumes_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureConsumesIsMutable();
consumes_.addAll(other.consumes_);
}
onChanged();
}
if (!other.produces_.isEmpty()) {
if (produces_.isEmpty()) {
produces_ = other.produces_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureProducesIsMutable();
produces_.addAll(other.produces_);
}
onChanged();
}
internalGetMutableResponses().mergeFrom(
other.internalGetResponses());
bitField0_ |= 0x00000080;
if (!other.schemes_.isEmpty()) {
if (schemes_.isEmpty()) {
schemes_ = other.schemes_;
bitField0_ = (bitField0_ & ~0x00000100);
} 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_ & ~0x00000400);
} else {
ensureSecurityIsMutable();
security_.addAll(other.security_);
}
onChanged();
}
} else {
if (!other.security_.isEmpty()) {
if (securityBuilder_.isEmpty()) {
securityBuilder_.dispose();
securityBuilder_ = null;
security_ = other.security_;
bitField0_ = (bitField0_ & ~0x00000400);
securityBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getSecurityFieldBuilder() : null;
} else {
securityBuilder_.addAllMessages(other.security_);
}
}
}
internalGetMutableExtensions().mergeFrom(
other.internalGetExtensions());
bitField0_ |= 0x00000800;
if (other.hasParameters()) {
mergeParameters(other.getParameters());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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();
ensureTagsIsMutable();
tags_.add(s);
break;
} // case 10
case 18: {
summary_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
input.readMessage(
getExternalDocsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
operationId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
java.lang.String s = input.readStringRequireUtf8();
ensureConsumesIsMutable();
consumes_.add(s);
break;
} // case 50
case 58: {
java.lang.String s = input.readStringRequireUtf8();
ensureProducesIsMutable();
produces_.add(s);
break;
} // case 58
case 74: {
com.google.protobuf.MapEntry
responses__ = input.readMessage(
ResponsesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableResponses().getMutableMap().put(
responses__.getKey(), responses__.getValue());
bitField0_ |= 0x00000080;
break;
} // case 74
case 80: {
int tmpRaw = input.readEnum();
ensureSchemesIsMutable();
schemes_.add(tmpRaw);
break;
} // case 80
case 82: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
ensureSchemesIsMutable();
schemes_.add(tmpRaw);
}
input.popLimit(oldLimit);
break;
} // case 82
case 88: {
deprecated_ = input.readBool();
bitField0_ |= 0x00000200;
break;
} // case 88
case 98: {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement m =
input.readMessage(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.SecurityRequirement.parser(),
extensionRegistry);
if (securityBuilder_ == null) {
ensureSecurityIsMutable();
security_.add(m);
} else {
securityBuilder_.addMessage(m);
}
break;
} // case 98
case 106: {
com.google.protobuf.MapEntry
extensions__ = input.readMessage(
ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableExtensions().getMutableMap().put(
extensions__.getKey(), extensions__.getValue());
bitField0_ |= 0x00000800;
break;
} // case 106
case 114: {
input.readMessage(
getParametersFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00001000;
break;
} // case 114
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
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.
*
* 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.
*
* 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;
bitField0_ |= 0x00000010;
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.
*
* 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;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList consumes_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureConsumesIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
consumes_ = new com.google.protobuf.LazyStringArrayList(consumes_);
bitField0_ |= 0x00000020;
}
}
/**
*
* 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.
*
* 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_ & 0x00000040) != 0)) {
produces_ = new com.google.protobuf.LazyStringArrayList(produces_);
bitField0_ |= 0x00000040;
}
}
/**
*
* 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.
*
* 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() {
if (responses_ == null) {
responses_ = com.google.protobuf.MapField.newMapField(
ResponsesDefaultEntryHolder.defaultEntry);
}
if (!responses_.isMutable()) {
responses_ = responses_.copy();
}
bitField0_ |= 0x00000080;
onChanged();
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 NullPointerException("map key"); }
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.
*
* 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.
*
* 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 to set the value at.
* @param value The enum numeric value on the wire for schemes to set.
* @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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* 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.
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 13;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearExtensions() {
bitField0_ = (bitField0_ & ~0x00000800);
internalGetMutableExtensions().getMutableMap()
.clear();
return this;
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 13;
*/
public Builder removeExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableExtensions().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableExtensions() {
bitField0_ |= 0x00000800;
return internalGetMutableExtensions().getMutableMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 13;
*/
public Builder putExtensions(
java.lang.String key,
com.google.protobuf.Value value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableExtensions().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000800;
return this;
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14;
* @return Whether the parameters field is set.
*/
public boolean hasParameters() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
* Custom parameters such as HTTP request headers.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/
* and https://swagger.io/specification/v2/#parameter-object.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.Parameters parameters = 14;
*/
private com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ParametersOrBuilder>
getParametersFieldBuilder() {
if (parametersBuilder_ == null) {
parametersBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ParametersOrBuilder>(
getParameters(),
getParentForChildren(),
isClean());
parameters_ = null;
}
return parametersBuilder_;
}
@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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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 ParametersOrBuilder extends
// @@protoc_insertion_point(interface_extends:grpc.gateway.protoc_gen_openapiv2.options.Parameters)
com.google.protobuf.MessageOrBuilder {
/**
*
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
*
* `Parameters` is a representation of OpenAPI v2 specification's parameters object.
* Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
* allow header parameters to be set here since we do not want users specifying custom non-header
* parameters beyond those inferred from the Protobuf schema.
* See: https://swagger.io/specification/v2/#parameter-object
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Parameters}
*/
public static final class Parameters extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Parameters)
ParametersOrBuilder {
private static final long serialVersionUID = 0L;
// Use Parameters.newBuilder() to construct.
private Parameters(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Parameters() {
headers_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Parameters();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
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_Parameters_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_Parameters_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters.Builder.class);
}
public static final int HEADERS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List headers_;
/**
*
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
*
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
*
*
* repeated .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter headers = 1;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameterOrBuilder getHeadersOrBuilder(
int index) {
return headers_.get(index);
}
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 {
for (int i = 0; i < headers_.size(); i++) {
output.writeMessage(1, headers_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < headers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, headers_.get(i));
}
size += getUnknownFields().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.Parameters)) {
return super.equals(obj);
}
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters other = (grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters) obj;
if (!getHeadersList()
.equals(other.getHeadersList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getHeadersCount() > 0) {
hash = (37 * hash) + HEADERS_FIELD_NUMBER;
hash = (53 * hash) + getHeadersList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters 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.Parameters parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters 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.Parameters parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters 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.Parameters 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.Parameters 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.Parameters 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.Parameters 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.Parameters 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.Parameters 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.Parameters 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;
}
/**
*
* `Parameters` is a representation of OpenAPI v2 specification's parameters object.
* Note: This technically breaks compatibility with the OpenAPI 2 definition structure as we only
* allow header parameters to be set here since we do not want users specifying custom non-header
* parameters beyond those inferred from the Protobuf schema.
* See: https://swagger.io/specification/v2/#parameter-object
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Parameters}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Parameters)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.ParametersOrBuilder {
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_Parameters_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_Parameters_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (headersBuilder_ == null) {
headers_ = java.util.Collections.emptyList();
} else {
headers_ = null;
headersBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
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_Parameters_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters result) {
if (headersBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
headers_ = java.util.Collections.unmodifiableList(headers_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.headers_ = headers_;
} else {
result.headers_ = headersBuilder_.build();
}
}
private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters result) {
int from_bitField0_ = bitField0_;
}
@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.Parameters) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Parameters.getDefaultInstance()) return this;
if (headersBuilder_ == null) {
if (!other.headers_.isEmpty()) {
if (headers_.isEmpty()) {
headers_ = other.headers_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureHeadersIsMutable();
headers_.addAll(other.headers_);
}
onChanged();
}
} else {
if (!other.headers_.isEmpty()) {
if (headersBuilder_.isEmpty()) {
headersBuilder_.dispose();
headersBuilder_ = null;
headers_ = other.headers_;
bitField0_ = (bitField0_ & ~0x00000001);
headersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getHeadersFieldBuilder() : null;
} else {
headersBuilder_.addAllMessages(other.headers_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
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.HeaderParameter m =
input.readMessage(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.parser(),
extensionRegistry);
if (headersBuilder_ == null) {
ensureHeadersIsMutable();
headers_.add(m);
} else {
headersBuilder_.addMessage(m);
}
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List headers_ =
java.util.Collections.emptyList();
private void ensureHeadersIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
headers_ = new java.util.ArrayList(headers_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Builder, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameterOrBuilder> headersBuilder_;
/**
*
* `Headers` is one or more HTTP header parameter.
* See: https://swagger.io/docs/specification/2-0/describing-parameters/#header-parameters
*
* `Description` is a short description of the header.
*
*
* string description = 2;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* See: https://swagger.io/specification/v2/#parameterType.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3;
* @return The enum numeric value on the wire for type.
*/
int getTypeValue();
/**
*
* `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* See: https://swagger.io/specification/v2/#parameterType.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3;
* @return The type.
*/
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Type getType();
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 4;
* @return The format.
*/
java.lang.String getFormat();
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 4;
* @return The bytes for format.
*/
com.google.protobuf.ByteString
getFormatBytes();
/**
*
* `Required` indicates if the header is optional
*
* `HeaderParameter` a HTTP header parameter.
* See: https://swagger.io/specification/v2/#parameter-object
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter}
*/
public static final class HeaderParameter extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter)
HeaderParameterOrBuilder {
private static final long serialVersionUID = 0L;
// Use HeaderParameter.newBuilder() to construct.
private HeaderParameter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HeaderParameter() {
name_ = "";
description_ = "";
type_ = 0;
format_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HeaderParameter();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
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_HeaderParameter_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_HeaderParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Builder.class);
}
/**
*
* `Type` is a a supported HTTP header type.
* See https://swagger.io/specification/v2/#parameterType.
*
*
* Protobuf enum {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type}
*/
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
* STRING = 1;
*/
STRING(1),
/**
* NUMBER = 2;
*/
NUMBER(2),
/**
* INTEGER = 3;
*/
INTEGER(3),
/**
* BOOLEAN = 4;
*/
BOOLEAN(4),
UNRECOGNIZED(-1),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
* STRING = 1;
*/
public static final int STRING_VALUE = 1;
/**
* NUMBER = 2;
*/
public static final int NUMBER_VALUE = 2;
/**
* INTEGER = 3;
*/
public static final int INTEGER_VALUE = 3;
/**
* BOOLEAN = 4;
*/
public static final int BOOLEAN_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 Type 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 Type forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return STRING;
case 2: return NUMBER;
case 3: return INTEGER;
case 4: return BOOLEAN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Type> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Type findValueByNumber(int number) {
return Type.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.HeaderParameter.getDescriptor().getEnumTypes().get(0);
}
private static final Type[] VALUES = values();
public static Type 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 Type(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type)
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
* `Name` is the header name.
*
*
* 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;
}
}
/**
*
* `Name` is the header name.
*
*
* 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 DESCRIPTION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
* `Description` is a short description of the header.
*
* `Description` is a short description of the header.
*
*
* 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 TYPE_FIELD_NUMBER = 3;
private int type_ = 0;
/**
*
* `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* See: https://swagger.io/specification/v2/#parameterType.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* See: https://swagger.io/specification/v2/#parameterType.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3;
* @return The type.
*/
@java.lang.Override public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Type getType() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Type result = grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Type.forNumber(type_);
return result == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Type.UNRECOGNIZED : result;
}
public static final int FORMAT_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object format_ = "";
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 4;
* @return The format.
*/
@java.lang.Override
public java.lang.String getFormat() {
java.lang.Object ref = format_;
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();
format_ = s;
return s;
}
}
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 4;
* @return The bytes for format.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFormatBytes() {
java.lang.Object ref = format_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
format_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REQUIRED_FIELD_NUMBER = 5;
private boolean required_ = false;
/**
*
* `Required` indicates if the header is optional
*
* `HeaderParameter` a HTTP header parameter.
* See: https://swagger.io/specification/v2/#parameter-object
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameterOrBuilder {
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_HeaderParameter_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_HeaderParameter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
description_ = "";
type_ = 0;
format_ = "";
required_ = false;
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_HeaderParameter_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.format_ = format_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.required_ = required_;
}
}
@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.HeaderParameter) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (!other.getFormat().isEmpty()) {
format_ = other.format_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.getRequired() != false) {
setRequired(other.getRequired());
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24: {
type_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 24
case 34: {
format_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 40: {
required_ = input.readBool();
bitField0_ |= 0x00000010;
break;
} // case 40
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* `Name` is the header name.
*
*
* 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;
}
}
/**
*
* `Name` is the header name.
*
*
* 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;
}
}
/**
*
* `Name` is the header name.
*
*
* 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* `Name` is the header name.
*
*
* string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* `Name` is the header name.
*
*
* 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* `Description` is a short description of the header.
*
* `Description` is a short description of the header.
*
*
* 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;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private int type_ = 0;
/**
*
* `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* See: https://swagger.io/specification/v2/#parameterType.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* See: https://swagger.io/specification/v2/#parameterType.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* See: https://swagger.io/specification/v2/#parameterType.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3;
* @return The type.
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Type getType() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Type result = grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Type.forNumber(type_);
return result == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Type.UNRECOGNIZED : result;
}
/**
*
* `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* See: https://swagger.io/specification/v2/#parameterType.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderParameter.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* `Type` is the type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
* See: https://swagger.io/specification/v2/#parameterType.
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.HeaderParameter.Type type = 3;
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000004);
type_ = 0;
onChanged();
return this;
}
private java.lang.Object format_ = "";
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 4;
* @return The format.
*/
public java.lang.String getFormat() {
java.lang.Object ref = format_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
format_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 4;
* @return The bytes for format.
*/
public com.google.protobuf.ByteString
getFormatBytes() {
java.lang.Object ref = format_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
format_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 4;
* @param value The format to set.
* @return This builder for chaining.
*/
public Builder setFormat(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
format_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 4;
* @return This builder for chaining.
*/
public Builder clearFormat() {
format_ = getDefaultInstance().getFormat();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 4;
* @param value The bytes for format to set.
* @return This builder for chaining.
*/
public Builder setFormatBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
format_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private boolean required_ ;
/**
*
* `Required` indicates if the header is optional
*
* `Description` is a short description of the header.
*
*
* string description = 1;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
*
*
* string type = 2;
* @return The type.
*/
java.lang.String getType();
/**
*
* The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
*
*
* string type = 2;
* @return The bytes for type.
*/
com.google.protobuf.ByteString
getTypeBytes();
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 3;
* @return The format.
*/
java.lang.String getFormat();
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 3;
* @return The bytes for format.
*/
com.google.protobuf.ByteString
getFormatBytes();
/**
*
* `Default` Declares the value of the header that the server will use if none is provided.
* See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
* Unlike JSON Schema this value MUST conform to the defined type for the header.
*
* `Default` Declares the value of the header that the server will use if none is provided.
* See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
* Unlike JSON Schema this value MUST conform to the defined type for the header.
*
*
* string default = 6;
* @return The bytes for default.
*/
com.google.protobuf.ByteString
getDefaultBytes();
/**
*
* 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
*
* 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
*
*
* string pattern = 13;
* @return The bytes for pattern.
*/
com.google.protobuf.ByteString
getPatternBytes();
}
/**
*
* `Header` is a representation of OpenAPI v2 specification's Header object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Header}
*/
public static final class Header extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:grpc.gateway.protoc_gen_openapiv2.options.Header)
HeaderOrBuilder {
private static final long serialVersionUID = 0L;
// Use Header.newBuilder() to construct.
private Header(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Header() {
description_ = "";
type_ = "";
format_ = "";
default_ = "";
pattern_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Header();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
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_Header_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_Header_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header.Builder.class);
}
public static final int DESCRIPTION_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
* `Description` is a short description of the header.
*
* `Description` is a short description of the header.
*
*
* 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 TYPE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object type_ = "";
/**
*
* The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
*
*
* string type = 2;
* @return The type.
*/
@java.lang.Override
public java.lang.String getType() {
java.lang.Object ref = type_;
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();
type_ = s;
return s;
}
}
/**
*
* The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
*
*
* string type = 2;
* @return The bytes for type.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FORMAT_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object format_ = "";
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 3;
* @return The format.
*/
@java.lang.Override
public java.lang.String getFormat() {
java.lang.Object ref = format_;
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();
format_ = s;
return s;
}
}
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 3;
* @return The bytes for format.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFormatBytes() {
java.lang.Object ref = format_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
format_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEFAULT_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object default_ = "";
/**
*
* `Default` Declares the value of the header that the server will use if none is provided.
* See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
* Unlike JSON Schema this value MUST conform to the defined type for the header.
*
* `Default` Declares the value of the header that the server will use if none is provided.
* See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
* Unlike JSON Schema this value MUST conform to the defined type for the header.
*
*
* string default = 6;
* @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 PATTERN_FIELD_NUMBER = 13;
@SuppressWarnings("serial")
private volatile java.lang.Object pattern_ = "";
/**
*
* 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
*
* `Header` is a representation of OpenAPI v2 specification's Header object.
* See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#headerObject
*
*
* Protobuf type {@code grpc.gateway.protoc_gen_openapiv2.options.Header}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:grpc.gateway.protoc_gen_openapiv2.options.Header)
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.HeaderOrBuilder {
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_Header_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_Header_fieldAccessorTable
.ensureFieldAccessorsInitialized(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header.class, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header.Builder.class);
}
// Construct using grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
description_ = "";
type_ = "";
format_ = "";
default_ = "";
pattern_ = "";
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_Header_descriptor;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header getDefaultInstanceForType() {
return grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header.getDefaultInstance();
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header build() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header buildPartial() {
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header result = new grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.format_ = format_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.default_ = default_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.pattern_ = pattern_;
}
}
@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.Header) {
return mergeFrom((grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header other) {
if (other == grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header.getDefaultInstance()) return this;
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getType().isEmpty()) {
type_ = other.type_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getFormat().isEmpty()) {
format_ = other.format_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.getDefault().isEmpty()) {
default_ = other.default_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getPattern().isEmpty()) {
pattern_ = other.pattern_;
bitField0_ |= 0x00000010;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
type_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
format_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 50: {
default_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 50
case 106: {
pattern_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 106
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object description_ = "";
/**
*
* `Description` is a short description of the header.
*
* `Description` is a short description of the header.
*
*
* 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object type_ = "";
/**
*
* The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
*
*
* string type = 2;
* @return The type.
*/
public java.lang.String getType() {
java.lang.Object ref = type_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
type_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
*
*
* string type = 2;
* @return The bytes for type.
*/
public com.google.protobuf.ByteString
getTypeBytes() {
java.lang.Object ref = type_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
type_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
*
*
* string type = 2;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
type_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
*
*
* string type = 2;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ = getDefaultInstance().getType();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* The type of the object. The value MUST be one of "string", "number", "integer", or "boolean". The "array" type is not supported.
*
*
* string type = 2;
* @param value The bytes for type to set.
* @return This builder for chaining.
*/
public Builder setTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
type_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object format_ = "";
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 3;
* @return The format.
*/
public java.lang.String getFormat() {
java.lang.Object ref = format_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
format_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 3;
* @return The bytes for format.
*/
public com.google.protobuf.ByteString
getFormatBytes() {
java.lang.Object ref = format_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
format_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 3;
* @param value The format to set.
* @return This builder for chaining.
*/
public Builder setFormat(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
format_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 3;
* @return This builder for chaining.
*/
public Builder clearFormat() {
format_ = getDefaultInstance().getFormat();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* `Format` The extending format for the previously mentioned type.
*
*
* string format = 3;
* @param value The bytes for format to set.
* @return This builder for chaining.
*/
public Builder setFormatBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
format_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object default_ = "";
/**
*
* `Default` Declares the value of the header that the server will use if none is provided.
* See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
* Unlike JSON Schema this value MUST conform to the defined type for the header.
*
* `Default` Declares the value of the header that the server will use if none is provided.
* See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
* Unlike JSON Schema this value MUST conform to the defined type for the header.
*
*
* string default = 6;
* @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;
}
}
/**
*
* `Default` Declares the value of the header that the server will use if none is provided.
* See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
* Unlike JSON Schema this value MUST conform to the defined type for the header.
*
*
* string default = 6;
* @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;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* `Default` Declares the value of the header that the server will use if none is provided.
* See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
* Unlike JSON Schema this value MUST conform to the defined type for the header.
*
* `Default` Declares the value of the header that the server will use if none is provided.
* See: https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2.
* Unlike JSON Schema this value MUST conform to the defined type for the header.
*
*
* string default = 6;
* @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;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object pattern_ = "";
/**
*
* 'Pattern' See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3.
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* `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;
}
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 3:
return internalGetHeaders();
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;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
* `Description` is a short description of the response.
* GFM syntax can be used for rich text representation.
*
* `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 schema_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Schema.getDefaultInstance() : schema_;
}
public static final int HEADERS_FIELD_NUMBER = 3;
private static final class HeadersDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.internal_static_grpc_gateway_protoc_gen_openapiv2_options_Response_HeadersEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header> headers_;
private com.google.protobuf.MapField
internalGetHeaders() {
if (headers_ == null) {
return com.google.protobuf.MapField.emptyMapField(
HeadersDefaultEntryHolder.defaultEntry);
}
return headers_;
}
public int getHeadersCount() {
return internalGetHeaders().getMap().size();
}
/**
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3;
*/
@java.lang.Override
public boolean containsHeaders(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetHeaders().getMap().containsKey(key);
}
/**
* Use {@link #getHeadersMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getHeaders() {
return getHeadersMap();
}
/**
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header getHeadersOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetHeaders().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
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,
"");
}
@SuppressWarnings("serial")
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();
}
/**
*
*
* map<string, string> examples = 4;
*/
@java.lang.Override
public java.lang.String getExamplesOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
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());
}
@SuppressWarnings("serial")
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();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 5;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* `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 3:
return internalGetHeaders();
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 3:
return internalGetMutableHeaders();
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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
description_ = "";
schema_ = null;
if (schemaBuilder_ != null) {
schemaBuilder_.dispose();
schemaBuilder_ = null;
}
internalGetMutableHeaders().clear();
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Response result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.schema_ = schemaBuilder_ == null
? schema_
: schemaBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.headers_ = internalGetHeaders();
result.headers_.makeImmutable();
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.examples_ = internalGetExamples();
result.examples_.makeImmutable();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.extensions_ = internalGetExtensions();
result.extensions_.makeImmutable();
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasSchema()) {
mergeSchema(other.getSchema());
}
internalGetMutableHeaders().mergeFrom(
other.internalGetHeaders());
bitField0_ |= 0x00000004;
internalGetMutableExamples().mergeFrom(
other.internalGetExamples());
bitField0_ |= 0x00000008;
internalGetMutableExtensions().mergeFrom(
other.internalGetExtensions());
bitField0_ |= 0x00000010;
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getSchemaFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
com.google.protobuf.MapEntry
headers__ = input.readMessage(
HeadersDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableHeaders().getMutableMap().put(
headers__.getKey(), headers__.getValue());
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
com.google.protobuf.MapEntry
examples__ = input.readMessage(
ExamplesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableExamples().getMutableMap().put(
examples__.getKey(), examples__.getValue());
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
com.google.protobuf.MapEntry
extensions__ = input.readMessage(
ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableExtensions().getMutableMap().put(
extensions__.getKey(), extensions__.getValue());
bitField0_ |= 0x00000010;
break;
} // case 42
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
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.
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3;
*/
@java.lang.Override
public boolean containsHeaders(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetHeaders().getMap().containsKey(key);
}
/**
* Use {@link #getHeadersMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getHeaders() {
return getHeadersMap();
}
/**
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header getHeadersOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetHeaders().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearHeaders() {
bitField0_ = (bitField0_ & ~0x00000004);
internalGetMutableHeaders().getMutableMap()
.clear();
return this;
}
/**
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3;
*/
public Builder removeHeaders(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableHeaders().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableHeaders() {
bitField0_ |= 0x00000004;
return internalGetMutableHeaders().getMutableMap();
}
/**
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
*
* map<string, .grpc.gateway.protoc_gen_openapiv2.options.Header> headers = 3;
*/
public Builder putHeaders(
java.lang.String key,
grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Header value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableHeaders().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000004;
return this;
}
/**
*
* `Headers` A list of headers that are sent with the response.
* `Header` name is expected to be a string in the canonical format of the MIME header key
* See: https://golang.org/pkg/net/textproto/#CanonicalMIMEHeaderKey
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 5;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 5;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearExtensions() {
bitField0_ = (bitField0_ & ~0x00000010);
internalGetMutableExtensions().getMutableMap()
.clear();
return this;
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 5;
*/
public Builder removeExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableExtensions().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableExtensions() {
bitField0_ |= 0x00000010;
return internalGetMutableExtensions().getMutableMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 5;
*/
public Builder putExtensions(
java.lang.String key,
com.google.protobuf.Value value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableExtensions().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000010;
return this;
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 5;
*/
public Builder putAllExtensions(
java.util.Map values) {
internalGetMutableExtensions().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000010;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.
*
* 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();
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* .grpc.gateway.protoc_gen_openapiv2.options.License license = 5;
*/
@java.lang.Override
public grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.LicenseOrBuilder getLicenseOrBuilder() {
return license_ == null ? grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.License.getDefaultInstance() : license_;
}
public static final int VERSION_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
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());
}
@SuppressWarnings("serial")
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();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(termsOfService_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, termsOfService_);
}
if (contact_ != null) {
output.writeMessage(4, getContact());
}
if (license_ != null) {
output.writeMessage(5, getLicense());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, version_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetExtensions(),
ExtensionsDefaultEntryHolder.defaultEntry,
7);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(termsOfService_)) {
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(version_)) {
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 += getUnknownFields().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 (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().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;
}
/**
*
*
* 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() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
title_ = "";
description_ = "";
termsOfService_ = "";
contact_ = null;
if (contactBuilder_ != null) {
contactBuilder_.dispose();
contactBuilder_ = null;
}
license_ = null;
if (licenseBuilder_ != null) {
licenseBuilder_.dispose();
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);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(grpc.gateway.protoc_gen_openapiv2.options.Openapiv2.Info result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.title_ = title_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.description_ = description_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.termsOfService_ = termsOfService_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.contact_ = contactBuilder_ == null
? contact_
: contactBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.license_ = licenseBuilder_ == null
? license_
: licenseBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.version_ = version_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.extensions_ = internalGetExtensions();
result.extensions_.makeImmutable();
}
}
@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_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getTermsOfService().isEmpty()) {
termsOfService_ = other.termsOfService_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasContact()) {
mergeContact(other.getContact());
}
if (other.hasLicense()) {
mergeLicense(other.getLicense());
}
if (!other.getVersion().isEmpty()) {
version_ = other.version_;
bitField0_ |= 0x00000020;
onChanged();
}
internalGetMutableExtensions().mergeFrom(
other.internalGetExtensions());
bitField0_ |= 0x00000040;
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
title_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
termsOfService_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
input.readMessage(
getContactFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
input.readMessage(
getLicenseFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50: {
version_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 50
case 58: {
com.google.protobuf.MapEntry
extensions__ = input.readMessage(
ExtensionsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableExtensions().getMutableMap().put(
extensions__.getKey(), extensions__.getValue());
bitField0_ |= 0x00000040;
break;
} // case 58
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The title of the application.
*
*
* string title = 1;
* @return This builder for chaining.
*/
public Builder clearTitle() {
title_ = getDefaultInstance().getTitle();
bitField0_ = (bitField0_ & ~0x00000001);
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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
* A short description of the application. GFM syntax can be used for rich
* text representation.
*
* 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;
bitField0_ |= 0x00000020;
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();
bitField0_ = (bitField0_ & ~0x00000020);
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;
bitField0_ |= 0x00000020;
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() {
if (extensions_ == null) {
extensions_ = com.google.protobuf.MapField.newMapField(
ExtensionsDefaultEntryHolder.defaultEntry);
}
if (!extensions_.isMutable()) {
extensions_ = extensions_.copy();
}
bitField0_ |= 0x00000040;
onChanged();
return extensions_;
}
public int getExtensionsCount() {
return internalGetExtensions().getMap().size();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public boolean containsExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetExtensions().getMap().containsKey(key);
}
/**
* Use {@link #getExtensionsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getExtensions() {
return getExtensionsMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 7;
*/
@java.lang.Override
public com.google.protobuf.Value getExtensionsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetExtensions().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearExtensions() {
bitField0_ = (bitField0_ & ~0x00000040);
internalGetMutableExtensions().getMutableMap()
.clear();
return this;
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 7;
*/
public Builder removeExtensions(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableExtensions().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableExtensions() {
bitField0_ |= 0x00000040;
return internalGetMutableExtensions().getMutableMap();
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 7;
*/
public Builder putExtensions(
java.lang.String key,
com.google.protobuf.Value value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableExtensions().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000040;
return this;
}
/**
*
* Custom properties that start with "x-" such as "x-foo" used to describe
* extra functionality that is not covered by the standard OpenAPI Specification.
* See: https://swagger.io/docs/specification/2-0/swagger-extensions/
*
*
* map<string, .google.protobuf.Value> extensions = 7;
*/
public Builder putAllExtensions(
java.util.Map values) {
internalGetMutableExtensions().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000040;
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 {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
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.
*