com.google.api.servicecontrol.v2.CheckResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-service-control-v2 Show documentation
Show all versions of proto-google-cloud-service-control-v2 Show documentation
Proto library for google-cloud-service-control
The newest version!
/*
* Copyright 2025 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/api/servicecontrol/v2/service_controller.proto
// Protobuf Java Version: 3.25.5
package com.google.api.servicecontrol.v2;
/**
*
*
*
* Response message for the Check method.
*
*
* Protobuf type {@code google.api.servicecontrol.v2.CheckResponse}
*/
public final class CheckResponse extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.api.servicecontrol.v2.CheckResponse)
CheckResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use CheckResponse.newBuilder() to construct.
private CheckResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CheckResponse() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new CheckResponse();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.api.servicecontrol.v2.ServiceControllerProto
.internal_static_google_api_servicecontrol_v2_CheckResponse_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetHeaders();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v2.ServiceControllerProto
.internal_static_google_api_servicecontrol_v2_CheckResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v2.CheckResponse.class,
com.google.api.servicecontrol.v2.CheckResponse.Builder.class);
}
private int bitField0_;
public static final int STATUS_FIELD_NUMBER = 1;
private com.google.rpc.Status status_;
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*
* @return Whether the status field is set.
*/
@java.lang.Override
public boolean hasStatus() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*
* @return The status.
*/
@java.lang.Override
public com.google.rpc.Status getStatus() {
return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
}
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*/
@java.lang.Override
public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
}
public static final int HEADERS_FIELD_NUMBER = 2;
private static final class HeadersDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.api.servicecontrol.v2.ServiceControllerProto
.internal_static_google_api_servicecontrol_v2_CheckResponse_HeadersEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField 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();
}
/**
*
*
*
* Returns a set of request contexts generated from the `CheckRequest`.
*
*
* map<string, string> headers = 2;
*/
@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();
}
/**
*
*
*
* Returns a set of request contexts generated from the `CheckRequest`.
*
*
* map<string, string> headers = 2;
*/
@java.lang.Override
public java.util.Map getHeadersMap() {
return internalGetHeaders().getMap();
}
/**
*
*
*
* Returns a set of request contexts generated from the `CheckRequest`.
*
*
* map<string, string> headers = 2;
*/
@java.lang.Override
public /* nullable */ java.lang.String getHeadersOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetHeaders().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* Returns a set of request contexts generated from the `CheckRequest`.
*
*
* map<string, string> headers = 2;
*/
@java.lang.Override
public java.lang.String 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);
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getStatus());
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetHeaders(), HeadersDefaultEntryHolder.defaultEntry, 2);
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStatus());
}
for (java.util.Map.Entry entry :
internalGetHeaders().getMap().entrySet()) {
com.google.protobuf.MapEntry headers__ =
HeadersDefaultEntryHolder.defaultEntry
.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, headers__);
}
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 com.google.api.servicecontrol.v2.CheckResponse)) {
return super.equals(obj);
}
com.google.api.servicecontrol.v2.CheckResponse other =
(com.google.api.servicecontrol.v2.CheckResponse) obj;
if (hasStatus() != other.hasStatus()) return false;
if (hasStatus()) {
if (!getStatus().equals(other.getStatus())) return false;
}
if (!internalGetHeaders().equals(other.internalGetHeaders())) 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 (hasStatus()) {
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + getStatus().hashCode();
}
if (!internalGetHeaders().getMap().isEmpty()) {
hash = (37 * hash) + HEADERS_FIELD_NUMBER;
hash = (53 * hash) + internalGetHeaders().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.servicecontrol.v2.CheckResponse parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v2.CheckResponse parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v2.CheckResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v2.CheckResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v2.CheckResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.servicecontrol.v2.CheckResponse parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.servicecontrol.v2.CheckResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v2.CheckResponse 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 com.google.api.servicecontrol.v2.CheckResponse parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v2.CheckResponse 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 com.google.api.servicecontrol.v2.CheckResponse parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.api.servicecontrol.v2.CheckResponse 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(com.google.api.servicecontrol.v2.CheckResponse prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Response message for the Check method.
*
*
* Protobuf type {@code google.api.servicecontrol.v2.CheckResponse}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.api.servicecontrol.v2.CheckResponse)
com.google.api.servicecontrol.v2.CheckResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.api.servicecontrol.v2.ServiceControllerProto
.internal_static_google_api_servicecontrol_v2_CheckResponse_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetHeaders();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 2:
return internalGetMutableHeaders();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.servicecontrol.v2.ServiceControllerProto
.internal_static_google_api_servicecontrol_v2_CheckResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.servicecontrol.v2.CheckResponse.class,
com.google.api.servicecontrol.v2.CheckResponse.Builder.class);
}
// Construct using com.google.api.servicecontrol.v2.CheckResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getStatusFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
status_ = null;
if (statusBuilder_ != null) {
statusBuilder_.dispose();
statusBuilder_ = null;
}
internalGetMutableHeaders().clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.api.servicecontrol.v2.ServiceControllerProto
.internal_static_google_api_servicecontrol_v2_CheckResponse_descriptor;
}
@java.lang.Override
public com.google.api.servicecontrol.v2.CheckResponse getDefaultInstanceForType() {
return com.google.api.servicecontrol.v2.CheckResponse.getDefaultInstance();
}
@java.lang.Override
public com.google.api.servicecontrol.v2.CheckResponse build() {
com.google.api.servicecontrol.v2.CheckResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.api.servicecontrol.v2.CheckResponse buildPartial() {
com.google.api.servicecontrol.v2.CheckResponse result =
new com.google.api.servicecontrol.v2.CheckResponse(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.api.servicecontrol.v2.CheckResponse result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.status_ = statusBuilder_ == null ? status_ : statusBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.headers_ = internalGetHeaders();
result.headers_.makeImmutable();
}
result.bitField0_ |= to_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 com.google.api.servicecontrol.v2.CheckResponse) {
return mergeFrom((com.google.api.servicecontrol.v2.CheckResponse) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.servicecontrol.v2.CheckResponse other) {
if (other == com.google.api.servicecontrol.v2.CheckResponse.getDefaultInstance()) return this;
if (other.hasStatus()) {
mergeStatus(other.getStatus());
}
internalGetMutableHeaders().mergeFrom(other.internalGetHeaders());
bitField0_ |= 0x00000002;
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:
{
input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
com.google.protobuf.MapEntry headers__ =
input.readMessage(
HeadersDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableHeaders()
.getMutableMap()
.put(headers__.getKey(), headers__.getValue());
bitField0_ |= 0x00000002;
break;
} // case 18
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.rpc.Status status_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
statusBuilder_;
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*
* @return Whether the status field is set.
*/
public boolean hasStatus() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*
* @return The status.
*/
public com.google.rpc.Status getStatus() {
if (statusBuilder_ == null) {
return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
} else {
return statusBuilder_.getMessage();
}
}
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*/
public Builder setStatus(com.google.rpc.Status value) {
if (statusBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
status_ = value;
} else {
statusBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*/
public Builder setStatus(com.google.rpc.Status.Builder builderForValue) {
if (statusBuilder_ == null) {
status_ = builderForValue.build();
} else {
statusBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*/
public Builder mergeStatus(com.google.rpc.Status value) {
if (statusBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)
&& status_ != null
&& status_ != com.google.rpc.Status.getDefaultInstance()) {
getStatusBuilder().mergeFrom(value);
} else {
status_ = value;
}
} else {
statusBuilder_.mergeFrom(value);
}
if (status_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*/
public Builder clearStatus() {
bitField0_ = (bitField0_ & ~0x00000001);
status_ = null;
if (statusBuilder_ != null) {
statusBuilder_.dispose();
statusBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*/
public com.google.rpc.Status.Builder getStatusBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getStatusFieldBuilder().getBuilder();
}
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*/
public com.google.rpc.StatusOrBuilder getStatusOrBuilder() {
if (statusBuilder_ != null) {
return statusBuilder_.getMessageOrBuilder();
} else {
return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_;
}
}
/**
*
*
*
* Operation is allowed when this field is not set. Any non-'OK' status
* indicates a denial; [google.rpc.Status.details][google.rpc.Status.details]
* would contain additional details about the denial.
*
*
* .google.rpc.Status status = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
getStatusFieldBuilder() {
if (statusBuilder_ == null) {
statusBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status,
com.google.rpc.Status.Builder,
com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean());
status_ = null;
}
return statusBuilder_;
}
private com.google.protobuf.MapField headers_;
private com.google.protobuf.MapField internalGetHeaders() {
if (headers_ == null) {
return com.google.protobuf.MapField.emptyMapField(HeadersDefaultEntryHolder.defaultEntry);
}
return headers_;
}
private com.google.protobuf.MapField
internalGetMutableHeaders() {
if (headers_ == null) {
headers_ = com.google.protobuf.MapField.newMapField(HeadersDefaultEntryHolder.defaultEntry);
}
if (!headers_.isMutable()) {
headers_ = headers_.copy();
}
bitField0_ |= 0x00000002;
onChanged();
return headers_;
}
public int getHeadersCount() {
return internalGetHeaders().getMap().size();
}
/**
*
*
*
* Returns a set of request contexts generated from the `CheckRequest`.
*
*
* map<string, string> headers = 2;
*/
@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();
}
/**
*
*
*
* Returns a set of request contexts generated from the `CheckRequest`.
*
*
* map<string, string> headers = 2;
*/
@java.lang.Override
public java.util.Map getHeadersMap() {
return internalGetHeaders().getMap();
}
/**
*
*
*
* Returns a set of request contexts generated from the `CheckRequest`.
*
*
* map<string, string> headers = 2;
*/
@java.lang.Override
public /* nullable */ java.lang.String getHeadersOrDefault(
java.lang.String key,
/* nullable */
java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetHeaders().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* Returns a set of request contexts generated from the `CheckRequest`.
*
*
* map<string, string> headers = 2;
*/
@java.lang.Override
public java.lang.String 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_ & ~0x00000002);
internalGetMutableHeaders().getMutableMap().clear();
return this;
}
/**
*
*
*
* Returns a set of request contexts generated from the `CheckRequest`.
*
*
* map<string, string> headers = 2;
*/
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_ |= 0x00000002;
return internalGetMutableHeaders().getMutableMap();
}
/**
*
*
*
* Returns a set of request contexts generated from the `CheckRequest`.
*
*
* map<string, string> headers = 2;
*/
public Builder putHeaders(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new NullPointerException("map key");
}
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableHeaders().getMutableMap().put(key, value);
bitField0_ |= 0x00000002;
return this;
}
/**
*
*
*
* Returns a set of request contexts generated from the `CheckRequest`.
*
*
* map<string, string> headers = 2;
*/
public Builder putAllHeaders(java.util.Map values) {
internalGetMutableHeaders().getMutableMap().putAll(values);
bitField0_ |= 0x00000002;
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:google.api.servicecontrol.v2.CheckResponse)
}
// @@protoc_insertion_point(class_scope:google.api.servicecontrol.v2.CheckResponse)
private static final com.google.api.servicecontrol.v2.CheckResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.api.servicecontrol.v2.CheckResponse();
}
public static com.google.api.servicecontrol.v2.CheckResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CheckResponse 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 com.google.api.servicecontrol.v2.CheckResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy