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: conformance.proto
package com.google.javascript.jscomp;
/**
*
* A specification of code requirements
* NEXT ID: 17
*
*
* Protobuf type {@code jscomp.Requirement}
*/
public final class Requirement extends
com.google.protobuf.GeneratedMessageV3.ExtendableMessage<
Requirement> implements
// @@protoc_insertion_point(message_implements:jscomp.Requirement)
RequirementOrBuilder {
private static final long serialVersionUID = 0L;
// Use Requirement.newBuilder() to construct.
private Requirement(com.google.protobuf.GeneratedMessageV3.ExtendableBuilder builder) {
super(builder);
}
private Requirement() {
errorMessage_ = "";
whitelist_ = com.google.protobuf.LazyStringArrayList.EMPTY;
whitelistRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY;
whitelistEntry_ = java.util.Collections.emptyList();
onlyApplyTo_ = com.google.protobuf.LazyStringArrayList.EMPTY;
onlyApplyToRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY;
type_ = 1;
value_ = com.google.protobuf.LazyStringArrayList.EMPTY;
typeMatchingStrategy_ = 1;
javaClass_ = "";
ruleId_ = "";
extends_ = "";
reportLooseTypeViolations_ = true;
severity_ = 1;
configFile_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Requirement();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Requirement(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
errorMessage_ = bs;
break;
}
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
whitelist_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
whitelist_.add(bs);
break;
}
case 26: {
com.google.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
whitelistRegexp_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
whitelistRegexp_.add(bs);
break;
}
case 34: {
com.google.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
onlyApplyTo_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000010;
}
onlyApplyTo_.add(bs);
break;
}
case 42: {
com.google.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000020) != 0)) {
onlyApplyToRegexp_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000020;
}
onlyApplyToRegexp_.add(bs);
break;
}
case 48: {
int rawValue = input.readEnum();
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.Type value = com.google.javascript.jscomp.Requirement.Type.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(6, rawValue);
} else {
bitField0_ |= 0x00000002;
type_ = rawValue;
}
break;
}
case 58: {
com.google.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000080) != 0)) {
value_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000080;
}
value_.add(bs);
break;
}
case 66: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000010;
javaClass_ = bs;
break;
}
case 74: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000020;
ruleId_ = bs;
break;
}
case 82: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000040;
extends_ = bs;
break;
}
case 88: {
bitField0_ |= 0x00000080;
reportLooseTypeViolations_ = input.readBool();
break;
}
case 96: {
int rawValue = input.readEnum();
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.Severity value = com.google.javascript.jscomp.Requirement.Severity.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(12, rawValue);
} else {
bitField0_ |= 0x00000100;
severity_ = rawValue;
}
break;
}
case 104: {
int rawValue = input.readEnum();
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.TypeMatchingStrategy value = com.google.javascript.jscomp.Requirement.TypeMatchingStrategy.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(13, rawValue);
} else {
bitField0_ |= 0x00000008;
typeMatchingStrategy_ = rawValue;
}
break;
}
case 114: {
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
whitelistEntry_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
whitelistEntry_.add(
input.readMessage(com.google.javascript.jscomp.Requirement.WhitelistEntry.PARSER, extensionRegistry));
break;
}
case 120: {
bitField0_ |= 0x00000004;
allowExtendingValue_ = input.readBool();
break;
}
case 130: {
com.google.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00008000) != 0)) {
configFile_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00008000;
}
configFile_.add(bs);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
whitelist_ = whitelist_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
whitelistRegexp_ = whitelistRegexp_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000010) != 0)) {
onlyApplyTo_ = onlyApplyTo_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000020) != 0)) {
onlyApplyToRegexp_ = onlyApplyToRegexp_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000080) != 0)) {
value_ = value_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
whitelistEntry_ = java.util.Collections.unmodifiableList(whitelistEntry_);
}
if (((mutable_bitField0_ & 0x00008000) != 0)) {
configFile_ = configFile_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.javascript.jscomp.Requirement.class, com.google.javascript.jscomp.Requirement.Builder.class);
}
/**
*
* A classification of the requirement and how it is enforced.
*
*
* Protobuf enum {@code jscomp.Requirement.Type}
*/
public enum Type
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* A requirement enforced with code a external java class.
*
*
* CUSTOM = 1;
*/
CUSTOM(1),
/**
*
*
*
* No-op requirement that never reports any violations.
* This exists so that, if a requirement becomes obsolete but is extended by
* other requirements that can't all be simultaneously deleted, it can be
* changed to this rule, allowing it to be effectively removed without
* breaking downstream builds.
*
* A forbidden fully distinguished name. For example:
* - A global name like "eval" or "goog"
* - A namespaced value or type: namespace.Banned
* - A 'static' property: "namespace.Foo.banned"
* TODO(b/112325992): If namespace.Banned is a goog.module that does not
* call goog.declareModuleId, the rule will not match.
*
*
* BANNED_NAME = 3;
*/
BANNED_NAME(3),
/**
*
* A banned instance property, for example:
* - An 'instance' property: "namespace.Foo.prototype.banned"
* - All properties of a given name "Object.prototype.banned"
*
* A banned reading from an instance property, for example:
* - An 'instance' property: "namespace.Foo.prototype.banned"
* - All properties of a given name "Object.prototype.banned"
* Unlike BANNED_PROPERTY, this only bans reads to the property,
* i.e. its use as an rvalue.
*
* A banned write to an instance property, for example:
* - An 'instance' property: "namespace.Foo.prototype.banned"
* - All properties of a given name "Object.prototype.banned"
* Unlike BANNED_PROPERTY, this only bans assignments to the property,
* i.e. its use as an lvalue.
*
* A restricted call, for example:
* - The unsafe opt_html parameter must not be passed to createNode:
* goog.ui.tree.TreeControl.prototype.createNode:function()
*
* A banned function call. for example:
* - An 'instance' property: "namespace.Foo.prototype.banned"
* - All properties of a given name "Object.prototype.banned"
* Unlike BANNED_PROPERTY, this only bans calls to the property
* i.e. using the property as a value is allowed.
*
* A banned write of a non-constant value to an instance property.
* Unlike BANNED_PROPERTY_WRITE, this only bans assignments of a
* non-constant value.
*
* A requirement enforced with code a external java class.
*
*
* CUSTOM = 1;
*/
public static final int CUSTOM_VALUE = 1;
/**
*
*
*
* No-op requirement that never reports any violations.
* This exists so that, if a requirement becomes obsolete but is extended by
* other requirements that can't all be simultaneously deleted, it can be
* changed to this rule, allowing it to be effectively removed without
* breaking downstream builds.
*
*
* NO_OP = 15;
*/
public static final int NO_OP_VALUE = 15;
/**
*
*
*
* A forbidden source file
*
*
* BANNED_DEPENDENCY = 2;
*/
public static final int BANNED_DEPENDENCY_VALUE = 2;
/**
*
* Forbidden dependency (source or generated files) expressed via regexp.
*
*
* BANNED_DEPENDENCY_REGEX = 14;
*/
public static final int BANNED_DEPENDENCY_REGEX_VALUE = 14;
/**
*
* A forbidden fully distinguished name. For example:
* - A global name like "eval" or "goog"
* - A namespaced value or type: namespace.Banned
* - A 'static' property: "namespace.Foo.banned"
* TODO(b/112325992): If namespace.Banned is a goog.module that does not
* call goog.declareModuleId, the rule will not match.
*
*
* BANNED_NAME = 3;
*/
public static final int BANNED_NAME_VALUE = 3;
/**
*
* A banned instance property, for example:
* - An 'instance' property: "namespace.Foo.prototype.banned"
* - All properties of a given name "Object.prototype.banned"
*
*
* BANNED_PROPERTY = 4;
*/
public static final int BANNED_PROPERTY_VALUE = 4;
/**
*
* A banned reading from an instance property, for example:
* - An 'instance' property: "namespace.Foo.prototype.banned"
* - All properties of a given name "Object.prototype.banned"
* Unlike BANNED_PROPERTY, this only bans reads to the property,
* i.e. its use as an rvalue.
*
*
* BANNED_PROPERTY_READ = 5;
*/
public static final int BANNED_PROPERTY_READ_VALUE = 5;
/**
*
* A banned write to an instance property, for example:
* - An 'instance' property: "namespace.Foo.prototype.banned"
* - All properties of a given name "Object.prototype.banned"
* Unlike BANNED_PROPERTY, this only bans assignments to the property,
* i.e. its use as an lvalue.
*
*
* BANNED_PROPERTY_WRITE = 6;
*/
public static final int BANNED_PROPERTY_WRITE_VALUE = 6;
/**
*
* A restricted call, for example:
* - the "parseInt" call must be called with a radix:
* parseInt:function(string, int)
*
*
* RESTRICTED_NAME_CALL = 7;
*/
public static final int RESTRICTED_NAME_CALL_VALUE = 7;
/**
*
* A restricted call, for example:
* - The unsafe opt_html parameter must not be passed to createNode:
* goog.ui.tree.TreeControl.prototype.createNode:function()
*
*
* RESTRICTED_METHOD_CALL = 8;
*/
public static final int RESTRICTED_METHOD_CALL_VALUE = 8;
/**
*
* A banned code pattern. This check is done using against an AST.
* To ban a call to eval:
* "/** @param {?} a */ function template(a) {eval(a);}"
*
*
* BANNED_CODE_PATTERN = 9;
*/
public static final int BANNED_CODE_PATTERN_VALUE = 9;
/**
*
* A banned function call. for example:
* - An 'instance' property: "namespace.Foo.prototype.banned"
* - All properties of a given name "Object.prototype.banned"
* Unlike BANNED_PROPERTY, this only bans calls to the property
* i.e. using the property as a value is allowed.
*
*
* BANNED_PROPERTY_CALL = 10;
*/
public static final int BANNED_PROPERTY_CALL_VALUE = 10;
/**
*
* A banned write of a non-constant value to an instance property.
* Unlike BANNED_PROPERTY_WRITE, this only bans assignments of a
* non-constant value.
*
*
* BANNED_PROPERTY_NON_CONSTANT_WRITE = 11;
*/
public static final int BANNED_PROPERTY_NON_CONSTANT_WRITE_VALUE = 11;
/**
*
* A banned function call.
* Unlike BANNED_NAME, this only bans calls to the property, i.e. using the
* property as a value is allowed.
*
*
* BANNED_NAME_CALL = 12;
*/
public static final int BANNED_NAME_CALL_VALUE = 12;
/**
*
* A restricted write to an instance property.
* Example: "Element.prototype.innerHTML:!TrustedHTML|string"
*
*
* RESTRICTED_PROPERTY_WRITE = 13;
*/
public static final int RESTRICTED_PROPERTY_WRITE_VALUE = 13;
public final int getNumber() {
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 1: return CUSTOM;
case 15:
return NO_OP;
case 2: return BANNED_DEPENDENCY;
case 14: return BANNED_DEPENDENCY_REGEX;
case 3: return BANNED_NAME;
case 4: return BANNED_PROPERTY;
case 5: return BANNED_PROPERTY_READ;
case 6: return BANNED_PROPERTY_WRITE;
case 7: return RESTRICTED_NAME_CALL;
case 8: return RESTRICTED_METHOD_CALL;
case 9: return BANNED_CODE_PATTERN;
case 10: return BANNED_PROPERTY_CALL;
case 11: return BANNED_PROPERTY_NON_CONSTANT_WRITE;
case 12: return BANNED_NAME_CALL;
case 13: return RESTRICTED_PROPERTY_WRITE;
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() {
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 com.google.javascript.jscomp.Requirement.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.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private Type(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:jscomp.Requirement.Type)
}
/**
* Protobuf enum {@code jscomp.Requirement.TypeMatchingStrategy}
*/
public enum TypeMatchingStrategy
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
*
* Matches type or any subtype. Matches types with different
* nullability/voidability. Allows loose matches.
*
*
* LOOSE = 1;
*/
LOOSE(1),
/**
*
* Matches type or any subtype. Does not match types with different
* nullability/voidability. Allows loose matches.
*
* Matches type or any subtype. Does not match types with different
* nullability/voidability. Does not allow loose matches.
*
*
* SUBTYPES = 3;
*/
SUBTYPES(3),
/**
*
* Does not match subtypes. Does not match types with different
* nullability/voidability. Does not allow loose matches.
*
*
* EXACT = 4;
*/
EXACT(4),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
*
* Matches type or any subtype. Matches types with different
* nullability/voidability. Allows loose matches.
*
*
* LOOSE = 1;
*/
public static final int LOOSE_VALUE = 1;
/**
*
* Matches type or any subtype. Does not match types with different
* nullability/voidability. Allows loose matches.
*
*
* STRICT_NULLABILITY = 2;
*/
public static final int STRICT_NULLABILITY_VALUE = 2;
/**
*
* Matches type or any subtype. Does not match types with different
* nullability/voidability. Does not allow loose matches.
*
*
* SUBTYPES = 3;
*/
public static final int SUBTYPES_VALUE = 3;
/**
*
* Does not match subtypes. Does not match types with different
* nullability/voidability. Does not allow loose matches.
*
*
* EXACT = 4;
*/
public static final int EXACT_VALUE = 4;
public final int getNumber() {
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 TypeMatchingStrategy 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 TypeMatchingStrategy forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return LOOSE;
case 2: return STRICT_NULLABILITY;
case 3: return SUBTYPES;
case 4: return EXACT;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
TypeMatchingStrategy> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public TypeMatchingStrategy findValueByNumber(int number) {
return TypeMatchingStrategy.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
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 com.google.javascript.jscomp.Requirement.getDescriptor().getEnumTypes().get(1);
}
private static final TypeMatchingStrategy[] VALUES = values();
public static TypeMatchingStrategy valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private TypeMatchingStrategy(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:jscomp.Requirement.TypeMatchingStrategy)
}
/**
*
* With what severity to report the issue by default.
*
* Allows the build to continue. Can be turned into an error by setting the
* jscomp_error=conformanceConfig flag.
*
*
* WARNING = 1;
*/
WARNING(1),
/**
*
* The build fails if we are confident this is an error.
* This causes an error even on possible violations, e.g. when the type
* system is ambiguous.
*
*
* ERROR = 2;
*/
ERROR(2),
;
/**
*
* Currently treated the same as WARNING.
*
*
* UNSPECIFIED = 0;
*/
public static final int UNSPECIFIED_VALUE = 0;
/**
*
* Allows the build to continue. Can be turned into an error by setting the
* jscomp_error=conformanceConfig flag.
*
*
* WARNING = 1;
*/
public static final int WARNING_VALUE = 1;
/**
*
* The build fails if we are confident this is an error.
* This causes an error even on possible violations, e.g. when the type
* system is ambiguous.
*
*
* ERROR = 2;
*/
public static final int ERROR_VALUE = 2;
public final int getNumber() {
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 Severity 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 Severity forNumber(int value) {
switch (value) {
case 0: return UNSPECIFIED;
case 1: return WARNING;
case 2: return ERROR;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Severity> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Severity findValueByNumber(int number) {
return Severity.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
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 com.google.javascript.jscomp.Requirement.getDescriptor().getEnumTypes().get(2);
}
private static final Severity[] VALUES = values();
public static Severity valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private Severity(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:jscomp.Requirement.Severity)
}
public interface WhitelistEntryOrBuilder extends
// @@protoc_insertion_point(interface_extends:jscomp.Requirement.WhitelistEntry)
com.google.protobuf.MessageOrBuilder {
/**
* optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1;
* @return Whether the reason field is set.
*/
boolean hasReason();
/**
* optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1;
* @return The reason.
*/
com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason getReason();
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @return A list containing the prefix.
*/
java.util.List
getPrefixList();
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @return The count of prefix.
*/
int getPrefixCount();
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @param index The index of the element to return.
* @return The prefix at the given index.
*/
java.lang.String getPrefix(int index);
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @param index The index of the value to return.
* @return The bytes of the prefix at the given index.
*/
com.google.protobuf.ByteString
getPrefixBytes(int index);
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @return A list containing the regexp.
*/
java.util.List
getRegexpList();
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @return The count of regexp.
*/
int getRegexpCount();
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @param index The index of the element to return.
* @return The regexp at the given index.
*/
java.lang.String getRegexp(int index);
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @param index The index of the value to return.
* @return The bytes of the regexp at the given index.
*/
com.google.protobuf.ByteString
getRegexpBytes(int index);
/**
*
* Short explanation.
*
*
* optional string explanation = 4;
* @return Whether the explanation field is set.
*/
boolean hasExplanation();
/**
*
*
* optional string explanation = 4;
* @return The bytes for explanation.
*/
com.google.protobuf.ByteString
getExplanationBytes();
/**
* repeated string comment = 5;
* @return A list containing the comment.
*/
java.util.List
getCommentList();
/**
* repeated string comment = 5;
* @return The count of comment.
*/
int getCommentCount();
/**
* repeated string comment = 5;
* @param index The index of the element to return.
* @return The comment at the given index.
*/
java.lang.String getComment(int index);
/**
* repeated string comment = 5;
* @param index The index of the value to return.
* @return The bytes of the comment at the given index.
*/
com.google.protobuf.ByteString
getCommentBytes(int index);
/**
*
* If you build automation to remove unused entries, you can use this flag
* to enable/disable it.
*
*
* optional bool automatically_prune = 6;
* @return Whether the automaticallyPrune field is set.
*/
boolean hasAutomaticallyPrune();
/**
*
* If you build automation to remove unused entries, you can use this flag
* to enable/disable it.
*
*
* optional bool automatically_prune = 6;
* @return The automaticallyPrune.
*/
boolean getAutomaticallyPrune();
}
/**
* Protobuf type {@code jscomp.Requirement.WhitelistEntry}
*/
public static final class WhitelistEntry extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:jscomp.Requirement.WhitelistEntry)
WhitelistEntryOrBuilder {
private static final long serialVersionUID = 0L;
// Use WhitelistEntry.newBuilder() to construct.
private WhitelistEntry(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private WhitelistEntry() {
reason_ = 0;
prefix_ = com.google.protobuf.LazyStringArrayList.EMPTY;
regexp_ = com.google.protobuf.LazyStringArrayList.EMPTY;
explanation_ = "";
comment_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new WhitelistEntry();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private WhitelistEntry(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int rawValue = input.readEnum();
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason value = com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(1, rawValue);
} else {
bitField0_ |= 0x00000001;
reason_ = rawValue;
}
break;
}
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
prefix_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
prefix_.add(bs);
break;
}
case 26: {
com.google.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
regexp_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
regexp_.add(bs);
break;
}
case 34: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
explanation_ = bs;
break;
}
case 42: {
com.google.protobuf.ByteString bs = input.readBytes();
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
comment_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000010;
}
comment_.add(bs);
break;
}
case 48: {
bitField0_ |= 0x00000004;
automaticallyPrune_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
prefix_ = prefix_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
regexp_ = regexp_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000010) != 0)) {
comment_ = comment_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_WhitelistEntry_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_WhitelistEntry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.javascript.jscomp.Requirement.WhitelistEntry.class, com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder.class);
}
/**
* Protobuf enum {@code jscomp.Requirement.WhitelistEntry.Reason}
*/
public enum Reason
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNSPECIFIED = 0;
*/
UNSPECIFIED(0),
/**
* LEGACY = 1;
*/
LEGACY(1),
/**
* OUT_OF_SCOPE = 2;
*/
OUT_OF_SCOPE(2),
/**
* MANUALLY_REVIEWED = 3;
*/
MANUALLY_REVIEWED(3),
;
/**
* UNSPECIFIED = 0;
*/
public static final int UNSPECIFIED_VALUE = 0;
/**
* LEGACY = 1;
*/
public static final int LEGACY_VALUE = 1;
/**
* OUT_OF_SCOPE = 2;
*/
public static final int OUT_OF_SCOPE_VALUE = 2;
/**
* MANUALLY_REVIEWED = 3;
*/
public static final int MANUALLY_REVIEWED_VALUE = 3;
public final int getNumber() {
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 Reason 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 Reason forNumber(int value) {
switch (value) {
case 0: return UNSPECIFIED;
case 1: return LEGACY;
case 2: return OUT_OF_SCOPE;
case 3: return MANUALLY_REVIEWED;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Reason> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Reason findValueByNumber(int number) {
return Reason.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
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 com.google.javascript.jscomp.Requirement.WhitelistEntry.getDescriptor().getEnumTypes().get(0);
}
private static final Reason[] VALUES = values();
public static Reason valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private Reason(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:jscomp.Requirement.WhitelistEntry.Reason)
}
private int bitField0_;
public static final int REASON_FIELD_NUMBER = 1;
private int reason_;
/**
* optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1;
* @return Whether the reason field is set.
*/
public boolean hasReason() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1;
* @return The reason.
*/
public com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason getReason() {
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason result = com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason.valueOf(reason_);
return result == null ? com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason.UNSPECIFIED : result;
}
public static final int PREFIX_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList prefix_;
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @return A list containing the prefix.
*/
public com.google.protobuf.ProtocolStringList
getPrefixList() {
return prefix_;
}
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @return The count of prefix.
*/
public int getPrefixCount() {
return prefix_.size();
}
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @param index The index of the element to return.
* @return The prefix at the given index.
*/
public java.lang.String getPrefix(int index) {
return prefix_.get(index);
}
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @param index The index of the value to return.
* @return The bytes of the prefix at the given index.
*/
public com.google.protobuf.ByteString
getPrefixBytes(int index) {
return prefix_.getByteString(index);
}
public static final int REGEXP_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList regexp_;
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @return A list containing the regexp.
*/
public com.google.protobuf.ProtocolStringList
getRegexpList() {
return regexp_;
}
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @return The count of regexp.
*/
public int getRegexpCount() {
return regexp_.size();
}
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @param index The index of the element to return.
* @return The regexp at the given index.
*/
public java.lang.String getRegexp(int index) {
return regexp_.get(index);
}
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @param index The index of the value to return.
* @return The bytes of the regexp at the given index.
*/
public com.google.protobuf.ByteString
getRegexpBytes(int index) {
return regexp_.getByteString(index);
}
public static final int EXPLANATION_FIELD_NUMBER = 4;
private volatile java.lang.Object explanation_;
/**
*
* Short explanation.
*
*
* optional string explanation = 4;
* @return Whether the explanation field is set.
*/
public boolean hasExplanation() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
* optional string explanation = 4;
* @return The bytes for explanation.
*/
public com.google.protobuf.ByteString
getExplanationBytes() {
java.lang.Object ref = explanation_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
explanation_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int COMMENT_FIELD_NUMBER = 5;
private com.google.protobuf.LazyStringList comment_;
/**
* repeated string comment = 5;
* @return A list containing the comment.
*/
public com.google.protobuf.ProtocolStringList
getCommentList() {
return comment_;
}
/**
* repeated string comment = 5;
* @return The count of comment.
*/
public int getCommentCount() {
return comment_.size();
}
/**
* repeated string comment = 5;
* @param index The index of the element to return.
* @return The comment at the given index.
*/
public java.lang.String getComment(int index) {
return comment_.get(index);
}
/**
* repeated string comment = 5;
* @param index The index of the value to return.
* @return The bytes of the comment at the given index.
*/
public com.google.protobuf.ByteString
getCommentBytes(int index) {
return comment_.getByteString(index);
}
public static final int AUTOMATICALLY_PRUNE_FIELD_NUMBER = 6;
private boolean automaticallyPrune_;
/**
*
* If you build automation to remove unused entries, you can use this flag
* to enable/disable it.
*
*
* optional bool automatically_prune = 6;
* @return Whether the automaticallyPrune field is set.
*/
public boolean hasAutomaticallyPrune() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* If you build automation to remove unused entries, you can use this flag
* to enable/disable it.
*
*
* optional bool automatically_prune = 6;
* @return The automaticallyPrune.
*/
public boolean getAutomaticallyPrune() {
return automaticallyPrune_;
}
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.writeEnum(1, reason_);
}
for (int i = 0; i < prefix_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, prefix_.getRaw(i));
}
for (int i = 0; i < regexp_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, regexp_.getRaw(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, explanation_);
}
for (int i = 0; i < comment_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, comment_.getRaw(i));
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeBool(6, automaticallyPrune_);
}
unknownFields.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
.computeEnumSize(1, reason_);
}
{
int dataSize = 0;
for (int i = 0; i < prefix_.size(); i++) {
dataSize += computeStringSizeNoTag(prefix_.getRaw(i));
}
size += dataSize;
size += 1 * getPrefixList().size();
}
{
int dataSize = 0;
for (int i = 0; i < regexp_.size(); i++) {
dataSize += computeStringSizeNoTag(regexp_.getRaw(i));
}
size += dataSize;
size += 1 * getRegexpList().size();
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, explanation_);
}
{
int dataSize = 0;
for (int i = 0; i < comment_.size(); i++) {
dataSize += computeStringSizeNoTag(comment_.getRaw(i));
}
size += dataSize;
size += 1 * getCommentList().size();
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, automaticallyPrune_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.javascript.jscomp.Requirement.WhitelistEntry)) {
return super.equals(obj);
}
com.google.javascript.jscomp.Requirement.WhitelistEntry other = (com.google.javascript.jscomp.Requirement.WhitelistEntry) obj;
if (hasReason() != other.hasReason()) return false;
if (hasReason()) {
if (reason_ != other.reason_) return false;
}
if (!getPrefixList()
.equals(other.getPrefixList())) return false;
if (!getRegexpList()
.equals(other.getRegexpList())) return false;
if (hasExplanation() != other.hasExplanation()) return false;
if (hasExplanation()) {
if (!getExplanation()
.equals(other.getExplanation())) return false;
}
if (!getCommentList()
.equals(other.getCommentList())) return false;
if (hasAutomaticallyPrune() != other.hasAutomaticallyPrune()) return false;
if (hasAutomaticallyPrune()) {
if (getAutomaticallyPrune()
!= other.getAutomaticallyPrune()) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasReason()) {
hash = (37 * hash) + REASON_FIELD_NUMBER;
hash = (53 * hash) + reason_;
}
if (getPrefixCount() > 0) {
hash = (37 * hash) + PREFIX_FIELD_NUMBER;
hash = (53 * hash) + getPrefixList().hashCode();
}
if (getRegexpCount() > 0) {
hash = (37 * hash) + REGEXP_FIELD_NUMBER;
hash = (53 * hash) + getRegexpList().hashCode();
}
if (hasExplanation()) {
hash = (37 * hash) + EXPLANATION_FIELD_NUMBER;
hash = (53 * hash) + getExplanation().hashCode();
}
if (getCommentCount() > 0) {
hash = (37 * hash) + COMMENT_FIELD_NUMBER;
hash = (53 * hash) + getCommentList().hashCode();
}
if (hasAutomaticallyPrune()) {
hash = (37 * hash) + AUTOMATICALLY_PRUNE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAutomaticallyPrune());
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.javascript.jscomp.Requirement.WhitelistEntry 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.javascript.jscomp.Requirement.WhitelistEntry parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.javascript.jscomp.Requirement.WhitelistEntry parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.javascript.jscomp.Requirement.WhitelistEntry 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.javascript.jscomp.Requirement.WhitelistEntry parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.javascript.jscomp.Requirement.WhitelistEntry 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.javascript.jscomp.Requirement.WhitelistEntry parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.javascript.jscomp.Requirement.WhitelistEntry 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.javascript.jscomp.Requirement.WhitelistEntry 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 jscomp.Requirement.WhitelistEntry}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:jscomp.Requirement.WhitelistEntry)
com.google.javascript.jscomp.Requirement.WhitelistEntryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_WhitelistEntry_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_WhitelistEntry_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.javascript.jscomp.Requirement.WhitelistEntry.class, com.google.javascript.jscomp.Requirement.WhitelistEntry.Builder.class);
}
// Construct using com.google.javascript.jscomp.Requirement.WhitelistEntry.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
reason_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
prefix_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
regexp_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
explanation_ = "";
bitField0_ = (bitField0_ & ~0x00000008);
comment_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
automaticallyPrune_ = false;
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.google.javascript.jscomp.Conformance.internal_static_jscomp_Requirement_WhitelistEntry_descriptor;
}
@java.lang.Override
public com.google.javascript.jscomp.Requirement.WhitelistEntry getDefaultInstanceForType() {
return com.google.javascript.jscomp.Requirement.WhitelistEntry.getDefaultInstance();
}
@java.lang.Override
public com.google.javascript.jscomp.Requirement.WhitelistEntry build() {
com.google.javascript.jscomp.Requirement.WhitelistEntry result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.javascript.jscomp.Requirement.WhitelistEntry buildPartial() {
com.google.javascript.jscomp.Requirement.WhitelistEntry result = new com.google.javascript.jscomp.Requirement.WhitelistEntry(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
to_bitField0_ |= 0x00000001;
}
result.reason_ = reason_;
if (((bitField0_ & 0x00000002) != 0)) {
prefix_ = prefix_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.prefix_ = prefix_;
if (((bitField0_ & 0x00000004) != 0)) {
regexp_ = regexp_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.regexp_ = regexp_;
if (((from_bitField0_ & 0x00000008) != 0)) {
to_bitField0_ |= 0x00000002;
}
result.explanation_ = explanation_;
if (((bitField0_ & 0x00000010) != 0)) {
comment_ = comment_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000010);
}
result.comment_ = comment_;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.automaticallyPrune_ = automaticallyPrune_;
to_bitField0_ |= 0x00000004;
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.javascript.jscomp.Requirement.WhitelistEntry) {
return mergeFrom((com.google.javascript.jscomp.Requirement.WhitelistEntry)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.javascript.jscomp.Requirement.WhitelistEntry other) {
if (other == com.google.javascript.jscomp.Requirement.WhitelistEntry.getDefaultInstance()) return this;
if (other.hasReason()) {
setReason(other.getReason());
}
if (!other.prefix_.isEmpty()) {
if (prefix_.isEmpty()) {
prefix_ = other.prefix_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensurePrefixIsMutable();
prefix_.addAll(other.prefix_);
}
onChanged();
}
if (!other.regexp_.isEmpty()) {
if (regexp_.isEmpty()) {
regexp_ = other.regexp_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureRegexpIsMutable();
regexp_.addAll(other.regexp_);
}
onChanged();
}
if (other.hasExplanation()) {
bitField0_ |= 0x00000008;
explanation_ = other.explanation_;
onChanged();
}
if (!other.comment_.isEmpty()) {
if (comment_.isEmpty()) {
comment_ = other.comment_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureCommentIsMutable();
comment_.addAll(other.comment_);
}
onChanged();
}
if (other.hasAutomaticallyPrune()) {
setAutomaticallyPrune(other.getAutomaticallyPrune());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.javascript.jscomp.Requirement.WhitelistEntry parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.javascript.jscomp.Requirement.WhitelistEntry) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int reason_ = 0;
/**
* optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1;
* @return Whether the reason field is set.
*/
public boolean hasReason() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1;
* @return The reason.
*/
public com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason getReason() {
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason result = com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason.valueOf(reason_);
return result == null ? com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason.UNSPECIFIED : result;
}
/**
* optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1;
* @param value The reason to set.
* @return This builder for chaining.
*/
public Builder setReason(com.google.javascript.jscomp.Requirement.WhitelistEntry.Reason value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
reason_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .jscomp.Requirement.WhitelistEntry.Reason reason = 1;
* @return This builder for chaining.
*/
public Builder clearReason() {
bitField0_ = (bitField0_ & ~0x00000001);
reason_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList prefix_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensurePrefixIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
prefix_ = new com.google.protobuf.LazyStringArrayList(prefix_);
bitField0_ |= 0x00000002;
}
}
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @return A list containing the prefix.
*/
public com.google.protobuf.ProtocolStringList
getPrefixList() {
return prefix_.getUnmodifiableView();
}
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @return The count of prefix.
*/
public int getPrefixCount() {
return prefix_.size();
}
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @param index The index of the element to return.
* @return The prefix at the given index.
*/
public java.lang.String getPrefix(int index) {
return prefix_.get(index);
}
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @param index The index of the value to return.
* @return The bytes of the prefix at the given index.
*/
public com.google.protobuf.ByteString
getPrefixBytes(int index) {
return prefix_.getByteString(index);
}
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @param index The index to set the value at.
* @param value The prefix to set.
* @return This builder for chaining.
*/
public Builder setPrefix(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensurePrefixIsMutable();
prefix_.set(index, value);
onChanged();
return this;
}
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @param value The prefix to add.
* @return This builder for chaining.
*/
public Builder addPrefix(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensurePrefixIsMutable();
prefix_.add(value);
onChanged();
return this;
}
/**
*
* A list of source path prefixes.
*
*
* repeated string prefix = 2;
* @param values The prefix to add.
* @return This builder for chaining.
*/
public Builder addAllPrefix(
java.lang.Iterable values) {
ensurePrefixIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, prefix_);
onChanged();
return this;
}
/**
*
*
* repeated string prefix = 2;
* @param value The bytes of the prefix to add.
* @return This builder for chaining.
*/
public Builder addPrefixBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensurePrefixIsMutable();
prefix_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList regexp_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureRegexpIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
regexp_ = new com.google.protobuf.LazyStringArrayList(regexp_);
bitField0_ |= 0x00000004;
}
}
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @return A list containing the regexp.
*/
public com.google.protobuf.ProtocolStringList
getRegexpList() {
return regexp_.getUnmodifiableView();
}
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @return The count of regexp.
*/
public int getRegexpCount() {
return regexp_.size();
}
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @param index The index of the element to return.
* @return The regexp at the given index.
*/
public java.lang.String getRegexp(int index) {
return regexp_.get(index);
}
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @param index The index of the value to return.
* @return The bytes of the regexp at the given index.
*/
public com.google.protobuf.ByteString
getRegexpBytes(int index) {
return regexp_.getByteString(index);
}
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @param index The index to set the value at.
* @param value The regexp to set.
* @return This builder for chaining.
*/
public Builder setRegexp(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRegexpIsMutable();
regexp_.set(index, value);
onChanged();
return this;
}
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @param value The regexp to add.
* @return This builder for chaining.
*/
public Builder addRegexp(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureRegexpIsMutable();
regexp_.add(value);
onChanged();
return this;
}
/**
*
* A list of regexes matching sources to be ignored
*
*
* repeated string regexp = 3;
* @param values The regexp to add.
* @return This builder for chaining.
*/
public Builder addAllRegexp(
java.lang.Iterable values) {
ensureRegexpIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, regexp_);
onChanged();
return this;
}
/**
*
* A list of regexes matching sources to be ignored
*
*
* optional string explanation = 4;
* @param value The bytes for explanation to set.
* @return This builder for chaining.
*/
public Builder setExplanationBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
explanation_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList comment_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureCommentIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
comment_ = new com.google.protobuf.LazyStringArrayList(comment_);
bitField0_ |= 0x00000010;
}
}
/**
* repeated string comment = 5;
* @return A list containing the comment.
*/
public com.google.protobuf.ProtocolStringList
getCommentList() {
return comment_.getUnmodifiableView();
}
/**
* repeated string comment = 5;
* @return The count of comment.
*/
public int getCommentCount() {
return comment_.size();
}
/**
* repeated string comment = 5;
* @param index The index of the element to return.
* @return The comment at the given index.
*/
public java.lang.String getComment(int index) {
return comment_.get(index);
}
/**
* repeated string comment = 5;
* @param index The index of the value to return.
* @return The bytes of the comment at the given index.
*/
public com.google.protobuf.ByteString
getCommentBytes(int index) {
return comment_.getByteString(index);
}
/**
* repeated string comment = 5;
* @param index The index to set the value at.
* @param value The comment to set.
* @return This builder for chaining.
*/
public Builder setComment(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCommentIsMutable();
comment_.set(index, value);
onChanged();
return this;
}
/**
* repeated string comment = 5;
* @param value The comment to add.
* @return This builder for chaining.
*/
public Builder addComment(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureCommentIsMutable();
comment_.add(value);
onChanged();
return this;
}
/**
* repeated string comment = 5;
* @param values The comment to add.
* @return This builder for chaining.
*/
public Builder addAllComment(
java.lang.Iterable values) {
ensureCommentIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, comment_);
onChanged();
return this;
}
/**
* repeated string comment = 5;
* @return This builder for chaining.
*/
public Builder clearComment() {
comment_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
* repeated string comment = 5;
* @param value The bytes of the comment to add.
* @return This builder for chaining.
*/
public Builder addCommentBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureCommentIsMutable();
comment_.add(value);
onChanged();
return this;
}
private boolean automaticallyPrune_ ;
/**
*
* If you build automation to remove unused entries, you can use this flag
* to enable/disable it.
*
*
* optional bool automatically_prune = 6;
* @return Whether the automaticallyPrune field is set.
*/
public boolean hasAutomaticallyPrune() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* If you build automation to remove unused entries, you can use this flag
* to enable/disable it.
*
* If you build automation to remove unused entries, you can use this flag
* to enable/disable it.
*
*
* optional bool automatically_prune = 6;
* @param value The automaticallyPrune to set.
* @return This builder for chaining.
*/
public Builder setAutomaticallyPrune(boolean value) {
bitField0_ |= 0x00000020;
automaticallyPrune_ = value;
onChanged();
return this;
}
/**
*
* If you build automation to remove unused entries, you can use this flag
* to enable/disable it.
*
*
* optional bool automatically_prune = 6;
* @return This builder for chaining.
*/
public Builder clearAutomaticallyPrune() {
bitField0_ = (bitField0_ & ~0x00000020);
automaticallyPrune_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:jscomp.Requirement.WhitelistEntry)
}
// @@protoc_insertion_point(class_scope:jscomp.Requirement.WhitelistEntry)
private static final com.google.javascript.jscomp.Requirement.WhitelistEntry DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.javascript.jscomp.Requirement.WhitelistEntry();
}
public static com.google.javascript.jscomp.Requirement.WhitelistEntry getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public WhitelistEntry parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new WhitelistEntry(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.javascript.jscomp.Requirement.WhitelistEntry getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int ERROR_MESSAGE_FIELD_NUMBER = 1;
private volatile java.lang.Object errorMessage_;
/**
*
* Required: The message to report when a requirement is violated. This should
* reference a document describing the reasoning for the requirement
* and contacts.
*
*
* optional string error_message = 1;
* @return Whether the errorMessage field is set.
*/
public boolean hasErrorMessage() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Required: The message to report when a requirement is violated. This should
* reference a document describing the reasoning for the requirement
* and contacts.
*
* Required: The message to report when a requirement is violated. This should
* reference a document describing the reasoning for the requirement
* and contacts.
*
*
* optional string error_message = 1;
* @return The bytes for errorMessage.
*/
public com.google.protobuf.ByteString
getErrorMessageBytes() {
java.lang.Object ref = errorMessage_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
errorMessage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WHITELIST_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList whitelist_;
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @return A list containing the whitelist.
*/
public com.google.protobuf.ProtocolStringList
getWhitelistList() {
return whitelist_;
}
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @return The count of whitelist.
*/
public int getWhitelistCount() {
return whitelist_.size();
}
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @param index The index of the element to return.
* @return The whitelist at the given index.
*/
public java.lang.String getWhitelist(int index) {
return whitelist_.get(index);
}
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @param index The index of the value to return.
* @return The bytes of the whitelist at the given index.
*/
public com.google.protobuf.ByteString
getWhitelistBytes(int index) {
return whitelist_.getByteString(index);
}
public static final int WHITELIST_REGEXP_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList whitelistRegexp_;
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
*
* repeated string whitelist_regexp = 3;
* @return A list containing the whitelistRegexp.
*/
public com.google.protobuf.ProtocolStringList
getWhitelistRegexpList() {
return whitelistRegexp_;
}
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
*
* repeated string whitelist_regexp = 3;
* @return The count of whitelistRegexp.
*/
public int getWhitelistRegexpCount() {
return whitelistRegexp_.size();
}
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
*
* repeated string whitelist_regexp = 3;
* @param index The index of the element to return.
* @return The whitelistRegexp at the given index.
*/
public java.lang.String getWhitelistRegexp(int index) {
return whitelistRegexp_.get(index);
}
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
*
* repeated string whitelist_regexp = 3;
* @param index The index of the value to return.
* @return The bytes of the whitelistRegexp at the given index.
*/
public com.google.protobuf.ByteString
getWhitelistRegexpBytes(int index) {
return whitelistRegexp_.getByteString(index);
}
public static final int WHITELIST_ENTRY_FIELD_NUMBER = 14;
private java.util.List whitelistEntry_;
/**
* repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
*/
public java.util.List getWhitelistEntryList() {
return whitelistEntry_;
}
/**
* repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
*/
public java.util.List extends com.google.javascript.jscomp.Requirement.WhitelistEntryOrBuilder>
getWhitelistEntryOrBuilderList() {
return whitelistEntry_;
}
/**
* repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
*/
public int getWhitelistEntryCount() {
return whitelistEntry_.size();
}
/**
* repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
*/
public com.google.javascript.jscomp.Requirement.WhitelistEntry getWhitelistEntry(int index) {
return whitelistEntry_.get(index);
}
/**
* repeated .jscomp.Requirement.WhitelistEntry whitelist_entry = 14;
*/
public com.google.javascript.jscomp.Requirement.WhitelistEntryOrBuilder getWhitelistEntryOrBuilder(
int index) {
return whitelistEntry_.get(index);
}
public static final int ONLY_APPLY_TO_FIELD_NUMBER = 4;
private com.google.protobuf.LazyStringList onlyApplyTo_;
/**
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @return A list containing the onlyApplyTo.
*/
public com.google.protobuf.ProtocolStringList
getOnlyApplyToList() {
return onlyApplyTo_;
}
/**
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @return The count of onlyApplyTo.
*/
public int getOnlyApplyToCount() {
return onlyApplyTo_.size();
}
/**
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @param index The index of the element to return.
* @return The onlyApplyTo at the given index.
*/
public java.lang.String getOnlyApplyTo(int index) {
return onlyApplyTo_.get(index);
}
/**
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @param index The index of the value to return.
* @return The bytes of the onlyApplyTo at the given index.
*/
public com.google.protobuf.ByteString
getOnlyApplyToBytes(int index) {
return onlyApplyTo_.getByteString(index);
}
public static final int ONLY_APPLY_TO_REGEXP_FIELD_NUMBER = 5;
private com.google.protobuf.LazyStringList onlyApplyToRegexp_;
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @return A list containing the onlyApplyToRegexp.
*/
public com.google.protobuf.ProtocolStringList
getOnlyApplyToRegexpList() {
return onlyApplyToRegexp_;
}
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @return The count of onlyApplyToRegexp.
*/
public int getOnlyApplyToRegexpCount() {
return onlyApplyToRegexp_.size();
}
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @param index The index of the element to return.
* @return The onlyApplyToRegexp at the given index.
*/
public java.lang.String getOnlyApplyToRegexp(int index) {
return onlyApplyToRegexp_.get(index);
}
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @param index The index of the value to return.
* @return The bytes of the onlyApplyToRegexp at the given index.
*/
public com.google.protobuf.ByteString
getOnlyApplyToRegexpBytes(int index) {
return onlyApplyToRegexp_.getByteString(index);
}
public static final int TYPE_FIELD_NUMBER = 6;
private int type_;
/**
*
* Required: The type of requirement.
*
*
* optional .jscomp.Requirement.Type type = 6;
* @return Whether the type field is set.
*/
public boolean hasType() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Required: The type of requirement.
*
*
* optional .jscomp.Requirement.Type type = 6;
* @return The type.
*/
public com.google.javascript.jscomp.Requirement.Type getType() {
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.Type result = com.google.javascript.jscomp.Requirement.Type.valueOf(type_);
return result == null ? com.google.javascript.jscomp.Requirement.Type.CUSTOM : result;
}
public static final int VALUE_FIELD_NUMBER = 7;
private com.google.protobuf.LazyStringList value_;
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @return A list containing the value.
*/
public com.google.protobuf.ProtocolStringList
getValueList() {
return value_;
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @return The count of value.
*/
public int getValueCount() {
return value_.size();
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @param index The index of the element to return.
* @return The value at the given index.
*/
public java.lang.String getValue(int index) {
return value_.get(index);
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @param index The index of the value to return.
* @return The bytes of the value at the given index.
*/
public com.google.protobuf.ByteString
getValueBytes(int index) {
return value_.getByteString(index);
}
public static final int ALLOW_EXTENDING_VALUE_FIELD_NUMBER = 15;
private boolean allowExtendingValue_;
/**
*
* Whether to allow subconfigs to extend the "value" field. This does not
* make sense for banning values, but when the value is used as a whitelist,
* it becomes important.
*
*
* optional bool allow_extending_value = 15;
* @return Whether the allowExtendingValue field is set.
*/
public boolean hasAllowExtendingValue() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Whether to allow subconfigs to extend the "value" field. This does not
* make sense for banning values, but when the value is used as a whitelist,
* it becomes important.
*
*
* optional bool allow_extending_value = 15;
* @return The allowExtendingValue.
*/
public boolean getAllowExtendingValue() {
return allowExtendingValue_;
}
public static final int TYPE_MATCHING_STRATEGY_FIELD_NUMBER = 13;
private int typeMatchingStrategy_;
/**
*
* Strategy to use for matching types in the value parameter (e.g. for
* BANNED_CODE_PATTERN checks).
*
*
* optional .jscomp.Requirement.TypeMatchingStrategy type_matching_strategy = 13 [default = LOOSE];
* @return Whether the typeMatchingStrategy field is set.
*/
public boolean hasTypeMatchingStrategy() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Strategy to use for matching types in the value parameter (e.g. for
* BANNED_CODE_PATTERN checks).
*
*
* optional .jscomp.Requirement.TypeMatchingStrategy type_matching_strategy = 13 [default = LOOSE];
* @return The typeMatchingStrategy.
*/
public com.google.javascript.jscomp.Requirement.TypeMatchingStrategy getTypeMatchingStrategy() {
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.TypeMatchingStrategy result = com.google.javascript.jscomp.Requirement.TypeMatchingStrategy.valueOf(typeMatchingStrategy_);
return result == null ? com.google.javascript.jscomp.Requirement.TypeMatchingStrategy.LOOSE : result;
}
public static final int JAVA_CLASS_FIELD_NUMBER = 8;
private volatile java.lang.Object javaClass_;
/**
*
* For "custom" requirements, the Java class used to enforce the requirement.
* Ignored otherwise.
*
*
* optional string java_class = 8;
* @return Whether the javaClass field is set.
*/
public boolean hasJavaClass() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* For "custom" requirements, the Java class used to enforce the requirement.
* Ignored otherwise.
*
* Gives the rule an unique ID that can be used for extending in other rules
* through 'extends'. An example of ID is 'closure:innerHtml'.
*
*
* optional string rule_id = 9;
* @return The bytes for ruleId.
*/
public com.google.protobuf.ByteString
getRuleIdBytes() {
java.lang.Object ref = ruleId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ruleId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXTENDS_FIELD_NUMBER = 10;
private volatile java.lang.Object extends_;
/**
*
* Allows extending whitelists of rules with the specified rule_id. If this
* field is specified then all fields except whitelist, whitelist_regexp,
* only_apply_to and only_apply_to_regexp are ignored.
*
*
* optional string extends = 10;
* @return Whether the extends field is set.
*/
public boolean hasExtends() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Allows extending whitelists of rules with the specified rule_id. If this
* field is specified then all fields except whitelist, whitelist_regexp,
* only_apply_to and only_apply_to_regexp are ignored.
*
* Allows extending whitelists of rules with the specified rule_id. If this
* field is specified then all fields except whitelist, whitelist_regexp,
* only_apply_to and only_apply_to_regexp are ignored.
*
*
* optional string extends = 10;
* @return The bytes for extends.
*/
public com.google.protobuf.ByteString
getExtendsBytes() {
java.lang.Object ref = extends_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
extends_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REPORT_LOOSE_TYPE_VIOLATIONS_FIELD_NUMBER = 11;
private boolean reportLooseTypeViolations_;
/**
*
* Whether to report possible violations when type information is not exact.
* Normally, violations on parent types are reported as possible violations.
* This field allows to ignore them and report only violations on exact types.
* This changes the balance between the false positives and the false
* negatives. With the default value, there might be lots of false positives
* (possible violations) but there shouldn't be any false negatives. Without
* reporting the loose type violations, there will be less false positives but
* there can also be false negatives (an actual violation that is not
* reported).
*
*
* optional bool report_loose_type_violations = 11 [default = true];
* @return Whether the reportLooseTypeViolations field is set.
*/
public boolean hasReportLooseTypeViolations() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* Whether to report possible violations when type information is not exact.
* Normally, violations on parent types are reported as possible violations.
* This field allows to ignore them and report only violations on exact types.
* This changes the balance between the false positives and the false
* negatives. With the default value, there might be lots of false positives
* (possible violations) but there shouldn't be any false negatives. Without
* reporting the loose type violations, there will be less false positives but
* there can also be false negatives (an actual violation that is not
* reported).
*
*
* optional bool report_loose_type_violations = 11 [default = true];
* @return The reportLooseTypeViolations.
*/
public boolean getReportLooseTypeViolations() {
return reportLooseTypeViolations_;
}
public static final int SEVERITY_FIELD_NUMBER = 12;
private int severity_;
/**
* optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
* @return Whether the severity field is set.
*/
public boolean hasSeverity() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
* optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
* @return The severity.
*/
public com.google.javascript.jscomp.Requirement.Severity getSeverity() {
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.Severity result = com.google.javascript.jscomp.Requirement.Severity.valueOf(severity_);
return result == null ? com.google.javascript.jscomp.Requirement.Severity.WARNING : result;
}
public static final int CONFIG_FILE_FIELD_NUMBER = 16;
private com.google.protobuf.LazyStringList configFile_;
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @return A list containing the configFile.
*/
public com.google.protobuf.ProtocolStringList
getConfigFileList() {
return configFile_;
}
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @return The count of configFile.
*/
public int getConfigFileCount() {
return configFile_.size();
}
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @param index The index of the element to return.
* @return The configFile at the given index.
*/
public java.lang.String getConfigFile(int index) {
return configFile_.get(index);
}
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @param index The index of the value to return.
* @return The bytes of the configFile at the given index.
*/
public com.google.protobuf.ByteString
getConfigFileBytes(int index) {
return configFile_.getByteString(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;
if (!extensionsAreInitialized()) {
memoizedIsInitialized = 0;
return false;
}
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
com.google.protobuf.GeneratedMessageV3
.ExtendableMessage.ExtensionWriter
extensionWriter = newExtensionWriter();
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, errorMessage_);
}
for (int i = 0; i < whitelist_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, whitelist_.getRaw(i));
}
for (int i = 0; i < whitelistRegexp_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, whitelistRegexp_.getRaw(i));
}
for (int i = 0; i < onlyApplyTo_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, onlyApplyTo_.getRaw(i));
}
for (int i = 0; i < onlyApplyToRegexp_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, onlyApplyToRegexp_.getRaw(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeEnum(6, type_);
}
for (int i = 0; i < value_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, value_.getRaw(i));
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, javaClass_);
}
if (((bitField0_ & 0x00000020) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, ruleId_);
}
if (((bitField0_ & 0x00000040) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, extends_);
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeBool(11, reportLooseTypeViolations_);
}
if (((bitField0_ & 0x00000100) != 0)) {
output.writeEnum(12, severity_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeEnum(13, typeMatchingStrategy_);
}
for (int i = 0; i < whitelistEntry_.size(); i++) {
output.writeMessage(14, whitelistEntry_.get(i));
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeBool(15, allowExtendingValue_);
}
for (int i = 0; i < configFile_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 16, configFile_.getRaw(i));
}
extensionWriter.writeUntil(536870912, output);
unknownFields.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.GeneratedMessageV3.computeStringSize(1, errorMessage_);
}
{
int dataSize = 0;
for (int i = 0; i < whitelist_.size(); i++) {
dataSize += computeStringSizeNoTag(whitelist_.getRaw(i));
}
size += dataSize;
size += 1 * getWhitelistList().size();
}
{
int dataSize = 0;
for (int i = 0; i < whitelistRegexp_.size(); i++) {
dataSize += computeStringSizeNoTag(whitelistRegexp_.getRaw(i));
}
size += dataSize;
size += 1 * getWhitelistRegexpList().size();
}
{
int dataSize = 0;
for (int i = 0; i < onlyApplyTo_.size(); i++) {
dataSize += computeStringSizeNoTag(onlyApplyTo_.getRaw(i));
}
size += dataSize;
size += 1 * getOnlyApplyToList().size();
}
{
int dataSize = 0;
for (int i = 0; i < onlyApplyToRegexp_.size(); i++) {
dataSize += computeStringSizeNoTag(onlyApplyToRegexp_.getRaw(i));
}
size += dataSize;
size += 1 * getOnlyApplyToRegexpList().size();
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(6, type_);
}
{
int dataSize = 0;
for (int i = 0; i < value_.size(); i++) {
dataSize += computeStringSizeNoTag(value_.getRaw(i));
}
size += dataSize;
size += 1 * getValueList().size();
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, javaClass_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, ruleId_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, extends_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(11, reportLooseTypeViolations_);
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(12, severity_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(13, typeMatchingStrategy_);
}
for (int i = 0; i < whitelistEntry_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, whitelistEntry_.get(i));
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(15, allowExtendingValue_);
}
{
int dataSize = 0;
for (int i = 0; i < configFile_.size(); i++) {
dataSize += computeStringSizeNoTag(configFile_.getRaw(i));
}
size += dataSize;
size += 2 * getConfigFileList().size();
}
size += extensionsSerializedSize();
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.javascript.jscomp.Requirement)) {
return super.equals(obj);
}
com.google.javascript.jscomp.Requirement other = (com.google.javascript.jscomp.Requirement) obj;
if (hasErrorMessage() != other.hasErrorMessage()) return false;
if (hasErrorMessage()) {
if (!getErrorMessage()
.equals(other.getErrorMessage())) return false;
}
if (!getWhitelistList()
.equals(other.getWhitelistList())) return false;
if (!getWhitelistRegexpList()
.equals(other.getWhitelistRegexpList())) return false;
if (!getWhitelistEntryList()
.equals(other.getWhitelistEntryList())) return false;
if (!getOnlyApplyToList()
.equals(other.getOnlyApplyToList())) return false;
if (!getOnlyApplyToRegexpList()
.equals(other.getOnlyApplyToRegexpList())) return false;
if (hasType() != other.hasType()) return false;
if (hasType()) {
if (type_ != other.type_) return false;
}
if (!getValueList()
.equals(other.getValueList())) return false;
if (hasAllowExtendingValue() != other.hasAllowExtendingValue()) return false;
if (hasAllowExtendingValue()) {
if (getAllowExtendingValue()
!= other.getAllowExtendingValue()) return false;
}
if (hasTypeMatchingStrategy() != other.hasTypeMatchingStrategy()) return false;
if (hasTypeMatchingStrategy()) {
if (typeMatchingStrategy_ != other.typeMatchingStrategy_) return false;
}
if (hasJavaClass() != other.hasJavaClass()) return false;
if (hasJavaClass()) {
if (!getJavaClass()
.equals(other.getJavaClass())) return false;
}
if (hasRuleId() != other.hasRuleId()) return false;
if (hasRuleId()) {
if (!getRuleId()
.equals(other.getRuleId())) return false;
}
if (hasExtends() != other.hasExtends()) return false;
if (hasExtends()) {
if (!getExtends()
.equals(other.getExtends())) return false;
}
if (hasReportLooseTypeViolations() != other.hasReportLooseTypeViolations()) return false;
if (hasReportLooseTypeViolations()) {
if (getReportLooseTypeViolations()
!= other.getReportLooseTypeViolations()) return false;
}
if (hasSeverity() != other.hasSeverity()) return false;
if (hasSeverity()) {
if (severity_ != other.severity_) return false;
}
if (!getConfigFileList()
.equals(other.getConfigFileList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
if (!getExtensionFields().equals(other.getExtensionFields()))
return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasErrorMessage()) {
hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getErrorMessage().hashCode();
}
if (getWhitelistCount() > 0) {
hash = (37 * hash) + WHITELIST_FIELD_NUMBER;
hash = (53 * hash) + getWhitelistList().hashCode();
}
if (getWhitelistRegexpCount() > 0) {
hash = (37 * hash) + WHITELIST_REGEXP_FIELD_NUMBER;
hash = (53 * hash) + getWhitelistRegexpList().hashCode();
}
if (getWhitelistEntryCount() > 0) {
hash = (37 * hash) + WHITELIST_ENTRY_FIELD_NUMBER;
hash = (53 * hash) + getWhitelistEntryList().hashCode();
}
if (getOnlyApplyToCount() > 0) {
hash = (37 * hash) + ONLY_APPLY_TO_FIELD_NUMBER;
hash = (53 * hash) + getOnlyApplyToList().hashCode();
}
if (getOnlyApplyToRegexpCount() > 0) {
hash = (37 * hash) + ONLY_APPLY_TO_REGEXP_FIELD_NUMBER;
hash = (53 * hash) + getOnlyApplyToRegexpList().hashCode();
}
if (hasType()) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
}
if (getValueCount() > 0) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValueList().hashCode();
}
if (hasAllowExtendingValue()) {
hash = (37 * hash) + ALLOW_EXTENDING_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAllowExtendingValue());
}
if (hasTypeMatchingStrategy()) {
hash = (37 * hash) + TYPE_MATCHING_STRATEGY_FIELD_NUMBER;
hash = (53 * hash) + typeMatchingStrategy_;
}
if (hasJavaClass()) {
hash = (37 * hash) + JAVA_CLASS_FIELD_NUMBER;
hash = (53 * hash) + getJavaClass().hashCode();
}
if (hasRuleId()) {
hash = (37 * hash) + RULE_ID_FIELD_NUMBER;
hash = (53 * hash) + getRuleId().hashCode();
}
if (hasExtends()) {
hash = (37 * hash) + EXTENDS_FIELD_NUMBER;
hash = (53 * hash) + getExtends().hashCode();
}
if (hasReportLooseTypeViolations()) {
hash = (37 * hash) + REPORT_LOOSE_TYPE_VIOLATIONS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getReportLooseTypeViolations());
}
if (hasSeverity()) {
hash = (37 * hash) + SEVERITY_FIELD_NUMBER;
hash = (53 * hash) + severity_;
}
if (getConfigFileCount() > 0) {
hash = (37 * hash) + CONFIG_FILE_FIELD_NUMBER;
hash = (53 * hash) + getConfigFileList().hashCode();
}
hash = hashFields(hash, getExtensionFields());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.javascript.jscomp.Requirement parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.javascript.jscomp.Requirement parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.javascript.jscomp.Requirement parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.javascript.jscomp.Requirement 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.javascript.jscomp.Requirement parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.javascript.jscomp.Requirement parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.javascript.jscomp.Requirement parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.javascript.jscomp.Requirement 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.javascript.jscomp.Requirement parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.javascript.jscomp.Requirement 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.javascript.jscomp.Requirement parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.google.javascript.jscomp.Requirement 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.javascript.jscomp.Requirement 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;
}
/**
*
* A specification of code requirements
* NEXT ID: 17
*
* Required: The message to report when a requirement is violated. This should
* reference a document describing the reasoning for the requirement
* and contacts.
*
*
* optional string error_message = 1;
* @return Whether the errorMessage field is set.
*/
public boolean hasErrorMessage() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Required: The message to report when a requirement is violated. This should
* reference a document describing the reasoning for the requirement
* and contacts.
*
* Required: The message to report when a requirement is violated. This should
* reference a document describing the reasoning for the requirement
* and contacts.
*
*
* optional string error_message = 1;
* @return The bytes for errorMessage.
*/
public com.google.protobuf.ByteString
getErrorMessageBytes() {
java.lang.Object ref = errorMessage_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
errorMessage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Required: The message to report when a requirement is violated. This should
* reference a document describing the reasoning for the requirement
* and contacts.
*
*
* optional string error_message = 1;
* @param value The errorMessage to set.
* @return This builder for chaining.
*/
public Builder setErrorMessage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
errorMessage_ = value;
onChanged();
return this;
}
/**
*
* Required: The message to report when a requirement is violated. This should
* reference a document describing the reasoning for the requirement
* and contacts.
*
* Required: The message to report when a requirement is violated. This should
* reference a document describing the reasoning for the requirement
* and contacts.
*
*
* optional string error_message = 1;
* @param value The bytes for errorMessage to set.
* @return This builder for chaining.
*/
public Builder setErrorMessageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
errorMessage_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList whitelist_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureWhitelistIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
whitelist_ = new com.google.protobuf.LazyStringArrayList(whitelist_);
bitField0_ |= 0x00000002;
}
}
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @return A list containing the whitelist.
*/
public com.google.protobuf.ProtocolStringList
getWhitelistList() {
return whitelist_.getUnmodifiableView();
}
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @return The count of whitelist.
*/
public int getWhitelistCount() {
return whitelist_.size();
}
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @param index The index of the element to return.
* @return The whitelist at the given index.
*/
public java.lang.String getWhitelist(int index) {
return whitelist_.get(index);
}
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @param index The index of the value to return.
* @return The bytes of the whitelist at the given index.
*/
public com.google.protobuf.ByteString
getWhitelistBytes(int index) {
return whitelist_.getByteString(index);
}
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @param index The index to set the value at.
* @param value The whitelist to set.
* @return This builder for chaining.
*/
public Builder setWhitelist(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureWhitelistIsMutable();
whitelist_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @param value The whitelist to add.
* @return This builder for chaining.
*/
public Builder addWhitelist(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureWhitelistIsMutable();
whitelist_.add(value);
onChanged();
return this;
}
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @param values The whitelist to add.
* @return This builder for chaining.
*/
public Builder addAllWhitelist(
java.lang.Iterable values) {
ensureWhitelistIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, whitelist_);
onChanged();
return this;
}
/**
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
* Optional: A list of source path prefixes that are exempt from the
* requirement.
*
*
* repeated string whitelist = 2;
* @param value The bytes of the whitelist to add.
* @return This builder for chaining.
*/
public Builder addWhitelistBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureWhitelistIsMutable();
whitelist_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList whitelistRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureWhitelistRegexpIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
whitelistRegexp_ = new com.google.protobuf.LazyStringArrayList(whitelistRegexp_);
bitField0_ |= 0x00000004;
}
}
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
*
* repeated string whitelist_regexp = 3;
* @return A list containing the whitelistRegexp.
*/
public com.google.protobuf.ProtocolStringList
getWhitelistRegexpList() {
return whitelistRegexp_.getUnmodifiableView();
}
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
*
* repeated string whitelist_regexp = 3;
* @return The count of whitelistRegexp.
*/
public int getWhitelistRegexpCount() {
return whitelistRegexp_.size();
}
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
*
* repeated string whitelist_regexp = 3;
* @param index The index of the element to return.
* @return The whitelistRegexp at the given index.
*/
public java.lang.String getWhitelistRegexp(int index) {
return whitelistRegexp_.get(index);
}
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
*
* repeated string whitelist_regexp = 3;
* @param index The index of the value to return.
* @return The bytes of the whitelistRegexp at the given index.
*/
public com.google.protobuf.ByteString
getWhitelistRegexpBytes(int index) {
return whitelistRegexp_.getByteString(index);
}
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
*
* repeated string whitelist_regexp = 3;
* @param index The index to set the value at.
* @param value The whitelistRegexp to set.
* @return This builder for chaining.
*/
public Builder setWhitelistRegexp(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureWhitelistRegexpIsMutable();
whitelistRegexp_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
*
* repeated string whitelist_regexp = 3;
* @param value The whitelistRegexp to add.
* @return This builder for chaining.
*/
public Builder addWhitelistRegexp(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureWhitelistRegexpIsMutable();
whitelistRegexp_.add(value);
onChanged();
return this;
}
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
*
* repeated string whitelist_regexp = 3;
* @param values The whitelistRegexp to add.
* @return This builder for chaining.
*/
public Builder addAllWhitelistRegexp(
java.lang.Iterable values) {
ensureWhitelistRegexpIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, whitelistRegexp_);
onChanged();
return this;
}
/**
*
* Optional: A list of source paths regexs that are exempt from the
* requirement.
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @return A list containing the onlyApplyTo.
*/
public com.google.protobuf.ProtocolStringList
getOnlyApplyToList() {
return onlyApplyTo_.getUnmodifiableView();
}
/**
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @return The count of onlyApplyTo.
*/
public int getOnlyApplyToCount() {
return onlyApplyTo_.size();
}
/**
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @param index The index of the element to return.
* @return The onlyApplyTo at the given index.
*/
public java.lang.String getOnlyApplyTo(int index) {
return onlyApplyTo_.get(index);
}
/**
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @param index The index of the value to return.
* @return The bytes of the onlyApplyTo at the given index.
*/
public com.google.protobuf.ByteString
getOnlyApplyToBytes(int index) {
return onlyApplyTo_.getByteString(index);
}
/**
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @param index The index to set the value at.
* @param value The onlyApplyTo to set.
* @return This builder for chaining.
*/
public Builder setOnlyApplyTo(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOnlyApplyToIsMutable();
onlyApplyTo_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @param value The onlyApplyTo to add.
* @return This builder for chaining.
*/
public Builder addOnlyApplyTo(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOnlyApplyToIsMutable();
onlyApplyTo_.add(value);
onChanged();
return this;
}
/**
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @param values The onlyApplyTo to add.
* @return This builder for chaining.
*/
public Builder addAllOnlyApplyTo(
java.lang.Iterable values) {
ensureOnlyApplyToIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, onlyApplyTo_);
onChanged();
return this;
}
/**
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
* Optional: A list of source paths that will be checked for the requirement
* (the opposite of whitelist).
*
*
* repeated string only_apply_to = 4;
* @param value The bytes of the onlyApplyTo to add.
* @return This builder for chaining.
*/
public Builder addOnlyApplyToBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureOnlyApplyToIsMutable();
onlyApplyTo_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList onlyApplyToRegexp_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureOnlyApplyToRegexpIsMutable() {
if (!((bitField0_ & 0x00000020) != 0)) {
onlyApplyToRegexp_ = new com.google.protobuf.LazyStringArrayList(onlyApplyToRegexp_);
bitField0_ |= 0x00000020;
}
}
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @return A list containing the onlyApplyToRegexp.
*/
public com.google.protobuf.ProtocolStringList
getOnlyApplyToRegexpList() {
return onlyApplyToRegexp_.getUnmodifiableView();
}
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @return The count of onlyApplyToRegexp.
*/
public int getOnlyApplyToRegexpCount() {
return onlyApplyToRegexp_.size();
}
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @param index The index of the element to return.
* @return The onlyApplyToRegexp at the given index.
*/
public java.lang.String getOnlyApplyToRegexp(int index) {
return onlyApplyToRegexp_.get(index);
}
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @param index The index of the value to return.
* @return The bytes of the onlyApplyToRegexp at the given index.
*/
public com.google.protobuf.ByteString
getOnlyApplyToRegexpBytes(int index) {
return onlyApplyToRegexp_.getByteString(index);
}
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @param index The index to set the value at.
* @param value The onlyApplyToRegexp to set.
* @return This builder for chaining.
*/
public Builder setOnlyApplyToRegexp(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOnlyApplyToRegexpIsMutable();
onlyApplyToRegexp_.set(index, value);
onChanged();
return this;
}
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @param value The onlyApplyToRegexp to add.
* @return This builder for chaining.
*/
public Builder addOnlyApplyToRegexp(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureOnlyApplyToRegexpIsMutable();
onlyApplyToRegexp_.add(value);
onChanged();
return this;
}
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @param values The onlyApplyToRegexp to add.
* @return This builder for chaining.
*/
public Builder addAllOnlyApplyToRegexp(
java.lang.Iterable values) {
ensureOnlyApplyToRegexpIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, onlyApplyToRegexp_);
onChanged();
return this;
}
/**
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
* Optional: A list of source path regexps that will be checked for
* the requirement (the opposite of whitelist_regexp).
*
*
* repeated string only_apply_to_regexp = 5;
* @param value The bytes of the onlyApplyToRegexp to add.
* @return This builder for chaining.
*/
public Builder addOnlyApplyToRegexpBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureOnlyApplyToRegexpIsMutable();
onlyApplyToRegexp_.add(value);
onChanged();
return this;
}
private int type_ = 1;
/**
*
* Required: The type of requirement.
*
*
* optional .jscomp.Requirement.Type type = 6;
* @return Whether the type field is set.
*/
public boolean hasType() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Required: The type of requirement.
*
*
* optional .jscomp.Requirement.Type type = 6;
* @return The type.
*/
public com.google.javascript.jscomp.Requirement.Type getType() {
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.Type result = com.google.javascript.jscomp.Requirement.Type.valueOf(type_);
return result == null ? com.google.javascript.jscomp.Requirement.Type.CUSTOM : result;
}
/**
*
* Required: The type of requirement.
*
*
* optional .jscomp.Requirement.Type type = 6;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.google.javascript.jscomp.Requirement.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Required: The type of requirement.
*
*
* optional .jscomp.Requirement.Type type = 6;
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000040);
type_ = 1;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList value_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureValueIsMutable() {
if (!((bitField0_ & 0x00000080) != 0)) {
value_ = new com.google.protobuf.LazyStringArrayList(value_);
bitField0_ |= 0x00000080;
}
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @return A list containing the value.
*/
public com.google.protobuf.ProtocolStringList
getValueList() {
return value_.getUnmodifiableView();
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @return The count of value.
*/
public int getValueCount() {
return value_.size();
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @param index The index of the element to return.
* @return The value at the given index.
*/
public java.lang.String getValue(int index) {
return value_.get(index);
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @param index The index of the value to return.
* @return The bytes of the value at the given index.
*/
public com.google.protobuf.ByteString
getValueBytes(int index) {
return value_.getByteString(index);
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @param index The index to set the value at.
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureValueIsMutable();
value_.set(index, value);
onChanged();
return this;
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @param value The value to add.
* @return This builder for chaining.
*/
public Builder addValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureValueIsMutable();
value_.add(value);
onChanged();
return this;
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @param values The value to add.
* @return This builder for chaining.
*/
public Builder addAllValue(
java.lang.Iterable values) {
ensureValueIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, value_);
onChanged();
return this;
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
* The value banned, optional for "custom" requirements. Some custom
* requirements repurpose this for different purposes, such as for whitelists
* of types.
*
*
* repeated string value = 7;
* @param value The bytes of the value to add.
* @return This builder for chaining.
*/
public Builder addValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureValueIsMutable();
value_.add(value);
onChanged();
return this;
}
private boolean allowExtendingValue_ ;
/**
*
* Whether to allow subconfigs to extend the "value" field. This does not
* make sense for banning values, but when the value is used as a whitelist,
* it becomes important.
*
*
* optional bool allow_extending_value = 15;
* @return Whether the allowExtendingValue field is set.
*/
public boolean hasAllowExtendingValue() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
* Whether to allow subconfigs to extend the "value" field. This does not
* make sense for banning values, but when the value is used as a whitelist,
* it becomes important.
*
* Whether to allow subconfigs to extend the "value" field. This does not
* make sense for banning values, but when the value is used as a whitelist,
* it becomes important.
*
*
* optional bool allow_extending_value = 15;
* @param value The allowExtendingValue to set.
* @return This builder for chaining.
*/
public Builder setAllowExtendingValue(boolean value) {
bitField0_ |= 0x00000100;
allowExtendingValue_ = value;
onChanged();
return this;
}
/**
*
* Whether to allow subconfigs to extend the "value" field. This does not
* make sense for banning values, but when the value is used as a whitelist,
* it becomes important.
*
*
* optional bool allow_extending_value = 15;
* @return This builder for chaining.
*/
public Builder clearAllowExtendingValue() {
bitField0_ = (bitField0_ & ~0x00000100);
allowExtendingValue_ = false;
onChanged();
return this;
}
private int typeMatchingStrategy_ = 1;
/**
*
* Strategy to use for matching types in the value parameter (e.g. for
* BANNED_CODE_PATTERN checks).
*
*
* optional .jscomp.Requirement.TypeMatchingStrategy type_matching_strategy = 13 [default = LOOSE];
* @return Whether the typeMatchingStrategy field is set.
*/
public boolean hasTypeMatchingStrategy() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
* Strategy to use for matching types in the value parameter (e.g. for
* BANNED_CODE_PATTERN checks).
*
*
* optional .jscomp.Requirement.TypeMatchingStrategy type_matching_strategy = 13 [default = LOOSE];
* @return The typeMatchingStrategy.
*/
public com.google.javascript.jscomp.Requirement.TypeMatchingStrategy getTypeMatchingStrategy() {
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.TypeMatchingStrategy result = com.google.javascript.jscomp.Requirement.TypeMatchingStrategy.valueOf(typeMatchingStrategy_);
return result == null ? com.google.javascript.jscomp.Requirement.TypeMatchingStrategy.LOOSE : result;
}
/**
*
* Strategy to use for matching types in the value parameter (e.g. for
* BANNED_CODE_PATTERN checks).
*
*
* optional .jscomp.Requirement.TypeMatchingStrategy type_matching_strategy = 13 [default = LOOSE];
* @param value The typeMatchingStrategy to set.
* @return This builder for chaining.
*/
public Builder setTypeMatchingStrategy(com.google.javascript.jscomp.Requirement.TypeMatchingStrategy value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000200;
typeMatchingStrategy_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Strategy to use for matching types in the value parameter (e.g. for
* BANNED_CODE_PATTERN checks).
*
* Gives the rule an unique ID that can be used for extending in other rules
* through 'extends'. An example of ID is 'closure:innerHtml'.
*
*
* optional string rule_id = 9;
* @param value The bytes for ruleId to set.
* @return This builder for chaining.
*/
public Builder setRuleIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000800;
ruleId_ = value;
onChanged();
return this;
}
private java.lang.Object extends_ = "";
/**
*
* Allows extending whitelists of rules with the specified rule_id. If this
* field is specified then all fields except whitelist, whitelist_regexp,
* only_apply_to and only_apply_to_regexp are ignored.
*
*
* optional string extends = 10;
* @return Whether the extends field is set.
*/
public boolean hasExtends() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
* Allows extending whitelists of rules with the specified rule_id. If this
* field is specified then all fields except whitelist, whitelist_regexp,
* only_apply_to and only_apply_to_regexp are ignored.
*
* Allows extending whitelists of rules with the specified rule_id. If this
* field is specified then all fields except whitelist, whitelist_regexp,
* only_apply_to and only_apply_to_regexp are ignored.
*
*
* optional string extends = 10;
* @return The bytes for extends.
*/
public com.google.protobuf.ByteString
getExtendsBytes() {
java.lang.Object ref = extends_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
extends_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Allows extending whitelists of rules with the specified rule_id. If this
* field is specified then all fields except whitelist, whitelist_regexp,
* only_apply_to and only_apply_to_regexp are ignored.
*
*
* optional string extends = 10;
* @param value The extends to set.
* @return This builder for chaining.
*/
public Builder setExtends(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00001000;
extends_ = value;
onChanged();
return this;
}
/**
*
* Allows extending whitelists of rules with the specified rule_id. If this
* field is specified then all fields except whitelist, whitelist_regexp,
* only_apply_to and only_apply_to_regexp are ignored.
*
* Allows extending whitelists of rules with the specified rule_id. If this
* field is specified then all fields except whitelist, whitelist_regexp,
* only_apply_to and only_apply_to_regexp are ignored.
*
*
* optional string extends = 10;
* @param value The bytes for extends to set.
* @return This builder for chaining.
*/
public Builder setExtendsBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00001000;
extends_ = value;
onChanged();
return this;
}
private boolean reportLooseTypeViolations_ = true;
/**
*
* Whether to report possible violations when type information is not exact.
* Normally, violations on parent types are reported as possible violations.
* This field allows to ignore them and report only violations on exact types.
* This changes the balance between the false positives and the false
* negatives. With the default value, there might be lots of false positives
* (possible violations) but there shouldn't be any false negatives. Without
* reporting the loose type violations, there will be less false positives but
* there can also be false negatives (an actual violation that is not
* reported).
*
*
* optional bool report_loose_type_violations = 11 [default = true];
* @return Whether the reportLooseTypeViolations field is set.
*/
public boolean hasReportLooseTypeViolations() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
* Whether to report possible violations when type information is not exact.
* Normally, violations on parent types are reported as possible violations.
* This field allows to ignore them and report only violations on exact types.
* This changes the balance between the false positives and the false
* negatives. With the default value, there might be lots of false positives
* (possible violations) but there shouldn't be any false negatives. Without
* reporting the loose type violations, there will be less false positives but
* there can also be false negatives (an actual violation that is not
* reported).
*
* Whether to report possible violations when type information is not exact.
* Normally, violations on parent types are reported as possible violations.
* This field allows to ignore them and report only violations on exact types.
* This changes the balance between the false positives and the false
* negatives. With the default value, there might be lots of false positives
* (possible violations) but there shouldn't be any false negatives. Without
* reporting the loose type violations, there will be less false positives but
* there can also be false negatives (an actual violation that is not
* reported).
*
*
* optional bool report_loose_type_violations = 11 [default = true];
* @param value The reportLooseTypeViolations to set.
* @return This builder for chaining.
*/
public Builder setReportLooseTypeViolations(boolean value) {
bitField0_ |= 0x00002000;
reportLooseTypeViolations_ = value;
onChanged();
return this;
}
/**
*
* Whether to report possible violations when type information is not exact.
* Normally, violations on parent types are reported as possible violations.
* This field allows to ignore them and report only violations on exact types.
* This changes the balance between the false positives and the false
* negatives. With the default value, there might be lots of false positives
* (possible violations) but there shouldn't be any false negatives. Without
* reporting the loose type violations, there will be less false positives but
* there can also be false negatives (an actual violation that is not
* reported).
*
*
* optional bool report_loose_type_violations = 11 [default = true];
* @return This builder for chaining.
*/
public Builder clearReportLooseTypeViolations() {
bitField0_ = (bitField0_ & ~0x00002000);
reportLooseTypeViolations_ = true;
onChanged();
return this;
}
private int severity_ = 1;
/**
* optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
* @return Whether the severity field is set.
*/
public boolean hasSeverity() {
return ((bitField0_ & 0x00004000) != 0);
}
/**
* optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
* @return The severity.
*/
public com.google.javascript.jscomp.Requirement.Severity getSeverity() {
@SuppressWarnings("deprecation")
com.google.javascript.jscomp.Requirement.Severity result = com.google.javascript.jscomp.Requirement.Severity.valueOf(severity_);
return result == null ? com.google.javascript.jscomp.Requirement.Severity.WARNING : result;
}
/**
* optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
* @param value The severity to set.
* @return This builder for chaining.
*/
public Builder setSeverity(com.google.javascript.jscomp.Requirement.Severity value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00004000;
severity_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .jscomp.Requirement.Severity severity = 12 [default = WARNING];
* @return This builder for chaining.
*/
public Builder clearSeverity() {
bitField0_ = (bitField0_ & ~0x00004000);
severity_ = 1;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList configFile_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureConfigFileIsMutable() {
if (!((bitField0_ & 0x00008000) != 0)) {
configFile_ = new com.google.protobuf.LazyStringArrayList(configFile_);
bitField0_ |= 0x00008000;
}
}
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @return A list containing the configFile.
*/
public com.google.protobuf.ProtocolStringList
getConfigFileList() {
return configFile_.getUnmodifiableView();
}
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @return The count of configFile.
*/
public int getConfigFileCount() {
return configFile_.size();
}
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @param index The index of the element to return.
* @return The configFile at the given index.
*/
public java.lang.String getConfigFile(int index) {
return configFile_.get(index);
}
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @param index The index of the value to return.
* @return The bytes of the configFile at the given index.
*/
public com.google.protobuf.ByteString
getConfigFileBytes(int index) {
return configFile_.getByteString(index);
}
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @param index The index to set the value at.
* @param value The configFile to set.
* @return This builder for chaining.
*/
public Builder setConfigFile(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConfigFileIsMutable();
configFile_.set(index, value);
onChanged();
return this;
}
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @param value The configFile to add.
* @return This builder for chaining.
*/
public Builder addConfigFile(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureConfigFileIsMutable();
configFile_.add(value);
onChanged();
return this;
}
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @param values The configFile to add.
* @return This builder for chaining.
*/
public Builder addAllConfigFile(
java.lang.Iterable values) {
ensureConfigFileIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, configFile_);
onChanged();
return this;
}
/**
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
* The file(s) that defined this requirement. If the requirement is extended,
* then all extending files are included as well. These will be printed in
* the error message.
*
*
* repeated string config_file = 16;
* @param value The bytes of the configFile to add.
* @return This builder for chaining.
*/
public Builder addConfigFileBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureConfigFileIsMutable();
configFile_.add(value);
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:jscomp.Requirement)
}
// @@protoc_insertion_point(class_scope:jscomp.Requirement)
private static final com.google.javascript.jscomp.Requirement DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.javascript.jscomp.Requirement();
}
public static com.google.javascript.jscomp.Requirement getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Requirement parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Requirement(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.javascript.jscomp.Requirement getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}