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: google/api/auth.proto
package com.google.api;
/**
*
* Authentication rules for the service.
*
* By default, if a method has any authentication requirements, every request
* must include a valid credential matching one of the requirements.
* It's an error to include more than one kind of credential in a single
* request.
*
* If a method doesn't have any auth requirements, request credentials will be
* ignored.
*
*
* Protobuf type {@code google.api.AuthenticationRule}
*/
public final class AuthenticationRule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:google.api.AuthenticationRule)
AuthenticationRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use AuthenticationRule.newBuilder() to construct.
private AuthenticationRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AuthenticationRule() {
selector_ = "";
requirements_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AuthenticationRule();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.AuthenticationRule.class, com.google.api.AuthenticationRule.Builder.class);
}
public static final int SELECTOR_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object selector_ = "";
/**
*
* Selects the methods to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*
* Requirements for additional authentication providers.
*
*
* repeated .google.api.AuthRequirement requirements = 7;
*/
@java.lang.Override
public com.google.api.AuthRequirementOrBuilder getRequirementsOrBuilder(
int index) {
return requirements_.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 {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(selector_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, selector_);
}
if (oauth_ != null) {
output.writeMessage(2, getOauth());
}
if (allowWithoutCredential_ != false) {
output.writeBool(5, allowWithoutCredential_);
}
for (int i = 0; i < requirements_.size(); i++) {
output.writeMessage(7, requirements_.get(i));
}
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(selector_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, selector_);
}
if (oauth_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getOauth());
}
if (allowWithoutCredential_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, allowWithoutCredential_);
}
for (int i = 0; i < requirements_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, requirements_.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 com.google.api.AuthenticationRule)) {
return super.equals(obj);
}
com.google.api.AuthenticationRule other = (com.google.api.AuthenticationRule) obj;
if (!getSelector()
.equals(other.getSelector())) return false;
if (hasOauth() != other.hasOauth()) return false;
if (hasOauth()) {
if (!getOauth()
.equals(other.getOauth())) return false;
}
if (getAllowWithoutCredential()
!= other.getAllowWithoutCredential()) return false;
if (!getRequirementsList()
.equals(other.getRequirementsList())) 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) + SELECTOR_FIELD_NUMBER;
hash = (53 * hash) + getSelector().hashCode();
if (hasOauth()) {
hash = (37 * hash) + OAUTH_FIELD_NUMBER;
hash = (53 * hash) + getOauth().hashCode();
}
hash = (37 * hash) + ALLOW_WITHOUT_CREDENTIAL_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAllowWithoutCredential());
if (getRequirementsCount() > 0) {
hash = (37 * hash) + REQUIREMENTS_FIELD_NUMBER;
hash = (53 * hash) + getRequirementsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.api.AuthenticationRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.AuthenticationRule 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.AuthenticationRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.AuthenticationRule 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.AuthenticationRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.api.AuthenticationRule parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.api.AuthenticationRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.AuthenticationRule 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.AuthenticationRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.api.AuthenticationRule 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.AuthenticationRule parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.api.AuthenticationRule 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.AuthenticationRule 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;
}
/**
*
* Authentication rules for the service.
*
* By default, if a method has any authentication requirements, every request
* must include a valid credential matching one of the requirements.
* It's an error to include more than one kind of credential in a single
* request.
*
* If a method doesn't have any auth requirements, request credentials will be
* ignored.
*
*
* Protobuf type {@code google.api.AuthenticationRule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:google.api.AuthenticationRule)
com.google.api.AuthenticationRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.api.AuthenticationRule.class, com.google.api.AuthenticationRule.Builder.class);
}
// Construct using com.google.api.AuthenticationRule.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
selector_ = "";
oauth_ = null;
if (oauthBuilder_ != null) {
oauthBuilder_.dispose();
oauthBuilder_ = null;
}
allowWithoutCredential_ = false;
if (requirementsBuilder_ == null) {
requirements_ = java.util.Collections.emptyList();
} else {
requirements_ = null;
requirementsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.api.AuthProto.internal_static_google_api_AuthenticationRule_descriptor;
}
@java.lang.Override
public com.google.api.AuthenticationRule getDefaultInstanceForType() {
return com.google.api.AuthenticationRule.getDefaultInstance();
}
@java.lang.Override
public com.google.api.AuthenticationRule build() {
com.google.api.AuthenticationRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.api.AuthenticationRule buildPartial() {
com.google.api.AuthenticationRule result = new com.google.api.AuthenticationRule(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.api.AuthenticationRule result) {
if (requirementsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
requirements_ = java.util.Collections.unmodifiableList(requirements_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.requirements_ = requirements_;
} else {
result.requirements_ = requirementsBuilder_.build();
}
}
private void buildPartial0(com.google.api.AuthenticationRule result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.selector_ = selector_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.oauth_ = oauthBuilder_ == null
? oauth_
: oauthBuilder_.build();
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.allowWithoutCredential_ = allowWithoutCredential_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.api.AuthenticationRule) {
return mergeFrom((com.google.api.AuthenticationRule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.api.AuthenticationRule other) {
if (other == com.google.api.AuthenticationRule.getDefaultInstance()) return this;
if (!other.getSelector().isEmpty()) {
selector_ = other.selector_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasOauth()) {
mergeOauth(other.getOauth());
}
if (other.getAllowWithoutCredential() != false) {
setAllowWithoutCredential(other.getAllowWithoutCredential());
}
if (requirementsBuilder_ == null) {
if (!other.requirements_.isEmpty()) {
if (requirements_.isEmpty()) {
requirements_ = other.requirements_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureRequirementsIsMutable();
requirements_.addAll(other.requirements_);
}
onChanged();
}
} else {
if (!other.requirements_.isEmpty()) {
if (requirementsBuilder_.isEmpty()) {
requirementsBuilder_.dispose();
requirementsBuilder_ = null;
requirements_ = other.requirements_;
bitField0_ = (bitField0_ & ~0x00000008);
requirementsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRequirementsFieldBuilder() : null;
} else {
requirementsBuilder_.addAllMessages(other.requirements_);
}
}
}
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: {
selector_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
input.readMessage(
getOauthFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 40: {
allowWithoutCredential_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 40
case 58: {
com.google.api.AuthRequirement m =
input.readMessage(
com.google.api.AuthRequirement.parser(),
extensionRegistry);
if (requirementsBuilder_ == null) {
ensureRequirementsIsMutable();
requirements_.add(m);
} else {
requirementsBuilder_.addMessage(m);
}
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 selector_ = "";
/**
*
* Selects the methods to which this rule applies.
*
* Refer to [selector][google.api.DocumentationRule.selector] for syntax details.
*