dev.amp.validator.ValidatorProtos Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validator-java Show documentation
Show all versions of validator-java Show documentation
A Java validator for the AMP Html format.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: validator.proto
package dev.amp.validator;
public final class ValidatorProtos {
private ValidatorProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface AttrTriggerSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.AttrTriggerSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @return Whether the ifValueRegex field is set.
*/
boolean hasIfValueRegex();
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @return The ifValueRegex.
*/
java.lang.String getIfValueRegex();
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @return The bytes for ifValueRegex.
*/
com.google.protobuf.ByteString
getIfValueRegexBytes();
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @return A list containing the alsoRequiresAttr.
*/
java.util.List
getAlsoRequiresAttrList();
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @return The count of alsoRequiresAttr.
*/
int getAlsoRequiresAttrCount();
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @param index The index of the element to return.
* @return The alsoRequiresAttr at the given index.
*/
java.lang.String getAlsoRequiresAttr(int index);
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @param index The index of the value to return.
* @return The bytes of the alsoRequiresAttr at the given index.
*/
com.google.protobuf.ByteString
getAlsoRequiresAttrBytes(int index);
}
/**
*
* Used for validating attributes that require another attribute for some
* given set of conditions.
* E.g. attr name: "on" if_value_regex: "tap:.*" also_require_attr: "role"
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf type {@code amp.validator.AttrTriggerSpec}
*/
public static final class AttrTriggerSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.AttrTriggerSpec)
AttrTriggerSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use AttrTriggerSpec.newBuilder() to construct.
private AttrTriggerSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private AttrTriggerSpec() {
ifValueRegex_ = "";
alsoRequiresAttr_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AttrTriggerSpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrTriggerSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrTriggerSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AttrTriggerSpec.class, dev.amp.validator.ValidatorProtos.AttrTriggerSpec.Builder.class);
}
private int bitField0_;
public static final int IF_VALUE_REGEX_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object ifValueRegex_ = "";
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @return Whether the ifValueRegex field is set.
*/
@java.lang.Override
public boolean hasIfValueRegex() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @return The ifValueRegex.
*/
@java.lang.Override
public java.lang.String getIfValueRegex() {
java.lang.Object ref = ifValueRegex_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
ifValueRegex_ = s;
}
return s;
}
}
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @return The bytes for ifValueRegex.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIfValueRegexBytes() {
java.lang.Object ref = ifValueRegex_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ifValueRegex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALSO_REQUIRES_ATTR_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList alsoRequiresAttr_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @return A list containing the alsoRequiresAttr.
*/
public com.google.protobuf.ProtocolStringList
getAlsoRequiresAttrList() {
return alsoRequiresAttr_;
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @return The count of alsoRequiresAttr.
*/
public int getAlsoRequiresAttrCount() {
return alsoRequiresAttr_.size();
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @param index The index of the element to return.
* @return The alsoRequiresAttr at the given index.
*/
public java.lang.String getAlsoRequiresAttr(int index) {
return alsoRequiresAttr_.get(index);
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @param index The index of the value to return.
* @return The bytes of the alsoRequiresAttr at the given index.
*/
public com.google.protobuf.ByteString
getAlsoRequiresAttrBytes(int index) {
return alsoRequiresAttr_.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;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ifValueRegex_);
}
for (int i = 0; i < alsoRequiresAttr_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, alsoRequiresAttr_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ifValueRegex_);
}
{
int dataSize = 0;
for (int i = 0; i < alsoRequiresAttr_.size(); i++) {
dataSize += computeStringSizeNoTag(alsoRequiresAttr_.getRaw(i));
}
size += dataSize;
size += 1 * getAlsoRequiresAttrList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.AttrTriggerSpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.AttrTriggerSpec other = (dev.amp.validator.ValidatorProtos.AttrTriggerSpec) obj;
if (hasIfValueRegex() != other.hasIfValueRegex()) return false;
if (hasIfValueRegex()) {
if (!getIfValueRegex()
.equals(other.getIfValueRegex())) return false;
}
if (!getAlsoRequiresAttrList()
.equals(other.getAlsoRequiresAttrList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasIfValueRegex()) {
hash = (37 * hash) + IF_VALUE_REGEX_FIELD_NUMBER;
hash = (53 * hash) + getIfValueRegex().hashCode();
}
if (getAlsoRequiresAttrCount() > 0) {
hash = (37 * hash) + ALSO_REQUIRES_ATTR_FIELD_NUMBER;
hash = (53 * hash) + getAlsoRequiresAttrList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.AttrTriggerSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AttrTriggerSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AttrTriggerSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AttrTriggerSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AttrTriggerSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AttrTriggerSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AttrTriggerSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AttrTriggerSpec 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 dev.amp.validator.ValidatorProtos.AttrTriggerSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AttrTriggerSpec 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 dev.amp.validator.ValidatorProtos.AttrTriggerSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AttrTriggerSpec 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(dev.amp.validator.ValidatorProtos.AttrTriggerSpec 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;
}
/**
*
* Used for validating attributes that require another attribute for some
* given set of conditions.
* E.g. attr name: "on" if_value_regex: "tap:.*" also_require_attr: "role"
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf type {@code amp.validator.AttrTriggerSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.AttrTriggerSpec)
dev.amp.validator.ValidatorProtos.AttrTriggerSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrTriggerSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrTriggerSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AttrTriggerSpec.class, dev.amp.validator.ValidatorProtos.AttrTriggerSpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.AttrTriggerSpec.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
ifValueRegex_ = "";
alsoRequiresAttr_ =
com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrTriggerSpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrTriggerSpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.AttrTriggerSpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrTriggerSpec build() {
dev.amp.validator.ValidatorProtos.AttrTriggerSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrTriggerSpec buildPartial() {
dev.amp.validator.ValidatorProtos.AttrTriggerSpec result = new dev.amp.validator.ValidatorProtos.AttrTriggerSpec(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.AttrTriggerSpec result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.ifValueRegex_ = ifValueRegex_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
alsoRequiresAttr_.makeImmutable();
result.alsoRequiresAttr_ = alsoRequiresAttr_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.AttrTriggerSpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.AttrTriggerSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.AttrTriggerSpec other) {
if (other == dev.amp.validator.ValidatorProtos.AttrTriggerSpec.getDefaultInstance()) return this;
if (other.hasIfValueRegex()) {
ifValueRegex_ = other.ifValueRegex_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.alsoRequiresAttr_.isEmpty()) {
if (alsoRequiresAttr_.isEmpty()) {
alsoRequiresAttr_ = other.alsoRequiresAttr_;
bitField0_ |= 0x00000002;
} else {
ensureAlsoRequiresAttrIsMutable();
alsoRequiresAttr_.addAll(other.alsoRequiresAttr_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
ifValueRegex_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureAlsoRequiresAttrIsMutable();
alsoRequiresAttr_.add(bs);
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object ifValueRegex_ = "";
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @return Whether the ifValueRegex field is set.
*/
public boolean hasIfValueRegex() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @return The ifValueRegex.
*/
public java.lang.String getIfValueRegex() {
java.lang.Object ref = ifValueRegex_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
ifValueRegex_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @return The bytes for ifValueRegex.
*/
public com.google.protobuf.ByteString
getIfValueRegexBytes() {
java.lang.Object ref = ifValueRegex_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
ifValueRegex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @param value The ifValueRegex to set.
* @return This builder for chaining.
*/
public Builder setIfValueRegex(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ifValueRegex_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @return This builder for chaining.
*/
public Builder clearIfValueRegex() {
ifValueRegex_ = getDefaultInstance().getIfValueRegex();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* If set, attribute's value must match to also require attribute(s).
* If not set, attribute automatically also require attribute(s).
*
*
* optional string if_value_regex = 1;
* @param value The bytes for ifValueRegex to set.
* @return This builder for chaining.
*/
public Builder setIfValueRegexBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ifValueRegex_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList alsoRequiresAttr_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureAlsoRequiresAttrIsMutable() {
if (!alsoRequiresAttr_.isModifiable()) {
alsoRequiresAttr_ = new com.google.protobuf.LazyStringArrayList(alsoRequiresAttr_);
}
bitField0_ |= 0x00000002;
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @return A list containing the alsoRequiresAttr.
*/
public com.google.protobuf.ProtocolStringList
getAlsoRequiresAttrList() {
alsoRequiresAttr_.makeImmutable();
return alsoRequiresAttr_;
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @return The count of alsoRequiresAttr.
*/
public int getAlsoRequiresAttrCount() {
return alsoRequiresAttr_.size();
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @param index The index of the element to return.
* @return The alsoRequiresAttr at the given index.
*/
public java.lang.String getAlsoRequiresAttr(int index) {
return alsoRequiresAttr_.get(index);
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @param index The index of the value to return.
* @return The bytes of the alsoRequiresAttr at the given index.
*/
public com.google.protobuf.ByteString
getAlsoRequiresAttrBytes(int index) {
return alsoRequiresAttr_.getByteString(index);
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @param index The index to set the value at.
* @param value The alsoRequiresAttr to set.
* @return This builder for chaining.
*/
public Builder setAlsoRequiresAttr(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureAlsoRequiresAttrIsMutable();
alsoRequiresAttr_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @param value The alsoRequiresAttr to add.
* @return This builder for chaining.
*/
public Builder addAlsoRequiresAttr(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureAlsoRequiresAttrIsMutable();
alsoRequiresAttr_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @param values The alsoRequiresAttr to add.
* @return This builder for chaining.
*/
public Builder addAllAlsoRequiresAttr(
java.lang.Iterable values) {
ensureAlsoRequiresAttrIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, alsoRequiresAttr_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @return This builder for chaining.
*/
public Builder clearAlsoRequiresAttr() {
alsoRequiresAttr_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* If set, other attributes - identified by their name string - must
* be present as well.
*
*
* repeated string also_requires_attr = 2;
* @param value The bytes of the alsoRequiresAttr to add.
* @return This builder for chaining.
*/
public Builder addAlsoRequiresAttrBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureAlsoRequiresAttrIsMutable();
alsoRequiresAttr_.add(value);
bitField0_ |= 0x00000002;
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:amp.validator.AttrTriggerSpec)
}
// @@protoc_insertion_point(class_scope:amp.validator.AttrTriggerSpec)
private static final dev.amp.validator.ValidatorProtos.AttrTriggerSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.AttrTriggerSpec();
}
public static dev.amp.validator.ValidatorProtos.AttrTriggerSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AttrTriggerSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrTriggerSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PropertySpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.PropertySpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
boolean hasName();
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* optional bool mandatory = 2;
* @return Whether the mandatory field is set.
*/
boolean hasMandatory();
/**
* optional bool mandatory = 2;
* @return The mandatory.
*/
boolean getMandatory();
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @return Whether the value field is set.
*/
boolean hasValue();
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @return The value.
*/
java.lang.String getValue();
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @return The bytes for value.
*/
com.google.protobuf.ByteString
getValueBytes();
/**
*
* } end oneof
*
*
* optional double value_double = 4;
* @return Whether the valueDouble field is set.
*/
boolean hasValueDouble();
/**
*
* } end oneof
*
*
* optional double value_double = 4;
* @return The valueDouble.
*/
double getValueDouble();
}
/**
*
* Used for validating properties in attribute values. Our validator
* (via parse-viewport.h) implements the parsing algorithm as described here:
* https://drafts.csswg.org/css-device-adapt/#parsing-algorithm
* NEXT AVAILABLE TAG: 5
*
*
* Protobuf type {@code amp.validator.PropertySpec}
*/
public static final class PropertySpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.PropertySpec)
PropertySpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use PropertySpec.newBuilder() to construct.
private PropertySpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private PropertySpec() {
name_ = "";
value_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PropertySpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_PropertySpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_PropertySpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.PropertySpec.class, dev.amp.validator.ValidatorProtos.PropertySpec.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MANDATORY_FIELD_NUMBER = 2;
private boolean mandatory_ = false;
/**
* optional bool mandatory = 2;
* @return Whether the mandatory field is set.
*/
@java.lang.Override
public boolean hasMandatory() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional bool mandatory = 2;
* @return The mandatory.
*/
@java.lang.Override
public boolean getMandatory() {
return mandatory_;
}
public static final int VALUE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object value_ = "";
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @return The value.
*/
@java.lang.Override
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
value_ = s;
}
return s;
}
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @return The bytes for value.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_DOUBLE_FIELD_NUMBER = 4;
private double valueDouble_ = 0D;
/**
*
* } end oneof
*
*
* optional double value_double = 4;
* @return Whether the valueDouble field is set.
*/
@java.lang.Override
public boolean hasValueDouble() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* } end oneof
*
*
* optional double value_double = 4;
* @return The valueDouble.
*/
@java.lang.Override
public double getValueDouble() {
return valueDouble_;
}
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)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeBool(2, mandatory_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, value_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeDouble(4, valueDouble_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, mandatory_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, value_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, valueDouble_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.PropertySpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.PropertySpec other = (dev.amp.validator.ValidatorProtos.PropertySpec) obj;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (hasMandatory() != other.hasMandatory()) return false;
if (hasMandatory()) {
if (getMandatory()
!= other.getMandatory()) return false;
}
if (hasValue() != other.hasValue()) return false;
if (hasValue()) {
if (!getValue()
.equals(other.getValue())) return false;
}
if (hasValueDouble() != other.hasValueDouble()) return false;
if (hasValueDouble()) {
if (java.lang.Double.doubleToLongBits(getValueDouble())
!= java.lang.Double.doubleToLongBits(
other.getValueDouble())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasMandatory()) {
hash = (37 * hash) + MANDATORY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMandatory());
}
if (hasValue()) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
}
if (hasValueDouble()) {
hash = (37 * hash) + VALUE_DOUBLE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getValueDouble()));
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.PropertySpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.PropertySpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.PropertySpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.PropertySpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.PropertySpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.PropertySpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.PropertySpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.PropertySpec 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 dev.amp.validator.ValidatorProtos.PropertySpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.PropertySpec 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 dev.amp.validator.ValidatorProtos.PropertySpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.PropertySpec 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(dev.amp.validator.ValidatorProtos.PropertySpec 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;
}
/**
*
* Used for validating properties in attribute values. Our validator
* (via parse-viewport.h) implements the parsing algorithm as described here:
* https://drafts.csswg.org/css-device-adapt/#parsing-algorithm
* NEXT AVAILABLE TAG: 5
*
*
* Protobuf type {@code amp.validator.PropertySpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.PropertySpec)
dev.amp.validator.ValidatorProtos.PropertySpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_PropertySpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_PropertySpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.PropertySpec.class, dev.amp.validator.ValidatorProtos.PropertySpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.PropertySpec.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
mandatory_ = false;
value_ = "";
valueDouble_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_PropertySpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.PropertySpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpec build() {
dev.amp.validator.ValidatorProtos.PropertySpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpec buildPartial() {
dev.amp.validator.ValidatorProtos.PropertySpec result = new dev.amp.validator.ValidatorProtos.PropertySpec(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.PropertySpec result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.mandatory_ = mandatory_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.value_ = value_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.valueDouble_ = valueDouble_;
to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.PropertySpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.PropertySpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.PropertySpec other) {
if (other == dev.amp.validator.ValidatorProtos.PropertySpec.getDefaultInstance()) return this;
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasMandatory()) {
setMandatory(other.getMandatory());
}
if (other.hasValue()) {
value_ = other.value_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasValueDouble()) {
setValueDouble(other.getValueDouble());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
mandatory_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
value_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 26
case 33: {
valueDouble_ = input.readDouble();
bitField0_ |= 0x00000008;
break;
} // case 33
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private boolean mandatory_ ;
/**
* optional bool mandatory = 2;
* @return Whether the mandatory field is set.
*/
@java.lang.Override
public boolean hasMandatory() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional bool mandatory = 2;
* @return The mandatory.
*/
@java.lang.Override
public boolean getMandatory() {
return mandatory_;
}
/**
* optional bool mandatory = 2;
* @param value The mandatory to set.
* @return This builder for chaining.
*/
public Builder setMandatory(boolean value) {
mandatory_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* optional bool mandatory = 2;
* @return This builder for chaining.
*/
public Builder clearMandatory() {
bitField0_ = (bitField0_ & ~0x00000002);
mandatory_ = false;
onChanged();
return this;
}
private java.lang.Object value_ = "";
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @return Whether the value field is set.
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @return The value.
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
value_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @return The bytes for value.
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
value_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ = getDefaultInstance().getValue();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Must be lowercase, and will be matched case-insensitively.
*
*
* optional string value = 3;
* @param value The bytes for value to set.
* @return This builder for chaining.
*/
public Builder setValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
value_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private double valueDouble_ ;
/**
*
* } end oneof
*
*
* optional double value_double = 4;
* @return Whether the valueDouble field is set.
*/
@java.lang.Override
public boolean hasValueDouble() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* } end oneof
*
*
* optional double value_double = 4;
* @return The valueDouble.
*/
@java.lang.Override
public double getValueDouble() {
return valueDouble_;
}
/**
*
* } end oneof
*
*
* optional double value_double = 4;
* @param value The valueDouble to set.
* @return This builder for chaining.
*/
public Builder setValueDouble(double value) {
valueDouble_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* } end oneof
*
*
* optional double value_double = 4;
* @return This builder for chaining.
*/
public Builder clearValueDouble() {
bitField0_ = (bitField0_ & ~0x00000008);
valueDouble_ = 0D;
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:amp.validator.PropertySpec)
}
// @@protoc_insertion_point(class_scope:amp.validator.PropertySpec)
private static final dev.amp.validator.ValidatorProtos.PropertySpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.PropertySpec();
}
public static dev.amp.validator.ValidatorProtos.PropertySpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PropertySpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PropertySpecListOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.PropertySpecList)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
java.util.List
getPropertiesList();
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
dev.amp.validator.ValidatorProtos.PropertySpec getProperties(int index);
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
int getPropertiesCount();
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
java.util.List
getPropertiesOrBuilderList();
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
dev.amp.validator.ValidatorProtos.PropertySpecOrBuilder getPropertiesOrBuilder(
int index);
}
/**
*
* NEXT AVAILABLE TAG: 2
*
*
* Protobuf type {@code amp.validator.PropertySpecList}
*/
public static final class PropertySpecList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.PropertySpecList)
PropertySpecListOrBuilder {
private static final long serialVersionUID = 0L;
// Use PropertySpecList.newBuilder() to construct.
private PropertySpecList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private PropertySpecList() {
properties_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PropertySpecList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_PropertySpecList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_PropertySpecList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.PropertySpecList.class, dev.amp.validator.ValidatorProtos.PropertySpecList.Builder.class);
}
public static final int PROPERTIES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List properties_;
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
@java.lang.Override
public java.util.List getPropertiesList() {
return properties_;
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
@java.lang.Override
public java.util.List
getPropertiesOrBuilderList() {
return properties_;
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
@java.lang.Override
public int getPropertiesCount() {
return properties_.size();
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpec getProperties(int index) {
return properties_.get(index);
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpecOrBuilder getPropertiesOrBuilder(
int index) {
return properties_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < properties_.size(); i++) {
output.writeMessage(1, properties_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < properties_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, properties_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.PropertySpecList)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.PropertySpecList other = (dev.amp.validator.ValidatorProtos.PropertySpecList) obj;
if (!getPropertiesList()
.equals(other.getPropertiesList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getPropertiesCount() > 0) {
hash = (37 * hash) + PROPERTIES_FIELD_NUMBER;
hash = (53 * hash) + getPropertiesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.PropertySpecList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.PropertySpecList parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.PropertySpecList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.PropertySpecList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.PropertySpecList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.PropertySpecList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.PropertySpecList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.PropertySpecList 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 dev.amp.validator.ValidatorProtos.PropertySpecList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.PropertySpecList 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 dev.amp.validator.ValidatorProtos.PropertySpecList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.PropertySpecList 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(dev.amp.validator.ValidatorProtos.PropertySpecList 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;
}
/**
*
* NEXT AVAILABLE TAG: 2
*
*
* Protobuf type {@code amp.validator.PropertySpecList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.PropertySpecList)
dev.amp.validator.ValidatorProtos.PropertySpecListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_PropertySpecList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_PropertySpecList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.PropertySpecList.class, dev.amp.validator.ValidatorProtos.PropertySpecList.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.PropertySpecList.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (propertiesBuilder_ == null) {
properties_ = java.util.Collections.emptyList();
} else {
properties_ = null;
propertiesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_PropertySpecList_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpecList getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.PropertySpecList.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpecList build() {
dev.amp.validator.ValidatorProtos.PropertySpecList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpecList buildPartial() {
dev.amp.validator.ValidatorProtos.PropertySpecList result = new dev.amp.validator.ValidatorProtos.PropertySpecList(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.amp.validator.ValidatorProtos.PropertySpecList result) {
if (propertiesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
properties_ = java.util.Collections.unmodifiableList(properties_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.properties_ = properties_;
} else {
result.properties_ = propertiesBuilder_.build();
}
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.PropertySpecList result) {
int from_bitField0_ = bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.PropertySpecList) {
return mergeFrom((dev.amp.validator.ValidatorProtos.PropertySpecList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.PropertySpecList other) {
if (other == dev.amp.validator.ValidatorProtos.PropertySpecList.getDefaultInstance()) return this;
if (propertiesBuilder_ == null) {
if (!other.properties_.isEmpty()) {
if (properties_.isEmpty()) {
properties_ = other.properties_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensurePropertiesIsMutable();
properties_.addAll(other.properties_);
}
onChanged();
}
} else {
if (!other.properties_.isEmpty()) {
if (propertiesBuilder_.isEmpty()) {
propertiesBuilder_.dispose();
propertiesBuilder_ = null;
properties_ = other.properties_;
bitField0_ = (bitField0_ & ~0x00000001);
propertiesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPropertiesFieldBuilder() : null;
} else {
propertiesBuilder_.addAllMessages(other.properties_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
dev.amp.validator.ValidatorProtos.PropertySpec m =
input.readMessage(
dev.amp.validator.ValidatorProtos.PropertySpec.PARSER,
extensionRegistry);
if (propertiesBuilder_ == null) {
ensurePropertiesIsMutable();
properties_.add(m);
} else {
propertiesBuilder_.addMessage(m);
}
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List properties_ =
java.util.Collections.emptyList();
private void ensurePropertiesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
properties_ = new java.util.ArrayList(properties_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.PropertySpec, dev.amp.validator.ValidatorProtos.PropertySpec.Builder, dev.amp.validator.ValidatorProtos.PropertySpecOrBuilder> propertiesBuilder_;
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public java.util.List getPropertiesList() {
if (propertiesBuilder_ == null) {
return java.util.Collections.unmodifiableList(properties_);
} else {
return propertiesBuilder_.getMessageList();
}
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public int getPropertiesCount() {
if (propertiesBuilder_ == null) {
return properties_.size();
} else {
return propertiesBuilder_.getCount();
}
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public dev.amp.validator.ValidatorProtos.PropertySpec getProperties(int index) {
if (propertiesBuilder_ == null) {
return properties_.get(index);
} else {
return propertiesBuilder_.getMessage(index);
}
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public Builder setProperties(
int index, dev.amp.validator.ValidatorProtos.PropertySpec value) {
if (propertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePropertiesIsMutable();
properties_.set(index, value);
onChanged();
} else {
propertiesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public Builder setProperties(
int index, dev.amp.validator.ValidatorProtos.PropertySpec.Builder builderForValue) {
if (propertiesBuilder_ == null) {
ensurePropertiesIsMutable();
properties_.set(index, builderForValue.build());
onChanged();
} else {
propertiesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public Builder addProperties(dev.amp.validator.ValidatorProtos.PropertySpec value) {
if (propertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePropertiesIsMutable();
properties_.add(value);
onChanged();
} else {
propertiesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public Builder addProperties(
int index, dev.amp.validator.ValidatorProtos.PropertySpec value) {
if (propertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePropertiesIsMutable();
properties_.add(index, value);
onChanged();
} else {
propertiesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public Builder addProperties(
dev.amp.validator.ValidatorProtos.PropertySpec.Builder builderForValue) {
if (propertiesBuilder_ == null) {
ensurePropertiesIsMutable();
properties_.add(builderForValue.build());
onChanged();
} else {
propertiesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public Builder addProperties(
int index, dev.amp.validator.ValidatorProtos.PropertySpec.Builder builderForValue) {
if (propertiesBuilder_ == null) {
ensurePropertiesIsMutable();
properties_.add(index, builderForValue.build());
onChanged();
} else {
propertiesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public Builder addAllProperties(
java.lang.Iterable values) {
if (propertiesBuilder_ == null) {
ensurePropertiesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, properties_);
onChanged();
} else {
propertiesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public Builder clearProperties() {
if (propertiesBuilder_ == null) {
properties_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
propertiesBuilder_.clear();
}
return this;
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public Builder removeProperties(int index) {
if (propertiesBuilder_ == null) {
ensurePropertiesIsMutable();
properties_.remove(index);
onChanged();
} else {
propertiesBuilder_.remove(index);
}
return this;
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public dev.amp.validator.ValidatorProtos.PropertySpec.Builder getPropertiesBuilder(
int index) {
return getPropertiesFieldBuilder().getBuilder(index);
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public dev.amp.validator.ValidatorProtos.PropertySpecOrBuilder getPropertiesOrBuilder(
int index) {
if (propertiesBuilder_ == null) {
return properties_.get(index); } else {
return propertiesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public java.util.List
getPropertiesOrBuilderList() {
if (propertiesBuilder_ != null) {
return propertiesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(properties_);
}
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public dev.amp.validator.ValidatorProtos.PropertySpec.Builder addPropertiesBuilder() {
return getPropertiesFieldBuilder().addBuilder(
dev.amp.validator.ValidatorProtos.PropertySpec.getDefaultInstance());
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public dev.amp.validator.ValidatorProtos.PropertySpec.Builder addPropertiesBuilder(
int index) {
return getPropertiesFieldBuilder().addBuilder(
index, dev.amp.validator.ValidatorProtos.PropertySpec.getDefaultInstance());
}
/**
* repeated .amp.validator.PropertySpec properties = 1;
*/
public java.util.List
getPropertiesBuilderList() {
return getPropertiesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.PropertySpec, dev.amp.validator.ValidatorProtos.PropertySpec.Builder, dev.amp.validator.ValidatorProtos.PropertySpecOrBuilder>
getPropertiesFieldBuilder() {
if (propertiesBuilder_ == null) {
propertiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.PropertySpec, dev.amp.validator.ValidatorProtos.PropertySpec.Builder, dev.amp.validator.ValidatorProtos.PropertySpecOrBuilder>(
properties_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
properties_ = null;
}
return propertiesBuilder_;
}
@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:amp.validator.PropertySpecList)
}
// @@protoc_insertion_point(class_scope:amp.validator.PropertySpecList)
private static final dev.amp.validator.ValidatorProtos.PropertySpecList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.PropertySpecList();
}
public static dev.amp.validator.ValidatorProtos.PropertySpecList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PropertySpecList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpecList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface UrlSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.UrlSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @return A list containing the protocol.
*/
java.util.List
getProtocolList();
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @return The count of protocol.
*/
int getProtocolCount();
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @param index The index of the element to return.
* @return The protocol at the given index.
*/
java.lang.String getProtocol(int index);
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @param index The index of the value to return.
* @return The bytes of the protocol at the given index.
*/
com.google.protobuf.ByteString
getProtocolBytes(int index);
/**
* optional bool allow_relative = 2 [default = true];
* @return Whether the allowRelative field is set.
*/
boolean hasAllowRelative();
/**
* optional bool allow_relative = 2 [default = true];
* @return The allowRelative.
*/
boolean getAllowRelative();
/**
*
* Whether the empty string '' is allowed for this URL value.
*
*
* optional bool allow_empty = 3 [default = false];
* @return Whether the allowEmpty field is set.
*/
boolean hasAllowEmpty();
/**
*
* Whether the empty string '' is allowed for this URL value.
*
*
* optional bool allow_empty = 3 [default = false];
* @return The allowEmpty.
*/
boolean getAllowEmpty();
}
/**
*
* Used for validating urls in attribute values (such as href/src/srcset).
* NEXT AVAILABLE TAG: 5
*
*
* Protobuf type {@code amp.validator.UrlSpec}
*/
public static final class UrlSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.UrlSpec)
UrlSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use UrlSpec.newBuilder() to construct.
private UrlSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private UrlSpec() {
protocol_ =
com.google.protobuf.LazyStringArrayList.emptyList();
allowRelative_ = true;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new UrlSpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_UrlSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_UrlSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.UrlSpec.class, dev.amp.validator.ValidatorProtos.UrlSpec.Builder.class);
}
private int bitField0_;
public static final int PROTOCOL_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList protocol_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @return A list containing the protocol.
*/
public com.google.protobuf.ProtocolStringList
getProtocolList() {
return protocol_;
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @return The count of protocol.
*/
public int getProtocolCount() {
return protocol_.size();
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @param index The index of the element to return.
* @return The protocol at the given index.
*/
public java.lang.String getProtocol(int index) {
return protocol_.get(index);
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @param index The index of the value to return.
* @return The bytes of the protocol at the given index.
*/
public com.google.protobuf.ByteString
getProtocolBytes(int index) {
return protocol_.getByteString(index);
}
public static final int ALLOW_RELATIVE_FIELD_NUMBER = 2;
private boolean allowRelative_ = true;
/**
* optional bool allow_relative = 2 [default = true];
* @return Whether the allowRelative field is set.
*/
@java.lang.Override
public boolean hasAllowRelative() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional bool allow_relative = 2 [default = true];
* @return The allowRelative.
*/
@java.lang.Override
public boolean getAllowRelative() {
return allowRelative_;
}
public static final int ALLOW_EMPTY_FIELD_NUMBER = 3;
private boolean allowEmpty_ = false;
/**
*
* Whether the empty string '' is allowed for this URL value.
*
*
* optional bool allow_empty = 3 [default = false];
* @return Whether the allowEmpty field is set.
*/
@java.lang.Override
public boolean hasAllowEmpty() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Whether the empty string '' is allowed for this URL value.
*
*
* optional bool allow_empty = 3 [default = false];
* @return The allowEmpty.
*/
@java.lang.Override
public boolean getAllowEmpty() {
return allowEmpty_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < protocol_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, protocol_.getRaw(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeBool(2, allowRelative_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeBool(3, allowEmpty_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < protocol_.size(); i++) {
dataSize += computeStringSizeNoTag(protocol_.getRaw(i));
}
size += dataSize;
size += 1 * getProtocolList().size();
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, allowRelative_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, allowEmpty_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.UrlSpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.UrlSpec other = (dev.amp.validator.ValidatorProtos.UrlSpec) obj;
if (!getProtocolList()
.equals(other.getProtocolList())) return false;
if (hasAllowRelative() != other.hasAllowRelative()) return false;
if (hasAllowRelative()) {
if (getAllowRelative()
!= other.getAllowRelative()) return false;
}
if (hasAllowEmpty() != other.hasAllowEmpty()) return false;
if (hasAllowEmpty()) {
if (getAllowEmpty()
!= other.getAllowEmpty()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getProtocolCount() > 0) {
hash = (37 * hash) + PROTOCOL_FIELD_NUMBER;
hash = (53 * hash) + getProtocolList().hashCode();
}
if (hasAllowRelative()) {
hash = (37 * hash) + ALLOW_RELATIVE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAllowRelative());
}
if (hasAllowEmpty()) {
hash = (37 * hash) + ALLOW_EMPTY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAllowEmpty());
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.UrlSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.UrlSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.UrlSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.UrlSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.UrlSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.UrlSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.UrlSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.UrlSpec 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 dev.amp.validator.ValidatorProtos.UrlSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.UrlSpec 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 dev.amp.validator.ValidatorProtos.UrlSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.UrlSpec 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(dev.amp.validator.ValidatorProtos.UrlSpec 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;
}
/**
*
* Used for validating urls in attribute values (such as href/src/srcset).
* NEXT AVAILABLE TAG: 5
*
*
* Protobuf type {@code amp.validator.UrlSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.UrlSpec)
dev.amp.validator.ValidatorProtos.UrlSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_UrlSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_UrlSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.UrlSpec.class, dev.amp.validator.ValidatorProtos.UrlSpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.UrlSpec.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
protocol_ =
com.google.protobuf.LazyStringArrayList.emptyList();
allowRelative_ = true;
allowEmpty_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_UrlSpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.UrlSpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.UrlSpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.UrlSpec build() {
dev.amp.validator.ValidatorProtos.UrlSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.UrlSpec buildPartial() {
dev.amp.validator.ValidatorProtos.UrlSpec result = new dev.amp.validator.ValidatorProtos.UrlSpec(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.UrlSpec result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
protocol_.makeImmutable();
result.protocol_ = protocol_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.allowRelative_ = allowRelative_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.allowEmpty_ = allowEmpty_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.UrlSpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.UrlSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.UrlSpec other) {
if (other == dev.amp.validator.ValidatorProtos.UrlSpec.getDefaultInstance()) return this;
if (!other.protocol_.isEmpty()) {
if (protocol_.isEmpty()) {
protocol_ = other.protocol_;
bitField0_ |= 0x00000001;
} else {
ensureProtocolIsMutable();
protocol_.addAll(other.protocol_);
}
onChanged();
}
if (other.hasAllowRelative()) {
setAllowRelative(other.getAllowRelative());
}
if (other.hasAllowEmpty()) {
setAllowEmpty(other.getAllowEmpty());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureProtocolIsMutable();
protocol_.add(bs);
break;
} // case 10
case 16: {
allowRelative_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
allowEmpty_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 24
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringArrayList protocol_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureProtocolIsMutable() {
if (!protocol_.isModifiable()) {
protocol_ = new com.google.protobuf.LazyStringArrayList(protocol_);
}
bitField0_ |= 0x00000001;
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @return A list containing the protocol.
*/
public com.google.protobuf.ProtocolStringList
getProtocolList() {
protocol_.makeImmutable();
return protocol_;
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @return The count of protocol.
*/
public int getProtocolCount() {
return protocol_.size();
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @param index The index of the element to return.
* @return The protocol at the given index.
*/
public java.lang.String getProtocol(int index) {
return protocol_.get(index);
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @param index The index of the value to return.
* @return The bytes of the protocol at the given index.
*/
public com.google.protobuf.ByteString
getProtocolBytes(int index) {
return protocol_.getByteString(index);
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @param index The index to set the value at.
* @param value The protocol to set.
* @return This builder for chaining.
*/
public Builder setProtocol(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureProtocolIsMutable();
protocol_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @param value The protocol to add.
* @return This builder for chaining.
*/
public Builder addProtocol(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureProtocolIsMutable();
protocol_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @param values The protocol to add.
* @return This builder for chaining.
*/
public Builder addAllProtocol(
java.lang.Iterable values) {
ensureProtocolIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, protocol_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @return This builder for chaining.
*/
public Builder clearProtocol() {
protocol_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
/**
*
* protocol must be in lowercase (e.g. "javascript" not "JavaScript").
*
*
* repeated string protocol = 1;
* @param value The bytes of the protocol to add.
* @return This builder for chaining.
*/
public Builder addProtocolBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureProtocolIsMutable();
protocol_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private boolean allowRelative_ = true;
/**
* optional bool allow_relative = 2 [default = true];
* @return Whether the allowRelative field is set.
*/
@java.lang.Override
public boolean hasAllowRelative() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional bool allow_relative = 2 [default = true];
* @return The allowRelative.
*/
@java.lang.Override
public boolean getAllowRelative() {
return allowRelative_;
}
/**
* optional bool allow_relative = 2 [default = true];
* @param value The allowRelative to set.
* @return This builder for chaining.
*/
public Builder setAllowRelative(boolean value) {
allowRelative_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* optional bool allow_relative = 2 [default = true];
* @return This builder for chaining.
*/
public Builder clearAllowRelative() {
bitField0_ = (bitField0_ & ~0x00000002);
allowRelative_ = true;
onChanged();
return this;
}
private boolean allowEmpty_ ;
/**
*
* Whether the empty string '' is allowed for this URL value.
*
*
* optional bool allow_empty = 3 [default = false];
* @return Whether the allowEmpty field is set.
*/
@java.lang.Override
public boolean hasAllowEmpty() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Whether the empty string '' is allowed for this URL value.
*
*
* optional bool allow_empty = 3 [default = false];
* @return The allowEmpty.
*/
@java.lang.Override
public boolean getAllowEmpty() {
return allowEmpty_;
}
/**
*
* Whether the empty string '' is allowed for this URL value.
*
*
* optional bool allow_empty = 3 [default = false];
* @param value The allowEmpty to set.
* @return This builder for chaining.
*/
public Builder setAllowEmpty(boolean value) {
allowEmpty_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Whether the empty string '' is allowed for this URL value.
*
*
* optional bool allow_empty = 3 [default = false];
* @return This builder for chaining.
*/
public Builder clearAllowEmpty() {
bitField0_ = (bitField0_ & ~0x00000004);
allowEmpty_ = 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:amp.validator.UrlSpec)
}
// @@protoc_insertion_point(class_scope:amp.validator.UrlSpec)
private static final dev.amp.validator.ValidatorProtos.UrlSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.UrlSpec();
}
public static dev.amp.validator.ValidatorProtos.UrlSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public UrlSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.UrlSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CssDeclarationOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.CssDeclaration)
com.google.protobuf.MessageOrBuilder {
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
boolean hasName();
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @return A list containing the valueCasei.
*/
java.util.List
getValueCaseiList();
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @return The count of valueCasei.
*/
int getValueCaseiCount();
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @param index The index of the element to return.
* @return The valueCasei at the given index.
*/
java.lang.String getValueCasei(int index);
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @param index The index of the value to return.
* @return The bytes of the valueCasei at the given index.
*/
com.google.protobuf.ByteString
getValueCaseiBytes(int index);
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @return Whether the valueRegexCasei field is set.
*/
boolean hasValueRegexCasei();
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @return The valueRegexCasei.
*/
java.lang.String getValueRegexCasei();
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @return The bytes for valueRegexCasei.
*/
com.google.protobuf.ByteString
getValueRegexCaseiBytes();
}
/**
*
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf type {@code amp.validator.CssDeclaration}
*/
public static final class CssDeclaration extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.CssDeclaration)
CssDeclarationOrBuilder {
private static final long serialVersionUID = 0L;
// Use CssDeclaration.newBuilder() to construct.
private CssDeclaration(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private CssDeclaration() {
name_ = "";
valueCasei_ =
com.google.protobuf.LazyStringArrayList.emptyList();
valueRegexCasei_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CssDeclaration();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CssDeclaration_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CssDeclaration_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.CssDeclaration.class, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_CASEI_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList valueCasei_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @return A list containing the valueCasei.
*/
public com.google.protobuf.ProtocolStringList
getValueCaseiList() {
return valueCasei_;
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @return The count of valueCasei.
*/
public int getValueCaseiCount() {
return valueCasei_.size();
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @param index The index of the element to return.
* @return The valueCasei at the given index.
*/
public java.lang.String getValueCasei(int index) {
return valueCasei_.get(index);
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @param index The index of the value to return.
* @return The bytes of the valueCasei at the given index.
*/
public com.google.protobuf.ByteString
getValueCaseiBytes(int index) {
return valueCasei_.getByteString(index);
}
public static final int VALUE_REGEX_CASEI_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object valueRegexCasei_ = "";
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @return Whether the valueRegexCasei field is set.
*/
@java.lang.Override
public boolean hasValueRegexCasei() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @return The valueRegexCasei.
*/
@java.lang.Override
public java.lang.String getValueRegexCasei() {
java.lang.Object ref = valueRegexCasei_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
valueRegexCasei_ = s;
}
return s;
}
}
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @return The bytes for valueRegexCasei.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getValueRegexCaseiBytes() {
java.lang.Object ref = valueRegexCasei_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
valueRegexCasei_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < valueCasei_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, valueCasei_.getRaw(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, valueRegexCasei_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
{
int dataSize = 0;
for (int i = 0; i < valueCasei_.size(); i++) {
dataSize += computeStringSizeNoTag(valueCasei_.getRaw(i));
}
size += dataSize;
size += 1 * getValueCaseiList().size();
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, valueRegexCasei_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.CssDeclaration)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.CssDeclaration other = (dev.amp.validator.ValidatorProtos.CssDeclaration) obj;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (!getValueCaseiList()
.equals(other.getValueCaseiList())) return false;
if (hasValueRegexCasei() != other.hasValueRegexCasei()) return false;
if (hasValueRegexCasei()) {
if (!getValueRegexCasei()
.equals(other.getValueRegexCasei())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (getValueCaseiCount() > 0) {
hash = (37 * hash) + VALUE_CASEI_FIELD_NUMBER;
hash = (53 * hash) + getValueCaseiList().hashCode();
}
if (hasValueRegexCasei()) {
hash = (37 * hash) + VALUE_REGEX_CASEI_FIELD_NUMBER;
hash = (53 * hash) + getValueRegexCasei().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.CssDeclaration parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.CssDeclaration parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.CssDeclaration parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.CssDeclaration parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.CssDeclaration parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.CssDeclaration parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.CssDeclaration parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.CssDeclaration 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 dev.amp.validator.ValidatorProtos.CssDeclaration parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.CssDeclaration 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 dev.amp.validator.ValidatorProtos.CssDeclaration parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.CssDeclaration 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(dev.amp.validator.ValidatorProtos.CssDeclaration 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;
}
/**
*
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf type {@code amp.validator.CssDeclaration}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.CssDeclaration)
dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CssDeclaration_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CssDeclaration_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.CssDeclaration.class, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.CssDeclaration.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
valueCasei_ =
com.google.protobuf.LazyStringArrayList.emptyList();
valueRegexCasei_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CssDeclaration_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssDeclaration getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.CssDeclaration.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssDeclaration build() {
dev.amp.validator.ValidatorProtos.CssDeclaration result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssDeclaration buildPartial() {
dev.amp.validator.ValidatorProtos.CssDeclaration result = new dev.amp.validator.ValidatorProtos.CssDeclaration(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.CssDeclaration result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
valueCasei_.makeImmutable();
result.valueCasei_ = valueCasei_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.valueRegexCasei_ = valueRegexCasei_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.CssDeclaration) {
return mergeFrom((dev.amp.validator.ValidatorProtos.CssDeclaration)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.CssDeclaration other) {
if (other == dev.amp.validator.ValidatorProtos.CssDeclaration.getDefaultInstance()) return this;
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.valueCasei_.isEmpty()) {
if (valueCasei_.isEmpty()) {
valueCasei_ = other.valueCasei_;
bitField0_ |= 0x00000002;
} else {
ensureValueCaseiIsMutable();
valueCasei_.addAll(other.valueCasei_);
}
onChanged();
}
if (other.hasValueRegexCasei()) {
valueRegexCasei_ = other.valueRegexCasei_;
bitField0_ |= 0x00000004;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureValueCaseiIsMutable();
valueCasei_.add(bs);
break;
} // case 18
case 26: {
valueRegexCasei_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* The name of the declaration (e.g. display). Use lower-case attribute names
* only.
*
*
* optional string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList valueCasei_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureValueCaseiIsMutable() {
if (!valueCasei_.isModifiable()) {
valueCasei_ = new com.google.protobuf.LazyStringArrayList(valueCasei_);
}
bitField0_ |= 0x00000002;
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @return A list containing the valueCasei.
*/
public com.google.protobuf.ProtocolStringList
getValueCaseiList() {
valueCasei_.makeImmutable();
return valueCasei_;
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @return The count of valueCasei.
*/
public int getValueCaseiCount() {
return valueCasei_.size();
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @param index The index of the element to return.
* @return The valueCasei at the given index.
*/
public java.lang.String getValueCasei(int index) {
return valueCasei_.get(index);
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @param index The index of the value to return.
* @return The bytes of the valueCasei at the given index.
*/
public com.google.protobuf.ByteString
getValueCaseiBytes(int index) {
return valueCasei_.getByteString(index);
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @param index The index to set the value at.
* @param value The valueCasei to set.
* @return This builder for chaining.
*/
public Builder setValueCasei(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureValueCaseiIsMutable();
valueCasei_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @param value The valueCasei to add.
* @return This builder for chaining.
*/
public Builder addValueCasei(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureValueCaseiIsMutable();
valueCasei_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @param values The valueCasei to add.
* @return This builder for chaining.
*/
public Builder addAllValueCasei(
java.lang.Iterable values) {
ensureValueCaseiIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, valueCasei_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @return This builder for chaining.
*/
public Builder clearValueCasei() {
valueCasei_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* This would be a oneof, but this file only uses features in protobuf 2.5.0.
* begin oneof {
* The valid values of the declaration (e.g. block).
*
*
* repeated string value_casei = 2;
* @param value The bytes of the valueCasei to add.
* @return This builder for chaining.
*/
public Builder addValueCaseiBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureValueCaseiIsMutable();
valueCasei_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object valueRegexCasei_ = "";
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @return Whether the valueRegexCasei field is set.
*/
public boolean hasValueRegexCasei() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @return The valueRegexCasei.
*/
public java.lang.String getValueRegexCasei() {
java.lang.Object ref = valueRegexCasei_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
valueRegexCasei_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @return The bytes for valueRegexCasei.
*/
public com.google.protobuf.ByteString
getValueRegexCaseiBytes() {
java.lang.Object ref = valueRegexCasei_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
valueRegexCasei_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @param value The valueRegexCasei to set.
* @return This builder for chaining.
*/
public Builder setValueRegexCasei(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
valueRegexCasei_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @return This builder for chaining.
*/
public Builder clearValueRegexCasei() {
valueRegexCasei_ = getDefaultInstance().getValueRegexCasei();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* } end oneof
*
*
* optional string value_regex_casei = 3;
* @param value The bytes for valueRegexCasei to set.
* @return This builder for chaining.
*/
public Builder setValueRegexCaseiBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
valueRegexCasei_ = value;
bitField0_ |= 0x00000004;
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:amp.validator.CssDeclaration)
}
// @@protoc_insertion_point(class_scope:amp.validator.CssDeclaration)
private static final dev.amp.validator.ValidatorProtos.CssDeclaration DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.CssDeclaration();
}
public static dev.amp.validator.ValidatorProtos.CssDeclaration getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CssDeclaration parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssDeclaration getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AttrSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.AttrSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @return A list containing the enabledBy.
*/
java.util.List
getEnabledByList();
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @return The count of enabledBy.
*/
int getEnabledByCount();
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @param index The index of the element to return.
* @return The enabledBy at the given index.
*/
java.lang.String getEnabledBy(int index);
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @param index The index of the value to return.
* @return The bytes of the enabledBy at the given index.
*/
com.google.protobuf.ByteString
getEnabledByBytes(int index);
/**
* repeated string disabled_by = 24;
* @return A list containing the disabledBy.
*/
java.util.List
getDisabledByList();
/**
* repeated string disabled_by = 24;
* @return The count of disabledBy.
*/
int getDisabledByCount();
/**
* repeated string disabled_by = 24;
* @param index The index of the element to return.
* @return The disabledBy at the given index.
*/
java.lang.String getDisabledBy(int index);
/**
* repeated string disabled_by = 24;
* @param index The index of the value to return.
* @return The bytes of the disabledBy at the given index.
*/
com.google.protobuf.ByteString
getDisabledByBytes(int index);
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
boolean hasName();
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* repeated string alternative_names = 2;
* @return A list containing the alternativeNames.
*/
java.util.List
getAlternativeNamesList();
/**
* repeated string alternative_names = 2;
* @return The count of alternativeNames.
*/
int getAlternativeNamesCount();
/**
* repeated string alternative_names = 2;
* @param index The index of the element to return.
* @return The alternativeNames at the given index.
*/
java.lang.String getAlternativeNames(int index);
/**
* repeated string alternative_names = 2;
* @param index The index of the value to return.
* @return The bytes of the alternativeNames at the given index.
*/
com.google.protobuf.ByteString
getAlternativeNamesBytes(int index);
/**
* optional bool mandatory = 3;
* @return Whether the mandatory field is set.
*/
boolean hasMandatory();
/**
* optional bool mandatory = 3;
* @return The mandatory.
*/
boolean getMandatory();
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @return Whether the mandatoryOneof field is set.
*/
boolean hasMandatoryOneof();
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @return The mandatoryOneof.
*/
java.lang.String getMandatoryOneof();
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @return The bytes for mandatoryOneof.
*/
com.google.protobuf.ByteString
getMandatoryOneofBytes();
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @return Whether the mandatoryAnyof field is set.
*/
boolean hasMandatoryAnyof();
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @return The mandatoryAnyof.
*/
java.lang.String getMandatoryAnyof();
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @return The bytes for mandatoryAnyof.
*/
com.google.protobuf.ByteString
getMandatoryAnyofBytes();
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @return A list containing the value.
*/
java.util.List
getValueList();
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @return The count of value.
*/
int getValueCount();
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @param index The index of the element to return.
* @return The value at the given index.
*/
java.lang.String getValue(int index);
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @param index The index of the value to return.
* @return The bytes of the value at the given index.
*/
com.google.protobuf.ByteString
getValueBytes(int index);
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @return A list containing the valueCasei.
*/
java.util.List
getValueCaseiList();
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @return The count of valueCasei.
*/
int getValueCaseiCount();
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @param index The index of the element to return.
* @return The valueCasei at the given index.
*/
java.lang.String getValueCasei(int index);
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @param index The index of the value to return.
* @return The bytes of the valueCasei at the given index.
*/
com.google.protobuf.ByteString
getValueCaseiBytes(int index);
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @return Whether the valueRegex field is set.
*/
boolean hasValueRegex();
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @return The valueRegex.
*/
java.lang.String getValueRegex();
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @return The bytes for valueRegex.
*/
com.google.protobuf.ByteString
getValueRegexBytes();
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @return Whether the valueRegexCasei field is set.
*/
boolean hasValueRegexCasei();
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @return The valueRegexCasei.
*/
java.lang.String getValueRegexCasei();
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @return The bytes for valueRegexCasei.
*/
com.google.protobuf.ByteString
getValueRegexCaseiBytes();
/**
* optional .amp.validator.UrlSpec value_url = 14;
* @return Whether the valueUrl field is set.
*/
boolean hasValueUrl();
/**
* optional .amp.validator.UrlSpec value_url = 14;
* @return The valueUrl.
*/
dev.amp.validator.ValidatorProtos.UrlSpec getValueUrl();
/**
* optional .amp.validator.UrlSpec value_url = 14;
*/
dev.amp.validator.ValidatorProtos.UrlSpecOrBuilder getValueUrlOrBuilder();
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
* @return Whether the valueProperties field is set.
*/
boolean hasValueProperties();
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
* @return The valueProperties.
*/
dev.amp.validator.ValidatorProtos.PropertySpecList getValueProperties();
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
*/
dev.amp.validator.ValidatorProtos.PropertySpecListOrBuilder getValuePropertiesOrBuilder();
/**
*
* If set, the attribute value will be evaluated using the matching document
* level CSS rules. This flag is used for `style` attributes. If
* `value_doc_css` is set, only non-SVG css is applied. If `value_doc_css_svg`
* is set, SVG-specific CSS rules are also allowed for this attribute value.
*
*
* optional bool value_doc_css = 27;
* @return Whether the valueDocCss field is set.
*/
boolean hasValueDocCss();
/**
*
* If set, the attribute value will be evaluated using the matching document
* level CSS rules. This flag is used for `style` attributes. If
* `value_doc_css` is set, only non-SVG css is applied. If `value_doc_css_svg`
* is set, SVG-specific CSS rules are also allowed for this attribute value.
*
*
* optional bool value_doc_css = 27;
* @return The valueDocCss.
*/
boolean getValueDocCss();
/**
*
* } end oneof
*
*
* optional bool value_doc_svg_css = 28;
* @return Whether the valueDocSvgCss field is set.
*/
boolean hasValueDocSvgCss();
/**
*
* } end oneof
*
*
* optional bool value_doc_svg_css = 28;
* @return The valueDocSvgCss.
*/
boolean getValueDocSvgCss();
/**
* optional .amp.validator.AttrSpec.ValueSet add_value_to_set = 25;
* @return Whether the addValueToSet field is set.
*/
boolean hasAddValueToSet();
/**
* optional .amp.validator.AttrSpec.ValueSet add_value_to_set = 25;
* @return The addValueToSet.
*/
dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet getAddValueToSet();
/**
* optional .amp.validator.AttrSpec.ValueSet value_oneof_set = 26;
* @return Whether the valueOneofSet field is set.
*/
boolean hasValueOneofSet();
/**
* optional .amp.validator.AttrSpec.ValueSet value_oneof_set = 26;
* @return The valueOneofSet.
*/
dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet getValueOneofSet();
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
* @return Whether the trigger field is set.
*/
boolean hasTrigger();
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
* @return The trigger.
*/
dev.amp.validator.ValidatorProtos.AttrTriggerSpec getTrigger();
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
*/
dev.amp.validator.ValidatorProtos.AttrTriggerSpecOrBuilder getTriggerOrBuilder();
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @return Whether the disallowedValueRegex field is set.
*/
boolean hasDisallowedValueRegex();
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @return The disallowedValueRegex.
*/
java.lang.String getDisallowedValueRegex();
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @return The bytes for disallowedValueRegex.
*/
com.google.protobuf.ByteString
getDisallowedValueRegexBytes();
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @return Whether the deprecation field is set.
*/
boolean hasDeprecation();
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @return The deprecation.
*/
java.lang.String getDeprecation();
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @return The bytes for deprecation.
*/
com.google.protobuf.ByteString
getDeprecationBytes();
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @return Whether the deprecationUrl field is set.
*/
boolean hasDeprecationUrl();
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @return The deprecationUrl.
*/
java.lang.String getDeprecationUrl();
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @return The bytes for deprecationUrl.
*/
com.google.protobuf.ByteString
getDeprecationUrlBytes();
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
java.util.List
getCssDeclarationList();
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
dev.amp.validator.ValidatorProtos.CssDeclaration getCssDeclaration(int index);
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
int getCssDeclarationCount();
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
java.util.List
getCssDeclarationOrBuilderList();
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder getCssDeclarationOrBuilder(
int index);
/**
*
* If set true, the TagSpec containing this AttrSpec will be evaluated first
* for any encountered tag which matches the tag name and this attribute spec.
* May only be set for an AttrSpec where mandatory=true and type matches those
* specified in the comments of DispatchKeyType above.
*
*
* optional .amp.validator.AttrSpec.DispatchKeyType dispatch_key = 13 [default = NONE_DISPATCH];
* @return Whether the dispatchKey field is set.
*/
boolean hasDispatchKey();
/**
*
* If set true, the TagSpec containing this AttrSpec will be evaluated first
* for any encountered tag which matches the tag name and this attribute spec.
* May only be set for an AttrSpec where mandatory=true and type matches those
* specified in the comments of DispatchKeyType above.
*
*
* optional .amp.validator.AttrSpec.DispatchKeyType dispatch_key = 13 [default = NONE_DISPATCH];
* @return The dispatchKey.
*/
dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType getDispatchKey();
/**
*
* If set to true, the TagSpec containing this AttrSpec implicitly has this
* attribute and the attribute is considered valid.
*
*
* optional bool implicit = 17 [default = false];
* @return Whether the implicit field is set.
*/
boolean hasImplicit();
/**
*
* If set to true, the TagSpec containing this AttrSpec implicitly has this
* attribute and the attribute is considered valid.
*
*
* optional bool implicit = 17 [default = false];
* @return The implicit.
*/
boolean getImplicit();
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @return A list containing the requiresExtension.
*/
java.util.List
getRequiresExtensionList();
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @return The count of requiresExtension.
*/
int getRequiresExtensionCount();
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @param index The index of the element to return.
* @return The requiresExtension at the given index.
*/
java.lang.String getRequiresExtension(int index);
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @param index The index of the value to return.
* @return The bytes of the requiresExtension at the given index.
*/
com.google.protobuf.ByteString
getRequiresExtensionBytes(int index);
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
* @return Whether the requiresAncestor field is set.
*/
boolean hasRequiresAncestor();
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
* @return The requiresAncestor.
*/
dev.amp.validator.ValidatorProtos.AncestorMarker getRequiresAncestor();
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
*/
dev.amp.validator.ValidatorProtos.AncestorMarkerOrBuilder getRequiresAncestorOrBuilder();
}
/**
*
* Attributes that are not covered by at least one of these specs are
* disallowed. Within a given context (e.g., for a given TagSpec),
* names are unique.
* NEXT AVAILABLE TAG: 29
*
*
* Protobuf type {@code amp.validator.AttrSpec}
*/
public static final class AttrSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.AttrSpec)
AttrSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use AttrSpec.newBuilder() to construct.
private AttrSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private AttrSpec() {
enabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
disabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
name_ = "";
alternativeNames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
mandatoryOneof_ = "";
mandatoryAnyof_ = "";
value_ =
com.google.protobuf.LazyStringArrayList.emptyList();
valueCasei_ =
com.google.protobuf.LazyStringArrayList.emptyList();
valueRegex_ = "";
valueRegexCasei_ = "";
addValueToSet_ = 0;
valueOneofSet_ = 0;
disallowedValueRegex_ = "";
deprecation_ = "";
deprecationUrl_ = "";
cssDeclaration_ = java.util.Collections.emptyList();
dispatchKey_ = 0;
requiresExtension_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AttrSpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AttrSpec.class, dev.amp.validator.ValidatorProtos.AttrSpec.Builder.class);
}
/**
*
* These two fields specify that values from one AttrSpec refer to values from
* another AttrSpec elsewhere on the page; validator will verify the
* references are not "dangling". These references may appear before or after
* their referents.
*
* For example, in the "id" AttrSpec in the "template" TagSpec, we have:
* add_value_to_set: TEMPLATE_IDS
* and in any "template" AttrSpec, we have:
* value_oneof_set: TEMPLATE_IDS
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf enum {@code amp.validator.AttrSpec.ValueSet}
*/
public enum ValueSet
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Never used
*
*
* UNKNOWN_VALUESET = 0;
*/
UNKNOWN_VALUESET(0),
/**
*
* <template id> values
*
*
* TEMPLATE_IDS = 1;
*/
TEMPLATE_IDS(1),
/**
*
* <script id> values, referenced by <amp-script>
*
*
* AMP_SCRIPT_IDS = 2;
*/
AMP_SCRIPT_IDS(2),
;
/**
*
* Never used
*
*
* UNKNOWN_VALUESET = 0;
*/
public static final int UNKNOWN_VALUESET_VALUE = 0;
/**
*
* <template id> values
*
*
* TEMPLATE_IDS = 1;
*/
public static final int TEMPLATE_IDS_VALUE = 1;
/**
*
* <script id> values, referenced by <amp-script>
*
*
* AMP_SCRIPT_IDS = 2;
*/
public static final int AMP_SCRIPT_IDS_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 ValueSet 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 ValueSet forNumber(int value) {
switch (value) {
case 0: return UNKNOWN_VALUESET;
case 1: return TEMPLATE_IDS;
case 2: return AMP_SCRIPT_IDS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ValueSet> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ValueSet findValueByNumber(int number) {
return ValueSet.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 dev.amp.validator.ValidatorProtos.AttrSpec.getDescriptor().getEnumTypes().get(0);
}
private static final ValueSet[] VALUES = values();
public static ValueSet 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 ValueSet(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:amp.validator.AttrSpec.ValueSet)
}
/**
* Protobuf enum {@code amp.validator.AttrSpec.DispatchKeyType}
*/
public enum DispatchKeyType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Indicates that the attribute does not form a dispatch key.
*
*
* NONE_DISPATCH = 0;
*/
NONE_DISPATCH(0),
/**
*
* Indicates that the name of the attribute alone forms a dispatch key.
*
*
* NAME_DISPATCH = 1;
*/
NAME_DISPATCH(1),
/**
*
* Indicates that the name + value of the attribute forms a dispatch key.
*
*
* NAME_VALUE_DISPATCH = 2;
*/
NAME_VALUE_DISPATCH(2),
/**
*
* Indicates that the name + value + mandatory parent forms a dispatch key.
*
*
* NAME_VALUE_PARENT_DISPATCH = 3;
*/
NAME_VALUE_PARENT_DISPATCH(3),
;
/**
*
* Indicates that the attribute does not form a dispatch key.
*
*
* NONE_DISPATCH = 0;
*/
public static final int NONE_DISPATCH_VALUE = 0;
/**
*
* Indicates that the name of the attribute alone forms a dispatch key.
*
*
* NAME_DISPATCH = 1;
*/
public static final int NAME_DISPATCH_VALUE = 1;
/**
*
* Indicates that the name + value of the attribute forms a dispatch key.
*
*
* NAME_VALUE_DISPATCH = 2;
*/
public static final int NAME_VALUE_DISPATCH_VALUE = 2;
/**
*
* Indicates that the name + value + mandatory parent forms a dispatch key.
*
*
* NAME_VALUE_PARENT_DISPATCH = 3;
*/
public static final int NAME_VALUE_PARENT_DISPATCH_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 DispatchKeyType 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 DispatchKeyType forNumber(int value) {
switch (value) {
case 0: return NONE_DISPATCH;
case 1: return NAME_DISPATCH;
case 2: return NAME_VALUE_DISPATCH;
case 3: return NAME_VALUE_PARENT_DISPATCH;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
DispatchKeyType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public DispatchKeyType findValueByNumber(int number) {
return DispatchKeyType.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 dev.amp.validator.ValidatorProtos.AttrSpec.getDescriptor().getEnumTypes().get(1);
}
private static final DispatchKeyType[] VALUES = values();
public static DispatchKeyType 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 DispatchKeyType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:amp.validator.AttrSpec.DispatchKeyType)
}
private int bitField0_;
public static final int ENABLED_BY_FIELD_NUMBER = 23;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList enabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @return A list containing the enabledBy.
*/
public com.google.protobuf.ProtocolStringList
getEnabledByList() {
return enabledBy_;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @return The count of enabledBy.
*/
public int getEnabledByCount() {
return enabledBy_.size();
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @param index The index of the element to return.
* @return The enabledBy at the given index.
*/
public java.lang.String getEnabledBy(int index) {
return enabledBy_.get(index);
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @param index The index of the value to return.
* @return The bytes of the enabledBy at the given index.
*/
public com.google.protobuf.ByteString
getEnabledByBytes(int index) {
return enabledBy_.getByteString(index);
}
public static final int DISABLED_BY_FIELD_NUMBER = 24;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList disabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* repeated string disabled_by = 24;
* @return A list containing the disabledBy.
*/
public com.google.protobuf.ProtocolStringList
getDisabledByList() {
return disabledBy_;
}
/**
* repeated string disabled_by = 24;
* @return The count of disabledBy.
*/
public int getDisabledByCount() {
return disabledBy_.size();
}
/**
* repeated string disabled_by = 24;
* @param index The index of the element to return.
* @return The disabledBy at the given index.
*/
public java.lang.String getDisabledBy(int index) {
return disabledBy_.get(index);
}
/**
* repeated string disabled_by = 24;
* @param index The index of the value to return.
* @return The bytes of the disabledBy at the given index.
*/
public com.google.protobuf.ByteString
getDisabledByBytes(int index) {
return disabledBy_.getByteString(index);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALTERNATIVE_NAMES_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList alternativeNames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* repeated string alternative_names = 2;
* @return A list containing the alternativeNames.
*/
public com.google.protobuf.ProtocolStringList
getAlternativeNamesList() {
return alternativeNames_;
}
/**
* repeated string alternative_names = 2;
* @return The count of alternativeNames.
*/
public int getAlternativeNamesCount() {
return alternativeNames_.size();
}
/**
* repeated string alternative_names = 2;
* @param index The index of the element to return.
* @return The alternativeNames at the given index.
*/
public java.lang.String getAlternativeNames(int index) {
return alternativeNames_.get(index);
}
/**
* repeated string alternative_names = 2;
* @param index The index of the value to return.
* @return The bytes of the alternativeNames at the given index.
*/
public com.google.protobuf.ByteString
getAlternativeNamesBytes(int index) {
return alternativeNames_.getByteString(index);
}
public static final int MANDATORY_FIELD_NUMBER = 3;
private boolean mandatory_ = false;
/**
* optional bool mandatory = 3;
* @return Whether the mandatory field is set.
*/
@java.lang.Override
public boolean hasMandatory() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional bool mandatory = 3;
* @return The mandatory.
*/
@java.lang.Override
public boolean getMandatory() {
return mandatory_;
}
public static final int MANDATORY_ONEOF_FIELD_NUMBER = 12;
@SuppressWarnings("serial")
private volatile java.lang.Object mandatoryOneof_ = "";
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @return Whether the mandatoryOneof field is set.
*/
@java.lang.Override
public boolean hasMandatoryOneof() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @return The mandatoryOneof.
*/
@java.lang.Override
public java.lang.String getMandatoryOneof() {
java.lang.Object ref = mandatoryOneof_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryOneof_ = s;
}
return s;
}
}
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @return The bytes for mandatoryOneof.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMandatoryOneofBytes() {
java.lang.Object ref = mandatoryOneof_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryOneof_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MANDATORY_ANYOF_FIELD_NUMBER = 21;
@SuppressWarnings("serial")
private volatile java.lang.Object mandatoryAnyof_ = "";
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @return Whether the mandatoryAnyof field is set.
*/
@java.lang.Override
public boolean hasMandatoryAnyof() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @return The mandatoryAnyof.
*/
@java.lang.Override
public java.lang.String getMandatoryAnyof() {
java.lang.Object ref = mandatoryAnyof_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryAnyof_ = s;
}
return s;
}
}
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @return The bytes for mandatoryAnyof.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMandatoryAnyofBytes() {
java.lang.Object ref = mandatoryAnyof_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryAnyof_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList value_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @return A list containing the value.
*/
public com.google.protobuf.ProtocolStringList
getValueList() {
return value_;
}
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @return The count of value.
*/
public int getValueCount() {
return value_.size();
}
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @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 attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @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 VALUE_CASEI_FIELD_NUMBER = 18;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList valueCasei_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @return A list containing the valueCasei.
*/
public com.google.protobuf.ProtocolStringList
getValueCaseiList() {
return valueCasei_;
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @return The count of valueCasei.
*/
public int getValueCaseiCount() {
return valueCasei_.size();
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @param index The index of the element to return.
* @return The valueCasei at the given index.
*/
public java.lang.String getValueCasei(int index) {
return valueCasei_.get(index);
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @param index The index of the value to return.
* @return The bytes of the valueCasei at the given index.
*/
public com.google.protobuf.ByteString
getValueCaseiBytes(int index) {
return valueCasei_.getByteString(index);
}
public static final int VALUE_REGEX_FIELD_NUMBER = 15;
@SuppressWarnings("serial")
private volatile java.lang.Object valueRegex_ = "";
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @return Whether the valueRegex field is set.
*/
@java.lang.Override
public boolean hasValueRegex() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @return The valueRegex.
*/
@java.lang.Override
public java.lang.String getValueRegex() {
java.lang.Object ref = valueRegex_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
valueRegex_ = s;
}
return s;
}
}
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @return The bytes for valueRegex.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getValueRegexBytes() {
java.lang.Object ref = valueRegex_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
valueRegex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_REGEX_CASEI_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object valueRegexCasei_ = "";
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @return Whether the valueRegexCasei field is set.
*/
@java.lang.Override
public boolean hasValueRegexCasei() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @return The valueRegexCasei.
*/
@java.lang.Override
public java.lang.String getValueRegexCasei() {
java.lang.Object ref = valueRegexCasei_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
valueRegexCasei_ = s;
}
return s;
}
}
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @return The bytes for valueRegexCasei.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getValueRegexCaseiBytes() {
java.lang.Object ref = valueRegexCasei_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
valueRegexCasei_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_URL_FIELD_NUMBER = 14;
private dev.amp.validator.ValidatorProtos.UrlSpec valueUrl_;
/**
* optional .amp.validator.UrlSpec value_url = 14;
* @return Whether the valueUrl field is set.
*/
@java.lang.Override
public boolean hasValueUrl() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
* optional .amp.validator.UrlSpec value_url = 14;
* @return The valueUrl.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.UrlSpec getValueUrl() {
return valueUrl_ == null ? dev.amp.validator.ValidatorProtos.UrlSpec.getDefaultInstance() : valueUrl_;
}
/**
* optional .amp.validator.UrlSpec value_url = 14;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.UrlSpecOrBuilder getValueUrlOrBuilder() {
return valueUrl_ == null ? dev.amp.validator.ValidatorProtos.UrlSpec.getDefaultInstance() : valueUrl_;
}
public static final int VALUE_PROPERTIES_FIELD_NUMBER = 11;
private dev.amp.validator.ValidatorProtos.PropertySpecList valueProperties_;
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
* @return Whether the valueProperties field is set.
*/
@java.lang.Override
public boolean hasValueProperties() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
* @return The valueProperties.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpecList getValueProperties() {
return valueProperties_ == null ? dev.amp.validator.ValidatorProtos.PropertySpecList.getDefaultInstance() : valueProperties_;
}
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.PropertySpecListOrBuilder getValuePropertiesOrBuilder() {
return valueProperties_ == null ? dev.amp.validator.ValidatorProtos.PropertySpecList.getDefaultInstance() : valueProperties_;
}
public static final int VALUE_DOC_CSS_FIELD_NUMBER = 27;
private boolean valueDocCss_ = false;
/**
*
* If set, the attribute value will be evaluated using the matching document
* level CSS rules. This flag is used for `style` attributes. If
* `value_doc_css` is set, only non-SVG css is applied. If `value_doc_css_svg`
* is set, SVG-specific CSS rules are also allowed for this attribute value.
*
*
* optional bool value_doc_css = 27;
* @return Whether the valueDocCss field is set.
*/
@java.lang.Override
public boolean hasValueDocCss() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
* If set, the attribute value will be evaluated using the matching document
* level CSS rules. This flag is used for `style` attributes. If
* `value_doc_css` is set, only non-SVG css is applied. If `value_doc_css_svg`
* is set, SVG-specific CSS rules are also allowed for this attribute value.
*
*
* optional bool value_doc_css = 27;
* @return The valueDocCss.
*/
@java.lang.Override
public boolean getValueDocCss() {
return valueDocCss_;
}
public static final int VALUE_DOC_SVG_CSS_FIELD_NUMBER = 28;
private boolean valueDocSvgCss_ = false;
/**
*
* } end oneof
*
*
* optional bool value_doc_svg_css = 28;
* @return Whether the valueDocSvgCss field is set.
*/
@java.lang.Override
public boolean hasValueDocSvgCss() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
* } end oneof
*
*
* optional bool value_doc_svg_css = 28;
* @return The valueDocSvgCss.
*/
@java.lang.Override
public boolean getValueDocSvgCss() {
return valueDocSvgCss_;
}
public static final int ADD_VALUE_TO_SET_FIELD_NUMBER = 25;
private int addValueToSet_ = 0;
/**
* optional .amp.validator.AttrSpec.ValueSet add_value_to_set = 25;
* @return Whether the addValueToSet field is set.
*/
@java.lang.Override public boolean hasAddValueToSet() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
* optional .amp.validator.AttrSpec.ValueSet add_value_to_set = 25;
* @return The addValueToSet.
*/
@java.lang.Override public dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet getAddValueToSet() {
dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet result = dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet.forNumber(addValueToSet_);
return result == null ? dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet.UNKNOWN_VALUESET : result;
}
public static final int VALUE_ONEOF_SET_FIELD_NUMBER = 26;
private int valueOneofSet_ = 0;
/**
* optional .amp.validator.AttrSpec.ValueSet value_oneof_set = 26;
* @return Whether the valueOneofSet field is set.
*/
@java.lang.Override public boolean hasValueOneofSet() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
* optional .amp.validator.AttrSpec.ValueSet value_oneof_set = 26;
* @return The valueOneofSet.
*/
@java.lang.Override public dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet getValueOneofSet() {
dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet result = dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet.forNumber(valueOneofSet_);
return result == null ? dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet.UNKNOWN_VALUESET : result;
}
public static final int TRIGGER_FIELD_NUMBER = 16;
private dev.amp.validator.ValidatorProtos.AttrTriggerSpec trigger_;
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
* @return Whether the trigger field is set.
*/
@java.lang.Override
public boolean hasTrigger() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
* @return The trigger.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrTriggerSpec getTrigger() {
return trigger_ == null ? dev.amp.validator.ValidatorProtos.AttrTriggerSpec.getDefaultInstance() : trigger_;
}
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrTriggerSpecOrBuilder getTriggerOrBuilder() {
return trigger_ == null ? dev.amp.validator.ValidatorProtos.AttrTriggerSpec.getDefaultInstance() : trigger_;
}
public static final int DISALLOWED_VALUE_REGEX_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object disallowedValueRegex_ = "";
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @return Whether the disallowedValueRegex field is set.
*/
@java.lang.Override
public boolean hasDisallowedValueRegex() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @return The disallowedValueRegex.
*/
@java.lang.Override
public java.lang.String getDisallowedValueRegex() {
java.lang.Object ref = disallowedValueRegex_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
disallowedValueRegex_ = s;
}
return s;
}
}
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @return The bytes for disallowedValueRegex.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDisallowedValueRegexBytes() {
java.lang.Object ref = disallowedValueRegex_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
disallowedValueRegex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEPRECATION_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object deprecation_ = "";
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @return Whether the deprecation field is set.
*/
@java.lang.Override
public boolean hasDeprecation() {
return ((bitField0_ & 0x00004000) != 0);
}
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @return The deprecation.
*/
@java.lang.Override
public java.lang.String getDeprecation() {
java.lang.Object ref = deprecation_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
deprecation_ = s;
}
return s;
}
}
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @return The bytes for deprecation.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDeprecationBytes() {
java.lang.Object ref = deprecation_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deprecation_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEPRECATION_URL_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object deprecationUrl_ = "";
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @return Whether the deprecationUrl field is set.
*/
@java.lang.Override
public boolean hasDeprecationUrl() {
return ((bitField0_ & 0x00008000) != 0);
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @return The deprecationUrl.
*/
@java.lang.Override
public java.lang.String getDeprecationUrl() {
java.lang.Object ref = deprecationUrl_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
deprecationUrl_ = s;
}
return s;
}
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @return The bytes for deprecationUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDeprecationUrlBytes() {
java.lang.Object ref = deprecationUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deprecationUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CSS_DECLARATION_FIELD_NUMBER = 20;
@SuppressWarnings("serial")
private java.util.List cssDeclaration_;
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
@java.lang.Override
public java.util.List getCssDeclarationList() {
return cssDeclaration_;
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
@java.lang.Override
public java.util.List
getCssDeclarationOrBuilderList() {
return cssDeclaration_;
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
@java.lang.Override
public int getCssDeclarationCount() {
return cssDeclaration_.size();
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssDeclaration getCssDeclaration(int index) {
return cssDeclaration_.get(index);
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder getCssDeclarationOrBuilder(
int index) {
return cssDeclaration_.get(index);
}
public static final int DISPATCH_KEY_FIELD_NUMBER = 13;
private int dispatchKey_ = 0;
/**
*
* If set true, the TagSpec containing this AttrSpec will be evaluated first
* for any encountered tag which matches the tag name and this attribute spec.
* May only be set for an AttrSpec where mandatory=true and type matches those
* specified in the comments of DispatchKeyType above.
*
*
* optional .amp.validator.AttrSpec.DispatchKeyType dispatch_key = 13 [default = NONE_DISPATCH];
* @return Whether the dispatchKey field is set.
*/
@java.lang.Override public boolean hasDispatchKey() {
return ((bitField0_ & 0x00010000) != 0);
}
/**
*
* If set true, the TagSpec containing this AttrSpec will be evaluated first
* for any encountered tag which matches the tag name and this attribute spec.
* May only be set for an AttrSpec where mandatory=true and type matches those
* specified in the comments of DispatchKeyType above.
*
*
* optional .amp.validator.AttrSpec.DispatchKeyType dispatch_key = 13 [default = NONE_DISPATCH];
* @return The dispatchKey.
*/
@java.lang.Override public dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType getDispatchKey() {
dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType result = dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType.forNumber(dispatchKey_);
return result == null ? dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType.NONE_DISPATCH : result;
}
public static final int IMPLICIT_FIELD_NUMBER = 17;
private boolean implicit_ = false;
/**
*
* If set to true, the TagSpec containing this AttrSpec implicitly has this
* attribute and the attribute is considered valid.
*
*
* optional bool implicit = 17 [default = false];
* @return Whether the implicit field is set.
*/
@java.lang.Override
public boolean hasImplicit() {
return ((bitField0_ & 0x00020000) != 0);
}
/**
*
* If set to true, the TagSpec containing this AttrSpec implicitly has this
* attribute and the attribute is considered valid.
*
*
* optional bool implicit = 17 [default = false];
* @return The implicit.
*/
@java.lang.Override
public boolean getImplicit() {
return implicit_;
}
public static final int REQUIRES_EXTENSION_FIELD_NUMBER = 19;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList requiresExtension_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @return A list containing the requiresExtension.
*/
public com.google.protobuf.ProtocolStringList
getRequiresExtensionList() {
return requiresExtension_;
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @return The count of requiresExtension.
*/
public int getRequiresExtensionCount() {
return requiresExtension_.size();
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @param index The index of the element to return.
* @return The requiresExtension at the given index.
*/
public java.lang.String getRequiresExtension(int index) {
return requiresExtension_.get(index);
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @param index The index of the value to return.
* @return The bytes of the requiresExtension at the given index.
*/
public com.google.protobuf.ByteString
getRequiresExtensionBytes(int index) {
return requiresExtension_.getByteString(index);
}
public static final int REQUIRES_ANCESTOR_FIELD_NUMBER = 22;
private dev.amp.validator.ValidatorProtos.AncestorMarker requiresAncestor_;
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
* @return Whether the requiresAncestor field is set.
*/
@java.lang.Override
public boolean hasRequiresAncestor() {
return ((bitField0_ & 0x00040000) != 0);
}
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
* @return The requiresAncestor.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AncestorMarker getRequiresAncestor() {
return requiresAncestor_ == null ? dev.amp.validator.ValidatorProtos.AncestorMarker.getDefaultInstance() : requiresAncestor_;
}
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AncestorMarkerOrBuilder getRequiresAncestorOrBuilder() {
return requiresAncestor_ == null ? dev.amp.validator.ValidatorProtos.AncestorMarker.getDefaultInstance() : requiresAncestor_;
}
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)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < alternativeNames_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, alternativeNames_.getRaw(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeBool(3, mandatory_);
}
for (int i = 0; i < value_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, value_.getRaw(i));
}
if (((bitField0_ & 0x00000020) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, valueRegexCasei_);
}
if (((bitField0_ & 0x00002000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, disallowedValueRegex_);
}
if (((bitField0_ & 0x00004000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, deprecation_);
}
if (((bitField0_ & 0x00008000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, deprecationUrl_);
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeMessage(11, getValueProperties());
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, mandatoryOneof_);
}
if (((bitField0_ & 0x00010000) != 0)) {
output.writeEnum(13, dispatchKey_);
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeMessage(14, getValueUrl());
}
if (((bitField0_ & 0x00000010) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 15, valueRegex_);
}
if (((bitField0_ & 0x00001000) != 0)) {
output.writeMessage(16, getTrigger());
}
if (((bitField0_ & 0x00020000) != 0)) {
output.writeBool(17, implicit_);
}
for (int i = 0; i < valueCasei_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 18, valueCasei_.getRaw(i));
}
for (int i = 0; i < requiresExtension_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 19, requiresExtension_.getRaw(i));
}
for (int i = 0; i < cssDeclaration_.size(); i++) {
output.writeMessage(20, cssDeclaration_.get(i));
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 21, mandatoryAnyof_);
}
if (((bitField0_ & 0x00040000) != 0)) {
output.writeMessage(22, getRequiresAncestor());
}
for (int i = 0; i < enabledBy_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 23, enabledBy_.getRaw(i));
}
for (int i = 0; i < disabledBy_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 24, disabledBy_.getRaw(i));
}
if (((bitField0_ & 0x00000400) != 0)) {
output.writeEnum(25, addValueToSet_);
}
if (((bitField0_ & 0x00000800) != 0)) {
output.writeEnum(26, valueOneofSet_);
}
if (((bitField0_ & 0x00000100) != 0)) {
output.writeBool(27, valueDocCss_);
}
if (((bitField0_ & 0x00000200) != 0)) {
output.writeBool(28, valueDocSvgCss_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
{
int dataSize = 0;
for (int i = 0; i < alternativeNames_.size(); i++) {
dataSize += computeStringSizeNoTag(alternativeNames_.getRaw(i));
}
size += dataSize;
size += 1 * getAlternativeNamesList().size();
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, mandatory_);
}
{
int dataSize = 0;
for (int i = 0; i < value_.size(); i++) {
dataSize += computeStringSizeNoTag(value_.getRaw(i));
}
size += dataSize;
size += 1 * getValueList().size();
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, valueRegexCasei_);
}
if (((bitField0_ & 0x00002000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, disallowedValueRegex_);
}
if (((bitField0_ & 0x00004000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, deprecation_);
}
if (((bitField0_ & 0x00008000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, deprecationUrl_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getValueProperties());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, mandatoryOneof_);
}
if (((bitField0_ & 0x00010000) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(13, dispatchKey_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, getValueUrl());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, valueRegex_);
}
if (((bitField0_ & 0x00001000) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(16, getTrigger());
}
if (((bitField0_ & 0x00020000) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(17, implicit_);
}
{
int dataSize = 0;
for (int i = 0; i < valueCasei_.size(); i++) {
dataSize += computeStringSizeNoTag(valueCasei_.getRaw(i));
}
size += dataSize;
size += 2 * getValueCaseiList().size();
}
{
int dataSize = 0;
for (int i = 0; i < requiresExtension_.size(); i++) {
dataSize += computeStringSizeNoTag(requiresExtension_.getRaw(i));
}
size += dataSize;
size += 2 * getRequiresExtensionList().size();
}
for (int i = 0; i < cssDeclaration_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(20, cssDeclaration_.get(i));
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, mandatoryAnyof_);
}
if (((bitField0_ & 0x00040000) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(22, getRequiresAncestor());
}
{
int dataSize = 0;
for (int i = 0; i < enabledBy_.size(); i++) {
dataSize += computeStringSizeNoTag(enabledBy_.getRaw(i));
}
size += dataSize;
size += 2 * getEnabledByList().size();
}
{
int dataSize = 0;
for (int i = 0; i < disabledBy_.size(); i++) {
dataSize += computeStringSizeNoTag(disabledBy_.getRaw(i));
}
size += dataSize;
size += 2 * getDisabledByList().size();
}
if (((bitField0_ & 0x00000400) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(25, addValueToSet_);
}
if (((bitField0_ & 0x00000800) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(26, valueOneofSet_);
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(27, valueDocCss_);
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(28, valueDocSvgCss_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.AttrSpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.AttrSpec other = (dev.amp.validator.ValidatorProtos.AttrSpec) obj;
if (!getEnabledByList()
.equals(other.getEnabledByList())) return false;
if (!getDisabledByList()
.equals(other.getDisabledByList())) return false;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (!getAlternativeNamesList()
.equals(other.getAlternativeNamesList())) return false;
if (hasMandatory() != other.hasMandatory()) return false;
if (hasMandatory()) {
if (getMandatory()
!= other.getMandatory()) return false;
}
if (hasMandatoryOneof() != other.hasMandatoryOneof()) return false;
if (hasMandatoryOneof()) {
if (!getMandatoryOneof()
.equals(other.getMandatoryOneof())) return false;
}
if (hasMandatoryAnyof() != other.hasMandatoryAnyof()) return false;
if (hasMandatoryAnyof()) {
if (!getMandatoryAnyof()
.equals(other.getMandatoryAnyof())) return false;
}
if (!getValueList()
.equals(other.getValueList())) return false;
if (!getValueCaseiList()
.equals(other.getValueCaseiList())) return false;
if (hasValueRegex() != other.hasValueRegex()) return false;
if (hasValueRegex()) {
if (!getValueRegex()
.equals(other.getValueRegex())) return false;
}
if (hasValueRegexCasei() != other.hasValueRegexCasei()) return false;
if (hasValueRegexCasei()) {
if (!getValueRegexCasei()
.equals(other.getValueRegexCasei())) return false;
}
if (hasValueUrl() != other.hasValueUrl()) return false;
if (hasValueUrl()) {
if (!getValueUrl()
.equals(other.getValueUrl())) return false;
}
if (hasValueProperties() != other.hasValueProperties()) return false;
if (hasValueProperties()) {
if (!getValueProperties()
.equals(other.getValueProperties())) return false;
}
if (hasValueDocCss() != other.hasValueDocCss()) return false;
if (hasValueDocCss()) {
if (getValueDocCss()
!= other.getValueDocCss()) return false;
}
if (hasValueDocSvgCss() != other.hasValueDocSvgCss()) return false;
if (hasValueDocSvgCss()) {
if (getValueDocSvgCss()
!= other.getValueDocSvgCss()) return false;
}
if (hasAddValueToSet() != other.hasAddValueToSet()) return false;
if (hasAddValueToSet()) {
if (addValueToSet_ != other.addValueToSet_) return false;
}
if (hasValueOneofSet() != other.hasValueOneofSet()) return false;
if (hasValueOneofSet()) {
if (valueOneofSet_ != other.valueOneofSet_) return false;
}
if (hasTrigger() != other.hasTrigger()) return false;
if (hasTrigger()) {
if (!getTrigger()
.equals(other.getTrigger())) return false;
}
if (hasDisallowedValueRegex() != other.hasDisallowedValueRegex()) return false;
if (hasDisallowedValueRegex()) {
if (!getDisallowedValueRegex()
.equals(other.getDisallowedValueRegex())) return false;
}
if (hasDeprecation() != other.hasDeprecation()) return false;
if (hasDeprecation()) {
if (!getDeprecation()
.equals(other.getDeprecation())) return false;
}
if (hasDeprecationUrl() != other.hasDeprecationUrl()) return false;
if (hasDeprecationUrl()) {
if (!getDeprecationUrl()
.equals(other.getDeprecationUrl())) return false;
}
if (!getCssDeclarationList()
.equals(other.getCssDeclarationList())) return false;
if (hasDispatchKey() != other.hasDispatchKey()) return false;
if (hasDispatchKey()) {
if (dispatchKey_ != other.dispatchKey_) return false;
}
if (hasImplicit() != other.hasImplicit()) return false;
if (hasImplicit()) {
if (getImplicit()
!= other.getImplicit()) return false;
}
if (!getRequiresExtensionList()
.equals(other.getRequiresExtensionList())) return false;
if (hasRequiresAncestor() != other.hasRequiresAncestor()) return false;
if (hasRequiresAncestor()) {
if (!getRequiresAncestor()
.equals(other.getRequiresAncestor())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getEnabledByCount() > 0) {
hash = (37 * hash) + ENABLED_BY_FIELD_NUMBER;
hash = (53 * hash) + getEnabledByList().hashCode();
}
if (getDisabledByCount() > 0) {
hash = (37 * hash) + DISABLED_BY_FIELD_NUMBER;
hash = (53 * hash) + getDisabledByList().hashCode();
}
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (getAlternativeNamesCount() > 0) {
hash = (37 * hash) + ALTERNATIVE_NAMES_FIELD_NUMBER;
hash = (53 * hash) + getAlternativeNamesList().hashCode();
}
if (hasMandatory()) {
hash = (37 * hash) + MANDATORY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMandatory());
}
if (hasMandatoryOneof()) {
hash = (37 * hash) + MANDATORY_ONEOF_FIELD_NUMBER;
hash = (53 * hash) + getMandatoryOneof().hashCode();
}
if (hasMandatoryAnyof()) {
hash = (37 * hash) + MANDATORY_ANYOF_FIELD_NUMBER;
hash = (53 * hash) + getMandatoryAnyof().hashCode();
}
if (getValueCount() > 0) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValueList().hashCode();
}
if (getValueCaseiCount() > 0) {
hash = (37 * hash) + VALUE_CASEI_FIELD_NUMBER;
hash = (53 * hash) + getValueCaseiList().hashCode();
}
if (hasValueRegex()) {
hash = (37 * hash) + VALUE_REGEX_FIELD_NUMBER;
hash = (53 * hash) + getValueRegex().hashCode();
}
if (hasValueRegexCasei()) {
hash = (37 * hash) + VALUE_REGEX_CASEI_FIELD_NUMBER;
hash = (53 * hash) + getValueRegexCasei().hashCode();
}
if (hasValueUrl()) {
hash = (37 * hash) + VALUE_URL_FIELD_NUMBER;
hash = (53 * hash) + getValueUrl().hashCode();
}
if (hasValueProperties()) {
hash = (37 * hash) + VALUE_PROPERTIES_FIELD_NUMBER;
hash = (53 * hash) + getValueProperties().hashCode();
}
if (hasValueDocCss()) {
hash = (37 * hash) + VALUE_DOC_CSS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getValueDocCss());
}
if (hasValueDocSvgCss()) {
hash = (37 * hash) + VALUE_DOC_SVG_CSS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getValueDocSvgCss());
}
if (hasAddValueToSet()) {
hash = (37 * hash) + ADD_VALUE_TO_SET_FIELD_NUMBER;
hash = (53 * hash) + addValueToSet_;
}
if (hasValueOneofSet()) {
hash = (37 * hash) + VALUE_ONEOF_SET_FIELD_NUMBER;
hash = (53 * hash) + valueOneofSet_;
}
if (hasTrigger()) {
hash = (37 * hash) + TRIGGER_FIELD_NUMBER;
hash = (53 * hash) + getTrigger().hashCode();
}
if (hasDisallowedValueRegex()) {
hash = (37 * hash) + DISALLOWED_VALUE_REGEX_FIELD_NUMBER;
hash = (53 * hash) + getDisallowedValueRegex().hashCode();
}
if (hasDeprecation()) {
hash = (37 * hash) + DEPRECATION_FIELD_NUMBER;
hash = (53 * hash) + getDeprecation().hashCode();
}
if (hasDeprecationUrl()) {
hash = (37 * hash) + DEPRECATION_URL_FIELD_NUMBER;
hash = (53 * hash) + getDeprecationUrl().hashCode();
}
if (getCssDeclarationCount() > 0) {
hash = (37 * hash) + CSS_DECLARATION_FIELD_NUMBER;
hash = (53 * hash) + getCssDeclarationList().hashCode();
}
if (hasDispatchKey()) {
hash = (37 * hash) + DISPATCH_KEY_FIELD_NUMBER;
hash = (53 * hash) + dispatchKey_;
}
if (hasImplicit()) {
hash = (37 * hash) + IMPLICIT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getImplicit());
}
if (getRequiresExtensionCount() > 0) {
hash = (37 * hash) + REQUIRES_EXTENSION_FIELD_NUMBER;
hash = (53 * hash) + getRequiresExtensionList().hashCode();
}
if (hasRequiresAncestor()) {
hash = (37 * hash) + REQUIRES_ANCESTOR_FIELD_NUMBER;
hash = (53 * hash) + getRequiresAncestor().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.AttrSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AttrSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AttrSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AttrSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AttrSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AttrSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AttrSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AttrSpec 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 dev.amp.validator.ValidatorProtos.AttrSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AttrSpec 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 dev.amp.validator.ValidatorProtos.AttrSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AttrSpec 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(dev.amp.validator.ValidatorProtos.AttrSpec 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;
}
/**
*
* Attributes that are not covered by at least one of these specs are
* disallowed. Within a given context (e.g., for a given TagSpec),
* names are unique.
* NEXT AVAILABLE TAG: 29
*
*
* Protobuf type {@code amp.validator.AttrSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.AttrSpec)
dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AttrSpec.class, dev.amp.validator.ValidatorProtos.AttrSpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.AttrSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getValueUrlFieldBuilder();
getValuePropertiesFieldBuilder();
getTriggerFieldBuilder();
getCssDeclarationFieldBuilder();
getRequiresAncestorFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
enabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
disabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
name_ = "";
alternativeNames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
mandatory_ = false;
mandatoryOneof_ = "";
mandatoryAnyof_ = "";
value_ =
com.google.protobuf.LazyStringArrayList.emptyList();
valueCasei_ =
com.google.protobuf.LazyStringArrayList.emptyList();
valueRegex_ = "";
valueRegexCasei_ = "";
valueUrl_ = null;
if (valueUrlBuilder_ != null) {
valueUrlBuilder_.dispose();
valueUrlBuilder_ = null;
}
valueProperties_ = null;
if (valuePropertiesBuilder_ != null) {
valuePropertiesBuilder_.dispose();
valuePropertiesBuilder_ = null;
}
valueDocCss_ = false;
valueDocSvgCss_ = false;
addValueToSet_ = 0;
valueOneofSet_ = 0;
trigger_ = null;
if (triggerBuilder_ != null) {
triggerBuilder_.dispose();
triggerBuilder_ = null;
}
disallowedValueRegex_ = "";
deprecation_ = "";
deprecationUrl_ = "";
if (cssDeclarationBuilder_ == null) {
cssDeclaration_ = java.util.Collections.emptyList();
} else {
cssDeclaration_ = null;
cssDeclarationBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00200000);
dispatchKey_ = 0;
implicit_ = false;
requiresExtension_ =
com.google.protobuf.LazyStringArrayList.emptyList();
requiresAncestor_ = null;
if (requiresAncestorBuilder_ != null) {
requiresAncestorBuilder_.dispose();
requiresAncestorBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrSpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrSpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.AttrSpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrSpec build() {
dev.amp.validator.ValidatorProtos.AttrSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrSpec buildPartial() {
dev.amp.validator.ValidatorProtos.AttrSpec result = new dev.amp.validator.ValidatorProtos.AttrSpec(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.amp.validator.ValidatorProtos.AttrSpec result) {
if (cssDeclarationBuilder_ == null) {
if (((bitField0_ & 0x00200000) != 0)) {
cssDeclaration_ = java.util.Collections.unmodifiableList(cssDeclaration_);
bitField0_ = (bitField0_ & ~0x00200000);
}
result.cssDeclaration_ = cssDeclaration_;
} else {
result.cssDeclaration_ = cssDeclarationBuilder_.build();
}
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.AttrSpec result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
enabledBy_.makeImmutable();
result.enabledBy_ = enabledBy_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
disabledBy_.makeImmutable();
result.disabledBy_ = disabledBy_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
alternativeNames_.makeImmutable();
result.alternativeNames_ = alternativeNames_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.mandatory_ = mandatory_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.mandatoryOneof_ = mandatoryOneof_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.mandatoryAnyof_ = mandatoryAnyof_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
value_.makeImmutable();
result.value_ = value_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
valueCasei_.makeImmutable();
result.valueCasei_ = valueCasei_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.valueRegex_ = valueRegex_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.valueRegexCasei_ = valueRegexCasei_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.valueUrl_ = valueUrlBuilder_ == null
? valueUrl_
: valueUrlBuilder_.build();
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.valueProperties_ = valuePropertiesBuilder_ == null
? valueProperties_
: valuePropertiesBuilder_.build();
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.valueDocCss_ = valueDocCss_;
to_bitField0_ |= 0x00000100;
}
if (((from_bitField0_ & 0x00004000) != 0)) {
result.valueDocSvgCss_ = valueDocSvgCss_;
to_bitField0_ |= 0x00000200;
}
if (((from_bitField0_ & 0x00008000) != 0)) {
result.addValueToSet_ = addValueToSet_;
to_bitField0_ |= 0x00000400;
}
if (((from_bitField0_ & 0x00010000) != 0)) {
result.valueOneofSet_ = valueOneofSet_;
to_bitField0_ |= 0x00000800;
}
if (((from_bitField0_ & 0x00020000) != 0)) {
result.trigger_ = triggerBuilder_ == null
? trigger_
: triggerBuilder_.build();
to_bitField0_ |= 0x00001000;
}
if (((from_bitField0_ & 0x00040000) != 0)) {
result.disallowedValueRegex_ = disallowedValueRegex_;
to_bitField0_ |= 0x00002000;
}
if (((from_bitField0_ & 0x00080000) != 0)) {
result.deprecation_ = deprecation_;
to_bitField0_ |= 0x00004000;
}
if (((from_bitField0_ & 0x00100000) != 0)) {
result.deprecationUrl_ = deprecationUrl_;
to_bitField0_ |= 0x00008000;
}
if (((from_bitField0_ & 0x00400000) != 0)) {
result.dispatchKey_ = dispatchKey_;
to_bitField0_ |= 0x00010000;
}
if (((from_bitField0_ & 0x00800000) != 0)) {
result.implicit_ = implicit_;
to_bitField0_ |= 0x00020000;
}
if (((from_bitField0_ & 0x01000000) != 0)) {
requiresExtension_.makeImmutable();
result.requiresExtension_ = requiresExtension_;
}
if (((from_bitField0_ & 0x02000000) != 0)) {
result.requiresAncestor_ = requiresAncestorBuilder_ == null
? requiresAncestor_
: requiresAncestorBuilder_.build();
to_bitField0_ |= 0x00040000;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.AttrSpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.AttrSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.AttrSpec other) {
if (other == dev.amp.validator.ValidatorProtos.AttrSpec.getDefaultInstance()) return this;
if (!other.enabledBy_.isEmpty()) {
if (enabledBy_.isEmpty()) {
enabledBy_ = other.enabledBy_;
bitField0_ |= 0x00000001;
} else {
ensureEnabledByIsMutable();
enabledBy_.addAll(other.enabledBy_);
}
onChanged();
}
if (!other.disabledBy_.isEmpty()) {
if (disabledBy_.isEmpty()) {
disabledBy_ = other.disabledBy_;
bitField0_ |= 0x00000002;
} else {
ensureDisabledByIsMutable();
disabledBy_.addAll(other.disabledBy_);
}
onChanged();
}
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.alternativeNames_.isEmpty()) {
if (alternativeNames_.isEmpty()) {
alternativeNames_ = other.alternativeNames_;
bitField0_ |= 0x00000008;
} else {
ensureAlternativeNamesIsMutable();
alternativeNames_.addAll(other.alternativeNames_);
}
onChanged();
}
if (other.hasMandatory()) {
setMandatory(other.getMandatory());
}
if (other.hasMandatoryOneof()) {
mandatoryOneof_ = other.mandatoryOneof_;
bitField0_ |= 0x00000020;
onChanged();
}
if (other.hasMandatoryAnyof()) {
mandatoryAnyof_ = other.mandatoryAnyof_;
bitField0_ |= 0x00000040;
onChanged();
}
if (!other.value_.isEmpty()) {
if (value_.isEmpty()) {
value_ = other.value_;
bitField0_ |= 0x00000080;
} else {
ensureValueIsMutable();
value_.addAll(other.value_);
}
onChanged();
}
if (!other.valueCasei_.isEmpty()) {
if (valueCasei_.isEmpty()) {
valueCasei_ = other.valueCasei_;
bitField0_ |= 0x00000100;
} else {
ensureValueCaseiIsMutable();
valueCasei_.addAll(other.valueCasei_);
}
onChanged();
}
if (other.hasValueRegex()) {
valueRegex_ = other.valueRegex_;
bitField0_ |= 0x00000200;
onChanged();
}
if (other.hasValueRegexCasei()) {
valueRegexCasei_ = other.valueRegexCasei_;
bitField0_ |= 0x00000400;
onChanged();
}
if (other.hasValueUrl()) {
mergeValueUrl(other.getValueUrl());
}
if (other.hasValueProperties()) {
mergeValueProperties(other.getValueProperties());
}
if (other.hasValueDocCss()) {
setValueDocCss(other.getValueDocCss());
}
if (other.hasValueDocSvgCss()) {
setValueDocSvgCss(other.getValueDocSvgCss());
}
if (other.hasAddValueToSet()) {
setAddValueToSet(other.getAddValueToSet());
}
if (other.hasValueOneofSet()) {
setValueOneofSet(other.getValueOneofSet());
}
if (other.hasTrigger()) {
mergeTrigger(other.getTrigger());
}
if (other.hasDisallowedValueRegex()) {
disallowedValueRegex_ = other.disallowedValueRegex_;
bitField0_ |= 0x00040000;
onChanged();
}
if (other.hasDeprecation()) {
deprecation_ = other.deprecation_;
bitField0_ |= 0x00080000;
onChanged();
}
if (other.hasDeprecationUrl()) {
deprecationUrl_ = other.deprecationUrl_;
bitField0_ |= 0x00100000;
onChanged();
}
if (cssDeclarationBuilder_ == null) {
if (!other.cssDeclaration_.isEmpty()) {
if (cssDeclaration_.isEmpty()) {
cssDeclaration_ = other.cssDeclaration_;
bitField0_ = (bitField0_ & ~0x00200000);
} else {
ensureCssDeclarationIsMutable();
cssDeclaration_.addAll(other.cssDeclaration_);
}
onChanged();
}
} else {
if (!other.cssDeclaration_.isEmpty()) {
if (cssDeclarationBuilder_.isEmpty()) {
cssDeclarationBuilder_.dispose();
cssDeclarationBuilder_ = null;
cssDeclaration_ = other.cssDeclaration_;
bitField0_ = (bitField0_ & ~0x00200000);
cssDeclarationBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getCssDeclarationFieldBuilder() : null;
} else {
cssDeclarationBuilder_.addAllMessages(other.cssDeclaration_);
}
}
}
if (other.hasDispatchKey()) {
setDispatchKey(other.getDispatchKey());
}
if (other.hasImplicit()) {
setImplicit(other.getImplicit());
}
if (!other.requiresExtension_.isEmpty()) {
if (requiresExtension_.isEmpty()) {
requiresExtension_ = other.requiresExtension_;
bitField0_ |= 0x01000000;
} else {
ensureRequiresExtensionIsMutable();
requiresExtension_.addAll(other.requiresExtension_);
}
onChanged();
}
if (other.hasRequiresAncestor()) {
mergeRequiresAncestor(other.getRequiresAncestor());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 10
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureAlternativeNamesIsMutable();
alternativeNames_.add(bs);
break;
} // case 18
case 24: {
mandatory_ = input.readBool();
bitField0_ |= 0x00000010;
break;
} // case 24
case 34: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureValueIsMutable();
value_.add(bs);
break;
} // case 34
case 42: {
valueRegexCasei_ = input.readBytes();
bitField0_ |= 0x00000400;
break;
} // case 42
case 50: {
disallowedValueRegex_ = input.readBytes();
bitField0_ |= 0x00040000;
break;
} // case 50
case 58: {
deprecation_ = input.readBytes();
bitField0_ |= 0x00080000;
break;
} // case 58
case 66: {
deprecationUrl_ = input.readBytes();
bitField0_ |= 0x00100000;
break;
} // case 66
case 90: {
input.readMessage(
getValuePropertiesFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00001000;
break;
} // case 90
case 98: {
mandatoryOneof_ = input.readBytes();
bitField0_ |= 0x00000020;
break;
} // case 98
case 104: {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType tmpValue =
dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(13, tmpRaw);
} else {
dispatchKey_ = tmpRaw;
bitField0_ |= 0x00400000;
}
break;
} // case 104
case 114: {
input.readMessage(
getValueUrlFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000800;
break;
} // case 114
case 122: {
valueRegex_ = input.readBytes();
bitField0_ |= 0x00000200;
break;
} // case 122
case 130: {
input.readMessage(
getTriggerFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00020000;
break;
} // case 130
case 136: {
implicit_ = input.readBool();
bitField0_ |= 0x00800000;
break;
} // case 136
case 146: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureValueCaseiIsMutable();
valueCasei_.add(bs);
break;
} // case 146
case 154: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureRequiresExtensionIsMutable();
requiresExtension_.add(bs);
break;
} // case 154
case 162: {
dev.amp.validator.ValidatorProtos.CssDeclaration m =
input.readMessage(
dev.amp.validator.ValidatorProtos.CssDeclaration.PARSER,
extensionRegistry);
if (cssDeclarationBuilder_ == null) {
ensureCssDeclarationIsMutable();
cssDeclaration_.add(m);
} else {
cssDeclarationBuilder_.addMessage(m);
}
break;
} // case 162
case 170: {
mandatoryAnyof_ = input.readBytes();
bitField0_ |= 0x00000040;
break;
} // case 170
case 178: {
input.readMessage(
getRequiresAncestorFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x02000000;
break;
} // case 178
case 186: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureEnabledByIsMutable();
enabledBy_.add(bs);
break;
} // case 186
case 194: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureDisabledByIsMutable();
disabledBy_.add(bs);
break;
} // case 194
case 200: {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet tmpValue =
dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(25, tmpRaw);
} else {
addValueToSet_ = tmpRaw;
bitField0_ |= 0x00008000;
}
break;
} // case 200
case 208: {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet tmpValue =
dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(26, tmpRaw);
} else {
valueOneofSet_ = tmpRaw;
bitField0_ |= 0x00010000;
}
break;
} // case 208
case 216: {
valueDocCss_ = input.readBool();
bitField0_ |= 0x00002000;
break;
} // case 216
case 224: {
valueDocSvgCss_ = input.readBool();
bitField0_ |= 0x00004000;
break;
} // case 224
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringArrayList enabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureEnabledByIsMutable() {
if (!enabledBy_.isModifiable()) {
enabledBy_ = new com.google.protobuf.LazyStringArrayList(enabledBy_);
}
bitField0_ |= 0x00000001;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @return A list containing the enabledBy.
*/
public com.google.protobuf.ProtocolStringList
getEnabledByList() {
enabledBy_.makeImmutable();
return enabledBy_;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @return The count of enabledBy.
*/
public int getEnabledByCount() {
return enabledBy_.size();
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @param index The index of the element to return.
* @return The enabledBy at the given index.
*/
public java.lang.String getEnabledBy(int index) {
return enabledBy_.get(index);
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @param index The index of the value to return.
* @return The bytes of the enabledBy at the given index.
*/
public com.google.protobuf.ByteString
getEnabledByBytes(int index) {
return enabledBy_.getByteString(index);
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @param index The index to set the value at.
* @param value The enabledBy to set.
* @return This builder for chaining.
*/
public Builder setEnabledBy(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureEnabledByIsMutable();
enabledBy_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @param value The enabledBy to add.
* @return This builder for chaining.
*/
public Builder addEnabledBy(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureEnabledByIsMutable();
enabledBy_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @param values The enabledBy to add.
* @return This builder for chaining.
*/
public Builder addAllEnabledBy(
java.lang.Iterable values) {
ensureEnabledByIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, enabledBy_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @return This builder for chaining.
*/
public Builder clearEnabledBy() {
enabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this AttrSpec. If a Type Identifier is in enabled_by then this
* AttrSpec will be used in validating parsed documents with that Type
* Identifier. If a Type Identifier is in disabled_by then this
* AttrSpec will not be used in validating parsed documents with that
* Type Identifier. An AttrSpec can not have both enabled_by and disabled_by
* set.
*
*
* repeated string enabled_by = 23;
* @param value The bytes of the enabledBy to add.
* @return This builder for chaining.
*/
public Builder addEnabledByBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureEnabledByIsMutable();
enabledBy_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList disabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureDisabledByIsMutable() {
if (!disabledBy_.isModifiable()) {
disabledBy_ = new com.google.protobuf.LazyStringArrayList(disabledBy_);
}
bitField0_ |= 0x00000002;
}
/**
* repeated string disabled_by = 24;
* @return A list containing the disabledBy.
*/
public com.google.protobuf.ProtocolStringList
getDisabledByList() {
disabledBy_.makeImmutable();
return disabledBy_;
}
/**
* repeated string disabled_by = 24;
* @return The count of disabledBy.
*/
public int getDisabledByCount() {
return disabledBy_.size();
}
/**
* repeated string disabled_by = 24;
* @param index The index of the element to return.
* @return The disabledBy at the given index.
*/
public java.lang.String getDisabledBy(int index) {
return disabledBy_.get(index);
}
/**
* repeated string disabled_by = 24;
* @param index The index of the value to return.
* @return The bytes of the disabledBy at the given index.
*/
public com.google.protobuf.ByteString
getDisabledByBytes(int index) {
return disabledBy_.getByteString(index);
}
/**
* repeated string disabled_by = 24;
* @param index The index to set the value at.
* @param value The disabledBy to set.
* @return This builder for chaining.
*/
public Builder setDisabledBy(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureDisabledByIsMutable();
disabledBy_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* repeated string disabled_by = 24;
* @param value The disabledBy to add.
* @return This builder for chaining.
*/
public Builder addDisabledBy(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureDisabledByIsMutable();
disabledBy_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* repeated string disabled_by = 24;
* @param values The disabledBy to add.
* @return This builder for chaining.
*/
public Builder addAllDisabledBy(
java.lang.Iterable values) {
ensureDisabledByIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, disabledBy_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* repeated string disabled_by = 24;
* @return This builder for chaining.
*/
public Builder clearDisabledBy() {
disabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
* repeated string disabled_by = 24;
* @param value The bytes of the disabledBy to add.
* @return This builder for chaining.
*/
public Builder addDisabledByBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureDisabledByIsMutable();
disabledBy_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Use lower-case attribute names only.
*
*
* optional string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList alternativeNames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureAlternativeNamesIsMutable() {
if (!alternativeNames_.isModifiable()) {
alternativeNames_ = new com.google.protobuf.LazyStringArrayList(alternativeNames_);
}
bitField0_ |= 0x00000008;
}
/**
* repeated string alternative_names = 2;
* @return A list containing the alternativeNames.
*/
public com.google.protobuf.ProtocolStringList
getAlternativeNamesList() {
alternativeNames_.makeImmutable();
return alternativeNames_;
}
/**
* repeated string alternative_names = 2;
* @return The count of alternativeNames.
*/
public int getAlternativeNamesCount() {
return alternativeNames_.size();
}
/**
* repeated string alternative_names = 2;
* @param index The index of the element to return.
* @return The alternativeNames at the given index.
*/
public java.lang.String getAlternativeNames(int index) {
return alternativeNames_.get(index);
}
/**
* repeated string alternative_names = 2;
* @param index The index of the value to return.
* @return The bytes of the alternativeNames at the given index.
*/
public com.google.protobuf.ByteString
getAlternativeNamesBytes(int index) {
return alternativeNames_.getByteString(index);
}
/**
* repeated string alternative_names = 2;
* @param index The index to set the value at.
* @param value The alternativeNames to set.
* @return This builder for chaining.
*/
public Builder setAlternativeNames(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureAlternativeNamesIsMutable();
alternativeNames_.set(index, value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* repeated string alternative_names = 2;
* @param value The alternativeNames to add.
* @return This builder for chaining.
*/
public Builder addAlternativeNames(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureAlternativeNamesIsMutable();
alternativeNames_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* repeated string alternative_names = 2;
* @param values The alternativeNames to add.
* @return This builder for chaining.
*/
public Builder addAllAlternativeNames(
java.lang.Iterable values) {
ensureAlternativeNamesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, alternativeNames_);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
* repeated string alternative_names = 2;
* @return This builder for chaining.
*/
public Builder clearAlternativeNames() {
alternativeNames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);;
onChanged();
return this;
}
/**
* repeated string alternative_names = 2;
* @param value The bytes of the alternativeNames to add.
* @return This builder for chaining.
*/
public Builder addAlternativeNamesBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureAlternativeNamesIsMutable();
alternativeNames_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private boolean mandatory_ ;
/**
* optional bool mandatory = 3;
* @return Whether the mandatory field is set.
*/
@java.lang.Override
public boolean hasMandatory() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional bool mandatory = 3;
* @return The mandatory.
*/
@java.lang.Override
public boolean getMandatory() {
return mandatory_;
}
/**
* optional bool mandatory = 3;
* @param value The mandatory to set.
* @return This builder for chaining.
*/
public Builder setMandatory(boolean value) {
mandatory_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
* optional bool mandatory = 3;
* @return This builder for chaining.
*/
public Builder clearMandatory() {
bitField0_ = (bitField0_ & ~0x00000010);
mandatory_ = false;
onChanged();
return this;
}
private java.lang.Object mandatoryOneof_ = "";
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @return Whether the mandatoryOneof field is set.
*/
public boolean hasMandatoryOneof() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @return The mandatoryOneof.
*/
public java.lang.String getMandatoryOneof() {
java.lang.Object ref = mandatoryOneof_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryOneof_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @return The bytes for mandatoryOneof.
*/
public com.google.protobuf.ByteString
getMandatoryOneofBytes() {
java.lang.Object ref = mandatoryOneof_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryOneof_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @param value The mandatoryOneof to set.
* @return This builder for chaining.
*/
public Builder setMandatoryOneof(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
mandatoryOneof_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @return This builder for chaining.
*/
public Builder clearMandatoryOneof() {
mandatoryOneof_ = getDefaultInstance().getMandatoryOneof();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
* Within the context of the tag, *exactly one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_oneof = 12;
* @param value The bytes for mandatoryOneof to set.
* @return This builder for chaining.
*/
public Builder setMandatoryOneofBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
mandatoryOneof_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
private java.lang.Object mandatoryAnyof_ = "";
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @return Whether the mandatoryAnyof field is set.
*/
public boolean hasMandatoryAnyof() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @return The mandatoryAnyof.
*/
public java.lang.String getMandatoryAnyof() {
java.lang.Object ref = mandatoryAnyof_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryAnyof_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @return The bytes for mandatoryAnyof.
*/
public com.google.protobuf.ByteString
getMandatoryAnyofBytes() {
java.lang.Object ref = mandatoryAnyof_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryAnyof_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @param value The mandatoryAnyof to set.
* @return This builder for chaining.
*/
public Builder setMandatoryAnyof(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
mandatoryAnyof_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @return This builder for chaining.
*/
public Builder clearMandatoryAnyof() {
mandatoryAnyof_ = getDefaultInstance().getMandatoryAnyof();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
* Within the context of the tag, *at least one* of the attributes tagged
* with this identifier must be present. Per convention, this identifier
* should list the tags participating in the mandatory oneof:
* e.g. mandatory_oneof: "['foo', 'bar']"
*
*
* optional string mandatory_anyof = 21;
* @param value The bytes for mandatoryAnyof to set.
* @return This builder for chaining.
*/
public Builder setMandatoryAnyofBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
mandatoryAnyof_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList value_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureValueIsMutable() {
if (!value_.isModifiable()) {
value_ = new com.google.protobuf.LazyStringArrayList(value_);
}
bitField0_ |= 0x00000080;
}
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @return A list containing the value.
*/
public com.google.protobuf.ProtocolStringList
getValueList() {
value_.makeImmutable();
return value_;
}
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @return The count of value.
*/
public int getValueCount() {
return value_.size();
}
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @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 attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @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 attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @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);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @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);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @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_);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @return This builder for chaining.
*/
public Builder clearValue() {
value_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000080);;
onChanged();
return this;
}
/**
*
* The attribute value must be equal to the value in this field.
*
*
* repeated string value = 4;
* @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);
bitField0_ |= 0x00000080;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList valueCasei_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureValueCaseiIsMutable() {
if (!valueCasei_.isModifiable()) {
valueCasei_ = new com.google.protobuf.LazyStringArrayList(valueCasei_);
}
bitField0_ |= 0x00000100;
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @return A list containing the valueCasei.
*/
public com.google.protobuf.ProtocolStringList
getValueCaseiList() {
valueCasei_.makeImmutable();
return valueCasei_;
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @return The count of valueCasei.
*/
public int getValueCaseiCount() {
return valueCasei_.size();
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @param index The index of the element to return.
* @return The valueCasei at the given index.
*/
public java.lang.String getValueCasei(int index) {
return valueCasei_.get(index);
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @param index The index of the value to return.
* @return The bytes of the valueCasei at the given index.
*/
public com.google.protobuf.ByteString
getValueCaseiBytes(int index) {
return valueCasei_.getByteString(index);
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @param index The index to set the value at.
* @param value The valueCasei to set.
* @return This builder for chaining.
*/
public Builder setValueCasei(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureValueCaseiIsMutable();
valueCasei_.set(index, value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @param value The valueCasei to add.
* @return This builder for chaining.
*/
public Builder addValueCasei(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureValueCaseiIsMutable();
valueCasei_.add(value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @param values The valueCasei to add.
* @return This builder for chaining.
*/
public Builder addAllValueCasei(
java.lang.Iterable values) {
ensureValueCaseiIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, valueCasei_);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @return This builder for chaining.
*/
public Builder clearValueCasei() {
valueCasei_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);;
onChanged();
return this;
}
/**
*
* case insensitive
*
*
* repeated string value_casei = 18;
* @param value The bytes of the valueCasei to add.
* @return This builder for chaining.
*/
public Builder addValueCaseiBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureValueCaseiIsMutable();
valueCasei_.add(value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
private java.lang.Object valueRegex_ = "";
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @return Whether the valueRegex field is set.
*/
public boolean hasValueRegex() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @return The valueRegex.
*/
public java.lang.String getValueRegex() {
java.lang.Object ref = valueRegex_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
valueRegex_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @return The bytes for valueRegex.
*/
public com.google.protobuf.ByteString
getValueRegexBytes() {
java.lang.Object ref = valueRegex_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
valueRegex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @param value The valueRegex to set.
* @return This builder for chaining.
*/
public Builder setValueRegex(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
valueRegex_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @return This builder for chaining.
*/
public Builder clearValueRegex() {
valueRegex_ = getDefaultInstance().getValueRegex();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
*
* case sensitive
*
*
* optional string value_regex = 15;
* @param value The bytes for valueRegex to set.
* @return This builder for chaining.
*/
public Builder setValueRegexBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
valueRegex_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
private java.lang.Object valueRegexCasei_ = "";
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @return Whether the valueRegexCasei field is set.
*/
public boolean hasValueRegexCasei() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @return The valueRegexCasei.
*/
public java.lang.String getValueRegexCasei() {
java.lang.Object ref = valueRegexCasei_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
valueRegexCasei_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @return The bytes for valueRegexCasei.
*/
public com.google.protobuf.ByteString
getValueRegexCaseiBytes() {
java.lang.Object ref = valueRegexCasei_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
valueRegexCasei_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @param value The valueRegexCasei to set.
* @return This builder for chaining.
*/
public Builder setValueRegexCasei(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
valueRegexCasei_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @return This builder for chaining.
*/
public Builder clearValueRegexCasei() {
valueRegexCasei_ = getDefaultInstance().getValueRegexCasei();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
/**
*
* case insensitive
*
*
* optional string value_regex_casei = 5;
* @param value The bytes for valueRegexCasei to set.
* @return This builder for chaining.
*/
public Builder setValueRegexCaseiBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
valueRegexCasei_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
private dev.amp.validator.ValidatorProtos.UrlSpec valueUrl_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.UrlSpec, dev.amp.validator.ValidatorProtos.UrlSpec.Builder, dev.amp.validator.ValidatorProtos.UrlSpecOrBuilder> valueUrlBuilder_;
/**
* optional .amp.validator.UrlSpec value_url = 14;
* @return Whether the valueUrl field is set.
*/
public boolean hasValueUrl() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
* optional .amp.validator.UrlSpec value_url = 14;
* @return The valueUrl.
*/
public dev.amp.validator.ValidatorProtos.UrlSpec getValueUrl() {
if (valueUrlBuilder_ == null) {
return valueUrl_ == null ? dev.amp.validator.ValidatorProtos.UrlSpec.getDefaultInstance() : valueUrl_;
} else {
return valueUrlBuilder_.getMessage();
}
}
/**
* optional .amp.validator.UrlSpec value_url = 14;
*/
public Builder setValueUrl(dev.amp.validator.ValidatorProtos.UrlSpec value) {
if (valueUrlBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
valueUrl_ = value;
} else {
valueUrlBuilder_.setMessage(value);
}
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
* optional .amp.validator.UrlSpec value_url = 14;
*/
public Builder setValueUrl(
dev.amp.validator.ValidatorProtos.UrlSpec.Builder builderForValue) {
if (valueUrlBuilder_ == null) {
valueUrl_ = builderForValue.build();
} else {
valueUrlBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
* optional .amp.validator.UrlSpec value_url = 14;
*/
public Builder mergeValueUrl(dev.amp.validator.ValidatorProtos.UrlSpec value) {
if (valueUrlBuilder_ == null) {
if (((bitField0_ & 0x00000800) != 0) &&
valueUrl_ != null &&
valueUrl_ != dev.amp.validator.ValidatorProtos.UrlSpec.getDefaultInstance()) {
getValueUrlBuilder().mergeFrom(value);
} else {
valueUrl_ = value;
}
} else {
valueUrlBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
* optional .amp.validator.UrlSpec value_url = 14;
*/
public Builder clearValueUrl() {
bitField0_ = (bitField0_ & ~0x00000800);
valueUrl_ = null;
if (valueUrlBuilder_ != null) {
valueUrlBuilder_.dispose();
valueUrlBuilder_ = null;
}
onChanged();
return this;
}
/**
* optional .amp.validator.UrlSpec value_url = 14;
*/
public dev.amp.validator.ValidatorProtos.UrlSpec.Builder getValueUrlBuilder() {
bitField0_ |= 0x00000800;
onChanged();
return getValueUrlFieldBuilder().getBuilder();
}
/**
* optional .amp.validator.UrlSpec value_url = 14;
*/
public dev.amp.validator.ValidatorProtos.UrlSpecOrBuilder getValueUrlOrBuilder() {
if (valueUrlBuilder_ != null) {
return valueUrlBuilder_.getMessageOrBuilder();
} else {
return valueUrl_ == null ?
dev.amp.validator.ValidatorProtos.UrlSpec.getDefaultInstance() : valueUrl_;
}
}
/**
* optional .amp.validator.UrlSpec value_url = 14;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.UrlSpec, dev.amp.validator.ValidatorProtos.UrlSpec.Builder, dev.amp.validator.ValidatorProtos.UrlSpecOrBuilder>
getValueUrlFieldBuilder() {
if (valueUrlBuilder_ == null) {
valueUrlBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.UrlSpec, dev.amp.validator.ValidatorProtos.UrlSpec.Builder, dev.amp.validator.ValidatorProtos.UrlSpecOrBuilder>(
getValueUrl(),
getParentForChildren(),
isClean());
valueUrl_ = null;
}
return valueUrlBuilder_;
}
private dev.amp.validator.ValidatorProtos.PropertySpecList valueProperties_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.PropertySpecList, dev.amp.validator.ValidatorProtos.PropertySpecList.Builder, dev.amp.validator.ValidatorProtos.PropertySpecListOrBuilder> valuePropertiesBuilder_;
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
* @return Whether the valueProperties field is set.
*/
public boolean hasValueProperties() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
* @return The valueProperties.
*/
public dev.amp.validator.ValidatorProtos.PropertySpecList getValueProperties() {
if (valuePropertiesBuilder_ == null) {
return valueProperties_ == null ? dev.amp.validator.ValidatorProtos.PropertySpecList.getDefaultInstance() : valueProperties_;
} else {
return valuePropertiesBuilder_.getMessage();
}
}
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
*/
public Builder setValueProperties(dev.amp.validator.ValidatorProtos.PropertySpecList value) {
if (valuePropertiesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
valueProperties_ = value;
} else {
valuePropertiesBuilder_.setMessage(value);
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
*/
public Builder setValueProperties(
dev.amp.validator.ValidatorProtos.PropertySpecList.Builder builderForValue) {
if (valuePropertiesBuilder_ == null) {
valueProperties_ = builderForValue.build();
} else {
valuePropertiesBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
*/
public Builder mergeValueProperties(dev.amp.validator.ValidatorProtos.PropertySpecList value) {
if (valuePropertiesBuilder_ == null) {
if (((bitField0_ & 0x00001000) != 0) &&
valueProperties_ != null &&
valueProperties_ != dev.amp.validator.ValidatorProtos.PropertySpecList.getDefaultInstance()) {
getValuePropertiesBuilder().mergeFrom(value);
} else {
valueProperties_ = value;
}
} else {
valuePropertiesBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
*/
public Builder clearValueProperties() {
bitField0_ = (bitField0_ & ~0x00001000);
valueProperties_ = null;
if (valuePropertiesBuilder_ != null) {
valuePropertiesBuilder_.dispose();
valuePropertiesBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
*/
public dev.amp.validator.ValidatorProtos.PropertySpecList.Builder getValuePropertiesBuilder() {
bitField0_ |= 0x00001000;
onChanged();
return getValuePropertiesFieldBuilder().getBuilder();
}
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
*/
public dev.amp.validator.ValidatorProtos.PropertySpecListOrBuilder getValuePropertiesOrBuilder() {
if (valuePropertiesBuilder_ != null) {
return valuePropertiesBuilder_.getMessageOrBuilder();
} else {
return valueProperties_ == null ?
dev.amp.validator.ValidatorProtos.PropertySpecList.getDefaultInstance() : valueProperties_;
}
}
/**
*
* validates against a list of properties (see PropertySpec).
*
*
* optional .amp.validator.PropertySpecList value_properties = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.PropertySpecList, dev.amp.validator.ValidatorProtos.PropertySpecList.Builder, dev.amp.validator.ValidatorProtos.PropertySpecListOrBuilder>
getValuePropertiesFieldBuilder() {
if (valuePropertiesBuilder_ == null) {
valuePropertiesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.PropertySpecList, dev.amp.validator.ValidatorProtos.PropertySpecList.Builder, dev.amp.validator.ValidatorProtos.PropertySpecListOrBuilder>(
getValueProperties(),
getParentForChildren(),
isClean());
valueProperties_ = null;
}
return valuePropertiesBuilder_;
}
private boolean valueDocCss_ ;
/**
*
* If set, the attribute value will be evaluated using the matching document
* level CSS rules. This flag is used for `style` attributes. If
* `value_doc_css` is set, only non-SVG css is applied. If `value_doc_css_svg`
* is set, SVG-specific CSS rules are also allowed for this attribute value.
*
*
* optional bool value_doc_css = 27;
* @return Whether the valueDocCss field is set.
*/
@java.lang.Override
public boolean hasValueDocCss() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
* If set, the attribute value will be evaluated using the matching document
* level CSS rules. This flag is used for `style` attributes. If
* `value_doc_css` is set, only non-SVG css is applied. If `value_doc_css_svg`
* is set, SVG-specific CSS rules are also allowed for this attribute value.
*
*
* optional bool value_doc_css = 27;
* @return The valueDocCss.
*/
@java.lang.Override
public boolean getValueDocCss() {
return valueDocCss_;
}
/**
*
* If set, the attribute value will be evaluated using the matching document
* level CSS rules. This flag is used for `style` attributes. If
* `value_doc_css` is set, only non-SVG css is applied. If `value_doc_css_svg`
* is set, SVG-specific CSS rules are also allowed for this attribute value.
*
*
* optional bool value_doc_css = 27;
* @param value The valueDocCss to set.
* @return This builder for chaining.
*/
public Builder setValueDocCss(boolean value) {
valueDocCss_ = value;
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
* If set, the attribute value will be evaluated using the matching document
* level CSS rules. This flag is used for `style` attributes. If
* `value_doc_css` is set, only non-SVG css is applied. If `value_doc_css_svg`
* is set, SVG-specific CSS rules are also allowed for this attribute value.
*
*
* optional bool value_doc_css = 27;
* @return This builder for chaining.
*/
public Builder clearValueDocCss() {
bitField0_ = (bitField0_ & ~0x00002000);
valueDocCss_ = false;
onChanged();
return this;
}
private boolean valueDocSvgCss_ ;
/**
*
* } end oneof
*
*
* optional bool value_doc_svg_css = 28;
* @return Whether the valueDocSvgCss field is set.
*/
@java.lang.Override
public boolean hasValueDocSvgCss() {
return ((bitField0_ & 0x00004000) != 0);
}
/**
*
* } end oneof
*
*
* optional bool value_doc_svg_css = 28;
* @return The valueDocSvgCss.
*/
@java.lang.Override
public boolean getValueDocSvgCss() {
return valueDocSvgCss_;
}
/**
*
* } end oneof
*
*
* optional bool value_doc_svg_css = 28;
* @param value The valueDocSvgCss to set.
* @return This builder for chaining.
*/
public Builder setValueDocSvgCss(boolean value) {
valueDocSvgCss_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
* } end oneof
*
*
* optional bool value_doc_svg_css = 28;
* @return This builder for chaining.
*/
public Builder clearValueDocSvgCss() {
bitField0_ = (bitField0_ & ~0x00004000);
valueDocSvgCss_ = false;
onChanged();
return this;
}
private int addValueToSet_ = 0;
/**
* optional .amp.validator.AttrSpec.ValueSet add_value_to_set = 25;
* @return Whether the addValueToSet field is set.
*/
@java.lang.Override public boolean hasAddValueToSet() {
return ((bitField0_ & 0x00008000) != 0);
}
/**
* optional .amp.validator.AttrSpec.ValueSet add_value_to_set = 25;
* @return The addValueToSet.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet getAddValueToSet() {
dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet result = dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet.forNumber(addValueToSet_);
return result == null ? dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet.UNKNOWN_VALUESET : result;
}
/**
* optional .amp.validator.AttrSpec.ValueSet add_value_to_set = 25;
* @param value The addValueToSet to set.
* @return This builder for chaining.
*/
public Builder setAddValueToSet(dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00008000;
addValueToSet_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .amp.validator.AttrSpec.ValueSet add_value_to_set = 25;
* @return This builder for chaining.
*/
public Builder clearAddValueToSet() {
bitField0_ = (bitField0_ & ~0x00008000);
addValueToSet_ = 0;
onChanged();
return this;
}
private int valueOneofSet_ = 0;
/**
* optional .amp.validator.AttrSpec.ValueSet value_oneof_set = 26;
* @return Whether the valueOneofSet field is set.
*/
@java.lang.Override public boolean hasValueOneofSet() {
return ((bitField0_ & 0x00010000) != 0);
}
/**
* optional .amp.validator.AttrSpec.ValueSet value_oneof_set = 26;
* @return The valueOneofSet.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet getValueOneofSet() {
dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet result = dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet.forNumber(valueOneofSet_);
return result == null ? dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet.UNKNOWN_VALUESET : result;
}
/**
* optional .amp.validator.AttrSpec.ValueSet value_oneof_set = 26;
* @param value The valueOneofSet to set.
* @return This builder for chaining.
*/
public Builder setValueOneofSet(dev.amp.validator.ValidatorProtos.AttrSpec.ValueSet value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00010000;
valueOneofSet_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .amp.validator.AttrSpec.ValueSet value_oneof_set = 26;
* @return This builder for chaining.
*/
public Builder clearValueOneofSet() {
bitField0_ = (bitField0_ & ~0x00010000);
valueOneofSet_ = 0;
onChanged();
return this;
}
private dev.amp.validator.ValidatorProtos.AttrTriggerSpec trigger_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AttrTriggerSpec, dev.amp.validator.ValidatorProtos.AttrTriggerSpec.Builder, dev.amp.validator.ValidatorProtos.AttrTriggerSpecOrBuilder> triggerBuilder_;
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
* @return Whether the trigger field is set.
*/
public boolean hasTrigger() {
return ((bitField0_ & 0x00020000) != 0);
}
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
* @return The trigger.
*/
public dev.amp.validator.ValidatorProtos.AttrTriggerSpec getTrigger() {
if (triggerBuilder_ == null) {
return trigger_ == null ? dev.amp.validator.ValidatorProtos.AttrTriggerSpec.getDefaultInstance() : trigger_;
} else {
return triggerBuilder_.getMessage();
}
}
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
*/
public Builder setTrigger(dev.amp.validator.ValidatorProtos.AttrTriggerSpec value) {
if (triggerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
trigger_ = value;
} else {
triggerBuilder_.setMessage(value);
}
bitField0_ |= 0x00020000;
onChanged();
return this;
}
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
*/
public Builder setTrigger(
dev.amp.validator.ValidatorProtos.AttrTriggerSpec.Builder builderForValue) {
if (triggerBuilder_ == null) {
trigger_ = builderForValue.build();
} else {
triggerBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00020000;
onChanged();
return this;
}
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
*/
public Builder mergeTrigger(dev.amp.validator.ValidatorProtos.AttrTriggerSpec value) {
if (triggerBuilder_ == null) {
if (((bitField0_ & 0x00020000) != 0) &&
trigger_ != null &&
trigger_ != dev.amp.validator.ValidatorProtos.AttrTriggerSpec.getDefaultInstance()) {
getTriggerBuilder().mergeFrom(value);
} else {
trigger_ = value;
}
} else {
triggerBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00020000;
onChanged();
return this;
}
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
*/
public Builder clearTrigger() {
bitField0_ = (bitField0_ & ~0x00020000);
trigger_ = null;
if (triggerBuilder_ != null) {
triggerBuilder_.dispose();
triggerBuilder_ = null;
}
onChanged();
return this;
}
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
*/
public dev.amp.validator.ValidatorProtos.AttrTriggerSpec.Builder getTriggerBuilder() {
bitField0_ |= 0x00020000;
onChanged();
return getTriggerFieldBuilder().getBuilder();
}
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
*/
public dev.amp.validator.ValidatorProtos.AttrTriggerSpecOrBuilder getTriggerOrBuilder() {
if (triggerBuilder_ != null) {
return triggerBuilder_.getMessageOrBuilder();
} else {
return trigger_ == null ?
dev.amp.validator.ValidatorProtos.AttrTriggerSpec.getDefaultInstance() : trigger_;
}
}
/**
* optional .amp.validator.AttrTriggerSpec trigger = 16;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AttrTriggerSpec, dev.amp.validator.ValidatorProtos.AttrTriggerSpec.Builder, dev.amp.validator.ValidatorProtos.AttrTriggerSpecOrBuilder>
getTriggerFieldBuilder() {
if (triggerBuilder_ == null) {
triggerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AttrTriggerSpec, dev.amp.validator.ValidatorProtos.AttrTriggerSpec.Builder, dev.amp.validator.ValidatorProtos.AttrTriggerSpecOrBuilder>(
getTrigger(),
getParentForChildren(),
isClean());
trigger_ = null;
}
return triggerBuilder_;
}
private java.lang.Object disallowedValueRegex_ = "";
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @return Whether the disallowedValueRegex field is set.
*/
public boolean hasDisallowedValueRegex() {
return ((bitField0_ & 0x00040000) != 0);
}
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @return The disallowedValueRegex.
*/
public java.lang.String getDisallowedValueRegex() {
java.lang.Object ref = disallowedValueRegex_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
disallowedValueRegex_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @return The bytes for disallowedValueRegex.
*/
public com.google.protobuf.ByteString
getDisallowedValueRegexBytes() {
java.lang.Object ref = disallowedValueRegex_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
disallowedValueRegex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @param value The disallowedValueRegex to set.
* @return This builder for chaining.
*/
public Builder setDisallowedValueRegex(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
disallowedValueRegex_ = value;
bitField0_ |= 0x00040000;
onChanged();
return this;
}
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @return This builder for chaining.
*/
public Builder clearDisallowedValueRegex() {
disallowedValueRegex_ = getDefaultInstance().getDisallowedValueRegex();
bitField0_ = (bitField0_ & ~0x00040000);
onChanged();
return this;
}
/**
*
* If set, then the attribute value may not match this regex, which is
* always applied case-insensitively and as a partial match.
*
*
* optional string disallowed_value_regex = 6;
* @param value The bytes for disallowedValueRegex to set.
* @return This builder for chaining.
*/
public Builder setDisallowedValueRegexBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
disallowedValueRegex_ = value;
bitField0_ |= 0x00040000;
onChanged();
return this;
}
private java.lang.Object deprecation_ = "";
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @return Whether the deprecation field is set.
*/
public boolean hasDeprecation() {
return ((bitField0_ & 0x00080000) != 0);
}
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @return The deprecation.
*/
public java.lang.String getDeprecation() {
java.lang.Object ref = deprecation_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
deprecation_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @return The bytes for deprecation.
*/
public com.google.protobuf.ByteString
getDeprecationBytes() {
java.lang.Object ref = deprecation_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deprecation_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @param value The deprecation to set.
* @return This builder for chaining.
*/
public Builder setDeprecation(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
deprecation_ = value;
bitField0_ |= 0x00080000;
onChanged();
return this;
}
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @return This builder for chaining.
*/
public Builder clearDeprecation() {
deprecation_ = getDefaultInstance().getDeprecation();
bitField0_ = (bitField0_ & ~0x00080000);
onChanged();
return this;
}
/**
*
* If set, generates a DEPRECATED_ATTR error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of an attribute or tag.
*
*
* optional string deprecation = 7;
* @param value The bytes for deprecation to set.
* @return This builder for chaining.
*/
public Builder setDeprecationBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
deprecation_ = value;
bitField0_ |= 0x00080000;
onChanged();
return this;
}
private java.lang.Object deprecationUrl_ = "";
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @return Whether the deprecationUrl field is set.
*/
public boolean hasDeprecationUrl() {
return ((bitField0_ & 0x00100000) != 0);
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @return The deprecationUrl.
*/
public java.lang.String getDeprecationUrl() {
java.lang.Object ref = deprecationUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
deprecationUrl_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @return The bytes for deprecationUrl.
*/
public com.google.protobuf.ByteString
getDeprecationUrlBytes() {
java.lang.Object ref = deprecationUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deprecationUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @param value The deprecationUrl to set.
* @return This builder for chaining.
*/
public Builder setDeprecationUrl(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
deprecationUrl_ = value;
bitField0_ |= 0x00100000;
onChanged();
return this;
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @return This builder for chaining.
*/
public Builder clearDeprecationUrl() {
deprecationUrl_ = getDefaultInstance().getDeprecationUrl();
bitField0_ = (bitField0_ & ~0x00100000);
onChanged();
return this;
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 8;
* @param value The bytes for deprecationUrl to set.
* @return This builder for chaining.
*/
public Builder setDeprecationUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
deprecationUrl_ = value;
bitField0_ |= 0x00100000;
onChanged();
return this;
}
private java.util.List cssDeclaration_ =
java.util.Collections.emptyList();
private void ensureCssDeclarationIsMutable() {
if (!((bitField0_ & 0x00200000) != 0)) {
cssDeclaration_ = new java.util.ArrayList(cssDeclaration_);
bitField0_ |= 0x00200000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.CssDeclaration, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder, dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder> cssDeclarationBuilder_;
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public java.util.List getCssDeclarationList() {
if (cssDeclarationBuilder_ == null) {
return java.util.Collections.unmodifiableList(cssDeclaration_);
} else {
return cssDeclarationBuilder_.getMessageList();
}
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public int getCssDeclarationCount() {
if (cssDeclarationBuilder_ == null) {
return cssDeclaration_.size();
} else {
return cssDeclarationBuilder_.getCount();
}
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public dev.amp.validator.ValidatorProtos.CssDeclaration getCssDeclaration(int index) {
if (cssDeclarationBuilder_ == null) {
return cssDeclaration_.get(index);
} else {
return cssDeclarationBuilder_.getMessage(index);
}
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public Builder setCssDeclaration(
int index, dev.amp.validator.ValidatorProtos.CssDeclaration value) {
if (cssDeclarationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCssDeclarationIsMutable();
cssDeclaration_.set(index, value);
onChanged();
} else {
cssDeclarationBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public Builder setCssDeclaration(
int index, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder builderForValue) {
if (cssDeclarationBuilder_ == null) {
ensureCssDeclarationIsMutable();
cssDeclaration_.set(index, builderForValue.build());
onChanged();
} else {
cssDeclarationBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public Builder addCssDeclaration(dev.amp.validator.ValidatorProtos.CssDeclaration value) {
if (cssDeclarationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCssDeclarationIsMutable();
cssDeclaration_.add(value);
onChanged();
} else {
cssDeclarationBuilder_.addMessage(value);
}
return this;
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public Builder addCssDeclaration(
int index, dev.amp.validator.ValidatorProtos.CssDeclaration value) {
if (cssDeclarationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCssDeclarationIsMutable();
cssDeclaration_.add(index, value);
onChanged();
} else {
cssDeclarationBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public Builder addCssDeclaration(
dev.amp.validator.ValidatorProtos.CssDeclaration.Builder builderForValue) {
if (cssDeclarationBuilder_ == null) {
ensureCssDeclarationIsMutable();
cssDeclaration_.add(builderForValue.build());
onChanged();
} else {
cssDeclarationBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public Builder addCssDeclaration(
int index, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder builderForValue) {
if (cssDeclarationBuilder_ == null) {
ensureCssDeclarationIsMutable();
cssDeclaration_.add(index, builderForValue.build());
onChanged();
} else {
cssDeclarationBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public Builder addAllCssDeclaration(
java.lang.Iterable values) {
if (cssDeclarationBuilder_ == null) {
ensureCssDeclarationIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, cssDeclaration_);
onChanged();
} else {
cssDeclarationBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public Builder clearCssDeclaration() {
if (cssDeclarationBuilder_ == null) {
cssDeclaration_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00200000);
onChanged();
} else {
cssDeclarationBuilder_.clear();
}
return this;
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public Builder removeCssDeclaration(int index) {
if (cssDeclarationBuilder_ == null) {
ensureCssDeclarationIsMutable();
cssDeclaration_.remove(index);
onChanged();
} else {
cssDeclarationBuilder_.remove(index);
}
return this;
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public dev.amp.validator.ValidatorProtos.CssDeclaration.Builder getCssDeclarationBuilder(
int index) {
return getCssDeclarationFieldBuilder().getBuilder(index);
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder getCssDeclarationOrBuilder(
int index) {
if (cssDeclarationBuilder_ == null) {
return cssDeclaration_.get(index); } else {
return cssDeclarationBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public java.util.List
getCssDeclarationOrBuilderList() {
if (cssDeclarationBuilder_ != null) {
return cssDeclarationBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(cssDeclaration_);
}
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public dev.amp.validator.ValidatorProtos.CssDeclaration.Builder addCssDeclarationBuilder() {
return getCssDeclarationFieldBuilder().addBuilder(
dev.amp.validator.ValidatorProtos.CssDeclaration.getDefaultInstance());
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public dev.amp.validator.ValidatorProtos.CssDeclaration.Builder addCssDeclarationBuilder(
int index) {
return getCssDeclarationFieldBuilder().addBuilder(
index, dev.amp.validator.ValidatorProtos.CssDeclaration.getDefaultInstance());
}
/**
*
* Valid CSS declarations.
*
*
* repeated .amp.validator.CssDeclaration css_declaration = 20;
*/
public java.util.List
getCssDeclarationBuilderList() {
return getCssDeclarationFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.CssDeclaration, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder, dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder>
getCssDeclarationFieldBuilder() {
if (cssDeclarationBuilder_ == null) {
cssDeclarationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.CssDeclaration, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder, dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder>(
cssDeclaration_,
((bitField0_ & 0x00200000) != 0),
getParentForChildren(),
isClean());
cssDeclaration_ = null;
}
return cssDeclarationBuilder_;
}
private int dispatchKey_ = 0;
/**
*
* If set true, the TagSpec containing this AttrSpec will be evaluated first
* for any encountered tag which matches the tag name and this attribute spec.
* May only be set for an AttrSpec where mandatory=true and type matches those
* specified in the comments of DispatchKeyType above.
*
*
* optional .amp.validator.AttrSpec.DispatchKeyType dispatch_key = 13 [default = NONE_DISPATCH];
* @return Whether the dispatchKey field is set.
*/
@java.lang.Override public boolean hasDispatchKey() {
return ((bitField0_ & 0x00400000) != 0);
}
/**
*
* If set true, the TagSpec containing this AttrSpec will be evaluated first
* for any encountered tag which matches the tag name and this attribute spec.
* May only be set for an AttrSpec where mandatory=true and type matches those
* specified in the comments of DispatchKeyType above.
*
*
* optional .amp.validator.AttrSpec.DispatchKeyType dispatch_key = 13 [default = NONE_DISPATCH];
* @return The dispatchKey.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType getDispatchKey() {
dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType result = dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType.forNumber(dispatchKey_);
return result == null ? dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType.NONE_DISPATCH : result;
}
/**
*
* If set true, the TagSpec containing this AttrSpec will be evaluated first
* for any encountered tag which matches the tag name and this attribute spec.
* May only be set for an AttrSpec where mandatory=true and type matches those
* specified in the comments of DispatchKeyType above.
*
*
* optional .amp.validator.AttrSpec.DispatchKeyType dispatch_key = 13 [default = NONE_DISPATCH];
* @param value The dispatchKey to set.
* @return This builder for chaining.
*/
public Builder setDispatchKey(dev.amp.validator.ValidatorProtos.AttrSpec.DispatchKeyType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00400000;
dispatchKey_ = value.getNumber();
onChanged();
return this;
}
/**
*
* If set true, the TagSpec containing this AttrSpec will be evaluated first
* for any encountered tag which matches the tag name and this attribute spec.
* May only be set for an AttrSpec where mandatory=true and type matches those
* specified in the comments of DispatchKeyType above.
*
*
* optional .amp.validator.AttrSpec.DispatchKeyType dispatch_key = 13 [default = NONE_DISPATCH];
* @return This builder for chaining.
*/
public Builder clearDispatchKey() {
bitField0_ = (bitField0_ & ~0x00400000);
dispatchKey_ = 0;
onChanged();
return this;
}
private boolean implicit_ ;
/**
*
* If set to true, the TagSpec containing this AttrSpec implicitly has this
* attribute and the attribute is considered valid.
*
*
* optional bool implicit = 17 [default = false];
* @return Whether the implicit field is set.
*/
@java.lang.Override
public boolean hasImplicit() {
return ((bitField0_ & 0x00800000) != 0);
}
/**
*
* If set to true, the TagSpec containing this AttrSpec implicitly has this
* attribute and the attribute is considered valid.
*
*
* optional bool implicit = 17 [default = false];
* @return The implicit.
*/
@java.lang.Override
public boolean getImplicit() {
return implicit_;
}
/**
*
* If set to true, the TagSpec containing this AttrSpec implicitly has this
* attribute and the attribute is considered valid.
*
*
* optional bool implicit = 17 [default = false];
* @param value The implicit to set.
* @return This builder for chaining.
*/
public Builder setImplicit(boolean value) {
implicit_ = value;
bitField0_ |= 0x00800000;
onChanged();
return this;
}
/**
*
* If set to true, the TagSpec containing this AttrSpec implicitly has this
* attribute and the attribute is considered valid.
*
*
* optional bool implicit = 17 [default = false];
* @return This builder for chaining.
*/
public Builder clearImplicit() {
bitField0_ = (bitField0_ & ~0x00800000);
implicit_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList requiresExtension_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureRequiresExtensionIsMutable() {
if (!requiresExtension_.isModifiable()) {
requiresExtension_ = new com.google.protobuf.LazyStringArrayList(requiresExtension_);
}
bitField0_ |= 0x01000000;
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @return A list containing the requiresExtension.
*/
public com.google.protobuf.ProtocolStringList
getRequiresExtensionList() {
requiresExtension_.makeImmutable();
return requiresExtension_;
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @return The count of requiresExtension.
*/
public int getRequiresExtensionCount() {
return requiresExtension_.size();
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @param index The index of the element to return.
* @return The requiresExtension at the given index.
*/
public java.lang.String getRequiresExtension(int index) {
return requiresExtension_.get(index);
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @param index The index of the value to return.
* @return The bytes of the requiresExtension at the given index.
*/
public com.google.protobuf.ByteString
getRequiresExtensionBytes(int index) {
return requiresExtension_.getByteString(index);
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @param index The index to set the value at.
* @param value The requiresExtension to set.
* @return This builder for chaining.
*/
public Builder setRequiresExtension(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureRequiresExtensionIsMutable();
requiresExtension_.set(index, value);
bitField0_ |= 0x01000000;
onChanged();
return this;
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @param value The requiresExtension to add.
* @return This builder for chaining.
*/
public Builder addRequiresExtension(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureRequiresExtensionIsMutable();
requiresExtension_.add(value);
bitField0_ |= 0x01000000;
onChanged();
return this;
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @param values The requiresExtension to add.
* @return This builder for chaining.
*/
public Builder addAllRequiresExtension(
java.lang.Iterable values) {
ensureRequiresExtensionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, requiresExtension_);
bitField0_ |= 0x01000000;
onChanged();
return this;
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @return This builder for chaining.
*/
public Builder clearRequiresExtension() {
requiresExtension_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x01000000);;
onChanged();
return this;
}
/**
*
* If set, this attr is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 19;
* @param value The bytes of the requiresExtension to add.
* @return This builder for chaining.
*/
public Builder addRequiresExtensionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureRequiresExtensionIsMutable();
requiresExtension_.add(value);
bitField0_ |= 0x01000000;
onChanged();
return this;
}
private dev.amp.validator.ValidatorProtos.AncestorMarker requiresAncestor_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AncestorMarker, dev.amp.validator.ValidatorProtos.AncestorMarker.Builder, dev.amp.validator.ValidatorProtos.AncestorMarkerOrBuilder> requiresAncestorBuilder_;
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
* @return Whether the requiresAncestor field is set.
*/
public boolean hasRequiresAncestor() {
return ((bitField0_ & 0x02000000) != 0);
}
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
* @return The requiresAncestor.
*/
public dev.amp.validator.ValidatorProtos.AncestorMarker getRequiresAncestor() {
if (requiresAncestorBuilder_ == null) {
return requiresAncestor_ == null ? dev.amp.validator.ValidatorProtos.AncestorMarker.getDefaultInstance() : requiresAncestor_;
} else {
return requiresAncestorBuilder_.getMessage();
}
}
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
*/
public Builder setRequiresAncestor(dev.amp.validator.ValidatorProtos.AncestorMarker value) {
if (requiresAncestorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
requiresAncestor_ = value;
} else {
requiresAncestorBuilder_.setMessage(value);
}
bitField0_ |= 0x02000000;
onChanged();
return this;
}
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
*/
public Builder setRequiresAncestor(
dev.amp.validator.ValidatorProtos.AncestorMarker.Builder builderForValue) {
if (requiresAncestorBuilder_ == null) {
requiresAncestor_ = builderForValue.build();
} else {
requiresAncestorBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x02000000;
onChanged();
return this;
}
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
*/
public Builder mergeRequiresAncestor(dev.amp.validator.ValidatorProtos.AncestorMarker value) {
if (requiresAncestorBuilder_ == null) {
if (((bitField0_ & 0x02000000) != 0) &&
requiresAncestor_ != null &&
requiresAncestor_ != dev.amp.validator.ValidatorProtos.AncestorMarker.getDefaultInstance()) {
getRequiresAncestorBuilder().mergeFrom(value);
} else {
requiresAncestor_ = value;
}
} else {
requiresAncestorBuilder_.mergeFrom(value);
}
bitField0_ |= 0x02000000;
onChanged();
return this;
}
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
*/
public Builder clearRequiresAncestor() {
bitField0_ = (bitField0_ & ~0x02000000);
requiresAncestor_ = null;
if (requiresAncestorBuilder_ != null) {
requiresAncestorBuilder_.dispose();
requiresAncestorBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
*/
public dev.amp.validator.ValidatorProtos.AncestorMarker.Builder getRequiresAncestorBuilder() {
bitField0_ |= 0x02000000;
onChanged();
return getRequiresAncestorFieldBuilder().getBuilder();
}
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
*/
public dev.amp.validator.ValidatorProtos.AncestorMarkerOrBuilder getRequiresAncestorOrBuilder() {
if (requiresAncestorBuilder_ != null) {
return requiresAncestorBuilder_.getMessageOrBuilder();
} else {
return requiresAncestor_ == null ?
dev.amp.validator.ValidatorProtos.AncestorMarker.getDefaultInstance() : requiresAncestor_;
}
}
/**
*
* If set, this attr is invalid unless the current tag has an ancestor
* tag which set one or more of the required markers.
*
*
* optional .amp.validator.AncestorMarker requires_ancestor = 22;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AncestorMarker, dev.amp.validator.ValidatorProtos.AncestorMarker.Builder, dev.amp.validator.ValidatorProtos.AncestorMarkerOrBuilder>
getRequiresAncestorFieldBuilder() {
if (requiresAncestorBuilder_ == null) {
requiresAncestorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AncestorMarker, dev.amp.validator.ValidatorProtos.AncestorMarker.Builder, dev.amp.validator.ValidatorProtos.AncestorMarkerOrBuilder>(
getRequiresAncestor(),
getParentForChildren(),
isClean());
requiresAncestor_ = null;
}
return requiresAncestorBuilder_;
}
@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:amp.validator.AttrSpec)
}
// @@protoc_insertion_point(class_scope:amp.validator.AttrSpec)
private static final dev.amp.validator.ValidatorProtos.AttrSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.AttrSpec();
}
public static dev.amp.validator.ValidatorProtos.AttrSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AttrSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AttrListOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.AttrList)
com.google.protobuf.MessageOrBuilder {
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
boolean hasName();
/**
* optional string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
* optional string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
java.util.List
getAttrsList();
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
dev.amp.validator.ValidatorProtos.AttrSpec getAttrs(int index);
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
int getAttrsCount();
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
java.util.List
getAttrsOrBuilderList();
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder getAttrsOrBuilder(
int index);
}
/**
*
* Some tags share several attributes, so they're identified by unique key
* (see the attr_lists map in ValidatorRules).
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf type {@code amp.validator.AttrList}
*/
public static final class AttrList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.AttrList)
AttrListOrBuilder {
private static final long serialVersionUID = 0L;
// Use AttrList.newBuilder() to construct.
private AttrList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private AttrList() {
name_ = "";
attrs_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AttrList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AttrList.class, dev.amp.validator.ValidatorProtos.AttrList.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
* optional string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ATTRS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List attrs_;
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
@java.lang.Override
public java.util.List getAttrsList() {
return attrs_;
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
@java.lang.Override
public java.util.List
getAttrsOrBuilderList() {
return attrs_;
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
@java.lang.Override
public int getAttrsCount() {
return attrs_.size();
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrSpec getAttrs(int index) {
return attrs_.get(index);
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder getAttrsOrBuilder(
int index) {
return attrs_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < attrs_.size(); i++) {
output.writeMessage(2, attrs_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
for (int i = 0; i < attrs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, attrs_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.AttrList)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.AttrList other = (dev.amp.validator.ValidatorProtos.AttrList) obj;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (!getAttrsList()
.equals(other.getAttrsList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (getAttrsCount() > 0) {
hash = (37 * hash) + ATTRS_FIELD_NUMBER;
hash = (53 * hash) + getAttrsList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.AttrList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AttrList parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AttrList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AttrList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AttrList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AttrList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AttrList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AttrList 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 dev.amp.validator.ValidatorProtos.AttrList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AttrList 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 dev.amp.validator.ValidatorProtos.AttrList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AttrList 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(dev.amp.validator.ValidatorProtos.AttrList 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;
}
/**
*
* Some tags share several attributes, so they're identified by unique key
* (see the attr_lists map in ValidatorRules).
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf type {@code amp.validator.AttrList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.AttrList)
dev.amp.validator.ValidatorProtos.AttrListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AttrList.class, dev.amp.validator.ValidatorProtos.AttrList.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.AttrList.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
if (attrsBuilder_ == null) {
attrs_ = java.util.Collections.emptyList();
} else {
attrs_ = null;
attrsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AttrList_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrList getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.AttrList.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrList build() {
dev.amp.validator.ValidatorProtos.AttrList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrList buildPartial() {
dev.amp.validator.ValidatorProtos.AttrList result = new dev.amp.validator.ValidatorProtos.AttrList(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.amp.validator.ValidatorProtos.AttrList result) {
if (attrsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
attrs_ = java.util.Collections.unmodifiableList(attrs_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.attrs_ = attrs_;
} else {
result.attrs_ = attrsBuilder_.build();
}
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.AttrList result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.AttrList) {
return mergeFrom((dev.amp.validator.ValidatorProtos.AttrList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.AttrList other) {
if (other == dev.amp.validator.ValidatorProtos.AttrList.getDefaultInstance()) return this;
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (attrsBuilder_ == null) {
if (!other.attrs_.isEmpty()) {
if (attrs_.isEmpty()) {
attrs_ = other.attrs_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureAttrsIsMutable();
attrs_.addAll(other.attrs_);
}
onChanged();
}
} else {
if (!other.attrs_.isEmpty()) {
if (attrsBuilder_.isEmpty()) {
attrsBuilder_.dispose();
attrsBuilder_ = null;
attrs_ = other.attrs_;
bitField0_ = (bitField0_ & ~0x00000002);
attrsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getAttrsFieldBuilder() : null;
} else {
attrsBuilder_.addAllMessages(other.attrs_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
dev.amp.validator.ValidatorProtos.AttrSpec m =
input.readMessage(
dev.amp.validator.ValidatorProtos.AttrSpec.PARSER,
extensionRegistry);
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
attrs_.add(m);
} else {
attrsBuilder_.addMessage(m);
}
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* optional string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* optional string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List attrs_ =
java.util.Collections.emptyList();
private void ensureAttrsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
attrs_ = new java.util.ArrayList(attrs_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AttrSpec, dev.amp.validator.ValidatorProtos.AttrSpec.Builder, dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder> attrsBuilder_;
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public java.util.List getAttrsList() {
if (attrsBuilder_ == null) {
return java.util.Collections.unmodifiableList(attrs_);
} else {
return attrsBuilder_.getMessageList();
}
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public int getAttrsCount() {
if (attrsBuilder_ == null) {
return attrs_.size();
} else {
return attrsBuilder_.getCount();
}
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public dev.amp.validator.ValidatorProtos.AttrSpec getAttrs(int index) {
if (attrsBuilder_ == null) {
return attrs_.get(index);
} else {
return attrsBuilder_.getMessage(index);
}
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public Builder setAttrs(
int index, dev.amp.validator.ValidatorProtos.AttrSpec value) {
if (attrsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttrsIsMutable();
attrs_.set(index, value);
onChanged();
} else {
attrsBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public Builder setAttrs(
int index, dev.amp.validator.ValidatorProtos.AttrSpec.Builder builderForValue) {
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
attrs_.set(index, builderForValue.build());
onChanged();
} else {
attrsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public Builder addAttrs(dev.amp.validator.ValidatorProtos.AttrSpec value) {
if (attrsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttrsIsMutable();
attrs_.add(value);
onChanged();
} else {
attrsBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public Builder addAttrs(
int index, dev.amp.validator.ValidatorProtos.AttrSpec value) {
if (attrsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttrsIsMutable();
attrs_.add(index, value);
onChanged();
} else {
attrsBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public Builder addAttrs(
dev.amp.validator.ValidatorProtos.AttrSpec.Builder builderForValue) {
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
attrs_.add(builderForValue.build());
onChanged();
} else {
attrsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public Builder addAttrs(
int index, dev.amp.validator.ValidatorProtos.AttrSpec.Builder builderForValue) {
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
attrs_.add(index, builderForValue.build());
onChanged();
} else {
attrsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public Builder addAllAttrs(
java.lang.Iterable values) {
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, attrs_);
onChanged();
} else {
attrsBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public Builder clearAttrs() {
if (attrsBuilder_ == null) {
attrs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
attrsBuilder_.clear();
}
return this;
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public Builder removeAttrs(int index) {
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
attrs_.remove(index);
onChanged();
} else {
attrsBuilder_.remove(index);
}
return this;
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public dev.amp.validator.ValidatorProtos.AttrSpec.Builder getAttrsBuilder(
int index) {
return getAttrsFieldBuilder().getBuilder(index);
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder getAttrsOrBuilder(
int index) {
if (attrsBuilder_ == null) {
return attrs_.get(index); } else {
return attrsBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public java.util.List
getAttrsOrBuilderList() {
if (attrsBuilder_ != null) {
return attrsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(attrs_);
}
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public dev.amp.validator.ValidatorProtos.AttrSpec.Builder addAttrsBuilder() {
return getAttrsFieldBuilder().addBuilder(
dev.amp.validator.ValidatorProtos.AttrSpec.getDefaultInstance());
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public dev.amp.validator.ValidatorProtos.AttrSpec.Builder addAttrsBuilder(
int index) {
return getAttrsFieldBuilder().addBuilder(
index, dev.amp.validator.ValidatorProtos.AttrSpec.getDefaultInstance());
}
/**
* repeated .amp.validator.AttrSpec attrs = 2;
*/
public java.util.List
getAttrsBuilderList() {
return getAttrsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AttrSpec, dev.amp.validator.ValidatorProtos.AttrSpec.Builder, dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder>
getAttrsFieldBuilder() {
if (attrsBuilder_ == null) {
attrsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AttrSpec, dev.amp.validator.ValidatorProtos.AttrSpec.Builder, dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder>(
attrs_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
attrs_ = null;
}
return attrsBuilder_;
}
@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:amp.validator.AttrList)
}
// @@protoc_insertion_point(class_scope:amp.validator.AttrList)
private static final dev.amp.validator.ValidatorProtos.AttrList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.AttrList();
}
public static dev.amp.validator.ValidatorProtos.AttrList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AttrList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DescendantTagListOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.DescendantTagList)
com.google.protobuf.MessageOrBuilder {
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
boolean hasName();
/**
* optional string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
* optional string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* repeated string tag = 2;
* @return A list containing the tag.
*/
java.util.List
getTagList();
/**
* repeated string tag = 2;
* @return The count of tag.
*/
int getTagCount();
/**
* repeated string tag = 2;
* @param index The index of the element to return.
* @return The tag at the given index.
*/
java.lang.String getTag(int index);
/**
* repeated string tag = 2;
* @param index The index of the value to return.
* @return The bytes of the tag at the given index.
*/
com.google.protobuf.ByteString
getTagBytes(int index);
}
/**
*
* A list of allowed tags for descendants of any level (children, grandchildren,
* great-grandchildren, etc).
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf type {@code amp.validator.DescendantTagList}
*/
public static final class DescendantTagList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.DescendantTagList)
DescendantTagListOrBuilder {
private static final long serialVersionUID = 0L;
// Use DescendantTagList.newBuilder() to construct.
private DescendantTagList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private DescendantTagList() {
name_ = "";
tag_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DescendantTagList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DescendantTagList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DescendantTagList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.DescendantTagList.class, dev.amp.validator.ValidatorProtos.DescendantTagList.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
* optional string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TAG_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList tag_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* repeated string tag = 2;
* @return A list containing the tag.
*/
public com.google.protobuf.ProtocolStringList
getTagList() {
return tag_;
}
/**
* repeated string tag = 2;
* @return The count of tag.
*/
public int getTagCount() {
return tag_.size();
}
/**
* repeated string tag = 2;
* @param index The index of the element to return.
* @return The tag at the given index.
*/
public java.lang.String getTag(int index) {
return tag_.get(index);
}
/**
* repeated string tag = 2;
* @param index The index of the value to return.
* @return The bytes of the tag at the given index.
*/
public com.google.protobuf.ByteString
getTagBytes(int index) {
return tag_.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;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < tag_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tag_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
{
int dataSize = 0;
for (int i = 0; i < tag_.size(); i++) {
dataSize += computeStringSizeNoTag(tag_.getRaw(i));
}
size += dataSize;
size += 1 * getTagList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.DescendantTagList)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.DescendantTagList other = (dev.amp.validator.ValidatorProtos.DescendantTagList) obj;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (!getTagList()
.equals(other.getTagList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (getTagCount() > 0) {
hash = (37 * hash) + TAG_FIELD_NUMBER;
hash = (53 * hash) + getTagList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.DescendantTagList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.DescendantTagList parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.DescendantTagList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.DescendantTagList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.DescendantTagList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.DescendantTagList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.DescendantTagList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.DescendantTagList 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 dev.amp.validator.ValidatorProtos.DescendantTagList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.DescendantTagList 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 dev.amp.validator.ValidatorProtos.DescendantTagList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.DescendantTagList 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(dev.amp.validator.ValidatorProtos.DescendantTagList 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 list of allowed tags for descendants of any level (children, grandchildren,
* great-grandchildren, etc).
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf type {@code amp.validator.DescendantTagList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.DescendantTagList)
dev.amp.validator.ValidatorProtos.DescendantTagListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DescendantTagList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DescendantTagList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.DescendantTagList.class, dev.amp.validator.ValidatorProtos.DescendantTagList.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.DescendantTagList.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
tag_ =
com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DescendantTagList_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DescendantTagList getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.DescendantTagList.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DescendantTagList build() {
dev.amp.validator.ValidatorProtos.DescendantTagList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DescendantTagList buildPartial() {
dev.amp.validator.ValidatorProtos.DescendantTagList result = new dev.amp.validator.ValidatorProtos.DescendantTagList(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.DescendantTagList result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
tag_.makeImmutable();
result.tag_ = tag_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.DescendantTagList) {
return mergeFrom((dev.amp.validator.ValidatorProtos.DescendantTagList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.DescendantTagList other) {
if (other == dev.amp.validator.ValidatorProtos.DescendantTagList.getDefaultInstance()) return this;
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.tag_.isEmpty()) {
if (tag_.isEmpty()) {
tag_ = other.tag_;
bitField0_ |= 0x00000002;
} else {
ensureTagIsMutable();
tag_.addAll(other.tag_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureTagIsMutable();
tag_.add(bs);
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* optional string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* optional string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList tag_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureTagIsMutable() {
if (!tag_.isModifiable()) {
tag_ = new com.google.protobuf.LazyStringArrayList(tag_);
}
bitField0_ |= 0x00000002;
}
/**
* repeated string tag = 2;
* @return A list containing the tag.
*/
public com.google.protobuf.ProtocolStringList
getTagList() {
tag_.makeImmutable();
return tag_;
}
/**
* repeated string tag = 2;
* @return The count of tag.
*/
public int getTagCount() {
return tag_.size();
}
/**
* repeated string tag = 2;
* @param index The index of the element to return.
* @return The tag at the given index.
*/
public java.lang.String getTag(int index) {
return tag_.get(index);
}
/**
* repeated string tag = 2;
* @param index The index of the value to return.
* @return The bytes of the tag at the given index.
*/
public com.google.protobuf.ByteString
getTagBytes(int index) {
return tag_.getByteString(index);
}
/**
* repeated string tag = 2;
* @param index The index to set the value at.
* @param value The tag to set.
* @return This builder for chaining.
*/
public Builder setTag(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureTagIsMutable();
tag_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* repeated string tag = 2;
* @param value The tag to add.
* @return This builder for chaining.
*/
public Builder addTag(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureTagIsMutable();
tag_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* repeated string tag = 2;
* @param values The tag to add.
* @return This builder for chaining.
*/
public Builder addAllTag(
java.lang.Iterable values) {
ensureTagIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, tag_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* repeated string tag = 2;
* @return This builder for chaining.
*/
public Builder clearTag() {
tag_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
* repeated string tag = 2;
* @param value The bytes of the tag to add.
* @return This builder for chaining.
*/
public Builder addTagBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureTagIsMutable();
tag_.add(value);
bitField0_ |= 0x00000002;
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:amp.validator.DescendantTagList)
}
// @@protoc_insertion_point(class_scope:amp.validator.DescendantTagList)
private static final dev.amp.validator.ValidatorProtos.DescendantTagList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.DescendantTagList();
}
public static dev.amp.validator.ValidatorProtos.DescendantTagList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DescendantTagList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DescendantTagList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DeclarationListOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.DeclarationList)
com.google.protobuf.MessageOrBuilder {
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
boolean hasName();
/**
* optional string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
* optional string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
java.util.List
getDeclarationList();
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
dev.amp.validator.ValidatorProtos.CssDeclaration getDeclaration(int index);
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
int getDeclarationCount();
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
java.util.List
getDeclarationOrBuilderList();
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder getDeclarationOrBuilder(
int index);
}
/**
*
* Some style blocks share long lists of declarations, so they're identified by
* unique key.
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf type {@code amp.validator.DeclarationList}
*/
public static final class DeclarationList extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.DeclarationList)
DeclarationListOrBuilder {
private static final long serialVersionUID = 0L;
// Use DeclarationList.newBuilder() to construct.
private DeclarationList(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private DeclarationList() {
name_ = "";
declaration_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DeclarationList();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DeclarationList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DeclarationList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.DeclarationList.class, dev.amp.validator.ValidatorProtos.DeclarationList.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
* optional string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DECLARATION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List declaration_;
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
@java.lang.Override
public java.util.List getDeclarationList() {
return declaration_;
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
@java.lang.Override
public java.util.List
getDeclarationOrBuilderList() {
return declaration_;
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
@java.lang.Override
public int getDeclarationCount() {
return declaration_.size();
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssDeclaration getDeclaration(int index) {
return declaration_.get(index);
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder getDeclarationOrBuilder(
int index) {
return declaration_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < declaration_.size(); i++) {
output.writeMessage(2, declaration_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
for (int i = 0; i < declaration_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, declaration_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.DeclarationList)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.DeclarationList other = (dev.amp.validator.ValidatorProtos.DeclarationList) obj;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (!getDeclarationList()
.equals(other.getDeclarationList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (getDeclarationCount() > 0) {
hash = (37 * hash) + DECLARATION_FIELD_NUMBER;
hash = (53 * hash) + getDeclarationList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.DeclarationList parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.DeclarationList parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.DeclarationList parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.DeclarationList parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.DeclarationList parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.DeclarationList parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.DeclarationList parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.DeclarationList 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 dev.amp.validator.ValidatorProtos.DeclarationList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.DeclarationList 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 dev.amp.validator.ValidatorProtos.DeclarationList parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.DeclarationList 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(dev.amp.validator.ValidatorProtos.DeclarationList 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;
}
/**
*
* Some style blocks share long lists of declarations, so they're identified by
* unique key.
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf type {@code amp.validator.DeclarationList}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.DeclarationList)
dev.amp.validator.ValidatorProtos.DeclarationListOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DeclarationList_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DeclarationList_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.DeclarationList.class, dev.amp.validator.ValidatorProtos.DeclarationList.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.DeclarationList.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
if (declarationBuilder_ == null) {
declaration_ = java.util.Collections.emptyList();
} else {
declaration_ = null;
declarationBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DeclarationList_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DeclarationList getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.DeclarationList.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DeclarationList build() {
dev.amp.validator.ValidatorProtos.DeclarationList result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DeclarationList buildPartial() {
dev.amp.validator.ValidatorProtos.DeclarationList result = new dev.amp.validator.ValidatorProtos.DeclarationList(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.amp.validator.ValidatorProtos.DeclarationList result) {
if (declarationBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
declaration_ = java.util.Collections.unmodifiableList(declaration_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.declaration_ = declaration_;
} else {
result.declaration_ = declarationBuilder_.build();
}
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.DeclarationList result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000001;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.DeclarationList) {
return mergeFrom((dev.amp.validator.ValidatorProtos.DeclarationList)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.DeclarationList other) {
if (other == dev.amp.validator.ValidatorProtos.DeclarationList.getDefaultInstance()) return this;
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (declarationBuilder_ == null) {
if (!other.declaration_.isEmpty()) {
if (declaration_.isEmpty()) {
declaration_ = other.declaration_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureDeclarationIsMutable();
declaration_.addAll(other.declaration_);
}
onChanged();
}
} else {
if (!other.declaration_.isEmpty()) {
if (declarationBuilder_.isEmpty()) {
declarationBuilder_.dispose();
declarationBuilder_ = null;
declaration_ = other.declaration_;
bitField0_ = (bitField0_ & ~0x00000002);
declarationBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDeclarationFieldBuilder() : null;
} else {
declarationBuilder_.addAllMessages(other.declaration_);
}
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
dev.amp.validator.ValidatorProtos.CssDeclaration m =
input.readMessage(
dev.amp.validator.ValidatorProtos.CssDeclaration.PARSER,
extensionRegistry);
if (declarationBuilder_ == null) {
ensureDeclarationIsMutable();
declaration_.add(m);
} else {
declarationBuilder_.addMessage(m);
}
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* optional string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* optional string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.util.List declaration_ =
java.util.Collections.emptyList();
private void ensureDeclarationIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
declaration_ = new java.util.ArrayList(declaration_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.CssDeclaration, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder, dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder> declarationBuilder_;
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public java.util.List getDeclarationList() {
if (declarationBuilder_ == null) {
return java.util.Collections.unmodifiableList(declaration_);
} else {
return declarationBuilder_.getMessageList();
}
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public int getDeclarationCount() {
if (declarationBuilder_ == null) {
return declaration_.size();
} else {
return declarationBuilder_.getCount();
}
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public dev.amp.validator.ValidatorProtos.CssDeclaration getDeclaration(int index) {
if (declarationBuilder_ == null) {
return declaration_.get(index);
} else {
return declarationBuilder_.getMessage(index);
}
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public Builder setDeclaration(
int index, dev.amp.validator.ValidatorProtos.CssDeclaration value) {
if (declarationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDeclarationIsMutable();
declaration_.set(index, value);
onChanged();
} else {
declarationBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public Builder setDeclaration(
int index, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder builderForValue) {
if (declarationBuilder_ == null) {
ensureDeclarationIsMutable();
declaration_.set(index, builderForValue.build());
onChanged();
} else {
declarationBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public Builder addDeclaration(dev.amp.validator.ValidatorProtos.CssDeclaration value) {
if (declarationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDeclarationIsMutable();
declaration_.add(value);
onChanged();
} else {
declarationBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public Builder addDeclaration(
int index, dev.amp.validator.ValidatorProtos.CssDeclaration value) {
if (declarationBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDeclarationIsMutable();
declaration_.add(index, value);
onChanged();
} else {
declarationBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public Builder addDeclaration(
dev.amp.validator.ValidatorProtos.CssDeclaration.Builder builderForValue) {
if (declarationBuilder_ == null) {
ensureDeclarationIsMutable();
declaration_.add(builderForValue.build());
onChanged();
} else {
declarationBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public Builder addDeclaration(
int index, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder builderForValue) {
if (declarationBuilder_ == null) {
ensureDeclarationIsMutable();
declaration_.add(index, builderForValue.build());
onChanged();
} else {
declarationBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public Builder addAllDeclaration(
java.lang.Iterable values) {
if (declarationBuilder_ == null) {
ensureDeclarationIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, declaration_);
onChanged();
} else {
declarationBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public Builder clearDeclaration() {
if (declarationBuilder_ == null) {
declaration_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
declarationBuilder_.clear();
}
return this;
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public Builder removeDeclaration(int index) {
if (declarationBuilder_ == null) {
ensureDeclarationIsMutable();
declaration_.remove(index);
onChanged();
} else {
declarationBuilder_.remove(index);
}
return this;
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public dev.amp.validator.ValidatorProtos.CssDeclaration.Builder getDeclarationBuilder(
int index) {
return getDeclarationFieldBuilder().getBuilder(index);
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder getDeclarationOrBuilder(
int index) {
if (declarationBuilder_ == null) {
return declaration_.get(index); } else {
return declarationBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public java.util.List
getDeclarationOrBuilderList() {
if (declarationBuilder_ != null) {
return declarationBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(declaration_);
}
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public dev.amp.validator.ValidatorProtos.CssDeclaration.Builder addDeclarationBuilder() {
return getDeclarationFieldBuilder().addBuilder(
dev.amp.validator.ValidatorProtos.CssDeclaration.getDefaultInstance());
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public dev.amp.validator.ValidatorProtos.CssDeclaration.Builder addDeclarationBuilder(
int index) {
return getDeclarationFieldBuilder().addBuilder(
index, dev.amp.validator.ValidatorProtos.CssDeclaration.getDefaultInstance());
}
/**
* repeated .amp.validator.CssDeclaration declaration = 2;
*/
public java.util.List
getDeclarationBuilderList() {
return getDeclarationFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.CssDeclaration, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder, dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder>
getDeclarationFieldBuilder() {
if (declarationBuilder_ == null) {
declarationBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.CssDeclaration, dev.amp.validator.ValidatorProtos.CssDeclaration.Builder, dev.amp.validator.ValidatorProtos.CssDeclarationOrBuilder>(
declaration_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
declaration_ = null;
}
return declarationBuilder_;
}
@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:amp.validator.DeclarationList)
}
// @@protoc_insertion_point(class_scope:amp.validator.DeclarationList)
private static final dev.amp.validator.ValidatorProtos.DeclarationList DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.DeclarationList();
}
public static dev.amp.validator.ValidatorProtos.DeclarationList getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DeclarationList parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DeclarationList getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DisallowedCDataRegexOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.DisallowedCDataRegex)
com.google.protobuf.MessageOrBuilder {
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @return Whether the regex field is set.
*/
boolean hasRegex();
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @return The regex.
*/
java.lang.String getRegex();
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @return The bytes for regex.
*/
com.google.protobuf.ByteString
getRegexBytes();
/**
* optional string error_message = 2;
* @return Whether the errorMessage field is set.
*/
boolean hasErrorMessage();
/**
* optional string error_message = 2;
* @return The errorMessage.
*/
java.lang.String getErrorMessage();
/**
* optional string error_message = 2;
* @return The bytes for errorMessage.
*/
com.google.protobuf.ByteString
getErrorMessageBytes();
}
/**
*
* Regex which, if matches the cdata of a tag, causes the tag validation to
* fail.
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf type {@code amp.validator.DisallowedCDataRegex}
*/
public static final class DisallowedCDataRegex extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.DisallowedCDataRegex)
DisallowedCDataRegexOrBuilder {
private static final long serialVersionUID = 0L;
// Use DisallowedCDataRegex.newBuilder() to construct.
private DisallowedCDataRegex(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private DisallowedCDataRegex() {
regex_ = "";
errorMessage_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DisallowedCDataRegex();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DisallowedCDataRegex_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DisallowedCDataRegex_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.class, dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.Builder.class);
}
private int bitField0_;
public static final int REGEX_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object regex_ = "";
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @return Whether the regex field is set.
*/
@java.lang.Override
public boolean hasRegex() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @return The regex.
*/
@java.lang.Override
public java.lang.String getRegex() {
java.lang.Object ref = regex_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
regex_ = s;
}
return s;
}
}
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @return The bytes for regex.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getRegexBytes() {
java.lang.Object ref = regex_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
regex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ERROR_MESSAGE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object errorMessage_ = "";
/**
* optional string error_message = 2;
* @return Whether the errorMessage field is set.
*/
@java.lang.Override
public boolean hasErrorMessage() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string error_message = 2;
* @return The errorMessage.
*/
@java.lang.Override
public java.lang.String getErrorMessage() {
java.lang.Object ref = errorMessage_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
errorMessage_ = s;
}
return s;
}
}
/**
* optional string error_message = 2;
* @return The bytes for errorMessage.
*/
@java.lang.Override
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;
}
}
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)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, regex_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, errorMessage_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, regex_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, errorMessage_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.DisallowedCDataRegex)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex other = (dev.amp.validator.ValidatorProtos.DisallowedCDataRegex) obj;
if (hasRegex() != other.hasRegex()) return false;
if (hasRegex()) {
if (!getRegex()
.equals(other.getRegex())) return false;
}
if (hasErrorMessage() != other.hasErrorMessage()) return false;
if (hasErrorMessage()) {
if (!getErrorMessage()
.equals(other.getErrorMessage())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasRegex()) {
hash = (37 * hash) + REGEX_FIELD_NUMBER;
hash = (53 * hash) + getRegex().hashCode();
}
if (hasErrorMessage()) {
hash = (37 * hash) + ERROR_MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getErrorMessage().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.DisallowedCDataRegex parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.DisallowedCDataRegex parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.DisallowedCDataRegex parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.DisallowedCDataRegex parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.DisallowedCDataRegex parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.DisallowedCDataRegex parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.DisallowedCDataRegex parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.DisallowedCDataRegex 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 dev.amp.validator.ValidatorProtos.DisallowedCDataRegex parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.DisallowedCDataRegex 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 dev.amp.validator.ValidatorProtos.DisallowedCDataRegex parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.DisallowedCDataRegex 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(dev.amp.validator.ValidatorProtos.DisallowedCDataRegex 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;
}
/**
*
* Regex which, if matches the cdata of a tag, causes the tag validation to
* fail.
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf type {@code amp.validator.DisallowedCDataRegex}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.DisallowedCDataRegex)
dev.amp.validator.ValidatorProtos.DisallowedCDataRegexOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DisallowedCDataRegex_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DisallowedCDataRegex_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.class, dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
regex_ = "";
errorMessage_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_DisallowedCDataRegex_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DisallowedCDataRegex getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DisallowedCDataRegex build() {
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DisallowedCDataRegex buildPartial() {
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex result = new dev.amp.validator.ValidatorProtos.DisallowedCDataRegex(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.DisallowedCDataRegex result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.regex_ = regex_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.errorMessage_ = errorMessage_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.DisallowedCDataRegex) {
return mergeFrom((dev.amp.validator.ValidatorProtos.DisallowedCDataRegex)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.DisallowedCDataRegex other) {
if (other == dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.getDefaultInstance()) return this;
if (other.hasRegex()) {
regex_ = other.regex_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasErrorMessage()) {
errorMessage_ = other.errorMessage_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
regex_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
errorMessage_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object regex_ = "";
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @return Whether the regex field is set.
*/
public boolean hasRegex() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @return The regex.
*/
public java.lang.String getRegex() {
java.lang.Object ref = regex_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
regex_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @return The bytes for regex.
*/
public com.google.protobuf.ByteString
getRegexBytes() {
java.lang.Object ref = regex_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
regex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @param value The regex to set.
* @return This builder for chaining.
*/
public Builder setRegex(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
regex_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @return This builder for chaining.
*/
public Builder clearRegex() {
regex_ = getDefaultInstance().getRegex();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Syntax is partial match, use ^ and $ if you want global match.
*
*
* optional string regex = 1;
* @param value The bytes for regex to set.
* @return This builder for chaining.
*/
public Builder setRegexBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
regex_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object errorMessage_ = "";
/**
* optional string error_message = 2;
* @return Whether the errorMessage field is set.
*/
public boolean hasErrorMessage() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string error_message = 2;
* @return The errorMessage.
*/
public java.lang.String getErrorMessage() {
java.lang.Object ref = errorMessage_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
errorMessage_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string error_message = 2;
* @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;
}
}
/**
* optional string error_message = 2;
* @param value The errorMessage to set.
* @return This builder for chaining.
*/
public Builder setErrorMessage(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
errorMessage_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* optional string error_message = 2;
* @return This builder for chaining.
*/
public Builder clearErrorMessage() {
errorMessage_ = getDefaultInstance().getErrorMessage();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* optional string error_message = 2;
* @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(); }
errorMessage_ = value;
bitField0_ |= 0x00000002;
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:amp.validator.DisallowedCDataRegex)
}
// @@protoc_insertion_point(class_scope:amp.validator.DisallowedCDataRegex)
private static final dev.amp.validator.ValidatorProtos.DisallowedCDataRegex DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.DisallowedCDataRegex();
}
public static dev.amp.validator.ValidatorProtos.DisallowedCDataRegex getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DisallowedCDataRegex parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DisallowedCDataRegex getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MediaQuerySpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.MediaQuerySpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* If issues_as_error is true, then parsing errors and invalid
* types / features will be treated as validator errors, otherwise warnings.
*
*
* optional bool issues_as_error = 1 [default = false];
* @return Whether the issuesAsError field is set.
*/
boolean hasIssuesAsError();
/**
*
* If issues_as_error is true, then parsing errors and invalid
* types / features will be treated as validator errors, otherwise warnings.
*
*
* optional bool issues_as_error = 1 [default = false];
* @return The issuesAsError.
*/
boolean getIssuesAsError();
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @return A list containing the type.
*/
java.util.List
getTypeList();
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @return The count of type.
*/
int getTypeCount();
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @param index The index of the element to return.
* @return The type at the given index.
*/
java.lang.String getType(int index);
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @param index The index of the value to return.
* @return The bytes of the type at the given index.
*/
com.google.protobuf.ByteString
getTypeBytes(int index);
/**
* repeated string feature = 3;
* @return A list containing the feature.
*/
java.util.List
getFeatureList();
/**
* repeated string feature = 3;
* @return The count of feature.
*/
int getFeatureCount();
/**
* repeated string feature = 3;
* @param index The index of the element to return.
* @return The feature at the given index.
*/
java.lang.String getFeature(int index);
/**
* repeated string feature = 3;
* @param index The index of the value to return.
* @return The bytes of the feature at the given index.
*/
com.google.protobuf.ByteString
getFeatureBytes(int index);
}
/**
*
* This spec is used when parsing a media query inside a CSS @media rule.
* NEXT AVAILABLE TAG: 5
*
*
* Protobuf type {@code amp.validator.MediaQuerySpec}
*/
public static final class MediaQuerySpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.MediaQuerySpec)
MediaQuerySpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use MediaQuerySpec.newBuilder() to construct.
private MediaQuerySpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private MediaQuerySpec() {
type_ =
com.google.protobuf.LazyStringArrayList.emptyList();
feature_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MediaQuerySpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_MediaQuerySpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_MediaQuerySpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.MediaQuerySpec.class, dev.amp.validator.ValidatorProtos.MediaQuerySpec.Builder.class);
}
private int bitField0_;
public static final int ISSUES_AS_ERROR_FIELD_NUMBER = 1;
private boolean issuesAsError_ = false;
/**
*
* If issues_as_error is true, then parsing errors and invalid
* types / features will be treated as validator errors, otherwise warnings.
*
*
* optional bool issues_as_error = 1 [default = false];
* @return Whether the issuesAsError field is set.
*/
@java.lang.Override
public boolean hasIssuesAsError() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* If issues_as_error is true, then parsing errors and invalid
* types / features will be treated as validator errors, otherwise warnings.
*
*
* optional bool issues_as_error = 1 [default = false];
* @return The issuesAsError.
*/
@java.lang.Override
public boolean getIssuesAsError() {
return issuesAsError_;
}
public static final int TYPE_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList type_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @return A list containing the type.
*/
public com.google.protobuf.ProtocolStringList
getTypeList() {
return type_;
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @return The count of type.
*/
public int getTypeCount() {
return type_.size();
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @param index The index of the element to return.
* @return The type at the given index.
*/
public java.lang.String getType(int index) {
return type_.get(index);
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @param index The index of the value to return.
* @return The bytes of the type at the given index.
*/
public com.google.protobuf.ByteString
getTypeBytes(int index) {
return type_.getByteString(index);
}
public static final int FEATURE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList feature_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* repeated string feature = 3;
* @return A list containing the feature.
*/
public com.google.protobuf.ProtocolStringList
getFeatureList() {
return feature_;
}
/**
* repeated string feature = 3;
* @return The count of feature.
*/
public int getFeatureCount() {
return feature_.size();
}
/**
* repeated string feature = 3;
* @param index The index of the element to return.
* @return The feature at the given index.
*/
public java.lang.String getFeature(int index) {
return feature_.get(index);
}
/**
* repeated string feature = 3;
* @param index The index of the value to return.
* @return The bytes of the feature at the given index.
*/
public com.google.protobuf.ByteString
getFeatureBytes(int index) {
return feature_.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;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeBool(1, issuesAsError_);
}
for (int i = 0; i < type_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_.getRaw(i));
}
for (int i = 0; i < feature_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, feature_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(1, issuesAsError_);
}
{
int dataSize = 0;
for (int i = 0; i < type_.size(); i++) {
dataSize += computeStringSizeNoTag(type_.getRaw(i));
}
size += dataSize;
size += 1 * getTypeList().size();
}
{
int dataSize = 0;
for (int i = 0; i < feature_.size(); i++) {
dataSize += computeStringSizeNoTag(feature_.getRaw(i));
}
size += dataSize;
size += 1 * getFeatureList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.MediaQuerySpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.MediaQuerySpec other = (dev.amp.validator.ValidatorProtos.MediaQuerySpec) obj;
if (hasIssuesAsError() != other.hasIssuesAsError()) return false;
if (hasIssuesAsError()) {
if (getIssuesAsError()
!= other.getIssuesAsError()) return false;
}
if (!getTypeList()
.equals(other.getTypeList())) return false;
if (!getFeatureList()
.equals(other.getFeatureList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasIssuesAsError()) {
hash = (37 * hash) + ISSUES_AS_ERROR_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getIssuesAsError());
}
if (getTypeCount() > 0) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + getTypeList().hashCode();
}
if (getFeatureCount() > 0) {
hash = (37 * hash) + FEATURE_FIELD_NUMBER;
hash = (53 * hash) + getFeatureList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.MediaQuerySpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.MediaQuerySpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.MediaQuerySpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.MediaQuerySpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.MediaQuerySpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.MediaQuerySpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.MediaQuerySpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.MediaQuerySpec 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 dev.amp.validator.ValidatorProtos.MediaQuerySpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.MediaQuerySpec 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 dev.amp.validator.ValidatorProtos.MediaQuerySpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.MediaQuerySpec 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(dev.amp.validator.ValidatorProtos.MediaQuerySpec 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;
}
/**
*
* This spec is used when parsing a media query inside a CSS @media rule.
* NEXT AVAILABLE TAG: 5
*
*
* Protobuf type {@code amp.validator.MediaQuerySpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.MediaQuerySpec)
dev.amp.validator.ValidatorProtos.MediaQuerySpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_MediaQuerySpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_MediaQuerySpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.MediaQuerySpec.class, dev.amp.validator.ValidatorProtos.MediaQuerySpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.MediaQuerySpec.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
issuesAsError_ = false;
type_ =
com.google.protobuf.LazyStringArrayList.emptyList();
feature_ =
com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_MediaQuerySpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.MediaQuerySpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.MediaQuerySpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.MediaQuerySpec build() {
dev.amp.validator.ValidatorProtos.MediaQuerySpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.MediaQuerySpec buildPartial() {
dev.amp.validator.ValidatorProtos.MediaQuerySpec result = new dev.amp.validator.ValidatorProtos.MediaQuerySpec(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.MediaQuerySpec result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.issuesAsError_ = issuesAsError_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
type_.makeImmutable();
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
feature_.makeImmutable();
result.feature_ = feature_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.MediaQuerySpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.MediaQuerySpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.MediaQuerySpec other) {
if (other == dev.amp.validator.ValidatorProtos.MediaQuerySpec.getDefaultInstance()) return this;
if (other.hasIssuesAsError()) {
setIssuesAsError(other.getIssuesAsError());
}
if (!other.type_.isEmpty()) {
if (type_.isEmpty()) {
type_ = other.type_;
bitField0_ |= 0x00000002;
} else {
ensureTypeIsMutable();
type_.addAll(other.type_);
}
onChanged();
}
if (!other.feature_.isEmpty()) {
if (feature_.isEmpty()) {
feature_ = other.feature_;
bitField0_ |= 0x00000004;
} else {
ensureFeatureIsMutable();
feature_.addAll(other.feature_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
issuesAsError_ = input.readBool();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureTypeIsMutable();
type_.add(bs);
break;
} // case 18
case 26: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureFeatureIsMutable();
feature_.add(bs);
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private boolean issuesAsError_ ;
/**
*
* If issues_as_error is true, then parsing errors and invalid
* types / features will be treated as validator errors, otherwise warnings.
*
*
* optional bool issues_as_error = 1 [default = false];
* @return Whether the issuesAsError field is set.
*/
@java.lang.Override
public boolean hasIssuesAsError() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* If issues_as_error is true, then parsing errors and invalid
* types / features will be treated as validator errors, otherwise warnings.
*
*
* optional bool issues_as_error = 1 [default = false];
* @return The issuesAsError.
*/
@java.lang.Override
public boolean getIssuesAsError() {
return issuesAsError_;
}
/**
*
* If issues_as_error is true, then parsing errors and invalid
* types / features will be treated as validator errors, otherwise warnings.
*
*
* optional bool issues_as_error = 1 [default = false];
* @param value The issuesAsError to set.
* @return This builder for chaining.
*/
public Builder setIssuesAsError(boolean value) {
issuesAsError_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* If issues_as_error is true, then parsing errors and invalid
* types / features will be treated as validator errors, otherwise warnings.
*
*
* optional bool issues_as_error = 1 [default = false];
* @return This builder for chaining.
*/
public Builder clearIssuesAsError() {
bitField0_ = (bitField0_ & ~0x00000001);
issuesAsError_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList type_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureTypeIsMutable() {
if (!type_.isModifiable()) {
type_ = new com.google.protobuf.LazyStringArrayList(type_);
}
bitField0_ |= 0x00000002;
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @return A list containing the type.
*/
public com.google.protobuf.ProtocolStringList
getTypeList() {
type_.makeImmutable();
return type_;
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @return The count of type.
*/
public int getTypeCount() {
return type_.size();
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @param index The index of the element to return.
* @return The type at the given index.
*/
public java.lang.String getType(int index) {
return type_.get(index);
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @param index The index of the value to return.
* @return The bytes of the type at the given index.
*/
public com.google.protobuf.ByteString
getTypeBytes(int index) {
return type_.getByteString(index);
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @param index The index to set the value at.
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureTypeIsMutable();
type_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @param value The type to add.
* @return This builder for chaining.
*/
public Builder addType(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureTypeIsMutable();
type_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @param values The type to add.
* @return This builder for chaining.
*/
public Builder addAllType(
java.lang.Iterable values) {
ensureTypeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, type_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @return This builder for chaining.
*/
public Builder clearType() {
type_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* These are the media query types and features allowed within the stylesheet.
* http://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries#Syntax
*
*
* repeated string type = 2;
* @param value The bytes of the type to add.
* @return This builder for chaining.
*/
public Builder addTypeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureTypeIsMutable();
type_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList feature_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureFeatureIsMutable() {
if (!feature_.isModifiable()) {
feature_ = new com.google.protobuf.LazyStringArrayList(feature_);
}
bitField0_ |= 0x00000004;
}
/**
* repeated string feature = 3;
* @return A list containing the feature.
*/
public com.google.protobuf.ProtocolStringList
getFeatureList() {
feature_.makeImmutable();
return feature_;
}
/**
* repeated string feature = 3;
* @return The count of feature.
*/
public int getFeatureCount() {
return feature_.size();
}
/**
* repeated string feature = 3;
* @param index The index of the element to return.
* @return The feature at the given index.
*/
public java.lang.String getFeature(int index) {
return feature_.get(index);
}
/**
* repeated string feature = 3;
* @param index The index of the value to return.
* @return The bytes of the feature at the given index.
*/
public com.google.protobuf.ByteString
getFeatureBytes(int index) {
return feature_.getByteString(index);
}
/**
* repeated string feature = 3;
* @param index The index to set the value at.
* @param value The feature to set.
* @return This builder for chaining.
*/
public Builder setFeature(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFeatureIsMutable();
feature_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* repeated string feature = 3;
* @param value The feature to add.
* @return This builder for chaining.
*/
public Builder addFeature(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFeatureIsMutable();
feature_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* repeated string feature = 3;
* @param values The feature to add.
* @return This builder for chaining.
*/
public Builder addAllFeature(
java.lang.Iterable values) {
ensureFeatureIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, feature_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* repeated string feature = 3;
* @return This builder for chaining.
*/
public Builder clearFeature() {
feature_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);;
onChanged();
return this;
}
/**
* repeated string feature = 3;
* @param value The bytes of the feature to add.
* @return This builder for chaining.
*/
public Builder addFeatureBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureFeatureIsMutable();
feature_.add(value);
bitField0_ |= 0x00000004;
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:amp.validator.MediaQuerySpec)
}
// @@protoc_insertion_point(class_scope:amp.validator.MediaQuerySpec)
private static final dev.amp.validator.ValidatorProtos.MediaQuerySpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.MediaQuerySpec();
}
public static dev.amp.validator.ValidatorProtos.MediaQuerySpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MediaQuerySpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.MediaQuerySpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SelectorSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.SelectorSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @return A list containing the attributeName.
*/
java.util.List
getAttributeNameList();
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @return The count of attributeName.
*/
int getAttributeNameCount();
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @param index The index of the element to return.
* @return The attributeName at the given index.
*/
java.lang.String getAttributeName(int index);
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @param index The index of the value to return.
* @return The bytes of the attributeName at the given index.
*/
com.google.protobuf.ByteString
getAttributeNameBytes(int index);
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @return A list containing the pseudoClass.
*/
java.util.List
getPseudoClassList();
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @return The count of pseudoClass.
*/
int getPseudoClassCount();
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @param index The index of the element to return.
* @return The pseudoClass at the given index.
*/
java.lang.String getPseudoClass(int index);
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @param index The index of the value to return.
* @return The bytes of the pseudoClass at the given index.
*/
com.google.protobuf.ByteString
getPseudoClassBytes(int index);
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @return A list containing the pseudoElement.
*/
java.util.List
getPseudoElementList();
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @return The count of pseudoElement.
*/
int getPseudoElementCount();
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @param index The index of the element to return.
* @return The pseudoElement at the given index.
*/
java.lang.String getPseudoElement(int index);
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @param index The index of the value to return.
* @return The bytes of the pseudoElement at the given index.
*/
com.google.protobuf.ByteString
getPseudoElementBytes(int index);
}
/**
*
* This spec is used when parsing a CSS selector group as the prelude of a CSS
* qualified rule. For example "div.foo span.bar". If no SelectorSpec is
* provided, the selector groups are unconstrained.
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf type {@code amp.validator.SelectorSpec}
*/
public static final class SelectorSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.SelectorSpec)
SelectorSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use SelectorSpec.newBuilder() to construct.
private SelectorSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private SelectorSpec() {
attributeName_ =
com.google.protobuf.LazyStringArrayList.emptyList();
pseudoClass_ =
com.google.protobuf.LazyStringArrayList.emptyList();
pseudoElement_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SelectorSpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_SelectorSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_SelectorSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.SelectorSpec.class, dev.amp.validator.ValidatorProtos.SelectorSpec.Builder.class);
}
public static final int ATTRIBUTE_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList attributeName_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @return A list containing the attributeName.
*/
public com.google.protobuf.ProtocolStringList
getAttributeNameList() {
return attributeName_;
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @return The count of attributeName.
*/
public int getAttributeNameCount() {
return attributeName_.size();
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @param index The index of the element to return.
* @return The attributeName at the given index.
*/
public java.lang.String getAttributeName(int index) {
return attributeName_.get(index);
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @param index The index of the value to return.
* @return The bytes of the attributeName at the given index.
*/
public com.google.protobuf.ByteString
getAttributeNameBytes(int index) {
return attributeName_.getByteString(index);
}
public static final int PSEUDO_CLASS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList pseudoClass_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @return A list containing the pseudoClass.
*/
public com.google.protobuf.ProtocolStringList
getPseudoClassList() {
return pseudoClass_;
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @return The count of pseudoClass.
*/
public int getPseudoClassCount() {
return pseudoClass_.size();
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @param index The index of the element to return.
* @return The pseudoClass at the given index.
*/
public java.lang.String getPseudoClass(int index) {
return pseudoClass_.get(index);
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @param index The index of the value to return.
* @return The bytes of the pseudoClass at the given index.
*/
public com.google.protobuf.ByteString
getPseudoClassBytes(int index) {
return pseudoClass_.getByteString(index);
}
public static final int PSEUDO_ELEMENT_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList pseudoElement_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @return A list containing the pseudoElement.
*/
public com.google.protobuf.ProtocolStringList
getPseudoElementList() {
return pseudoElement_;
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @return The count of pseudoElement.
*/
public int getPseudoElementCount() {
return pseudoElement_.size();
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @param index The index of the element to return.
* @return The pseudoElement at the given index.
*/
public java.lang.String getPseudoElement(int index) {
return pseudoElement_.get(index);
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @param index The index of the value to return.
* @return The bytes of the pseudoElement at the given index.
*/
public com.google.protobuf.ByteString
getPseudoElementBytes(int index) {
return pseudoElement_.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;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < attributeName_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributeName_.getRaw(i));
}
for (int i = 0; i < pseudoClass_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pseudoClass_.getRaw(i));
}
for (int i = 0; i < pseudoElement_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pseudoElement_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < attributeName_.size(); i++) {
dataSize += computeStringSizeNoTag(attributeName_.getRaw(i));
}
size += dataSize;
size += 1 * getAttributeNameList().size();
}
{
int dataSize = 0;
for (int i = 0; i < pseudoClass_.size(); i++) {
dataSize += computeStringSizeNoTag(pseudoClass_.getRaw(i));
}
size += dataSize;
size += 1 * getPseudoClassList().size();
}
{
int dataSize = 0;
for (int i = 0; i < pseudoElement_.size(); i++) {
dataSize += computeStringSizeNoTag(pseudoElement_.getRaw(i));
}
size += dataSize;
size += 1 * getPseudoElementList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.SelectorSpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.SelectorSpec other = (dev.amp.validator.ValidatorProtos.SelectorSpec) obj;
if (!getAttributeNameList()
.equals(other.getAttributeNameList())) return false;
if (!getPseudoClassList()
.equals(other.getPseudoClassList())) return false;
if (!getPseudoElementList()
.equals(other.getPseudoElementList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getAttributeNameCount() > 0) {
hash = (37 * hash) + ATTRIBUTE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getAttributeNameList().hashCode();
}
if (getPseudoClassCount() > 0) {
hash = (37 * hash) + PSEUDO_CLASS_FIELD_NUMBER;
hash = (53 * hash) + getPseudoClassList().hashCode();
}
if (getPseudoElementCount() > 0) {
hash = (37 * hash) + PSEUDO_ELEMENT_FIELD_NUMBER;
hash = (53 * hash) + getPseudoElementList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.SelectorSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.SelectorSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.SelectorSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.SelectorSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.SelectorSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.SelectorSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.SelectorSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.SelectorSpec 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 dev.amp.validator.ValidatorProtos.SelectorSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.SelectorSpec 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 dev.amp.validator.ValidatorProtos.SelectorSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.SelectorSpec 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(dev.amp.validator.ValidatorProtos.SelectorSpec 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;
}
/**
*
* This spec is used when parsing a CSS selector group as the prelude of a CSS
* qualified rule. For example "div.foo span.bar". If no SelectorSpec is
* provided, the selector groups are unconstrained.
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf type {@code amp.validator.SelectorSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.SelectorSpec)
dev.amp.validator.ValidatorProtos.SelectorSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_SelectorSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_SelectorSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.SelectorSpec.class, dev.amp.validator.ValidatorProtos.SelectorSpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.SelectorSpec.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
attributeName_ =
com.google.protobuf.LazyStringArrayList.emptyList();
pseudoClass_ =
com.google.protobuf.LazyStringArrayList.emptyList();
pseudoElement_ =
com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_SelectorSpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.SelectorSpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.SelectorSpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.SelectorSpec build() {
dev.amp.validator.ValidatorProtos.SelectorSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.SelectorSpec buildPartial() {
dev.amp.validator.ValidatorProtos.SelectorSpec result = new dev.amp.validator.ValidatorProtos.SelectorSpec(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.SelectorSpec result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
attributeName_.makeImmutable();
result.attributeName_ = attributeName_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
pseudoClass_.makeImmutable();
result.pseudoClass_ = pseudoClass_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
pseudoElement_.makeImmutable();
result.pseudoElement_ = pseudoElement_;
}
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.SelectorSpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.SelectorSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.SelectorSpec other) {
if (other == dev.amp.validator.ValidatorProtos.SelectorSpec.getDefaultInstance()) return this;
if (!other.attributeName_.isEmpty()) {
if (attributeName_.isEmpty()) {
attributeName_ = other.attributeName_;
bitField0_ |= 0x00000001;
} else {
ensureAttributeNameIsMutable();
attributeName_.addAll(other.attributeName_);
}
onChanged();
}
if (!other.pseudoClass_.isEmpty()) {
if (pseudoClass_.isEmpty()) {
pseudoClass_ = other.pseudoClass_;
bitField0_ |= 0x00000002;
} else {
ensurePseudoClassIsMutable();
pseudoClass_.addAll(other.pseudoClass_);
}
onChanged();
}
if (!other.pseudoElement_.isEmpty()) {
if (pseudoElement_.isEmpty()) {
pseudoElement_ = other.pseudoElement_;
bitField0_ |= 0x00000004;
} else {
ensurePseudoElementIsMutable();
pseudoElement_.addAll(other.pseudoElement_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureAttributeNameIsMutable();
attributeName_.add(bs);
break;
} // case 10
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
ensurePseudoClassIsMutable();
pseudoClass_.add(bs);
break;
} // case 18
case 26: {
com.google.protobuf.ByteString bs = input.readBytes();
ensurePseudoElementIsMutable();
pseudoElement_.add(bs);
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringArrayList attributeName_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureAttributeNameIsMutable() {
if (!attributeName_.isModifiable()) {
attributeName_ = new com.google.protobuf.LazyStringArrayList(attributeName_);
}
bitField0_ |= 0x00000001;
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @return A list containing the attributeName.
*/
public com.google.protobuf.ProtocolStringList
getAttributeNameList() {
attributeName_.makeImmutable();
return attributeName_;
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @return The count of attributeName.
*/
public int getAttributeNameCount() {
return attributeName_.size();
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @param index The index of the element to return.
* @return The attributeName at the given index.
*/
public java.lang.String getAttributeName(int index) {
return attributeName_.get(index);
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @param index The index of the value to return.
* @return The bytes of the attributeName at the given index.
*/
public com.google.protobuf.ByteString
getAttributeNameBytes(int index) {
return attributeName_.getByteString(index);
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @param index The index to set the value at.
* @param value The attributeName to set.
* @return This builder for chaining.
*/
public Builder setAttributeName(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureAttributeNameIsMutable();
attributeName_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @param value The attributeName to add.
* @return This builder for chaining.
*/
public Builder addAttributeName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureAttributeNameIsMutable();
attributeName_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @param values The attributeName to add.
* @return This builder for chaining.
*/
public Builder addAllAttributeName(
java.lang.Iterable values) {
ensureAttributeNameIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, attributeName_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @return This builder for chaining.
*/
public Builder clearAttributeName() {
attributeName_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
/**
*
* Allowed attribute selector names. For example `foo` in the selector
* `.a[foo=bar]`.
*
*
* repeated string attribute_name = 1;
* @param value The bytes of the attributeName to add.
* @return This builder for chaining.
*/
public Builder addAttributeNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureAttributeNameIsMutable();
attributeName_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList pseudoClass_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensurePseudoClassIsMutable() {
if (!pseudoClass_.isModifiable()) {
pseudoClass_ = new com.google.protobuf.LazyStringArrayList(pseudoClass_);
}
bitField0_ |= 0x00000002;
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @return A list containing the pseudoClass.
*/
public com.google.protobuf.ProtocolStringList
getPseudoClassList() {
pseudoClass_.makeImmutable();
return pseudoClass_;
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @return The count of pseudoClass.
*/
public int getPseudoClassCount() {
return pseudoClass_.size();
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @param index The index of the element to return.
* @return The pseudoClass at the given index.
*/
public java.lang.String getPseudoClass(int index) {
return pseudoClass_.get(index);
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @param index The index of the value to return.
* @return The bytes of the pseudoClass at the given index.
*/
public com.google.protobuf.ByteString
getPseudoClassBytes(int index) {
return pseudoClass_.getByteString(index);
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @param index The index to set the value at.
* @param value The pseudoClass to set.
* @return This builder for chaining.
*/
public Builder setPseudoClass(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePseudoClassIsMutable();
pseudoClass_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @param value The pseudoClass to add.
* @return This builder for chaining.
*/
public Builder addPseudoClass(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePseudoClassIsMutable();
pseudoClass_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @param values The pseudoClass to add.
* @return This builder for chaining.
*/
public Builder addAllPseudoClass(
java.lang.Iterable values) {
ensurePseudoClassIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, pseudoClass_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @return This builder for chaining.
*/
public Builder clearPseudoClass() {
pseudoClass_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* Allowed pseudo class names. For example `checked` in `.a:checked`.
*
*
* repeated string pseudo_class = 2;
* @param value The bytes of the pseudoClass to add.
* @return This builder for chaining.
*/
public Builder addPseudoClassBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensurePseudoClassIsMutable();
pseudoClass_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList pseudoElement_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensurePseudoElementIsMutable() {
if (!pseudoElement_.isModifiable()) {
pseudoElement_ = new com.google.protobuf.LazyStringArrayList(pseudoElement_);
}
bitField0_ |= 0x00000004;
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @return A list containing the pseudoElement.
*/
public com.google.protobuf.ProtocolStringList
getPseudoElementList() {
pseudoElement_.makeImmutable();
return pseudoElement_;
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @return The count of pseudoElement.
*/
public int getPseudoElementCount() {
return pseudoElement_.size();
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @param index The index of the element to return.
* @return The pseudoElement at the given index.
*/
public java.lang.String getPseudoElement(int index) {
return pseudoElement_.get(index);
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @param index The index of the value to return.
* @return The bytes of the pseudoElement at the given index.
*/
public com.google.protobuf.ByteString
getPseudoElementBytes(int index) {
return pseudoElement_.getByteString(index);
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @param index The index to set the value at.
* @param value The pseudoElement to set.
* @return This builder for chaining.
*/
public Builder setPseudoElement(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePseudoElementIsMutable();
pseudoElement_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @param value The pseudoElement to add.
* @return This builder for chaining.
*/
public Builder addPseudoElement(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePseudoElementIsMutable();
pseudoElement_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @param values The pseudoElement to add.
* @return This builder for chaining.
*/
public Builder addAllPseudoElement(
java.lang.Iterable values) {
ensurePseudoElementIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, pseudoElement_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @return This builder for chaining.
*/
public Builder clearPseudoElement() {
pseudoElement_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);;
onChanged();
return this;
}
/**
*
* Allowed pseudo element names. For example `before` in `.a::before`.
*
*
* repeated string pseudo_element = 3;
* @param value The bytes of the pseudoElement to add.
* @return This builder for chaining.
*/
public Builder addPseudoElementBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensurePseudoElementIsMutable();
pseudoElement_.add(value);
bitField0_ |= 0x00000004;
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:amp.validator.SelectorSpec)
}
// @@protoc_insertion_point(class_scope:amp.validator.SelectorSpec)
private static final dev.amp.validator.ValidatorProtos.SelectorSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.SelectorSpec();
}
public static dev.amp.validator.ValidatorProtos.SelectorSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SelectorSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.SelectorSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AtRuleSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.AtRuleSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
boolean hasName();
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
* @return Whether the mediaQuerySpec field is set.
*/
boolean hasMediaQuerySpec();
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
* @return The mediaQuerySpec.
*/
dev.amp.validator.ValidatorProtos.MediaQuerySpec getMediaQuerySpec();
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
*/
dev.amp.validator.ValidatorProtos.MediaQuerySpecOrBuilder getMediaQuerySpecOrBuilder();
}
/**
*
* This spec is used by our CSS parser to determine what AT rules are allowed
* in the CSS spec. The term 'rule' here refers to the AT Rule in CSS, not a
* validation rule.
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf type {@code amp.validator.AtRuleSpec}
*/
public static final class AtRuleSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.AtRuleSpec)
AtRuleSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use AtRuleSpec.newBuilder() to construct.
private AtRuleSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private AtRuleSpec() {
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AtRuleSpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AtRuleSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AtRuleSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AtRuleSpec.class, dev.amp.validator.ValidatorProtos.AtRuleSpec.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MEDIA_QUERY_SPEC_FIELD_NUMBER = 3;
private dev.amp.validator.ValidatorProtos.MediaQuerySpec mediaQuerySpec_;
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
* @return Whether the mediaQuerySpec field is set.
*/
@java.lang.Override
public boolean hasMediaQuerySpec() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
* @return The mediaQuerySpec.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.MediaQuerySpec getMediaQuerySpec() {
return mediaQuerySpec_ == null ? dev.amp.validator.ValidatorProtos.MediaQuerySpec.getDefaultInstance() : mediaQuerySpec_;
}
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.MediaQuerySpecOrBuilder getMediaQuerySpecOrBuilder() {
return mediaQuerySpec_ == null ? dev.amp.validator.ValidatorProtos.MediaQuerySpec.getDefaultInstance() : mediaQuerySpec_;
}
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)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getMediaQuerySpec());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getMediaQuerySpec());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.AtRuleSpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.AtRuleSpec other = (dev.amp.validator.ValidatorProtos.AtRuleSpec) obj;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (hasMediaQuerySpec() != other.hasMediaQuerySpec()) return false;
if (hasMediaQuerySpec()) {
if (!getMediaQuerySpec()
.equals(other.getMediaQuerySpec())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasMediaQuerySpec()) {
hash = (37 * hash) + MEDIA_QUERY_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getMediaQuerySpec().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.AtRuleSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AtRuleSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AtRuleSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AtRuleSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AtRuleSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AtRuleSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AtRuleSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AtRuleSpec 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 dev.amp.validator.ValidatorProtos.AtRuleSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AtRuleSpec 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 dev.amp.validator.ValidatorProtos.AtRuleSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AtRuleSpec 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(dev.amp.validator.ValidatorProtos.AtRuleSpec 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;
}
/**
*
* This spec is used by our CSS parser to determine what AT rules are allowed
* in the CSS spec. The term 'rule' here refers to the AT Rule in CSS, not a
* validation rule.
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf type {@code amp.validator.AtRuleSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.AtRuleSpec)
dev.amp.validator.ValidatorProtos.AtRuleSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AtRuleSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AtRuleSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AtRuleSpec.class, dev.amp.validator.ValidatorProtos.AtRuleSpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.AtRuleSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getMediaQuerySpecFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
mediaQuerySpec_ = null;
if (mediaQuerySpecBuilder_ != null) {
mediaQuerySpecBuilder_.dispose();
mediaQuerySpecBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AtRuleSpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AtRuleSpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.AtRuleSpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AtRuleSpec build() {
dev.amp.validator.ValidatorProtos.AtRuleSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AtRuleSpec buildPartial() {
dev.amp.validator.ValidatorProtos.AtRuleSpec result = new dev.amp.validator.ValidatorProtos.AtRuleSpec(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.AtRuleSpec result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.mediaQuerySpec_ = mediaQuerySpecBuilder_ == null
? mediaQuerySpec_
: mediaQuerySpecBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.AtRuleSpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.AtRuleSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.AtRuleSpec other) {
if (other == dev.amp.validator.ValidatorProtos.AtRuleSpec.getDefaultInstance()) return this;
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasMediaQuerySpec()) {
mergeMediaQuerySpec(other.getMediaQuerySpec());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 26: {
input.readMessage(
getMediaQuerySpecFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 26
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Name of the AT rule to parse. Do not include the '@' symbol (e.g. '@media'
* should be encoded as 'media'.
*
*
* optional string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private dev.amp.validator.ValidatorProtos.MediaQuerySpec mediaQuerySpec_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.MediaQuerySpec, dev.amp.validator.ValidatorProtos.MediaQuerySpec.Builder, dev.amp.validator.ValidatorProtos.MediaQuerySpecOrBuilder> mediaQuerySpecBuilder_;
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
* @return Whether the mediaQuerySpec field is set.
*/
public boolean hasMediaQuerySpec() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
* @return The mediaQuerySpec.
*/
public dev.amp.validator.ValidatorProtos.MediaQuerySpec getMediaQuerySpec() {
if (mediaQuerySpecBuilder_ == null) {
return mediaQuerySpec_ == null ? dev.amp.validator.ValidatorProtos.MediaQuerySpec.getDefaultInstance() : mediaQuerySpec_;
} else {
return mediaQuerySpecBuilder_.getMessage();
}
}
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
*/
public Builder setMediaQuerySpec(dev.amp.validator.ValidatorProtos.MediaQuerySpec value) {
if (mediaQuerySpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
mediaQuerySpec_ = value;
} else {
mediaQuerySpecBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
*/
public Builder setMediaQuerySpec(
dev.amp.validator.ValidatorProtos.MediaQuerySpec.Builder builderForValue) {
if (mediaQuerySpecBuilder_ == null) {
mediaQuerySpec_ = builderForValue.build();
} else {
mediaQuerySpecBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
*/
public Builder mergeMediaQuerySpec(dev.amp.validator.ValidatorProtos.MediaQuerySpec value) {
if (mediaQuerySpecBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
mediaQuerySpec_ != null &&
mediaQuerySpec_ != dev.amp.validator.ValidatorProtos.MediaQuerySpec.getDefaultInstance()) {
getMediaQuerySpecBuilder().mergeFrom(value);
} else {
mediaQuerySpec_ = value;
}
} else {
mediaQuerySpecBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
*/
public Builder clearMediaQuerySpec() {
bitField0_ = (bitField0_ & ~0x00000002);
mediaQuerySpec_ = null;
if (mediaQuerySpecBuilder_ != null) {
mediaQuerySpecBuilder_.dispose();
mediaQuerySpecBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
*/
public dev.amp.validator.ValidatorProtos.MediaQuerySpec.Builder getMediaQuerySpecBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getMediaQuerySpecFieldBuilder().getBuilder();
}
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
*/
public dev.amp.validator.ValidatorProtos.MediaQuerySpecOrBuilder getMediaQuerySpecOrBuilder() {
if (mediaQuerySpecBuilder_ != null) {
return mediaQuerySpecBuilder_.getMessageOrBuilder();
} else {
return mediaQuerySpec_ == null ?
dev.amp.validator.ValidatorProtos.MediaQuerySpec.getDefaultInstance() : mediaQuerySpec_;
}
}
/**
*
* A MediaQuerySpec may only be set for an AtRuleSpec with the name
* "media". If not set, media queries will be left unparsed, so no errors or
* warnings about them will be reported.
*
*
* optional .amp.validator.MediaQuerySpec media_query_spec = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.MediaQuerySpec, dev.amp.validator.ValidatorProtos.MediaQuerySpec.Builder, dev.amp.validator.ValidatorProtos.MediaQuerySpecOrBuilder>
getMediaQuerySpecFieldBuilder() {
if (mediaQuerySpecBuilder_ == null) {
mediaQuerySpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.MediaQuerySpec, dev.amp.validator.ValidatorProtos.MediaQuerySpec.Builder, dev.amp.validator.ValidatorProtos.MediaQuerySpecOrBuilder>(
getMediaQuerySpec(),
getParentForChildren(),
isClean());
mediaQuerySpec_ = null;
}
return mediaQuerySpecBuilder_;
}
@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:amp.validator.AtRuleSpec)
}
// @@protoc_insertion_point(class_scope:amp.validator.AtRuleSpec)
private static final dev.amp.validator.ValidatorProtos.AtRuleSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.AtRuleSpec();
}
public static dev.amp.validator.ValidatorProtos.AtRuleSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AtRuleSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AtRuleSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CssSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.CssSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
java.util.List
getAtRuleSpecList();
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
dev.amp.validator.ValidatorProtos.AtRuleSpec getAtRuleSpec(int index);
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
int getAtRuleSpecCount();
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
java.util.List
getAtRuleSpecOrBuilderList();
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
dev.amp.validator.ValidatorProtos.AtRuleSpecOrBuilder getAtRuleSpecOrBuilder(
int index);
/**
*
* Enables checks specific to the draft A4A specification.
* TODO(powdercloud): Make this more generic.
*
*
* optional bool validate_amp4ads = 5;
* @return Whether the validateAmp4ads field is set.
*/
boolean hasValidateAmp4Ads();
/**
*
* Enables checks specific to the draft A4A specification.
* TODO(powdercloud): Make this more generic.
*
*
* optional bool validate_amp4ads = 5;
* @return The validateAmp4ads.
*/
boolean getValidateAmp4Ads();
/**
*
* Enables checks specific to the style[keyframes] specification.
* TODO(chenshay): Make this more generic.
*
*
* optional bool validate_keyframes = 6;
* @return Whether the validateKeyframes field is set.
*/
boolean hasValidateKeyframes();
/**
*
* Enables checks specific to the style[keyframes] specification.
* TODO(chenshay): Make this more generic.
*
*
* optional bool validate_keyframes = 6;
* @return The validateKeyframes.
*/
boolean getValidateKeyframes();
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @return A list containing the declaration.
*/
java.util.List
getDeclarationList();
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @return The count of declaration.
*/
int getDeclarationCount();
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @param index The index of the element to return.
* @return The declaration at the given index.
*/
java.lang.String getDeclaration(int index);
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @param index The index of the value to return.
* @return The bytes of the declaration at the given index.
*/
com.google.protobuf.ByteString
getDeclarationBytes(int index);
/**
*
* If fase, declarations tagged with `!important` are considered errors.
* Most AMP stylesheets disallow `!important` to reserve this override
* for AMP's own styles.
*
*
* optional bool allow_important = 8 [default = false];
* @return Whether the allowImportant field is set.
*/
boolean hasAllowImportant();
/**
*
* If fase, declarations tagged with `!important` are considered errors.
* Most AMP stylesheets disallow `!important` to reserve this override
* for AMP's own styles.
*
*
* optional bool allow_important = 8 [default = false];
* @return The allowImportant.
*/
boolean getAllowImportant();
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
* @return Whether the selectorSpec field is set.
*/
boolean hasSelectorSpec();
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
* @return The selectorSpec.
*/
dev.amp.validator.ValidatorProtos.SelectorSpec getSelectorSpec();
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
*/
dev.amp.validator.ValidatorProtos.SelectorSpecOrBuilder getSelectorSpecOrBuilder();
}
/**
*
* NEXT AVAILABLE TAG: 10
*
*
* Protobuf type {@code amp.validator.CssSpec}
*/
public static final class CssSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.CssSpec)
CssSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use CssSpec.newBuilder() to construct.
private CssSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private CssSpec() {
atRuleSpec_ = java.util.Collections.emptyList();
declaration_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CssSpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CssSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CssSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.CssSpec.class, dev.amp.validator.ValidatorProtos.CssSpec.Builder.class);
}
private int bitField0_;
public static final int AT_RULE_SPEC_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List atRuleSpec_;
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
@java.lang.Override
public java.util.List getAtRuleSpecList() {
return atRuleSpec_;
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
@java.lang.Override
public java.util.List
getAtRuleSpecOrBuilderList() {
return atRuleSpec_;
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
@java.lang.Override
public int getAtRuleSpecCount() {
return atRuleSpec_.size();
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AtRuleSpec getAtRuleSpec(int index) {
return atRuleSpec_.get(index);
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AtRuleSpecOrBuilder getAtRuleSpecOrBuilder(
int index) {
return atRuleSpec_.get(index);
}
public static final int VALIDATE_AMP4ADS_FIELD_NUMBER = 5;
private boolean validateAmp4Ads_ = false;
/**
*
* Enables checks specific to the draft A4A specification.
* TODO(powdercloud): Make this more generic.
*
*
* optional bool validate_amp4ads = 5;
* @return Whether the validateAmp4ads field is set.
*/
@java.lang.Override
public boolean hasValidateAmp4Ads() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Enables checks specific to the draft A4A specification.
* TODO(powdercloud): Make this more generic.
*
*
* optional bool validate_amp4ads = 5;
* @return The validateAmp4ads.
*/
@java.lang.Override
public boolean getValidateAmp4Ads() {
return validateAmp4Ads_;
}
public static final int VALIDATE_KEYFRAMES_FIELD_NUMBER = 6;
private boolean validateKeyframes_ = false;
/**
*
* Enables checks specific to the style[keyframes] specification.
* TODO(chenshay): Make this more generic.
*
*
* optional bool validate_keyframes = 6;
* @return Whether the validateKeyframes field is set.
*/
@java.lang.Override
public boolean hasValidateKeyframes() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Enables checks specific to the style[keyframes] specification.
* TODO(chenshay): Make this more generic.
*
*
* optional bool validate_keyframes = 6;
* @return The validateKeyframes.
*/
@java.lang.Override
public boolean getValidateKeyframes() {
return validateKeyframes_;
}
public static final int DECLARATION_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList declaration_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @return A list containing the declaration.
*/
public com.google.protobuf.ProtocolStringList
getDeclarationList() {
return declaration_;
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @return The count of declaration.
*/
public int getDeclarationCount() {
return declaration_.size();
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @param index The index of the element to return.
* @return The declaration at the given index.
*/
public java.lang.String getDeclaration(int index) {
return declaration_.get(index);
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @param index The index of the value to return.
* @return The bytes of the declaration at the given index.
*/
public com.google.protobuf.ByteString
getDeclarationBytes(int index) {
return declaration_.getByteString(index);
}
public static final int ALLOW_IMPORTANT_FIELD_NUMBER = 8;
private boolean allowImportant_ = false;
/**
*
* If fase, declarations tagged with `!important` are considered errors.
* Most AMP stylesheets disallow `!important` to reserve this override
* for AMP's own styles.
*
*
* optional bool allow_important = 8 [default = false];
* @return Whether the allowImportant field is set.
*/
@java.lang.Override
public boolean hasAllowImportant() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* If fase, declarations tagged with `!important` are considered errors.
* Most AMP stylesheets disallow `!important` to reserve this override
* for AMP's own styles.
*
*
* optional bool allow_important = 8 [default = false];
* @return The allowImportant.
*/
@java.lang.Override
public boolean getAllowImportant() {
return allowImportant_;
}
public static final int SELECTOR_SPEC_FIELD_NUMBER = 9;
private dev.amp.validator.ValidatorProtos.SelectorSpec selectorSpec_;
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
* @return Whether the selectorSpec field is set.
*/
@java.lang.Override
public boolean hasSelectorSpec() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
* @return The selectorSpec.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.SelectorSpec getSelectorSpec() {
return selectorSpec_ == null ? dev.amp.validator.ValidatorProtos.SelectorSpec.getDefaultInstance() : selectorSpec_;
}
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.SelectorSpecOrBuilder getSelectorSpecOrBuilder() {
return selectorSpec_ == null ? dev.amp.validator.ValidatorProtos.SelectorSpec.getDefaultInstance() : selectorSpec_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < atRuleSpec_.size(); i++) {
output.writeMessage(1, atRuleSpec_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeBool(5, validateAmp4Ads_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeBool(6, validateKeyframes_);
}
for (int i = 0; i < declaration_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, declaration_.getRaw(i));
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeBool(8, allowImportant_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(9, getSelectorSpec());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < atRuleSpec_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, atRuleSpec_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, validateAmp4Ads_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, validateKeyframes_);
}
{
int dataSize = 0;
for (int i = 0; i < declaration_.size(); i++) {
dataSize += computeStringSizeNoTag(declaration_.getRaw(i));
}
size += dataSize;
size += 1 * getDeclarationList().size();
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(8, allowImportant_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getSelectorSpec());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.CssSpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.CssSpec other = (dev.amp.validator.ValidatorProtos.CssSpec) obj;
if (!getAtRuleSpecList()
.equals(other.getAtRuleSpecList())) return false;
if (hasValidateAmp4Ads() != other.hasValidateAmp4Ads()) return false;
if (hasValidateAmp4Ads()) {
if (getValidateAmp4Ads()
!= other.getValidateAmp4Ads()) return false;
}
if (hasValidateKeyframes() != other.hasValidateKeyframes()) return false;
if (hasValidateKeyframes()) {
if (getValidateKeyframes()
!= other.getValidateKeyframes()) return false;
}
if (!getDeclarationList()
.equals(other.getDeclarationList())) return false;
if (hasAllowImportant() != other.hasAllowImportant()) return false;
if (hasAllowImportant()) {
if (getAllowImportant()
!= other.getAllowImportant()) return false;
}
if (hasSelectorSpec() != other.hasSelectorSpec()) return false;
if (hasSelectorSpec()) {
if (!getSelectorSpec()
.equals(other.getSelectorSpec())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getAtRuleSpecCount() > 0) {
hash = (37 * hash) + AT_RULE_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getAtRuleSpecList().hashCode();
}
if (hasValidateAmp4Ads()) {
hash = (37 * hash) + VALIDATE_AMP4ADS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getValidateAmp4Ads());
}
if (hasValidateKeyframes()) {
hash = (37 * hash) + VALIDATE_KEYFRAMES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getValidateKeyframes());
}
if (getDeclarationCount() > 0) {
hash = (37 * hash) + DECLARATION_FIELD_NUMBER;
hash = (53 * hash) + getDeclarationList().hashCode();
}
if (hasAllowImportant()) {
hash = (37 * hash) + ALLOW_IMPORTANT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getAllowImportant());
}
if (hasSelectorSpec()) {
hash = (37 * hash) + SELECTOR_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getSelectorSpec().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.CssSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.CssSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.CssSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.CssSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.CssSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.CssSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.CssSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.CssSpec 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 dev.amp.validator.ValidatorProtos.CssSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.CssSpec 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 dev.amp.validator.ValidatorProtos.CssSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.CssSpec 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(dev.amp.validator.ValidatorProtos.CssSpec 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;
}
/**
*
* NEXT AVAILABLE TAG: 10
*
*
* Protobuf type {@code amp.validator.CssSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.CssSpec)
dev.amp.validator.ValidatorProtos.CssSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CssSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CssSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.CssSpec.class, dev.amp.validator.ValidatorProtos.CssSpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.CssSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getAtRuleSpecFieldBuilder();
getSelectorSpecFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (atRuleSpecBuilder_ == null) {
atRuleSpec_ = java.util.Collections.emptyList();
} else {
atRuleSpec_ = null;
atRuleSpecBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
validateAmp4Ads_ = false;
validateKeyframes_ = false;
declaration_ =
com.google.protobuf.LazyStringArrayList.emptyList();
allowImportant_ = false;
selectorSpec_ = null;
if (selectorSpecBuilder_ != null) {
selectorSpecBuilder_.dispose();
selectorSpecBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CssSpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssSpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.CssSpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssSpec build() {
dev.amp.validator.ValidatorProtos.CssSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssSpec buildPartial() {
dev.amp.validator.ValidatorProtos.CssSpec result = new dev.amp.validator.ValidatorProtos.CssSpec(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.amp.validator.ValidatorProtos.CssSpec result) {
if (atRuleSpecBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
atRuleSpec_ = java.util.Collections.unmodifiableList(atRuleSpec_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.atRuleSpec_ = atRuleSpec_;
} else {
result.atRuleSpec_ = atRuleSpecBuilder_.build();
}
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.CssSpec result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.validateAmp4Ads_ = validateAmp4Ads_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.validateKeyframes_ = validateKeyframes_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
declaration_.makeImmutable();
result.declaration_ = declaration_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.allowImportant_ = allowImportant_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.selectorSpec_ = selectorSpecBuilder_ == null
? selectorSpec_
: selectorSpecBuilder_.build();
to_bitField0_ |= 0x00000008;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.CssSpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.CssSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.CssSpec other) {
if (other == dev.amp.validator.ValidatorProtos.CssSpec.getDefaultInstance()) return this;
if (atRuleSpecBuilder_ == null) {
if (!other.atRuleSpec_.isEmpty()) {
if (atRuleSpec_.isEmpty()) {
atRuleSpec_ = other.atRuleSpec_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAtRuleSpecIsMutable();
atRuleSpec_.addAll(other.atRuleSpec_);
}
onChanged();
}
} else {
if (!other.atRuleSpec_.isEmpty()) {
if (atRuleSpecBuilder_.isEmpty()) {
atRuleSpecBuilder_.dispose();
atRuleSpecBuilder_ = null;
atRuleSpec_ = other.atRuleSpec_;
bitField0_ = (bitField0_ & ~0x00000001);
atRuleSpecBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getAtRuleSpecFieldBuilder() : null;
} else {
atRuleSpecBuilder_.addAllMessages(other.atRuleSpec_);
}
}
}
if (other.hasValidateAmp4Ads()) {
setValidateAmp4Ads(other.getValidateAmp4Ads());
}
if (other.hasValidateKeyframes()) {
setValidateKeyframes(other.getValidateKeyframes());
}
if (!other.declaration_.isEmpty()) {
if (declaration_.isEmpty()) {
declaration_ = other.declaration_;
bitField0_ |= 0x00000008;
} else {
ensureDeclarationIsMutable();
declaration_.addAll(other.declaration_);
}
onChanged();
}
if (other.hasAllowImportant()) {
setAllowImportant(other.getAllowImportant());
}
if (other.hasSelectorSpec()) {
mergeSelectorSpec(other.getSelectorSpec());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
dev.amp.validator.ValidatorProtos.AtRuleSpec m =
input.readMessage(
dev.amp.validator.ValidatorProtos.AtRuleSpec.PARSER,
extensionRegistry);
if (atRuleSpecBuilder_ == null) {
ensureAtRuleSpecIsMutable();
atRuleSpec_.add(m);
} else {
atRuleSpecBuilder_.addMessage(m);
}
break;
} // case 10
case 40: {
validateAmp4Ads_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 40
case 48: {
validateKeyframes_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 48
case 58: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureDeclarationIsMutable();
declaration_.add(bs);
break;
} // case 58
case 64: {
allowImportant_ = input.readBool();
bitField0_ |= 0x00000010;
break;
} // case 64
case 74: {
input.readMessage(
getSelectorSpecFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 74
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List atRuleSpec_ =
java.util.Collections.emptyList();
private void ensureAtRuleSpecIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
atRuleSpec_ = new java.util.ArrayList(atRuleSpec_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AtRuleSpec, dev.amp.validator.ValidatorProtos.AtRuleSpec.Builder, dev.amp.validator.ValidatorProtos.AtRuleSpecOrBuilder> atRuleSpecBuilder_;
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public java.util.List getAtRuleSpecList() {
if (atRuleSpecBuilder_ == null) {
return java.util.Collections.unmodifiableList(atRuleSpec_);
} else {
return atRuleSpecBuilder_.getMessageList();
}
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public int getAtRuleSpecCount() {
if (atRuleSpecBuilder_ == null) {
return atRuleSpec_.size();
} else {
return atRuleSpecBuilder_.getCount();
}
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public dev.amp.validator.ValidatorProtos.AtRuleSpec getAtRuleSpec(int index) {
if (atRuleSpecBuilder_ == null) {
return atRuleSpec_.get(index);
} else {
return atRuleSpecBuilder_.getMessage(index);
}
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public Builder setAtRuleSpec(
int index, dev.amp.validator.ValidatorProtos.AtRuleSpec value) {
if (atRuleSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAtRuleSpecIsMutable();
atRuleSpec_.set(index, value);
onChanged();
} else {
atRuleSpecBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public Builder setAtRuleSpec(
int index, dev.amp.validator.ValidatorProtos.AtRuleSpec.Builder builderForValue) {
if (atRuleSpecBuilder_ == null) {
ensureAtRuleSpecIsMutable();
atRuleSpec_.set(index, builderForValue.build());
onChanged();
} else {
atRuleSpecBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public Builder addAtRuleSpec(dev.amp.validator.ValidatorProtos.AtRuleSpec value) {
if (atRuleSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAtRuleSpecIsMutable();
atRuleSpec_.add(value);
onChanged();
} else {
atRuleSpecBuilder_.addMessage(value);
}
return this;
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public Builder addAtRuleSpec(
int index, dev.amp.validator.ValidatorProtos.AtRuleSpec value) {
if (atRuleSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAtRuleSpecIsMutable();
atRuleSpec_.add(index, value);
onChanged();
} else {
atRuleSpecBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public Builder addAtRuleSpec(
dev.amp.validator.ValidatorProtos.AtRuleSpec.Builder builderForValue) {
if (atRuleSpecBuilder_ == null) {
ensureAtRuleSpecIsMutable();
atRuleSpec_.add(builderForValue.build());
onChanged();
} else {
atRuleSpecBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public Builder addAtRuleSpec(
int index, dev.amp.validator.ValidatorProtos.AtRuleSpec.Builder builderForValue) {
if (atRuleSpecBuilder_ == null) {
ensureAtRuleSpecIsMutable();
atRuleSpec_.add(index, builderForValue.build());
onChanged();
} else {
atRuleSpecBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public Builder addAllAtRuleSpec(
java.lang.Iterable values) {
if (atRuleSpecBuilder_ == null) {
ensureAtRuleSpecIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, atRuleSpec_);
onChanged();
} else {
atRuleSpecBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public Builder clearAtRuleSpec() {
if (atRuleSpecBuilder_ == null) {
atRuleSpec_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
atRuleSpecBuilder_.clear();
}
return this;
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public Builder removeAtRuleSpec(int index) {
if (atRuleSpecBuilder_ == null) {
ensureAtRuleSpecIsMutable();
atRuleSpec_.remove(index);
onChanged();
} else {
atRuleSpecBuilder_.remove(index);
}
return this;
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public dev.amp.validator.ValidatorProtos.AtRuleSpec.Builder getAtRuleSpecBuilder(
int index) {
return getAtRuleSpecFieldBuilder().getBuilder(index);
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public dev.amp.validator.ValidatorProtos.AtRuleSpecOrBuilder getAtRuleSpecOrBuilder(
int index) {
if (atRuleSpecBuilder_ == null) {
return atRuleSpec_.get(index); } else {
return atRuleSpecBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public java.util.List
getAtRuleSpecOrBuilderList() {
if (atRuleSpecBuilder_ != null) {
return atRuleSpecBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(atRuleSpec_);
}
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public dev.amp.validator.ValidatorProtos.AtRuleSpec.Builder addAtRuleSpecBuilder() {
return getAtRuleSpecFieldBuilder().addBuilder(
dev.amp.validator.ValidatorProtos.AtRuleSpec.getDefaultInstance());
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public dev.amp.validator.ValidatorProtos.AtRuleSpec.Builder addAtRuleSpecBuilder(
int index) {
return getAtRuleSpecFieldBuilder().addBuilder(
index, dev.amp.validator.ValidatorProtos.AtRuleSpec.getDefaultInstance());
}
/**
*
* Spec for how to parse CSS AT rules, one per AT rule. Must not contain
* duplicate names, and must contain at least one entry for the default.
*
*
* repeated .amp.validator.AtRuleSpec at_rule_spec = 1;
*/
public java.util.List
getAtRuleSpecBuilderList() {
return getAtRuleSpecFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AtRuleSpec, dev.amp.validator.ValidatorProtos.AtRuleSpec.Builder, dev.amp.validator.ValidatorProtos.AtRuleSpecOrBuilder>
getAtRuleSpecFieldBuilder() {
if (atRuleSpecBuilder_ == null) {
atRuleSpecBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AtRuleSpec, dev.amp.validator.ValidatorProtos.AtRuleSpec.Builder, dev.amp.validator.ValidatorProtos.AtRuleSpecOrBuilder>(
atRuleSpec_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
atRuleSpec_ = null;
}
return atRuleSpecBuilder_;
}
private boolean validateAmp4Ads_ ;
/**
*
* Enables checks specific to the draft A4A specification.
* TODO(powdercloud): Make this more generic.
*
*
* optional bool validate_amp4ads = 5;
* @return Whether the validateAmp4ads field is set.
*/
@java.lang.Override
public boolean hasValidateAmp4Ads() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Enables checks specific to the draft A4A specification.
* TODO(powdercloud): Make this more generic.
*
*
* optional bool validate_amp4ads = 5;
* @return The validateAmp4ads.
*/
@java.lang.Override
public boolean getValidateAmp4Ads() {
return validateAmp4Ads_;
}
/**
*
* Enables checks specific to the draft A4A specification.
* TODO(powdercloud): Make this more generic.
*
*
* optional bool validate_amp4ads = 5;
* @param value The validateAmp4ads to set.
* @return This builder for chaining.
*/
public Builder setValidateAmp4Ads(boolean value) {
validateAmp4Ads_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Enables checks specific to the draft A4A specification.
* TODO(powdercloud): Make this more generic.
*
*
* optional bool validate_amp4ads = 5;
* @return This builder for chaining.
*/
public Builder clearValidateAmp4Ads() {
bitField0_ = (bitField0_ & ~0x00000002);
validateAmp4Ads_ = false;
onChanged();
return this;
}
private boolean validateKeyframes_ ;
/**
*
* Enables checks specific to the style[keyframes] specification.
* TODO(chenshay): Make this more generic.
*
*
* optional bool validate_keyframes = 6;
* @return Whether the validateKeyframes field is set.
*/
@java.lang.Override
public boolean hasValidateKeyframes() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Enables checks specific to the style[keyframes] specification.
* TODO(chenshay): Make this more generic.
*
*
* optional bool validate_keyframes = 6;
* @return The validateKeyframes.
*/
@java.lang.Override
public boolean getValidateKeyframes() {
return validateKeyframes_;
}
/**
*
* Enables checks specific to the style[keyframes] specification.
* TODO(chenshay): Make this more generic.
*
*
* optional bool validate_keyframes = 6;
* @param value The validateKeyframes to set.
* @return This builder for chaining.
*/
public Builder setValidateKeyframes(boolean value) {
validateKeyframes_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Enables checks specific to the style[keyframes] specification.
* TODO(chenshay): Make this more generic.
*
*
* optional bool validate_keyframes = 6;
* @return This builder for chaining.
*/
public Builder clearValidateKeyframes() {
bitField0_ = (bitField0_ & ~0x00000004);
validateKeyframes_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList declaration_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureDeclarationIsMutable() {
if (!declaration_.isModifiable()) {
declaration_ = new com.google.protobuf.LazyStringArrayList(declaration_);
}
bitField0_ |= 0x00000008;
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @return A list containing the declaration.
*/
public com.google.protobuf.ProtocolStringList
getDeclarationList() {
declaration_.makeImmutable();
return declaration_;
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @return The count of declaration.
*/
public int getDeclarationCount() {
return declaration_.size();
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @param index The index of the element to return.
* @return The declaration at the given index.
*/
public java.lang.String getDeclaration(int index) {
return declaration_.get(index);
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @param index The index of the value to return.
* @return The bytes of the declaration at the given index.
*/
public com.google.protobuf.ByteString
getDeclarationBytes(int index) {
return declaration_.getByteString(index);
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @param index The index to set the value at.
* @param value The declaration to set.
* @return This builder for chaining.
*/
public Builder setDeclaration(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureDeclarationIsMutable();
declaration_.set(index, value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @param value The declaration to add.
* @return This builder for chaining.
*/
public Builder addDeclaration(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureDeclarationIsMutable();
declaration_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @param values The declaration to add.
* @return This builder for chaining.
*/
public Builder addAllDeclaration(
java.lang.Iterable values) {
ensureDeclarationIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, declaration_);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @return This builder for chaining.
*/
public Builder clearDeclaration() {
declaration_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);;
onChanged();
return this;
}
/**
*
* Any declaration listed here are allowed.
*
*
* repeated string declaration = 7;
* @param value The bytes of the declaration to add.
* @return This builder for chaining.
*/
public Builder addDeclarationBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureDeclarationIsMutable();
declaration_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private boolean allowImportant_ ;
/**
*
* If fase, declarations tagged with `!important` are considered errors.
* Most AMP stylesheets disallow `!important` to reserve this override
* for AMP's own styles.
*
*
* optional bool allow_important = 8 [default = false];
* @return Whether the allowImportant field is set.
*/
@java.lang.Override
public boolean hasAllowImportant() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* If fase, declarations tagged with `!important` are considered errors.
* Most AMP stylesheets disallow `!important` to reserve this override
* for AMP's own styles.
*
*
* optional bool allow_important = 8 [default = false];
* @return The allowImportant.
*/
@java.lang.Override
public boolean getAllowImportant() {
return allowImportant_;
}
/**
*
* If fase, declarations tagged with `!important` are considered errors.
* Most AMP stylesheets disallow `!important` to reserve this override
* for AMP's own styles.
*
*
* optional bool allow_important = 8 [default = false];
* @param value The allowImportant to set.
* @return This builder for chaining.
*/
public Builder setAllowImportant(boolean value) {
allowImportant_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* If fase, declarations tagged with `!important` are considered errors.
* Most AMP stylesheets disallow `!important` to reserve this override
* for AMP's own styles.
*
*
* optional bool allow_important = 8 [default = false];
* @return This builder for chaining.
*/
public Builder clearAllowImportant() {
bitField0_ = (bitField0_ & ~0x00000010);
allowImportant_ = false;
onChanged();
return this;
}
private dev.amp.validator.ValidatorProtos.SelectorSpec selectorSpec_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.SelectorSpec, dev.amp.validator.ValidatorProtos.SelectorSpec.Builder, dev.amp.validator.ValidatorProtos.SelectorSpecOrBuilder> selectorSpecBuilder_;
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
* @return Whether the selectorSpec field is set.
*/
public boolean hasSelectorSpec() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
* @return The selectorSpec.
*/
public dev.amp.validator.ValidatorProtos.SelectorSpec getSelectorSpec() {
if (selectorSpecBuilder_ == null) {
return selectorSpec_ == null ? dev.amp.validator.ValidatorProtos.SelectorSpec.getDefaultInstance() : selectorSpec_;
} else {
return selectorSpecBuilder_.getMessage();
}
}
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
*/
public Builder setSelectorSpec(dev.amp.validator.ValidatorProtos.SelectorSpec value) {
if (selectorSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
selectorSpec_ = value;
} else {
selectorSpecBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
*/
public Builder setSelectorSpec(
dev.amp.validator.ValidatorProtos.SelectorSpec.Builder builderForValue) {
if (selectorSpecBuilder_ == null) {
selectorSpec_ = builderForValue.build();
} else {
selectorSpecBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
*/
public Builder mergeSelectorSpec(dev.amp.validator.ValidatorProtos.SelectorSpec value) {
if (selectorSpecBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
selectorSpec_ != null &&
selectorSpec_ != dev.amp.validator.ValidatorProtos.SelectorSpec.getDefaultInstance()) {
getSelectorSpecBuilder().mergeFrom(value);
} else {
selectorSpec_ = value;
}
} else {
selectorSpecBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
*/
public Builder clearSelectorSpec() {
bitField0_ = (bitField0_ & ~0x00000020);
selectorSpec_ = null;
if (selectorSpecBuilder_ != null) {
selectorSpecBuilder_.dispose();
selectorSpecBuilder_ = null;
}
onChanged();
return this;
}
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
*/
public dev.amp.validator.ValidatorProtos.SelectorSpec.Builder getSelectorSpecBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getSelectorSpecFieldBuilder().getBuilder();
}
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
*/
public dev.amp.validator.ValidatorProtos.SelectorSpecOrBuilder getSelectorSpecOrBuilder() {
if (selectorSpecBuilder_ != null) {
return selectorSpecBuilder_.getMessageOrBuilder();
} else {
return selectorSpec_ == null ?
dev.amp.validator.ValidatorProtos.SelectorSpec.getDefaultInstance() : selectorSpec_;
}
}
/**
* optional .amp.validator.SelectorSpec selector_spec = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.SelectorSpec, dev.amp.validator.ValidatorProtos.SelectorSpec.Builder, dev.amp.validator.ValidatorProtos.SelectorSpecOrBuilder>
getSelectorSpecFieldBuilder() {
if (selectorSpecBuilder_ == null) {
selectorSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.SelectorSpec, dev.amp.validator.ValidatorProtos.SelectorSpec.Builder, dev.amp.validator.ValidatorProtos.SelectorSpecOrBuilder>(
getSelectorSpec(),
getParentForChildren(),
isClean());
selectorSpec_ = null;
}
return selectorSpecBuilder_;
}
@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:amp.validator.CssSpec)
}
// @@protoc_insertion_point(class_scope:amp.validator.CssSpec)
private static final dev.amp.validator.ValidatorProtos.CssSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.CssSpec();
}
public static dev.amp.validator.ValidatorProtos.CssSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CssSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CdataSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.CdataSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* If set, the cdata contents cannot be greater than this length, in bytes. A
* value of -2 (default) indicates that there is no limit (unlimited). A value
* of -1 will always cause validation failure on match. -1 is used to
* implement the `amp-custom-length-check` attribute:
* (https://github.com/ampproject/amphtml/issues/22315#issuecomment-496681165)
*
*
* optional int32 max_bytes = 1 [default = -2];
* @return Whether the maxBytes field is set.
*/
boolean hasMaxBytes();
/**
*
* If set, the cdata contents cannot be greater than this length, in bytes. A
* value of -2 (default) indicates that there is no limit (unlimited). A value
* of -1 will always cause validation failure on match. -1 is used to
* implement the `amp-custom-length-check` attribute:
* (https://github.com/ampproject/amphtml/issues/22315#issuecomment-496681165)
*
*
* optional int32 max_bytes = 1 [default = -2];
* @return The maxBytes.
*/
int getMaxBytes();
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @return Whether the maxBytesSpecUrl field is set.
*/
boolean hasMaxBytesSpecUrl();
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @return The maxBytesSpecUrl.
*/
java.lang.String getMaxBytesSpecUrl();
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @return The bytes for maxBytesSpecUrl.
*/
com.google.protobuf.ByteString
getMaxBytesSpecUrlBytes();
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @return Whether the mandatoryCdata field is set.
*/
boolean hasMandatoryCdata();
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @return The mandatoryCdata.
*/
java.lang.String getMandatoryCdata();
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @return The bytes for mandatoryCdata.
*/
com.google.protobuf.ByteString
getMandatoryCdataBytes();
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @return Whether the cdataRegex field is set.
*/
boolean hasCdataRegex();
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @return The cdataRegex.
*/
java.lang.String getCdataRegex();
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @return The bytes for cdataRegex.
*/
com.google.protobuf.ByteString
getCdataRegexBytes();
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
* @return Whether the cssSpec field is set.
*/
boolean hasCssSpec();
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
* @return The cssSpec.
*/
dev.amp.validator.ValidatorProtos.CssSpec getCssSpec();
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
*/
dev.amp.validator.ValidatorProtos.CssSpecOrBuilder getCssSpecOrBuilder();
/**
*
* If set to true, then only whitespace may be in the cdata contents.
* This is useful for script tags that reference extensions etc.
*
*
* optional bool whitespace_only = 8;
* @return Whether the whitespaceOnly field is set.
*/
boolean hasWhitespaceOnly();
/**
*
* If set to true, then only whitespace may be in the cdata contents.
* This is useful for script tags that reference extensions etc.
*
*
* optional bool whitespace_only = 8;
* @return The whitespaceOnly.
*/
boolean getWhitespaceOnly();
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
java.util.List
getDisallowedCdataRegexList();
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex getDisallowedCdataRegex(int index);
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
int getDisallowedCdataRegexCount();
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
java.util.List
getDisallowedCdataRegexOrBuilderList();
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
dev.amp.validator.ValidatorProtos.DisallowedCDataRegexOrBuilder getDisallowedCdataRegexOrBuilder(
int index);
/**
*
* If true, the contents of this tag's CDATA text will be counted against the
* document level DocCssSpec CSS lengths.
*
*
* optional bool doc_css_bytes = 11;
* @return Whether the docCssBytes field is set.
*/
boolean hasDocCssBytes();
/**
*
* If true, the contents of this tag's CDATA text will be counted against the
* document level DocCssSpec CSS lengths.
*
*
* optional bool doc_css_bytes = 11;
* @return The docCssBytes.
*/
boolean getDocCssBytes();
}
/**
*
* NEXT AVAILABLE TAG: 12
*
*
* Protobuf type {@code amp.validator.CdataSpec}
*/
public static final class CdataSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.CdataSpec)
CdataSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use CdataSpec.newBuilder() to construct.
private CdataSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private CdataSpec() {
maxBytes_ = -2;
maxBytesSpecUrl_ = "";
mandatoryCdata_ = "";
cdataRegex_ = "";
disallowedCdataRegex_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CdataSpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CdataSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CdataSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.CdataSpec.class, dev.amp.validator.ValidatorProtos.CdataSpec.Builder.class);
}
private int bitField0_;
public static final int MAX_BYTES_FIELD_NUMBER = 1;
private int maxBytes_ = -2;
/**
*
* If set, the cdata contents cannot be greater than this length, in bytes. A
* value of -2 (default) indicates that there is no limit (unlimited). A value
* of -1 will always cause validation failure on match. -1 is used to
* implement the `amp-custom-length-check` attribute:
* (https://github.com/ampproject/amphtml/issues/22315#issuecomment-496681165)
*
*
* optional int32 max_bytes = 1 [default = -2];
* @return Whether the maxBytes field is set.
*/
@java.lang.Override
public boolean hasMaxBytes() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* If set, the cdata contents cannot be greater than this length, in bytes. A
* value of -2 (default) indicates that there is no limit (unlimited). A value
* of -1 will always cause validation failure on match. -1 is used to
* implement the `amp-custom-length-check` attribute:
* (https://github.com/ampproject/amphtml/issues/22315#issuecomment-496681165)
*
*
* optional int32 max_bytes = 1 [default = -2];
* @return The maxBytes.
*/
@java.lang.Override
public int getMaxBytes() {
return maxBytes_;
}
public static final int MAX_BYTES_SPEC_URL_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object maxBytesSpecUrl_ = "";
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @return Whether the maxBytesSpecUrl field is set.
*/
@java.lang.Override
public boolean hasMaxBytesSpecUrl() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @return The maxBytesSpecUrl.
*/
@java.lang.Override
public java.lang.String getMaxBytesSpecUrl() {
java.lang.Object ref = maxBytesSpecUrl_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
maxBytesSpecUrl_ = s;
}
return s;
}
}
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @return The bytes for maxBytesSpecUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMaxBytesSpecUrlBytes() {
java.lang.Object ref = maxBytesSpecUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
maxBytesSpecUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MANDATORY_CDATA_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object mandatoryCdata_ = "";
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @return Whether the mandatoryCdata field is set.
*/
@java.lang.Override
public boolean hasMandatoryCdata() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @return The mandatoryCdata.
*/
@java.lang.Override
public java.lang.String getMandatoryCdata() {
java.lang.Object ref = mandatoryCdata_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryCdata_ = s;
}
return s;
}
}
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @return The bytes for mandatoryCdata.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMandatoryCdataBytes() {
java.lang.Object ref = mandatoryCdata_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryCdata_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CDATA_REGEX_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object cdataRegex_ = "";
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @return Whether the cdataRegex field is set.
*/
@java.lang.Override
public boolean hasCdataRegex() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @return The cdataRegex.
*/
@java.lang.Override
public java.lang.String getCdataRegex() {
java.lang.Object ref = cdataRegex_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
cdataRegex_ = s;
}
return s;
}
}
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @return The bytes for cdataRegex.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getCdataRegexBytes() {
java.lang.Object ref = cdataRegex_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
cdataRegex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CSS_SPEC_FIELD_NUMBER = 7;
private dev.amp.validator.ValidatorProtos.CssSpec cssSpec_;
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
* @return Whether the cssSpec field is set.
*/
@java.lang.Override
public boolean hasCssSpec() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
* @return The cssSpec.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssSpec getCssSpec() {
return cssSpec_ == null ? dev.amp.validator.ValidatorProtos.CssSpec.getDefaultInstance() : cssSpec_;
}
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CssSpecOrBuilder getCssSpecOrBuilder() {
return cssSpec_ == null ? dev.amp.validator.ValidatorProtos.CssSpec.getDefaultInstance() : cssSpec_;
}
public static final int WHITESPACE_ONLY_FIELD_NUMBER = 8;
private boolean whitespaceOnly_ = false;
/**
*
* If set to true, then only whitespace may be in the cdata contents.
* This is useful for script tags that reference extensions etc.
*
*
* optional bool whitespace_only = 8;
* @return Whether the whitespaceOnly field is set.
*/
@java.lang.Override
public boolean hasWhitespaceOnly() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* If set to true, then only whitespace may be in the cdata contents.
* This is useful for script tags that reference extensions etc.
*
*
* optional bool whitespace_only = 8;
* @return The whitespaceOnly.
*/
@java.lang.Override
public boolean getWhitespaceOnly() {
return whitespaceOnly_;
}
public static final int DISALLOWED_CDATA_REGEX_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private java.util.List disallowedCdataRegex_;
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
@java.lang.Override
public java.util.List getDisallowedCdataRegexList() {
return disallowedCdataRegex_;
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
@java.lang.Override
public java.util.List
getDisallowedCdataRegexOrBuilderList() {
return disallowedCdataRegex_;
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
@java.lang.Override
public int getDisallowedCdataRegexCount() {
return disallowedCdataRegex_.size();
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DisallowedCDataRegex getDisallowedCdataRegex(int index) {
return disallowedCdataRegex_.get(index);
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.DisallowedCDataRegexOrBuilder getDisallowedCdataRegexOrBuilder(
int index) {
return disallowedCdataRegex_.get(index);
}
public static final int DOC_CSS_BYTES_FIELD_NUMBER = 11;
private boolean docCssBytes_ = false;
/**
*
* If true, the contents of this tag's CDATA text will be counted against the
* document level DocCssSpec CSS lengths.
*
*
* optional bool doc_css_bytes = 11;
* @return Whether the docCssBytes field is set.
*/
@java.lang.Override
public boolean hasDocCssBytes() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* If true, the contents of this tag's CDATA text will be counted against the
* document level DocCssSpec CSS lengths.
*
*
* optional bool doc_css_bytes = 11;
* @return The docCssBytes.
*/
@java.lang.Override
public boolean getDocCssBytes() {
return docCssBytes_;
}
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.writeInt32(1, maxBytes_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, maxBytesSpecUrl_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, mandatoryCdata_);
}
for (int i = 0; i < disallowedCdataRegex_.size(); i++) {
output.writeMessage(4, disallowedCdataRegex_.get(i));
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, cdataRegex_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(7, getCssSpec());
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeBool(8, whitespaceOnly_);
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeBool(11, docCssBytes_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, maxBytes_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, maxBytesSpecUrl_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, mandatoryCdata_);
}
for (int i = 0; i < disallowedCdataRegex_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, disallowedCdataRegex_.get(i));
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, cdataRegex_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getCssSpec());
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(8, whitespaceOnly_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(11, docCssBytes_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.CdataSpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.CdataSpec other = (dev.amp.validator.ValidatorProtos.CdataSpec) obj;
if (hasMaxBytes() != other.hasMaxBytes()) return false;
if (hasMaxBytes()) {
if (getMaxBytes()
!= other.getMaxBytes()) return false;
}
if (hasMaxBytesSpecUrl() != other.hasMaxBytesSpecUrl()) return false;
if (hasMaxBytesSpecUrl()) {
if (!getMaxBytesSpecUrl()
.equals(other.getMaxBytesSpecUrl())) return false;
}
if (hasMandatoryCdata() != other.hasMandatoryCdata()) return false;
if (hasMandatoryCdata()) {
if (!getMandatoryCdata()
.equals(other.getMandatoryCdata())) return false;
}
if (hasCdataRegex() != other.hasCdataRegex()) return false;
if (hasCdataRegex()) {
if (!getCdataRegex()
.equals(other.getCdataRegex())) return false;
}
if (hasCssSpec() != other.hasCssSpec()) return false;
if (hasCssSpec()) {
if (!getCssSpec()
.equals(other.getCssSpec())) return false;
}
if (hasWhitespaceOnly() != other.hasWhitespaceOnly()) return false;
if (hasWhitespaceOnly()) {
if (getWhitespaceOnly()
!= other.getWhitespaceOnly()) return false;
}
if (!getDisallowedCdataRegexList()
.equals(other.getDisallowedCdataRegexList())) return false;
if (hasDocCssBytes() != other.hasDocCssBytes()) return false;
if (hasDocCssBytes()) {
if (getDocCssBytes()
!= other.getDocCssBytes()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMaxBytes()) {
hash = (37 * hash) + MAX_BYTES_FIELD_NUMBER;
hash = (53 * hash) + getMaxBytes();
}
if (hasMaxBytesSpecUrl()) {
hash = (37 * hash) + MAX_BYTES_SPEC_URL_FIELD_NUMBER;
hash = (53 * hash) + getMaxBytesSpecUrl().hashCode();
}
if (hasMandatoryCdata()) {
hash = (37 * hash) + MANDATORY_CDATA_FIELD_NUMBER;
hash = (53 * hash) + getMandatoryCdata().hashCode();
}
if (hasCdataRegex()) {
hash = (37 * hash) + CDATA_REGEX_FIELD_NUMBER;
hash = (53 * hash) + getCdataRegex().hashCode();
}
if (hasCssSpec()) {
hash = (37 * hash) + CSS_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getCssSpec().hashCode();
}
if (hasWhitespaceOnly()) {
hash = (37 * hash) + WHITESPACE_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getWhitespaceOnly());
}
if (getDisallowedCdataRegexCount() > 0) {
hash = (37 * hash) + DISALLOWED_CDATA_REGEX_FIELD_NUMBER;
hash = (53 * hash) + getDisallowedCdataRegexList().hashCode();
}
if (hasDocCssBytes()) {
hash = (37 * hash) + DOC_CSS_BYTES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDocCssBytes());
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.CdataSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.CdataSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.CdataSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.CdataSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.CdataSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.CdataSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.CdataSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.CdataSpec 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 dev.amp.validator.ValidatorProtos.CdataSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.CdataSpec 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 dev.amp.validator.ValidatorProtos.CdataSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.CdataSpec 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(dev.amp.validator.ValidatorProtos.CdataSpec 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;
}
/**
*
* NEXT AVAILABLE TAG: 12
*
*
* Protobuf type {@code amp.validator.CdataSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.CdataSpec)
dev.amp.validator.ValidatorProtos.CdataSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CdataSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CdataSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.CdataSpec.class, dev.amp.validator.ValidatorProtos.CdataSpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.CdataSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getCssSpecFieldBuilder();
getDisallowedCdataRegexFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
maxBytes_ = -2;
maxBytesSpecUrl_ = "";
mandatoryCdata_ = "";
cdataRegex_ = "";
cssSpec_ = null;
if (cssSpecBuilder_ != null) {
cssSpecBuilder_.dispose();
cssSpecBuilder_ = null;
}
whitespaceOnly_ = false;
if (disallowedCdataRegexBuilder_ == null) {
disallowedCdataRegex_ = java.util.Collections.emptyList();
} else {
disallowedCdataRegex_ = null;
disallowedCdataRegexBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000040);
docCssBytes_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_CdataSpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CdataSpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.CdataSpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CdataSpec build() {
dev.amp.validator.ValidatorProtos.CdataSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CdataSpec buildPartial() {
dev.amp.validator.ValidatorProtos.CdataSpec result = new dev.amp.validator.ValidatorProtos.CdataSpec(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.amp.validator.ValidatorProtos.CdataSpec result) {
if (disallowedCdataRegexBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)) {
disallowedCdataRegex_ = java.util.Collections.unmodifiableList(disallowedCdataRegex_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.disallowedCdataRegex_ = disallowedCdataRegex_;
} else {
result.disallowedCdataRegex_ = disallowedCdataRegexBuilder_.build();
}
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.CdataSpec result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.maxBytes_ = maxBytes_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.maxBytesSpecUrl_ = maxBytesSpecUrl_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.mandatoryCdata_ = mandatoryCdata_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.cdataRegex_ = cdataRegex_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.cssSpec_ = cssSpecBuilder_ == null
? cssSpec_
: cssSpecBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.whitespaceOnly_ = whitespaceOnly_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.docCssBytes_ = docCssBytes_;
to_bitField0_ |= 0x00000040;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.CdataSpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.CdataSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.CdataSpec other) {
if (other == dev.amp.validator.ValidatorProtos.CdataSpec.getDefaultInstance()) return this;
if (other.hasMaxBytes()) {
setMaxBytes(other.getMaxBytes());
}
if (other.hasMaxBytesSpecUrl()) {
maxBytesSpecUrl_ = other.maxBytesSpecUrl_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasMandatoryCdata()) {
mandatoryCdata_ = other.mandatoryCdata_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasCdataRegex()) {
cdataRegex_ = other.cdataRegex_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasCssSpec()) {
mergeCssSpec(other.getCssSpec());
}
if (other.hasWhitespaceOnly()) {
setWhitespaceOnly(other.getWhitespaceOnly());
}
if (disallowedCdataRegexBuilder_ == null) {
if (!other.disallowedCdataRegex_.isEmpty()) {
if (disallowedCdataRegex_.isEmpty()) {
disallowedCdataRegex_ = other.disallowedCdataRegex_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureDisallowedCdataRegexIsMutable();
disallowedCdataRegex_.addAll(other.disallowedCdataRegex_);
}
onChanged();
}
} else {
if (!other.disallowedCdataRegex_.isEmpty()) {
if (disallowedCdataRegexBuilder_.isEmpty()) {
disallowedCdataRegexBuilder_.dispose();
disallowedCdataRegexBuilder_ = null;
disallowedCdataRegex_ = other.disallowedCdataRegex_;
bitField0_ = (bitField0_ & ~0x00000040);
disallowedCdataRegexBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDisallowedCdataRegexFieldBuilder() : null;
} else {
disallowedCdataRegexBuilder_.addAllMessages(other.disallowedCdataRegex_);
}
}
}
if (other.hasDocCssBytes()) {
setDocCssBytes(other.getDocCssBytes());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
maxBytes_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
maxBytesSpecUrl_ = input.readBytes();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
mandatoryCdata_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 26
case 34: {
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex m =
input.readMessage(
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.PARSER,
extensionRegistry);
if (disallowedCdataRegexBuilder_ == null) {
ensureDisallowedCdataRegexIsMutable();
disallowedCdataRegex_.add(m);
} else {
disallowedCdataRegexBuilder_.addMessage(m);
}
break;
} // case 34
case 50: {
cdataRegex_ = input.readBytes();
bitField0_ |= 0x00000008;
break;
} // case 50
case 58: {
input.readMessage(
getCssSpecFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 58
case 64: {
whitespaceOnly_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 64
case 88: {
docCssBytes_ = input.readBool();
bitField0_ |= 0x00000080;
break;
} // case 88
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int maxBytes_ = -2;
/**
*
* If set, the cdata contents cannot be greater than this length, in bytes. A
* value of -2 (default) indicates that there is no limit (unlimited). A value
* of -1 will always cause validation failure on match. -1 is used to
* implement the `amp-custom-length-check` attribute:
* (https://github.com/ampproject/amphtml/issues/22315#issuecomment-496681165)
*
*
* optional int32 max_bytes = 1 [default = -2];
* @return Whether the maxBytes field is set.
*/
@java.lang.Override
public boolean hasMaxBytes() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* If set, the cdata contents cannot be greater than this length, in bytes. A
* value of -2 (default) indicates that there is no limit (unlimited). A value
* of -1 will always cause validation failure on match. -1 is used to
* implement the `amp-custom-length-check` attribute:
* (https://github.com/ampproject/amphtml/issues/22315#issuecomment-496681165)
*
*
* optional int32 max_bytes = 1 [default = -2];
* @return The maxBytes.
*/
@java.lang.Override
public int getMaxBytes() {
return maxBytes_;
}
/**
*
* If set, the cdata contents cannot be greater than this length, in bytes. A
* value of -2 (default) indicates that there is no limit (unlimited). A value
* of -1 will always cause validation failure on match. -1 is used to
* implement the `amp-custom-length-check` attribute:
* (https://github.com/ampproject/amphtml/issues/22315#issuecomment-496681165)
*
*
* optional int32 max_bytes = 1 [default = -2];
* @param value The maxBytes to set.
* @return This builder for chaining.
*/
public Builder setMaxBytes(int value) {
maxBytes_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* If set, the cdata contents cannot be greater than this length, in bytes. A
* value of -2 (default) indicates that there is no limit (unlimited). A value
* of -1 will always cause validation failure on match. -1 is used to
* implement the `amp-custom-length-check` attribute:
* (https://github.com/ampproject/amphtml/issues/22315#issuecomment-496681165)
*
*
* optional int32 max_bytes = 1 [default = -2];
* @return This builder for chaining.
*/
public Builder clearMaxBytes() {
bitField0_ = (bitField0_ & ~0x00000001);
maxBytes_ = -2;
onChanged();
return this;
}
private java.lang.Object maxBytesSpecUrl_ = "";
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @return Whether the maxBytesSpecUrl field is set.
*/
public boolean hasMaxBytesSpecUrl() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @return The maxBytesSpecUrl.
*/
public java.lang.String getMaxBytesSpecUrl() {
java.lang.Object ref = maxBytesSpecUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
maxBytesSpecUrl_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @return The bytes for maxBytesSpecUrl.
*/
public com.google.protobuf.ByteString
getMaxBytesSpecUrlBytes() {
java.lang.Object ref = maxBytesSpecUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
maxBytesSpecUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @param value The maxBytesSpecUrl to set.
* @return This builder for chaining.
*/
public Builder setMaxBytesSpecUrl(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
maxBytesSpecUrl_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @return This builder for chaining.
*/
public Builder clearMaxBytesSpecUrl() {
maxBytesSpecUrl_ = getDefaultInstance().getMaxBytesSpecUrl();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec.
*
*
* optional string max_bytes_spec_url = 2;
* @param value The bytes for maxBytesSpecUrl to set.
* @return This builder for chaining.
*/
public Builder setMaxBytesSpecUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
maxBytesSpecUrl_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object mandatoryCdata_ = "";
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @return Whether the mandatoryCdata field is set.
*/
public boolean hasMandatoryCdata() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @return The mandatoryCdata.
*/
public java.lang.String getMandatoryCdata() {
java.lang.Object ref = mandatoryCdata_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryCdata_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @return The bytes for mandatoryCdata.
*/
public com.google.protobuf.ByteString
getMandatoryCdataBytes() {
java.lang.Object ref = mandatoryCdata_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryCdata_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @param value The mandatoryCdata to set.
* @return This builder for chaining.
*/
public Builder setMandatoryCdata(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
mandatoryCdata_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @return This builder for chaining.
*/
public Builder clearMandatoryCdata() {
mandatoryCdata_ = getDefaultInstance().getMandatoryCdata();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* If non-empty, the text between the start / end tag must match this value.
*
*
* optional string mandatory_cdata = 3;
* @param value The bytes for mandatoryCdata to set.
* @return This builder for chaining.
*/
public Builder setMandatoryCdataBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
mandatoryCdata_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object cdataRegex_ = "";
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @return Whether the cdataRegex field is set.
*/
public boolean hasCdataRegex() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @return The cdataRegex.
*/
public java.lang.String getCdataRegex() {
java.lang.Object ref = cdataRegex_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
cdataRegex_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @return The bytes for cdataRegex.
*/
public com.google.protobuf.ByteString
getCdataRegexBytes() {
java.lang.Object ref = cdataRegex_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
cdataRegex_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @param value The cdataRegex to set.
* @return This builder for chaining.
*/
public Builder setCdataRegex(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
cdataRegex_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @return This builder for chaining.
*/
public Builder clearCdataRegex() {
cdataRegex_ = getDefaultInstance().getCdataRegex();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* If non-empty, the text between the start / end tag must match this regex.
*
*
* optional string cdata_regex = 6;
* @param value The bytes for cdataRegex to set.
* @return This builder for chaining.
*/
public Builder setCdataRegexBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
cdataRegex_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private dev.amp.validator.ValidatorProtos.CssSpec cssSpec_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.CssSpec, dev.amp.validator.ValidatorProtos.CssSpec.Builder, dev.amp.validator.ValidatorProtos.CssSpecOrBuilder> cssSpecBuilder_;
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
* @return Whether the cssSpec field is set.
*/
public boolean hasCssSpec() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
* @return The cssSpec.
*/
public dev.amp.validator.ValidatorProtos.CssSpec getCssSpec() {
if (cssSpecBuilder_ == null) {
return cssSpec_ == null ? dev.amp.validator.ValidatorProtos.CssSpec.getDefaultInstance() : cssSpec_;
} else {
return cssSpecBuilder_.getMessage();
}
}
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
*/
public Builder setCssSpec(dev.amp.validator.ValidatorProtos.CssSpec value) {
if (cssSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cssSpec_ = value;
} else {
cssSpecBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
*/
public Builder setCssSpec(
dev.amp.validator.ValidatorProtos.CssSpec.Builder builderForValue) {
if (cssSpecBuilder_ == null) {
cssSpec_ = builderForValue.build();
} else {
cssSpecBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
*/
public Builder mergeCssSpec(dev.amp.validator.ValidatorProtos.CssSpec value) {
if (cssSpecBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
cssSpec_ != null &&
cssSpec_ != dev.amp.validator.ValidatorProtos.CssSpec.getDefaultInstance()) {
getCssSpecBuilder().mergeFrom(value);
} else {
cssSpec_ = value;
}
} else {
cssSpecBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
*/
public Builder clearCssSpec() {
bitField0_ = (bitField0_ & ~0x00000010);
cssSpec_ = null;
if (cssSpecBuilder_ != null) {
cssSpecBuilder_.dispose();
cssSpecBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
*/
public dev.amp.validator.ValidatorProtos.CssSpec.Builder getCssSpecBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getCssSpecFieldBuilder().getBuilder();
}
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
*/
public dev.amp.validator.ValidatorProtos.CssSpecOrBuilder getCssSpecOrBuilder() {
if (cssSpecBuilder_ != null) {
return cssSpecBuilder_.getMessageOrBuilder();
} else {
return cssSpec_ == null ?
dev.amp.validator.ValidatorProtos.CssSpec.getDefaultInstance() : cssSpec_;
}
}
/**
*
* If at least one CssSpec is provided, this cdata field will be parsed
* as CSS3, and any parsing errors will become validation errors.
*
*
* optional .amp.validator.CssSpec css_spec = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.CssSpec, dev.amp.validator.ValidatorProtos.CssSpec.Builder, dev.amp.validator.ValidatorProtos.CssSpecOrBuilder>
getCssSpecFieldBuilder() {
if (cssSpecBuilder_ == null) {
cssSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.CssSpec, dev.amp.validator.ValidatorProtos.CssSpec.Builder, dev.amp.validator.ValidatorProtos.CssSpecOrBuilder>(
getCssSpec(),
getParentForChildren(),
isClean());
cssSpec_ = null;
}
return cssSpecBuilder_;
}
private boolean whitespaceOnly_ ;
/**
*
* If set to true, then only whitespace may be in the cdata contents.
* This is useful for script tags that reference extensions etc.
*
*
* optional bool whitespace_only = 8;
* @return Whether the whitespaceOnly field is set.
*/
@java.lang.Override
public boolean hasWhitespaceOnly() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* If set to true, then only whitespace may be in the cdata contents.
* This is useful for script tags that reference extensions etc.
*
*
* optional bool whitespace_only = 8;
* @return The whitespaceOnly.
*/
@java.lang.Override
public boolean getWhitespaceOnly() {
return whitespaceOnly_;
}
/**
*
* If set to true, then only whitespace may be in the cdata contents.
* This is useful for script tags that reference extensions etc.
*
*
* optional bool whitespace_only = 8;
* @param value The whitespaceOnly to set.
* @return This builder for chaining.
*/
public Builder setWhitespaceOnly(boolean value) {
whitespaceOnly_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* If set to true, then only whitespace may be in the cdata contents.
* This is useful for script tags that reference extensions etc.
*
*
* optional bool whitespace_only = 8;
* @return This builder for chaining.
*/
public Builder clearWhitespaceOnly() {
bitField0_ = (bitField0_ & ~0x00000020);
whitespaceOnly_ = false;
onChanged();
return this;
}
private java.util.List disallowedCdataRegex_ =
java.util.Collections.emptyList();
private void ensureDisallowedCdataRegexIsMutable() {
if (!((bitField0_ & 0x00000040) != 0)) {
disallowedCdataRegex_ = new java.util.ArrayList(disallowedCdataRegex_);
bitField0_ |= 0x00000040;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex, dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.Builder, dev.amp.validator.ValidatorProtos.DisallowedCDataRegexOrBuilder> disallowedCdataRegexBuilder_;
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public java.util.List getDisallowedCdataRegexList() {
if (disallowedCdataRegexBuilder_ == null) {
return java.util.Collections.unmodifiableList(disallowedCdataRegex_);
} else {
return disallowedCdataRegexBuilder_.getMessageList();
}
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public int getDisallowedCdataRegexCount() {
if (disallowedCdataRegexBuilder_ == null) {
return disallowedCdataRegex_.size();
} else {
return disallowedCdataRegexBuilder_.getCount();
}
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public dev.amp.validator.ValidatorProtos.DisallowedCDataRegex getDisallowedCdataRegex(int index) {
if (disallowedCdataRegexBuilder_ == null) {
return disallowedCdataRegex_.get(index);
} else {
return disallowedCdataRegexBuilder_.getMessage(index);
}
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public Builder setDisallowedCdataRegex(
int index, dev.amp.validator.ValidatorProtos.DisallowedCDataRegex value) {
if (disallowedCdataRegexBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDisallowedCdataRegexIsMutable();
disallowedCdataRegex_.set(index, value);
onChanged();
} else {
disallowedCdataRegexBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public Builder setDisallowedCdataRegex(
int index, dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.Builder builderForValue) {
if (disallowedCdataRegexBuilder_ == null) {
ensureDisallowedCdataRegexIsMutable();
disallowedCdataRegex_.set(index, builderForValue.build());
onChanged();
} else {
disallowedCdataRegexBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public Builder addDisallowedCdataRegex(dev.amp.validator.ValidatorProtos.DisallowedCDataRegex value) {
if (disallowedCdataRegexBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDisallowedCdataRegexIsMutable();
disallowedCdataRegex_.add(value);
onChanged();
} else {
disallowedCdataRegexBuilder_.addMessage(value);
}
return this;
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public Builder addDisallowedCdataRegex(
int index, dev.amp.validator.ValidatorProtos.DisallowedCDataRegex value) {
if (disallowedCdataRegexBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureDisallowedCdataRegexIsMutable();
disallowedCdataRegex_.add(index, value);
onChanged();
} else {
disallowedCdataRegexBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public Builder addDisallowedCdataRegex(
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.Builder builderForValue) {
if (disallowedCdataRegexBuilder_ == null) {
ensureDisallowedCdataRegexIsMutable();
disallowedCdataRegex_.add(builderForValue.build());
onChanged();
} else {
disallowedCdataRegexBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public Builder addDisallowedCdataRegex(
int index, dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.Builder builderForValue) {
if (disallowedCdataRegexBuilder_ == null) {
ensureDisallowedCdataRegexIsMutable();
disallowedCdataRegex_.add(index, builderForValue.build());
onChanged();
} else {
disallowedCdataRegexBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public Builder addAllDisallowedCdataRegex(
java.lang.Iterable values) {
if (disallowedCdataRegexBuilder_ == null) {
ensureDisallowedCdataRegexIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, disallowedCdataRegex_);
onChanged();
} else {
disallowedCdataRegexBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public Builder clearDisallowedCdataRegex() {
if (disallowedCdataRegexBuilder_ == null) {
disallowedCdataRegex_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
} else {
disallowedCdataRegexBuilder_.clear();
}
return this;
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public Builder removeDisallowedCdataRegex(int index) {
if (disallowedCdataRegexBuilder_ == null) {
ensureDisallowedCdataRegexIsMutable();
disallowedCdataRegex_.remove(index);
onChanged();
} else {
disallowedCdataRegexBuilder_.remove(index);
}
return this;
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.Builder getDisallowedCdataRegexBuilder(
int index) {
return getDisallowedCdataRegexFieldBuilder().getBuilder(index);
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public dev.amp.validator.ValidatorProtos.DisallowedCDataRegexOrBuilder getDisallowedCdataRegexOrBuilder(
int index) {
if (disallowedCdataRegexBuilder_ == null) {
return disallowedCdataRegex_.get(index); } else {
return disallowedCdataRegexBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public java.util.List
getDisallowedCdataRegexOrBuilderList() {
if (disallowedCdataRegexBuilder_ != null) {
return disallowedCdataRegexBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(disallowedCdataRegex_);
}
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.Builder addDisallowedCdataRegexBuilder() {
return getDisallowedCdataRegexFieldBuilder().addBuilder(
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.getDefaultInstance());
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.Builder addDisallowedCdataRegexBuilder(
int index) {
return getDisallowedCdataRegexFieldBuilder().addBuilder(
index, dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.getDefaultInstance());
}
/**
*
* If any of these regexes match, then this cdata spec does not validate.
*
*
* repeated .amp.validator.DisallowedCDataRegex disallowed_cdata_regex = 4;
*/
public java.util.List
getDisallowedCdataRegexBuilderList() {
return getDisallowedCdataRegexFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex, dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.Builder, dev.amp.validator.ValidatorProtos.DisallowedCDataRegexOrBuilder>
getDisallowedCdataRegexFieldBuilder() {
if (disallowedCdataRegexBuilder_ == null) {
disallowedCdataRegexBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.DisallowedCDataRegex, dev.amp.validator.ValidatorProtos.DisallowedCDataRegex.Builder, dev.amp.validator.ValidatorProtos.DisallowedCDataRegexOrBuilder>(
disallowedCdataRegex_,
((bitField0_ & 0x00000040) != 0),
getParentForChildren(),
isClean());
disallowedCdataRegex_ = null;
}
return disallowedCdataRegexBuilder_;
}
private boolean docCssBytes_ ;
/**
*
* If true, the contents of this tag's CDATA text will be counted against the
* document level DocCssSpec CSS lengths.
*
*
* optional bool doc_css_bytes = 11;
* @return Whether the docCssBytes field is set.
*/
@java.lang.Override
public boolean hasDocCssBytes() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* If true, the contents of this tag's CDATA text will be counted against the
* document level DocCssSpec CSS lengths.
*
*
* optional bool doc_css_bytes = 11;
* @return The docCssBytes.
*/
@java.lang.Override
public boolean getDocCssBytes() {
return docCssBytes_;
}
/**
*
* If true, the contents of this tag's CDATA text will be counted against the
* document level DocCssSpec CSS lengths.
*
*
* optional bool doc_css_bytes = 11;
* @param value The docCssBytes to set.
* @return This builder for chaining.
*/
public Builder setDocCssBytes(boolean value) {
docCssBytes_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* If true, the contents of this tag's CDATA text will be counted against the
* document level DocCssSpec CSS lengths.
*
*
* optional bool doc_css_bytes = 11;
* @return This builder for chaining.
*/
public Builder clearDocCssBytes() {
bitField0_ = (bitField0_ & ~0x00000080);
docCssBytes_ = 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:amp.validator.CdataSpec)
}
// @@protoc_insertion_point(class_scope:amp.validator.CdataSpec)
private static final dev.amp.validator.ValidatorProtos.CdataSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.CdataSpec();
}
public static dev.amp.validator.ValidatorProtos.CdataSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CdataSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CdataSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AmpLayoutOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.AmpLayout)
com.google.protobuf.MessageOrBuilder {
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @return A list containing the supportedLayouts.
*/
java.util.List getSupportedLayoutsList();
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @return The count of supportedLayouts.
*/
int getSupportedLayoutsCount();
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @param index The index of the element to return.
* @return The supportedLayouts at the given index.
*/
dev.amp.validator.ValidatorProtos.AmpLayout.Layout getSupportedLayouts(int index);
/**
*
* Specifies whether this element has default dimensions. This corresponds
* to being allowlisted in naturalDimensions_ in
* https://github.com/ampproject/amphtml/blob/main/src/static-layout.js.
*
*
* optional bool defines_default_width = 2;
* @return Whether the definesDefaultWidth field is set.
*/
boolean hasDefinesDefaultWidth();
/**
*
* Specifies whether this element has default dimensions. This corresponds
* to being allowlisted in naturalDimensions_ in
* https://github.com/ampproject/amphtml/blob/main/src/static-layout.js.
*
*
* optional bool defines_default_width = 2;
* @return The definesDefaultWidth.
*/
boolean getDefinesDefaultWidth();
/**
* optional bool defines_default_height = 3;
* @return Whether the definesDefaultHeight field is set.
*/
boolean hasDefinesDefaultHeight();
/**
* optional bool defines_default_height = 3;
* @return The definesDefaultHeight.
*/
boolean getDefinesDefaultHeight();
}
/**
*
* Specifies which AMP Layouts are supported by a given element.
* For the purpose of the validator, this specifies which
* values for layout, height, and width attributes are allowed. Also see
* https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-html-layout.md
* TODO(johannes): Make the error messages around layouts better. This
* may require revamping the documentation for elements and/or the above spec,
* so that a user gets more clearly informed about which layouts are
* applicable to a given tag, what happens when layout attribute or other
* attributes are not set, etc.
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf type {@code amp.validator.AmpLayout}
*/
public static final class AmpLayout extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.AmpLayout)
AmpLayoutOrBuilder {
private static final long serialVersionUID = 0L;
// Use AmpLayout.newBuilder() to construct.
private AmpLayout(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private AmpLayout() {
supportedLayouts_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AmpLayout();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AmpLayout_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AmpLayout_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AmpLayout.class, dev.amp.validator.ValidatorProtos.AmpLayout.Builder.class);
}
/**
*
* NEXT AVAILABLE TAG: 10
*
*
* Protobuf enum {@code amp.validator.AmpLayout.Layout}
*/
public enum Layout
implements com.google.protobuf.ProtocolMessageEnum {
/**
* CONTAINER = 5;
*/
CONTAINER(5),
/**
* FILL = 6;
*/
FILL(6),
/**
* FIXED = 2;
*/
FIXED(2),
/**
* FIXED_HEIGHT = 3;
*/
FIXED_HEIGHT(3),
/**
* FLEX_ITEM = 7;
*/
FLEX_ITEM(7),
/**
* FLUID = 8;
*/
FLUID(8),
/**
* INTRINSIC = 9;
*/
INTRINSIC(9),
/**
* NODISPLAY = 1;
*/
NODISPLAY(1),
/**
* RESPONSIVE = 4;
*/
RESPONSIVE(4),
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
;
/**
* CONTAINER = 5;
*/
public static final int CONTAINER_VALUE = 5;
/**
* FILL = 6;
*/
public static final int FILL_VALUE = 6;
/**
* FIXED = 2;
*/
public static final int FIXED_VALUE = 2;
/**
* FIXED_HEIGHT = 3;
*/
public static final int FIXED_HEIGHT_VALUE = 3;
/**
* FLEX_ITEM = 7;
*/
public static final int FLEX_ITEM_VALUE = 7;
/**
* FLUID = 8;
*/
public static final int FLUID_VALUE = 8;
/**
* INTRINSIC = 9;
*/
public static final int INTRINSIC_VALUE = 9;
/**
* NODISPLAY = 1;
*/
public static final int NODISPLAY_VALUE = 1;
/**
* RESPONSIVE = 4;
*/
public static final int RESPONSIVE_VALUE = 4;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
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 Layout 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 Layout forNumber(int value) {
switch (value) {
case 5: return CONTAINER;
case 6: return FILL;
case 2: return FIXED;
case 3: return FIXED_HEIGHT;
case 7: return FLEX_ITEM;
case 8: return FLUID;
case 9: return INTRINSIC;
case 1: return NODISPLAY;
case 4: return RESPONSIVE;
case 0: return UNKNOWN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Layout> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Layout findValueByNumber(int number) {
return Layout.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 dev.amp.validator.ValidatorProtos.AmpLayout.getDescriptor().getEnumTypes().get(0);
}
private static final Layout[] VALUES = values();
public static Layout 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 Layout(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:amp.validator.AmpLayout.Layout)
}
private int bitField0_;
public static final int SUPPORTED_LAYOUTS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List supportedLayouts_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.AmpLayout.Layout> supportedLayouts_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.AmpLayout.Layout>() {
public dev.amp.validator.ValidatorProtos.AmpLayout.Layout convert(java.lang.Integer from) {
dev.amp.validator.ValidatorProtos.AmpLayout.Layout result = dev.amp.validator.ValidatorProtos.AmpLayout.Layout.forNumber(from);
return result == null ? dev.amp.validator.ValidatorProtos.AmpLayout.Layout.CONTAINER : result;
}
};
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @return A list containing the supportedLayouts.
*/
@java.lang.Override
public java.util.List getSupportedLayoutsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.AmpLayout.Layout>(supportedLayouts_, supportedLayouts_converter_);
}
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @return The count of supportedLayouts.
*/
@java.lang.Override
public int getSupportedLayoutsCount() {
return supportedLayouts_.size();
}
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @param index The index of the element to return.
* @return The supportedLayouts at the given index.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AmpLayout.Layout getSupportedLayouts(int index) {
return supportedLayouts_converter_.convert(supportedLayouts_.get(index));
}
public static final int DEFINES_DEFAULT_WIDTH_FIELD_NUMBER = 2;
private boolean definesDefaultWidth_ = false;
/**
*
* Specifies whether this element has default dimensions. This corresponds
* to being allowlisted in naturalDimensions_ in
* https://github.com/ampproject/amphtml/blob/main/src/static-layout.js.
*
*
* optional bool defines_default_width = 2;
* @return Whether the definesDefaultWidth field is set.
*/
@java.lang.Override
public boolean hasDefinesDefaultWidth() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Specifies whether this element has default dimensions. This corresponds
* to being allowlisted in naturalDimensions_ in
* https://github.com/ampproject/amphtml/blob/main/src/static-layout.js.
*
*
* optional bool defines_default_width = 2;
* @return The definesDefaultWidth.
*/
@java.lang.Override
public boolean getDefinesDefaultWidth() {
return definesDefaultWidth_;
}
public static final int DEFINES_DEFAULT_HEIGHT_FIELD_NUMBER = 3;
private boolean definesDefaultHeight_ = false;
/**
* optional bool defines_default_height = 3;
* @return Whether the definesDefaultHeight field is set.
*/
@java.lang.Override
public boolean hasDefinesDefaultHeight() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional bool defines_default_height = 3;
* @return The definesDefaultHeight.
*/
@java.lang.Override
public boolean getDefinesDefaultHeight() {
return definesDefaultHeight_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < supportedLayouts_.size(); i++) {
output.writeEnum(1, supportedLayouts_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeBool(2, definesDefaultWidth_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeBool(3, definesDefaultHeight_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < supportedLayouts_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(supportedLayouts_.get(i));
}
size += dataSize;
size += 1 * supportedLayouts_.size();
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, definesDefaultWidth_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, definesDefaultHeight_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.AmpLayout)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.AmpLayout other = (dev.amp.validator.ValidatorProtos.AmpLayout) obj;
if (!supportedLayouts_.equals(other.supportedLayouts_)) return false;
if (hasDefinesDefaultWidth() != other.hasDefinesDefaultWidth()) return false;
if (hasDefinesDefaultWidth()) {
if (getDefinesDefaultWidth()
!= other.getDefinesDefaultWidth()) return false;
}
if (hasDefinesDefaultHeight() != other.hasDefinesDefaultHeight()) return false;
if (hasDefinesDefaultHeight()) {
if (getDefinesDefaultHeight()
!= other.getDefinesDefaultHeight()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getSupportedLayoutsCount() > 0) {
hash = (37 * hash) + SUPPORTED_LAYOUTS_FIELD_NUMBER;
hash = (53 * hash) + supportedLayouts_.hashCode();
}
if (hasDefinesDefaultWidth()) {
hash = (37 * hash) + DEFINES_DEFAULT_WIDTH_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDefinesDefaultWidth());
}
if (hasDefinesDefaultHeight()) {
hash = (37 * hash) + DEFINES_DEFAULT_HEIGHT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDefinesDefaultHeight());
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.AmpLayout parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AmpLayout parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AmpLayout parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AmpLayout parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AmpLayout parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AmpLayout parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AmpLayout parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AmpLayout 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 dev.amp.validator.ValidatorProtos.AmpLayout parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AmpLayout 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 dev.amp.validator.ValidatorProtos.AmpLayout parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AmpLayout 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(dev.amp.validator.ValidatorProtos.AmpLayout 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;
}
/**
*
* Specifies which AMP Layouts are supported by a given element.
* For the purpose of the validator, this specifies which
* values for layout, height, and width attributes are allowed. Also see
* https://github.com/ampproject/amphtml/blob/main/docs/spec/amp-html-layout.md
* TODO(johannes): Make the error messages around layouts better. This
* may require revamping the documentation for elements and/or the above spec,
* so that a user gets more clearly informed about which layouts are
* applicable to a given tag, what happens when layout attribute or other
* attributes are not set, etc.
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf type {@code amp.validator.AmpLayout}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.AmpLayout)
dev.amp.validator.ValidatorProtos.AmpLayoutOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AmpLayout_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AmpLayout_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AmpLayout.class, dev.amp.validator.ValidatorProtos.AmpLayout.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.AmpLayout.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
supportedLayouts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
definesDefaultWidth_ = false;
definesDefaultHeight_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AmpLayout_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AmpLayout getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.AmpLayout.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AmpLayout build() {
dev.amp.validator.ValidatorProtos.AmpLayout result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AmpLayout buildPartial() {
dev.amp.validator.ValidatorProtos.AmpLayout result = new dev.amp.validator.ValidatorProtos.AmpLayout(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.amp.validator.ValidatorProtos.AmpLayout result) {
if (((bitField0_ & 0x00000001) != 0)) {
supportedLayouts_ = java.util.Collections.unmodifiableList(supportedLayouts_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.supportedLayouts_ = supportedLayouts_;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.AmpLayout result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.definesDefaultWidth_ = definesDefaultWidth_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.definesDefaultHeight_ = definesDefaultHeight_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.AmpLayout) {
return mergeFrom((dev.amp.validator.ValidatorProtos.AmpLayout)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.AmpLayout other) {
if (other == dev.amp.validator.ValidatorProtos.AmpLayout.getDefaultInstance()) return this;
if (!other.supportedLayouts_.isEmpty()) {
if (supportedLayouts_.isEmpty()) {
supportedLayouts_ = other.supportedLayouts_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSupportedLayoutsIsMutable();
supportedLayouts_.addAll(other.supportedLayouts_);
}
onChanged();
}
if (other.hasDefinesDefaultWidth()) {
setDefinesDefaultWidth(other.getDefinesDefaultWidth());
}
if (other.hasDefinesDefaultHeight()) {
setDefinesDefaultHeight(other.getDefinesDefaultHeight());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.AmpLayout.Layout tmpValue =
dev.amp.validator.ValidatorProtos.AmpLayout.Layout.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(1, tmpRaw);
} else {
ensureSupportedLayoutsIsMutable();
supportedLayouts_.add(tmpRaw);
}
break;
} // case 8
case 10: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.AmpLayout.Layout tmpValue =
dev.amp.validator.ValidatorProtos.AmpLayout.Layout.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(1, tmpRaw);
} else {
ensureSupportedLayoutsIsMutable();
supportedLayouts_.add(tmpRaw);
}
}
input.popLimit(oldLimit);
break;
} // case 10
case 16: {
definesDefaultWidth_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
definesDefaultHeight_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 24
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List supportedLayouts_ =
java.util.Collections.emptyList();
private void ensureSupportedLayoutsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
supportedLayouts_ = new java.util.ArrayList(supportedLayouts_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @return A list containing the supportedLayouts.
*/
public java.util.List getSupportedLayoutsList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.AmpLayout.Layout>(supportedLayouts_, supportedLayouts_converter_);
}
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @return The count of supportedLayouts.
*/
public int getSupportedLayoutsCount() {
return supportedLayouts_.size();
}
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @param index The index of the element to return.
* @return The supportedLayouts at the given index.
*/
public dev.amp.validator.ValidatorProtos.AmpLayout.Layout getSupportedLayouts(int index) {
return supportedLayouts_converter_.convert(supportedLayouts_.get(index));
}
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @param index The index to set the value at.
* @param value The supportedLayouts to set.
* @return This builder for chaining.
*/
public Builder setSupportedLayouts(
int index, dev.amp.validator.ValidatorProtos.AmpLayout.Layout value) {
if (value == null) {
throw new NullPointerException();
}
ensureSupportedLayoutsIsMutable();
supportedLayouts_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @param value The supportedLayouts to add.
* @return This builder for chaining.
*/
public Builder addSupportedLayouts(dev.amp.validator.ValidatorProtos.AmpLayout.Layout value) {
if (value == null) {
throw new NullPointerException();
}
ensureSupportedLayoutsIsMutable();
supportedLayouts_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @param values The supportedLayouts to add.
* @return This builder for chaining.
*/
public Builder addAllSupportedLayouts(
java.lang.Iterable values) {
ensureSupportedLayoutsIsMutable();
for (dev.amp.validator.ValidatorProtos.AmpLayout.Layout value : values) {
supportedLayouts_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* Specifies which layouts are supported by this element.
*
*
* repeated .amp.validator.AmpLayout.Layout supported_layouts = 1;
* @return This builder for chaining.
*/
public Builder clearSupportedLayouts() {
supportedLayouts_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private boolean definesDefaultWidth_ ;
/**
*
* Specifies whether this element has default dimensions. This corresponds
* to being allowlisted in naturalDimensions_ in
* https://github.com/ampproject/amphtml/blob/main/src/static-layout.js.
*
*
* optional bool defines_default_width = 2;
* @return Whether the definesDefaultWidth field is set.
*/
@java.lang.Override
public boolean hasDefinesDefaultWidth() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Specifies whether this element has default dimensions. This corresponds
* to being allowlisted in naturalDimensions_ in
* https://github.com/ampproject/amphtml/blob/main/src/static-layout.js.
*
*
* optional bool defines_default_width = 2;
* @return The definesDefaultWidth.
*/
@java.lang.Override
public boolean getDefinesDefaultWidth() {
return definesDefaultWidth_;
}
/**
*
* Specifies whether this element has default dimensions. This corresponds
* to being allowlisted in naturalDimensions_ in
* https://github.com/ampproject/amphtml/blob/main/src/static-layout.js.
*
*
* optional bool defines_default_width = 2;
* @param value The definesDefaultWidth to set.
* @return This builder for chaining.
*/
public Builder setDefinesDefaultWidth(boolean value) {
definesDefaultWidth_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Specifies whether this element has default dimensions. This corresponds
* to being allowlisted in naturalDimensions_ in
* https://github.com/ampproject/amphtml/blob/main/src/static-layout.js.
*
*
* optional bool defines_default_width = 2;
* @return This builder for chaining.
*/
public Builder clearDefinesDefaultWidth() {
bitField0_ = (bitField0_ & ~0x00000002);
definesDefaultWidth_ = false;
onChanged();
return this;
}
private boolean definesDefaultHeight_ ;
/**
* optional bool defines_default_height = 3;
* @return Whether the definesDefaultHeight field is set.
*/
@java.lang.Override
public boolean hasDefinesDefaultHeight() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional bool defines_default_height = 3;
* @return The definesDefaultHeight.
*/
@java.lang.Override
public boolean getDefinesDefaultHeight() {
return definesDefaultHeight_;
}
/**
* optional bool defines_default_height = 3;
* @param value The definesDefaultHeight to set.
* @return This builder for chaining.
*/
public Builder setDefinesDefaultHeight(boolean value) {
definesDefaultHeight_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* optional bool defines_default_height = 3;
* @return This builder for chaining.
*/
public Builder clearDefinesDefaultHeight() {
bitField0_ = (bitField0_ & ~0x00000004);
definesDefaultHeight_ = 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:amp.validator.AmpLayout)
}
// @@protoc_insertion_point(class_scope:amp.validator.AmpLayout)
private static final dev.amp.validator.ValidatorProtos.AmpLayout DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.AmpLayout();
}
public static dev.amp.validator.ValidatorProtos.AmpLayout getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AmpLayout parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AmpLayout getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AncestorMarkerOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.AncestorMarker)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @return A list containing the marker.
*/
java.util.List getMarkerList();
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @return The count of marker.
*/
int getMarkerCount();
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @param index The index of the element to return.
* @return The marker at the given index.
*/
dev.amp.validator.ValidatorProtos.AncestorMarker.Marker getMarker(int index);
}
/**
*
* An AncestorMarker is a state maintained on the stack of matching tags.
* When a TagSpec with an AncestorMarker matches, this Marker is placed on the
* stack until the matched html tag is popped from the stack. Other rules may be
* triggered by the presence of a specific AncestorMarker on the stack.
* NEXT AVAILABLE TAG: 2
*
*
* Protobuf type {@code amp.validator.AncestorMarker}
*/
public static final class AncestorMarker extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.AncestorMarker)
AncestorMarkerOrBuilder {
private static final long serialVersionUID = 0L;
// Use AncestorMarker.newBuilder() to construct.
private AncestorMarker(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private AncestorMarker() {
marker_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AncestorMarker();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AncestorMarker_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AncestorMarker_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AncestorMarker.class, dev.amp.validator.ValidatorProtos.AncestorMarker.Builder.class);
}
/**
*
* NEXT AVAILABLE TAG: 2
*
*
* Protobuf enum {@code amp.validator.AncestorMarker.Marker}
*/
public enum Marker
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
*
* Set by <amp-sidebar> tags to allow autoscroll attributes on descendants.
* See https://github.com/ampproject/amphtml/pull/20524 for more context.
*
*
* AUTOSCROLL = 1;
*/
AUTOSCROLL(1),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
*
* Set by <amp-sidebar> tags to allow autoscroll attributes on descendants.
* See https://github.com/ampproject/amphtml/pull/20524 for more context.
*
*
* AUTOSCROLL = 1;
*/
public static final int AUTOSCROLL_VALUE = 1;
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 Marker 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 Marker forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return AUTOSCROLL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Marker> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Marker findValueByNumber(int number) {
return Marker.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 dev.amp.validator.ValidatorProtos.AncestorMarker.getDescriptor().getEnumTypes().get(0);
}
private static final Marker[] VALUES = values();
public static Marker 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 Marker(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:amp.validator.AncestorMarker.Marker)
}
public static final int MARKER_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List marker_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.AncestorMarker.Marker> marker_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.AncestorMarker.Marker>() {
public dev.amp.validator.ValidatorProtos.AncestorMarker.Marker convert(java.lang.Integer from) {
dev.amp.validator.ValidatorProtos.AncestorMarker.Marker result = dev.amp.validator.ValidatorProtos.AncestorMarker.Marker.forNumber(from);
return result == null ? dev.amp.validator.ValidatorProtos.AncestorMarker.Marker.UNKNOWN : result;
}
};
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @return A list containing the marker.
*/
@java.lang.Override
public java.util.List getMarkerList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.AncestorMarker.Marker>(marker_, marker_converter_);
}
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @return The count of marker.
*/
@java.lang.Override
public int getMarkerCount() {
return marker_.size();
}
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @param index The index of the element to return.
* @return The marker at the given index.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AncestorMarker.Marker getMarker(int index) {
return marker_converter_.convert(marker_.get(index));
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < marker_.size(); i++) {
output.writeEnum(1, marker_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < marker_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(marker_.get(i));
}
size += dataSize;
size += 1 * marker_.size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.AncestorMarker)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.AncestorMarker other = (dev.amp.validator.ValidatorProtos.AncestorMarker) obj;
if (!marker_.equals(other.marker_)) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getMarkerCount() > 0) {
hash = (37 * hash) + MARKER_FIELD_NUMBER;
hash = (53 * hash) + marker_.hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.AncestorMarker parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AncestorMarker parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AncestorMarker parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AncestorMarker parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AncestorMarker parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.AncestorMarker parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.AncestorMarker parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AncestorMarker 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 dev.amp.validator.ValidatorProtos.AncestorMarker parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AncestorMarker 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 dev.amp.validator.ValidatorProtos.AncestorMarker parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.AncestorMarker 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(dev.amp.validator.ValidatorProtos.AncestorMarker 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;
}
/**
*
* An AncestorMarker is a state maintained on the stack of matching tags.
* When a TagSpec with an AncestorMarker matches, this Marker is placed on the
* stack until the matched html tag is popped from the stack. Other rules may be
* triggered by the presence of a specific AncestorMarker on the stack.
* NEXT AVAILABLE TAG: 2
*
*
* Protobuf type {@code amp.validator.AncestorMarker}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.AncestorMarker)
dev.amp.validator.ValidatorProtos.AncestorMarkerOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AncestorMarker_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AncestorMarker_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.AncestorMarker.class, dev.amp.validator.ValidatorProtos.AncestorMarker.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.AncestorMarker.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
marker_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_AncestorMarker_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AncestorMarker getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.AncestorMarker.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AncestorMarker build() {
dev.amp.validator.ValidatorProtos.AncestorMarker result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AncestorMarker buildPartial() {
dev.amp.validator.ValidatorProtos.AncestorMarker result = new dev.amp.validator.ValidatorProtos.AncestorMarker(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.amp.validator.ValidatorProtos.AncestorMarker result) {
if (((bitField0_ & 0x00000001) != 0)) {
marker_ = java.util.Collections.unmodifiableList(marker_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.marker_ = marker_;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.AncestorMarker result) {
int from_bitField0_ = bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.AncestorMarker) {
return mergeFrom((dev.amp.validator.ValidatorProtos.AncestorMarker)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.AncestorMarker other) {
if (other == dev.amp.validator.ValidatorProtos.AncestorMarker.getDefaultInstance()) return this;
if (!other.marker_.isEmpty()) {
if (marker_.isEmpty()) {
marker_ = other.marker_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureMarkerIsMutable();
marker_.addAll(other.marker_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.AncestorMarker.Marker tmpValue =
dev.amp.validator.ValidatorProtos.AncestorMarker.Marker.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(1, tmpRaw);
} else {
ensureMarkerIsMutable();
marker_.add(tmpRaw);
}
break;
} // case 8
case 10: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.AncestorMarker.Marker tmpValue =
dev.amp.validator.ValidatorProtos.AncestorMarker.Marker.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(1, tmpRaw);
} else {
ensureMarkerIsMutable();
marker_.add(tmpRaw);
}
}
input.popLimit(oldLimit);
break;
} // case 10
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List marker_ =
java.util.Collections.emptyList();
private void ensureMarkerIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
marker_ = new java.util.ArrayList(marker_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @return A list containing the marker.
*/
public java.util.List getMarkerList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.AncestorMarker.Marker>(marker_, marker_converter_);
}
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @return The count of marker.
*/
public int getMarkerCount() {
return marker_.size();
}
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @param index The index of the element to return.
* @return The marker at the given index.
*/
public dev.amp.validator.ValidatorProtos.AncestorMarker.Marker getMarker(int index) {
return marker_converter_.convert(marker_.get(index));
}
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @param index The index to set the value at.
* @param value The marker to set.
* @return This builder for chaining.
*/
public Builder setMarker(
int index, dev.amp.validator.ValidatorProtos.AncestorMarker.Marker value) {
if (value == null) {
throw new NullPointerException();
}
ensureMarkerIsMutable();
marker_.set(index, value.getNumber());
onChanged();
return this;
}
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @param value The marker to add.
* @return This builder for chaining.
*/
public Builder addMarker(dev.amp.validator.ValidatorProtos.AncestorMarker.Marker value) {
if (value == null) {
throw new NullPointerException();
}
ensureMarkerIsMutable();
marker_.add(value.getNumber());
onChanged();
return this;
}
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @param values The marker to add.
* @return This builder for chaining.
*/
public Builder addAllMarker(
java.lang.Iterable values) {
ensureMarkerIsMutable();
for (dev.amp.validator.ValidatorProtos.AncestorMarker.Marker value : values) {
marker_.add(value.getNumber());
}
onChanged();
return this;
}
/**
* repeated .amp.validator.AncestorMarker.Marker marker = 1;
* @return This builder for chaining.
*/
public Builder clearMarker() {
marker_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
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:amp.validator.AncestorMarker)
}
// @@protoc_insertion_point(class_scope:amp.validator.AncestorMarker)
private static final dev.amp.validator.ValidatorProtos.AncestorMarker DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.AncestorMarker();
}
public static dev.amp.validator.ValidatorProtos.AncestorMarker getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AncestorMarker parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AncestorMarker getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ChildTagSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.ChildTagSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* Unless set to -1 (the default), the parent tag must have exactly
* |mandatory_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_num_child_tags = 1 [default = -1];
* @return Whether the mandatoryNumChildTags field is set.
*/
boolean hasMandatoryNumChildTags();
/**
*
* Unless set to -1 (the default), the parent tag must have exactly
* |mandatory_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_num_child_tags = 1 [default = -1];
* @return The mandatoryNumChildTags.
*/
int getMandatoryNumChildTags();
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @return A list containing the firstChildTagNameOneof.
*/
java.util.List
getFirstChildTagNameOneofList();
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @return The count of firstChildTagNameOneof.
*/
int getFirstChildTagNameOneofCount();
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @param index The index of the element to return.
* @return The firstChildTagNameOneof at the given index.
*/
java.lang.String getFirstChildTagNameOneof(int index);
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @param index The index of the value to return.
* @return The bytes of the firstChildTagNameOneof at the given index.
*/
com.google.protobuf.ByteString
getFirstChildTagNameOneofBytes(int index);
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @return A list containing the childTagNameOneof.
*/
java.util.List
getChildTagNameOneofList();
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @return The count of childTagNameOneof.
*/
int getChildTagNameOneofCount();
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @param index The index of the element to return.
* @return The childTagNameOneof at the given index.
*/
java.lang.String getChildTagNameOneof(int index);
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @param index The index of the value to return.
* @return The bytes of the childTagNameOneof at the given index.
*/
com.google.protobuf.ByteString
getChildTagNameOneofBytes(int index);
/**
*
* Unless set to -1 (the default), the parent tag must have a minimum of
* |mandatory_min_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_min_num_child_tags = 4 [default = -1];
* @return Whether the mandatoryMinNumChildTags field is set.
*/
boolean hasMandatoryMinNumChildTags();
/**
*
* Unless set to -1 (the default), the parent tag must have a minimum of
* |mandatory_min_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_min_num_child_tags = 4 [default = -1];
* @return The mandatoryMinNumChildTags.
*/
int getMandatoryMinNumChildTags();
}
/**
*
* TagSpec::child_tags uses this configuration to specify which child tags
* are expected for a specific tag.
*
* Matching child tags is done by tag name, while the parent is
* matched by TagSpec. The reason for this is that matching by tag
* spec name would produce less useful error messages, because we want
* to be able to produce a good message even if the tag spec name
* could not be determined because the enclosed child tag is invalid
* (no TagSpec matches). By doing a tag name match, we can produce a
* reasonable error regardless if a child tag was misplaced.
* NEXT AVAILABLE TAG: 5
*
*
* Protobuf type {@code amp.validator.ChildTagSpec}
*/
public static final class ChildTagSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.ChildTagSpec)
ChildTagSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use ChildTagSpec.newBuilder() to construct.
private ChildTagSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ChildTagSpec() {
mandatoryNumChildTags_ = -1;
firstChildTagNameOneof_ =
com.google.protobuf.LazyStringArrayList.emptyList();
childTagNameOneof_ =
com.google.protobuf.LazyStringArrayList.emptyList();
mandatoryMinNumChildTags_ = -1;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ChildTagSpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ChildTagSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ChildTagSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.ChildTagSpec.class, dev.amp.validator.ValidatorProtos.ChildTagSpec.Builder.class);
}
private int bitField0_;
public static final int MANDATORY_NUM_CHILD_TAGS_FIELD_NUMBER = 1;
private int mandatoryNumChildTags_ = -1;
/**
*
* Unless set to -1 (the default), the parent tag must have exactly
* |mandatory_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_num_child_tags = 1 [default = -1];
* @return Whether the mandatoryNumChildTags field is set.
*/
@java.lang.Override
public boolean hasMandatoryNumChildTags() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Unless set to -1 (the default), the parent tag must have exactly
* |mandatory_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_num_child_tags = 1 [default = -1];
* @return The mandatoryNumChildTags.
*/
@java.lang.Override
public int getMandatoryNumChildTags() {
return mandatoryNumChildTags_;
}
public static final int FIRST_CHILD_TAG_NAME_ONEOF_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList firstChildTagNameOneof_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @return A list containing the firstChildTagNameOneof.
*/
public com.google.protobuf.ProtocolStringList
getFirstChildTagNameOneofList() {
return firstChildTagNameOneof_;
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @return The count of firstChildTagNameOneof.
*/
public int getFirstChildTagNameOneofCount() {
return firstChildTagNameOneof_.size();
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @param index The index of the element to return.
* @return The firstChildTagNameOneof at the given index.
*/
public java.lang.String getFirstChildTagNameOneof(int index) {
return firstChildTagNameOneof_.get(index);
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @param index The index of the value to return.
* @return The bytes of the firstChildTagNameOneof at the given index.
*/
public com.google.protobuf.ByteString
getFirstChildTagNameOneofBytes(int index) {
return firstChildTagNameOneof_.getByteString(index);
}
public static final int CHILD_TAG_NAME_ONEOF_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList childTagNameOneof_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @return A list containing the childTagNameOneof.
*/
public com.google.protobuf.ProtocolStringList
getChildTagNameOneofList() {
return childTagNameOneof_;
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @return The count of childTagNameOneof.
*/
public int getChildTagNameOneofCount() {
return childTagNameOneof_.size();
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @param index The index of the element to return.
* @return The childTagNameOneof at the given index.
*/
public java.lang.String getChildTagNameOneof(int index) {
return childTagNameOneof_.get(index);
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @param index The index of the value to return.
* @return The bytes of the childTagNameOneof at the given index.
*/
public com.google.protobuf.ByteString
getChildTagNameOneofBytes(int index) {
return childTagNameOneof_.getByteString(index);
}
public static final int MANDATORY_MIN_NUM_CHILD_TAGS_FIELD_NUMBER = 4;
private int mandatoryMinNumChildTags_ = -1;
/**
*
* Unless set to -1 (the default), the parent tag must have a minimum of
* |mandatory_min_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_min_num_child_tags = 4 [default = -1];
* @return Whether the mandatoryMinNumChildTags field is set.
*/
@java.lang.Override
public boolean hasMandatoryMinNumChildTags() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Unless set to -1 (the default), the parent tag must have a minimum of
* |mandatory_min_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_min_num_child_tags = 4 [default = -1];
* @return The mandatoryMinNumChildTags.
*/
@java.lang.Override
public int getMandatoryMinNumChildTags() {
return mandatoryMinNumChildTags_;
}
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.writeInt32(1, mandatoryNumChildTags_);
}
for (int i = 0; i < firstChildTagNameOneof_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, firstChildTagNameOneof_.getRaw(i));
}
for (int i = 0; i < childTagNameOneof_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, childTagNameOneof_.getRaw(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeInt32(4, mandatoryMinNumChildTags_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, mandatoryNumChildTags_);
}
{
int dataSize = 0;
for (int i = 0; i < firstChildTagNameOneof_.size(); i++) {
dataSize += computeStringSizeNoTag(firstChildTagNameOneof_.getRaw(i));
}
size += dataSize;
size += 1 * getFirstChildTagNameOneofList().size();
}
{
int dataSize = 0;
for (int i = 0; i < childTagNameOneof_.size(); i++) {
dataSize += computeStringSizeNoTag(childTagNameOneof_.getRaw(i));
}
size += dataSize;
size += 1 * getChildTagNameOneofList().size();
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, mandatoryMinNumChildTags_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.ChildTagSpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.ChildTagSpec other = (dev.amp.validator.ValidatorProtos.ChildTagSpec) obj;
if (hasMandatoryNumChildTags() != other.hasMandatoryNumChildTags()) return false;
if (hasMandatoryNumChildTags()) {
if (getMandatoryNumChildTags()
!= other.getMandatoryNumChildTags()) return false;
}
if (!getFirstChildTagNameOneofList()
.equals(other.getFirstChildTagNameOneofList())) return false;
if (!getChildTagNameOneofList()
.equals(other.getChildTagNameOneofList())) return false;
if (hasMandatoryMinNumChildTags() != other.hasMandatoryMinNumChildTags()) return false;
if (hasMandatoryMinNumChildTags()) {
if (getMandatoryMinNumChildTags()
!= other.getMandatoryMinNumChildTags()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasMandatoryNumChildTags()) {
hash = (37 * hash) + MANDATORY_NUM_CHILD_TAGS_FIELD_NUMBER;
hash = (53 * hash) + getMandatoryNumChildTags();
}
if (getFirstChildTagNameOneofCount() > 0) {
hash = (37 * hash) + FIRST_CHILD_TAG_NAME_ONEOF_FIELD_NUMBER;
hash = (53 * hash) + getFirstChildTagNameOneofList().hashCode();
}
if (getChildTagNameOneofCount() > 0) {
hash = (37 * hash) + CHILD_TAG_NAME_ONEOF_FIELD_NUMBER;
hash = (53 * hash) + getChildTagNameOneofList().hashCode();
}
if (hasMandatoryMinNumChildTags()) {
hash = (37 * hash) + MANDATORY_MIN_NUM_CHILD_TAGS_FIELD_NUMBER;
hash = (53 * hash) + getMandatoryMinNumChildTags();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.ChildTagSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.ChildTagSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.ChildTagSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.ChildTagSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.ChildTagSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.ChildTagSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.ChildTagSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.ChildTagSpec 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 dev.amp.validator.ValidatorProtos.ChildTagSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.ChildTagSpec 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 dev.amp.validator.ValidatorProtos.ChildTagSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.ChildTagSpec 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(dev.amp.validator.ValidatorProtos.ChildTagSpec 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;
}
/**
*
* TagSpec::child_tags uses this configuration to specify which child tags
* are expected for a specific tag.
*
* Matching child tags is done by tag name, while the parent is
* matched by TagSpec. The reason for this is that matching by tag
* spec name would produce less useful error messages, because we want
* to be able to produce a good message even if the tag spec name
* could not be determined because the enclosed child tag is invalid
* (no TagSpec matches). By doing a tag name match, we can produce a
* reasonable error regardless if a child tag was misplaced.
* NEXT AVAILABLE TAG: 5
*
*
* Protobuf type {@code amp.validator.ChildTagSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.ChildTagSpec)
dev.amp.validator.ValidatorProtos.ChildTagSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ChildTagSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ChildTagSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.ChildTagSpec.class, dev.amp.validator.ValidatorProtos.ChildTagSpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.ChildTagSpec.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
mandatoryNumChildTags_ = -1;
firstChildTagNameOneof_ =
com.google.protobuf.LazyStringArrayList.emptyList();
childTagNameOneof_ =
com.google.protobuf.LazyStringArrayList.emptyList();
mandatoryMinNumChildTags_ = -1;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ChildTagSpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ChildTagSpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.ChildTagSpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ChildTagSpec build() {
dev.amp.validator.ValidatorProtos.ChildTagSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ChildTagSpec buildPartial() {
dev.amp.validator.ValidatorProtos.ChildTagSpec result = new dev.amp.validator.ValidatorProtos.ChildTagSpec(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.ChildTagSpec result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.mandatoryNumChildTags_ = mandatoryNumChildTags_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
firstChildTagNameOneof_.makeImmutable();
result.firstChildTagNameOneof_ = firstChildTagNameOneof_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
childTagNameOneof_.makeImmutable();
result.childTagNameOneof_ = childTagNameOneof_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.mandatoryMinNumChildTags_ = mandatoryMinNumChildTags_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.ChildTagSpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.ChildTagSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.ChildTagSpec other) {
if (other == dev.amp.validator.ValidatorProtos.ChildTagSpec.getDefaultInstance()) return this;
if (other.hasMandatoryNumChildTags()) {
setMandatoryNumChildTags(other.getMandatoryNumChildTags());
}
if (!other.firstChildTagNameOneof_.isEmpty()) {
if (firstChildTagNameOneof_.isEmpty()) {
firstChildTagNameOneof_ = other.firstChildTagNameOneof_;
bitField0_ |= 0x00000002;
} else {
ensureFirstChildTagNameOneofIsMutable();
firstChildTagNameOneof_.addAll(other.firstChildTagNameOneof_);
}
onChanged();
}
if (!other.childTagNameOneof_.isEmpty()) {
if (childTagNameOneof_.isEmpty()) {
childTagNameOneof_ = other.childTagNameOneof_;
bitField0_ |= 0x00000004;
} else {
ensureChildTagNameOneofIsMutable();
childTagNameOneof_.addAll(other.childTagNameOneof_);
}
onChanged();
}
if (other.hasMandatoryMinNumChildTags()) {
setMandatoryMinNumChildTags(other.getMandatoryMinNumChildTags());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
mandatoryNumChildTags_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureFirstChildTagNameOneofIsMutable();
firstChildTagNameOneof_.add(bs);
break;
} // case 18
case 26: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureChildTagNameOneofIsMutable();
childTagNameOneof_.add(bs);
break;
} // case 26
case 32: {
mandatoryMinNumChildTags_ = input.readInt32();
bitField0_ |= 0x00000008;
break;
} // case 32
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int mandatoryNumChildTags_ = -1;
/**
*
* Unless set to -1 (the default), the parent tag must have exactly
* |mandatory_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_num_child_tags = 1 [default = -1];
* @return Whether the mandatoryNumChildTags field is set.
*/
@java.lang.Override
public boolean hasMandatoryNumChildTags() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Unless set to -1 (the default), the parent tag must have exactly
* |mandatory_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_num_child_tags = 1 [default = -1];
* @return The mandatoryNumChildTags.
*/
@java.lang.Override
public int getMandatoryNumChildTags() {
return mandatoryNumChildTags_;
}
/**
*
* Unless set to -1 (the default), the parent tag must have exactly
* |mandatory_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_num_child_tags = 1 [default = -1];
* @param value The mandatoryNumChildTags to set.
* @return This builder for chaining.
*/
public Builder setMandatoryNumChildTags(int value) {
mandatoryNumChildTags_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Unless set to -1 (the default), the parent tag must have exactly
* |mandatory_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_num_child_tags = 1 [default = -1];
* @return This builder for chaining.
*/
public Builder clearMandatoryNumChildTags() {
bitField0_ = (bitField0_ & ~0x00000001);
mandatoryNumChildTags_ = -1;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList firstChildTagNameOneof_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureFirstChildTagNameOneofIsMutable() {
if (!firstChildTagNameOneof_.isModifiable()) {
firstChildTagNameOneof_ = new com.google.protobuf.LazyStringArrayList(firstChildTagNameOneof_);
}
bitField0_ |= 0x00000002;
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @return A list containing the firstChildTagNameOneof.
*/
public com.google.protobuf.ProtocolStringList
getFirstChildTagNameOneofList() {
firstChildTagNameOneof_.makeImmutable();
return firstChildTagNameOneof_;
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @return The count of firstChildTagNameOneof.
*/
public int getFirstChildTagNameOneofCount() {
return firstChildTagNameOneof_.size();
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @param index The index of the element to return.
* @return The firstChildTagNameOneof at the given index.
*/
public java.lang.String getFirstChildTagNameOneof(int index) {
return firstChildTagNameOneof_.get(index);
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @param index The index of the value to return.
* @return The bytes of the firstChildTagNameOneof at the given index.
*/
public com.google.protobuf.ByteString
getFirstChildTagNameOneofBytes(int index) {
return firstChildTagNameOneof_.getByteString(index);
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @param index The index to set the value at.
* @param value The firstChildTagNameOneof to set.
* @return This builder for chaining.
*/
public Builder setFirstChildTagNameOneof(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFirstChildTagNameOneofIsMutable();
firstChildTagNameOneof_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @param value The firstChildTagNameOneof to add.
* @return This builder for chaining.
*/
public Builder addFirstChildTagNameOneof(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFirstChildTagNameOneofIsMutable();
firstChildTagNameOneof_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @param values The firstChildTagNameOneof to add.
* @return This builder for chaining.
*/
public Builder addAllFirstChildTagNameOneof(
java.lang.Iterable values) {
ensureFirstChildTagNameOneofIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, firstChildTagNameOneof_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @return This builder for chaining.
*/
public Builder clearFirstChildTagNameOneof() {
firstChildTagNameOneof_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* If at least one tag name is specified, then the first child of the
* parent tag must have one of the provided names.
*
*
* repeated string first_child_tag_name_oneof = 2;
* @param value The bytes of the firstChildTagNameOneof to add.
* @return This builder for chaining.
*/
public Builder addFirstChildTagNameOneofBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureFirstChildTagNameOneofIsMutable();
firstChildTagNameOneof_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList childTagNameOneof_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureChildTagNameOneofIsMutable() {
if (!childTagNameOneof_.isModifiable()) {
childTagNameOneof_ = new com.google.protobuf.LazyStringArrayList(childTagNameOneof_);
}
bitField0_ |= 0x00000004;
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @return A list containing the childTagNameOneof.
*/
public com.google.protobuf.ProtocolStringList
getChildTagNameOneofList() {
childTagNameOneof_.makeImmutable();
return childTagNameOneof_;
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @return The count of childTagNameOneof.
*/
public int getChildTagNameOneofCount() {
return childTagNameOneof_.size();
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @param index The index of the element to return.
* @return The childTagNameOneof at the given index.
*/
public java.lang.String getChildTagNameOneof(int index) {
return childTagNameOneof_.get(index);
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @param index The index of the value to return.
* @return The bytes of the childTagNameOneof at the given index.
*/
public com.google.protobuf.ByteString
getChildTagNameOneofBytes(int index) {
return childTagNameOneof_.getByteString(index);
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @param index The index to set the value at.
* @param value The childTagNameOneof to set.
* @return This builder for chaining.
*/
public Builder setChildTagNameOneof(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureChildTagNameOneofIsMutable();
childTagNameOneof_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @param value The childTagNameOneof to add.
* @return This builder for chaining.
*/
public Builder addChildTagNameOneof(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureChildTagNameOneofIsMutable();
childTagNameOneof_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @param values The childTagNameOneof to add.
* @return This builder for chaining.
*/
public Builder addAllChildTagNameOneof(
java.lang.Iterable values) {
ensureChildTagNameOneofIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, childTagNameOneof_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @return This builder for chaining.
*/
public Builder clearChildTagNameOneof() {
childTagNameOneof_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);;
onChanged();
return this;
}
/**
*
* If at least one tag name is specified, then the child tags of
* the parent tag must have one of the provided tag names.
*
*
* repeated string child_tag_name_oneof = 3;
* @param value The bytes of the childTagNameOneof to add.
* @return This builder for chaining.
*/
public Builder addChildTagNameOneofBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureChildTagNameOneofIsMutable();
childTagNameOneof_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private int mandatoryMinNumChildTags_ = -1;
/**
*
* Unless set to -1 (the default), the parent tag must have a minimum of
* |mandatory_min_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_min_num_child_tags = 4 [default = -1];
* @return Whether the mandatoryMinNumChildTags field is set.
*/
@java.lang.Override
public boolean hasMandatoryMinNumChildTags() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Unless set to -1 (the default), the parent tag must have a minimum of
* |mandatory_min_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_min_num_child_tags = 4 [default = -1];
* @return The mandatoryMinNumChildTags.
*/
@java.lang.Override
public int getMandatoryMinNumChildTags() {
return mandatoryMinNumChildTags_;
}
/**
*
* Unless set to -1 (the default), the parent tag must have a minimum of
* |mandatory_min_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_min_num_child_tags = 4 [default = -1];
* @param value The mandatoryMinNumChildTags to set.
* @return This builder for chaining.
*/
public Builder setMandatoryMinNumChildTags(int value) {
mandatoryMinNumChildTags_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Unless set to -1 (the default), the parent tag must have a minimum of
* |mandatory_min_num_child_tags| immediate child tags.
*
*
* optional int32 mandatory_min_num_child_tags = 4 [default = -1];
* @return This builder for chaining.
*/
public Builder clearMandatoryMinNumChildTags() {
bitField0_ = (bitField0_ & ~0x00000008);
mandatoryMinNumChildTags_ = -1;
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:amp.validator.ChildTagSpec)
}
// @@protoc_insertion_point(class_scope:amp.validator.ChildTagSpec)
private static final dev.amp.validator.ValidatorProtos.ChildTagSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.ChildTagSpec();
}
public static dev.amp.validator.ValidatorProtos.ChildTagSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ChildTagSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ChildTagSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ReferencePointOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.ReferencePoint)
com.google.protobuf.MessageOrBuilder {
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @return Whether the tagSpecName field is set.
*/
boolean hasTagSpecName();
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @return The tagSpecName.
*/
java.lang.String getTagSpecName();
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @return The bytes for tagSpecName.
*/
com.google.protobuf.ByteString
getTagSpecNameBytes();
/**
*
* At least one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool mandatory = 2;
* @return Whether the mandatory field is set.
*/
boolean hasMandatory();
/**
*
* At least one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool mandatory = 2;
* @return The mandatory.
*/
boolean getMandatory();
/**
*
* At most one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool unique = 3;
* @return Whether the unique field is set.
*/
boolean hasUnique();
/**
*
* At most one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool unique = 3;
* @return The unique.
*/
boolean getUnique();
}
/**
*
* TagSpecs and reference points.
*
* Any TagSpec may define a list of reference points via the
* TagSpec::reference_points field. These reference points specify how
* DOM elements that are children of this parent tag fulfill particular
* functionality. For instance, a widget (implemented as an AMP tag) may
* require a login reference point. Any valid AMP tag would be allowed,
* whether it's a clickable DIV or an AMP-IMG or a BUTTON, so long as
* it *also* conforms to the reference point specification. This
* specification is a TagSpec which does not define a name (the
* name is set to the special value '$REFERENCE_POINT'), but rather
* identifies the reference point with AttrSpec requirements. For instance,
* the login reference point may require that there be a login attribute,
* or some end-point attribute with a URL, or similar.
* Therefore, for any child tags of a tag that defines reference points,
* they are first matched against these reference points, and only
* then are they validated as regular tags against the TagSpecs that are
* not reference points while their reference point attributes are skipped.
* The complexity of this mechanism is unfortunate but reduces the markup
* required and makes CSS styling more convenient. Please see
* the amp-live-list specification for an example.
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf type {@code amp.validator.ReferencePoint}
*/
public static final class ReferencePoint extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.ReferencePoint)
ReferencePointOrBuilder {
private static final long serialVersionUID = 0L;
// Use ReferencePoint.newBuilder() to construct.
private ReferencePoint(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ReferencePoint() {
tagSpecName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ReferencePoint();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ReferencePoint_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ReferencePoint_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.ReferencePoint.class, dev.amp.validator.ValidatorProtos.ReferencePoint.Builder.class);
}
private int bitField0_;
public static final int TAG_SPEC_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object tagSpecName_ = "";
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @return Whether the tagSpecName field is set.
*/
@java.lang.Override
public boolean hasTagSpecName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @return The tagSpecName.
*/
@java.lang.Override
public java.lang.String getTagSpecName() {
java.lang.Object ref = tagSpecName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
tagSpecName_ = s;
}
return s;
}
}
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @return The bytes for tagSpecName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTagSpecNameBytes() {
java.lang.Object ref = tagSpecName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tagSpecName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MANDATORY_FIELD_NUMBER = 2;
private boolean mandatory_ = false;
/**
*
* At least one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool mandatory = 2;
* @return Whether the mandatory field is set.
*/
@java.lang.Override
public boolean hasMandatory() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* At least one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool mandatory = 2;
* @return The mandatory.
*/
@java.lang.Override
public boolean getMandatory() {
return mandatory_;
}
public static final int UNIQUE_FIELD_NUMBER = 3;
private boolean unique_ = false;
/**
*
* At most one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool unique = 3;
* @return Whether the unique field is set.
*/
@java.lang.Override
public boolean hasUnique() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* At most one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool unique = 3;
* @return The unique.
*/
@java.lang.Override
public boolean getUnique() {
return unique_;
}
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)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tagSpecName_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeBool(2, mandatory_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeBool(3, unique_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tagSpecName_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(2, mandatory_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, unique_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.ReferencePoint)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.ReferencePoint other = (dev.amp.validator.ValidatorProtos.ReferencePoint) obj;
if (hasTagSpecName() != other.hasTagSpecName()) return false;
if (hasTagSpecName()) {
if (!getTagSpecName()
.equals(other.getTagSpecName())) return false;
}
if (hasMandatory() != other.hasMandatory()) return false;
if (hasMandatory()) {
if (getMandatory()
!= other.getMandatory()) return false;
}
if (hasUnique() != other.hasUnique()) return false;
if (hasUnique()) {
if (getUnique()
!= other.getUnique()) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasTagSpecName()) {
hash = (37 * hash) + TAG_SPEC_NAME_FIELD_NUMBER;
hash = (53 * hash) + getTagSpecName().hashCode();
}
if (hasMandatory()) {
hash = (37 * hash) + MANDATORY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMandatory());
}
if (hasUnique()) {
hash = (37 * hash) + UNIQUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getUnique());
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.ReferencePoint parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.ReferencePoint parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.ReferencePoint parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.ReferencePoint parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.ReferencePoint parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.ReferencePoint parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.ReferencePoint parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.ReferencePoint 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 dev.amp.validator.ValidatorProtos.ReferencePoint parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.ReferencePoint 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 dev.amp.validator.ValidatorProtos.ReferencePoint parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.ReferencePoint 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(dev.amp.validator.ValidatorProtos.ReferencePoint 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;
}
/**
*
* TagSpecs and reference points.
*
* Any TagSpec may define a list of reference points via the
* TagSpec::reference_points field. These reference points specify how
* DOM elements that are children of this parent tag fulfill particular
* functionality. For instance, a widget (implemented as an AMP tag) may
* require a login reference point. Any valid AMP tag would be allowed,
* whether it's a clickable DIV or an AMP-IMG or a BUTTON, so long as
* it *also* conforms to the reference point specification. This
* specification is a TagSpec which does not define a name (the
* name is set to the special value '$REFERENCE_POINT'), but rather
* identifies the reference point with AttrSpec requirements. For instance,
* the login reference point may require that there be a login attribute,
* or some end-point attribute with a URL, or similar.
* Therefore, for any child tags of a tag that defines reference points,
* they are first matched against these reference points, and only
* then are they validated as regular tags against the TagSpecs that are
* not reference points while their reference point attributes are skipped.
* The complexity of this mechanism is unfortunate but reduces the markup
* required and makes CSS styling more convenient. Please see
* the amp-live-list specification for an example.
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf type {@code amp.validator.ReferencePoint}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.ReferencePoint)
dev.amp.validator.ValidatorProtos.ReferencePointOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ReferencePoint_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ReferencePoint_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.ReferencePoint.class, dev.amp.validator.ValidatorProtos.ReferencePoint.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.ReferencePoint.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
tagSpecName_ = "";
mandatory_ = false;
unique_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ReferencePoint_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ReferencePoint getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.ReferencePoint.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ReferencePoint build() {
dev.amp.validator.ValidatorProtos.ReferencePoint result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ReferencePoint buildPartial() {
dev.amp.validator.ValidatorProtos.ReferencePoint result = new dev.amp.validator.ValidatorProtos.ReferencePoint(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.ReferencePoint result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.tagSpecName_ = tagSpecName_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.mandatory_ = mandatory_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.unique_ = unique_;
to_bitField0_ |= 0x00000004;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.ReferencePoint) {
return mergeFrom((dev.amp.validator.ValidatorProtos.ReferencePoint)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.ReferencePoint other) {
if (other == dev.amp.validator.ValidatorProtos.ReferencePoint.getDefaultInstance()) return this;
if (other.hasTagSpecName()) {
tagSpecName_ = other.tagSpecName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasMandatory()) {
setMandatory(other.getMandatory());
}
if (other.hasUnique()) {
setUnique(other.getUnique());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
tagSpecName_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
mandatory_ = input.readBool();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
unique_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 24
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object tagSpecName_ = "";
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @return Whether the tagSpecName field is set.
*/
public boolean hasTagSpecName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @return The tagSpecName.
*/
public java.lang.String getTagSpecName() {
java.lang.Object ref = tagSpecName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
tagSpecName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @return The bytes for tagSpecName.
*/
public com.google.protobuf.ByteString
getTagSpecNameBytes() {
java.lang.Object ref = tagSpecName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tagSpecName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @param value The tagSpecName to set.
* @return This builder for chaining.
*/
public Builder setTagSpecName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
tagSpecName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @return This builder for chaining.
*/
public Builder clearTagSpecName() {
tagSpecName_ = getDefaultInstance().getTagSpecName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* A tag spec identified by its TagSpec::spec_name which specifies how
* a specific functionality for the parent tag is assigned.
*
*
* optional string tag_spec_name = 1;
* @param value The bytes for tagSpecName to set.
* @return This builder for chaining.
*/
public Builder setTagSpecNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
tagSpecName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private boolean mandatory_ ;
/**
*
* At least one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool mandatory = 2;
* @return Whether the mandatory field is set.
*/
@java.lang.Override
public boolean hasMandatory() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* At least one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool mandatory = 2;
* @return The mandatory.
*/
@java.lang.Override
public boolean getMandatory() {
return mandatory_;
}
/**
*
* At least one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool mandatory = 2;
* @param value The mandatory to set.
* @return This builder for chaining.
*/
public Builder setMandatory(boolean value) {
mandatory_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* At least one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool mandatory = 2;
* @return This builder for chaining.
*/
public Builder clearMandatory() {
bitField0_ = (bitField0_ & ~0x00000002);
mandatory_ = false;
onChanged();
return this;
}
private boolean unique_ ;
/**
*
* At most one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool unique = 3;
* @return Whether the unique field is set.
*/
@java.lang.Override
public boolean hasUnique() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* At most one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool unique = 3;
* @return The unique.
*/
@java.lang.Override
public boolean getUnique() {
return unique_;
}
/**
*
* At most one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool unique = 3;
* @param value The unique to set.
* @return This builder for chaining.
*/
public Builder setUnique(boolean value) {
unique_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* At most one of the child tags of the parent defining this
* reference point must match it.
*
*
* optional bool unique = 3;
* @return This builder for chaining.
*/
public Builder clearUnique() {
bitField0_ = (bitField0_ & ~0x00000004);
unique_ = 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:amp.validator.ReferencePoint)
}
// @@protoc_insertion_point(class_scope:amp.validator.ReferencePoint)
private static final dev.amp.validator.ValidatorProtos.ReferencePoint DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.ReferencePoint();
}
public static dev.amp.validator.ValidatorProtos.ReferencePoint getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ReferencePoint parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ReferencePoint getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExtensionSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.ExtensionSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
boolean hasName();
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @return A list containing the version.
*/
java.util.List
getVersionList();
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @return The count of version.
*/
int getVersionCount();
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @param index The index of the element to return.
* @return The version at the given index.
*/
java.lang.String getVersion(int index);
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @param index The index of the value to return.
* @return The bytes of the version at the given index.
*/
com.google.protobuf.ByteString
getVersionBytes(int index);
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @return Whether the versionName field is set.
*/
boolean hasVersionName();
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @return The versionName.
*/
java.lang.String getVersionName();
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @return The bytes for versionName.
*/
com.google.protobuf.ByteString
getVersionNameBytes();
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @return A list containing the deprecatedVersion.
*/
java.util.List
getDeprecatedVersionList();
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @return The count of deprecatedVersion.
*/
int getDeprecatedVersionCount();
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @param index The index of the element to return.
* @return The deprecatedVersion at the given index.
*/
java.lang.String getDeprecatedVersion(int index);
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @param index The index of the value to return.
* @return The bytes of the deprecatedVersion at the given index.
*/
com.google.protobuf.ByteString
getDeprecatedVersionBytes(int index);
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @return A list containing the bentoSupportedVersion.
*/
java.util.List
getBentoSupportedVersionList();
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @return The count of bentoSupportedVersion.
*/
int getBentoSupportedVersionCount();
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @param index The index of the element to return.
* @return The bentoSupportedVersion at the given index.
*/
java.lang.String getBentoSupportedVersion(int index);
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @param index The index of the value to return.
* @return The bytes of the bentoSupportedVersion at the given index.
*/
com.google.protobuf.ByteString
getBentoSupportedVersionBytes(int index);
/**
* optional .amp.validator.ExtensionSpec.ExtensionType extension_type = 8 [default = CUSTOM_ELEMENT];
* @return Whether the extensionType field is set.
*/
boolean hasExtensionType();
/**
* optional .amp.validator.ExtensionSpec.ExtensionType extension_type = 8 [default = CUSTOM_ELEMENT];
* @return The extensionType.
*/
dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType getExtensionType();
/**
*
* For older tags, we did not originally require that the tag only be included
* once, so those tags are exempted from the multiple inclusion ban.
*
*
* optional bool deprecated_allow_duplicates = 6 [default = false];
* @return Whether the deprecatedAllowDuplicates field is set.
*/
boolean hasDeprecatedAllowDuplicates();
/**
*
* For older tags, we did not originally require that the tag only be included
* once, so those tags are exempted from the multiple inclusion ban.
*
*
* optional bool deprecated_allow_duplicates = 6 [default = false];
* @return The deprecatedAllowDuplicates.
*/
boolean getDeprecatedAllowDuplicates();
/**
* optional .amp.validator.ExtensionSpec.ExtensionUsageRequirement requires_usage = 7 [default = ERROR];
* @return Whether the requiresUsage field is set.
*/
boolean hasRequiresUsage();
/**
* optional .amp.validator.ExtensionSpec.ExtensionUsageRequirement requires_usage = 7 [default = ERROR];
* @return The requiresUsage.
*/
dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement getRequiresUsage();
}
/**
*
* Specs specific to AMP Extensions. This is a field within TagSpec that
* replaces the standard tagspec list of attributes, requirements, etc.
* NEXT AVAILABLE TAG: 11
*
*
* Protobuf type {@code amp.validator.ExtensionSpec}
*/
public static final class ExtensionSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.ExtensionSpec)
ExtensionSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use ExtensionSpec.newBuilder() to construct.
private ExtensionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private ExtensionSpec() {
name_ = "";
version_ =
com.google.protobuf.LazyStringArrayList.emptyList();
versionName_ = "";
deprecatedVersion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bentoSupportedVersion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
extensionType_ = 1;
requiresUsage_ = 1;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ExtensionSpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ExtensionSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ExtensionSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.ExtensionSpec.class, dev.amp.validator.ValidatorProtos.ExtensionSpec.Builder.class);
}
/**
*
* Most extensions are custom-elements. For custom-template extensions, this
* value needs to be set true. E.g: amp-mustache.
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf enum {@code amp.validator.ExtensionSpec.ExtensionType}
*/
public enum ExtensionType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* UNKNOWN = 0;
*/
UNKNOWN(0),
/**
* CUSTOM_ELEMENT = 1;
*/
CUSTOM_ELEMENT(1),
/**
* CUSTOM_TEMPLATE = 2;
*/
CUSTOM_TEMPLATE(2),
/**
* HOST_SERVICE = 3;
*/
HOST_SERVICE(3),
;
/**
* UNKNOWN = 0;
*/
public static final int UNKNOWN_VALUE = 0;
/**
* CUSTOM_ELEMENT = 1;
*/
public static final int CUSTOM_ELEMENT_VALUE = 1;
/**
* CUSTOM_TEMPLATE = 2;
*/
public static final int CUSTOM_TEMPLATE_VALUE = 2;
/**
* HOST_SERVICE = 3;
*/
public static final int HOST_SERVICE_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 ExtensionType 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 ExtensionType forNumber(int value) {
switch (value) {
case 0: return UNKNOWN;
case 1: return CUSTOM_ELEMENT;
case 2: return CUSTOM_TEMPLATE;
case 3: return HOST_SERVICE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ExtensionType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ExtensionType findValueByNumber(int number) {
return ExtensionType.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 dev.amp.validator.ValidatorProtos.ExtensionSpec.getDescriptor().getEnumTypes().get(0);
}
private static final ExtensionType[] VALUES = values();
public static ExtensionType 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 ExtensionType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:amp.validator.ExtensionSpec.ExtensionType)
}
/**
*
* TagSpec.requires_extension will be set to the new extension's name on one
* or more TagSpecs that require that extension. This typically creates 2
* validation requirements:
* 1) If a tag is on the page whose TagSpec has the requires_extension
* field set, but that extension is not present, this is an error.
* (Usage requires extension).
* 2) If an extension is on the page, but no tags indicating usage of that
* extension via the required_extension field are on the page, this is an
* error. (Extension requires usage).
*
* The second requirement (extension requires usage) has a few exceptions:
* 1) For older extensions, implemented before these tagspec rules, we
* do not want to introduce a breaking change, so we exempt these
* extensions from the usage requirement. New extensions must use ERROR.
* 2) Some extensions, such as `amp-dynamic-css-classes`, do not have any
* associated tag in the document indicating usage. These extensions do
* not trigger warnings or errors.
* NEXT AVAILABLE TAG: 4
*
*
* Protobuf enum {@code amp.validator.ExtensionSpec.ExtensionUsageRequirement}
*/
public enum ExtensionUsageRequirement
implements com.google.protobuf.ProtocolMessageEnum {
/**
* ERROR = 1;
*/
ERROR(1),
/**
*
* Exception for exempted extensions. #1 above.
*
*
* EXEMPTED = 2;
*/
EXEMPTED(2),
/**
*
* Exception for extensions with no usage-indicating tag. #2 above.
*
*
* NONE = 3;
*/
NONE(3),
;
/**
* ERROR = 1;
*/
public static final int ERROR_VALUE = 1;
/**
*
* Exception for exempted extensions. #1 above.
*
*
* EXEMPTED = 2;
*/
public static final int EXEMPTED_VALUE = 2;
/**
*
* Exception for extensions with no usage-indicating tag. #2 above.
*
*
* NONE = 3;
*/
public static final int NONE_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 ExtensionUsageRequirement 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 ExtensionUsageRequirement forNumber(int value) {
switch (value) {
case 1: return ERROR;
case 2: return EXEMPTED;
case 3: return NONE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ExtensionUsageRequirement> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public ExtensionUsageRequirement findValueByNumber(int number) {
return ExtensionUsageRequirement.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 dev.amp.validator.ValidatorProtos.ExtensionSpec.getDescriptor().getEnumTypes().get(1);
}
private static final ExtensionUsageRequirement[] VALUES = values();
public static ExtensionUsageRequirement 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 ExtensionUsageRequirement(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:amp.validator.ExtensionSpec.ExtensionUsageRequirement)
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VERSION_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList version_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @return A list containing the version.
*/
public com.google.protobuf.ProtocolStringList
getVersionList() {
return version_;
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @return The count of version.
*/
public int getVersionCount() {
return version_.size();
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @param index The index of the element to return.
* @return The version at the given index.
*/
public java.lang.String getVersion(int index) {
return version_.get(index);
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @param index The index of the value to return.
* @return The bytes of the version at the given index.
*/
public com.google.protobuf.ByteString
getVersionBytes(int index) {
return version_.getByteString(index);
}
public static final int VERSION_NAME_FIELD_NUMBER = 9;
@SuppressWarnings("serial")
private volatile java.lang.Object versionName_ = "";
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @return Whether the versionName field is set.
*/
@java.lang.Override
public boolean hasVersionName() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @return The versionName.
*/
@java.lang.Override
public java.lang.String getVersionName() {
java.lang.Object ref = versionName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
versionName_ = s;
}
return s;
}
}
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @return The bytes for versionName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getVersionNameBytes() {
java.lang.Object ref = versionName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
versionName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEPRECATED_VERSION_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList deprecatedVersion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @return A list containing the deprecatedVersion.
*/
public com.google.protobuf.ProtocolStringList
getDeprecatedVersionList() {
return deprecatedVersion_;
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @return The count of deprecatedVersion.
*/
public int getDeprecatedVersionCount() {
return deprecatedVersion_.size();
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @param index The index of the element to return.
* @return The deprecatedVersion at the given index.
*/
public java.lang.String getDeprecatedVersion(int index) {
return deprecatedVersion_.get(index);
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @param index The index of the value to return.
* @return The bytes of the deprecatedVersion at the given index.
*/
public com.google.protobuf.ByteString
getDeprecatedVersionBytes(int index) {
return deprecatedVersion_.getByteString(index);
}
public static final int BENTO_SUPPORTED_VERSION_FIELD_NUMBER = 10;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList bentoSupportedVersion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @return A list containing the bentoSupportedVersion.
*/
public com.google.protobuf.ProtocolStringList
getBentoSupportedVersionList() {
return bentoSupportedVersion_;
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @return The count of bentoSupportedVersion.
*/
public int getBentoSupportedVersionCount() {
return bentoSupportedVersion_.size();
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @param index The index of the element to return.
* @return The bentoSupportedVersion at the given index.
*/
public java.lang.String getBentoSupportedVersion(int index) {
return bentoSupportedVersion_.get(index);
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @param index The index of the value to return.
* @return The bytes of the bentoSupportedVersion at the given index.
*/
public com.google.protobuf.ByteString
getBentoSupportedVersionBytes(int index) {
return bentoSupportedVersion_.getByteString(index);
}
public static final int EXTENSION_TYPE_FIELD_NUMBER = 8;
private int extensionType_ = 1;
/**
* optional .amp.validator.ExtensionSpec.ExtensionType extension_type = 8 [default = CUSTOM_ELEMENT];
* @return Whether the extensionType field is set.
*/
@java.lang.Override public boolean hasExtensionType() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional .amp.validator.ExtensionSpec.ExtensionType extension_type = 8 [default = CUSTOM_ELEMENT];
* @return The extensionType.
*/
@java.lang.Override public dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType getExtensionType() {
dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType result = dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType.forNumber(extensionType_);
return result == null ? dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType.CUSTOM_ELEMENT : result;
}
public static final int DEPRECATED_ALLOW_DUPLICATES_FIELD_NUMBER = 6;
private boolean deprecatedAllowDuplicates_ = false;
/**
*
* For older tags, we did not originally require that the tag only be included
* once, so those tags are exempted from the multiple inclusion ban.
*
*
* optional bool deprecated_allow_duplicates = 6 [default = false];
* @return Whether the deprecatedAllowDuplicates field is set.
*/
@java.lang.Override
public boolean hasDeprecatedAllowDuplicates() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* For older tags, we did not originally require that the tag only be included
* once, so those tags are exempted from the multiple inclusion ban.
*
*
* optional bool deprecated_allow_duplicates = 6 [default = false];
* @return The deprecatedAllowDuplicates.
*/
@java.lang.Override
public boolean getDeprecatedAllowDuplicates() {
return deprecatedAllowDuplicates_;
}
public static final int REQUIRES_USAGE_FIELD_NUMBER = 7;
private int requiresUsage_ = 1;
/**
* optional .amp.validator.ExtensionSpec.ExtensionUsageRequirement requires_usage = 7 [default = ERROR];
* @return Whether the requiresUsage field is set.
*/
@java.lang.Override public boolean hasRequiresUsage() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional .amp.validator.ExtensionSpec.ExtensionUsageRequirement requires_usage = 7 [default = ERROR];
* @return The requiresUsage.
*/
@java.lang.Override public dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement getRequiresUsage() {
dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement result = dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement.forNumber(requiresUsage_);
return result == null ? dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement.ERROR : result;
}
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)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
for (int i = 0; i < version_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, version_.getRaw(i));
}
for (int i = 0; i < deprecatedVersion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deprecatedVersion_.getRaw(i));
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeBool(6, deprecatedAllowDuplicates_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeEnum(7, requiresUsage_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeEnum(8, extensionType_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, versionName_);
}
for (int i = 0; i < bentoSupportedVersion_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, bentoSupportedVersion_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
{
int dataSize = 0;
for (int i = 0; i < version_.size(); i++) {
dataSize += computeStringSizeNoTag(version_.getRaw(i));
}
size += dataSize;
size += 1 * getVersionList().size();
}
{
int dataSize = 0;
for (int i = 0; i < deprecatedVersion_.size(); i++) {
dataSize += computeStringSizeNoTag(deprecatedVersion_.getRaw(i));
}
size += dataSize;
size += 1 * getDeprecatedVersionList().size();
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, deprecatedAllowDuplicates_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(7, requiresUsage_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(8, extensionType_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, versionName_);
}
{
int dataSize = 0;
for (int i = 0; i < bentoSupportedVersion_.size(); i++) {
dataSize += computeStringSizeNoTag(bentoSupportedVersion_.getRaw(i));
}
size += dataSize;
size += 1 * getBentoSupportedVersionList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.ExtensionSpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.ExtensionSpec other = (dev.amp.validator.ValidatorProtos.ExtensionSpec) obj;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (!getVersionList()
.equals(other.getVersionList())) return false;
if (hasVersionName() != other.hasVersionName()) return false;
if (hasVersionName()) {
if (!getVersionName()
.equals(other.getVersionName())) return false;
}
if (!getDeprecatedVersionList()
.equals(other.getDeprecatedVersionList())) return false;
if (!getBentoSupportedVersionList()
.equals(other.getBentoSupportedVersionList())) return false;
if (hasExtensionType() != other.hasExtensionType()) return false;
if (hasExtensionType()) {
if (extensionType_ != other.extensionType_) return false;
}
if (hasDeprecatedAllowDuplicates() != other.hasDeprecatedAllowDuplicates()) return false;
if (hasDeprecatedAllowDuplicates()) {
if (getDeprecatedAllowDuplicates()
!= other.getDeprecatedAllowDuplicates()) return false;
}
if (hasRequiresUsage() != other.hasRequiresUsage()) return false;
if (hasRequiresUsage()) {
if (requiresUsage_ != other.requiresUsage_) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (getVersionCount() > 0) {
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + getVersionList().hashCode();
}
if (hasVersionName()) {
hash = (37 * hash) + VERSION_NAME_FIELD_NUMBER;
hash = (53 * hash) + getVersionName().hashCode();
}
if (getDeprecatedVersionCount() > 0) {
hash = (37 * hash) + DEPRECATED_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getDeprecatedVersionList().hashCode();
}
if (getBentoSupportedVersionCount() > 0) {
hash = (37 * hash) + BENTO_SUPPORTED_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getBentoSupportedVersionList().hashCode();
}
if (hasExtensionType()) {
hash = (37 * hash) + EXTENSION_TYPE_FIELD_NUMBER;
hash = (53 * hash) + extensionType_;
}
if (hasDeprecatedAllowDuplicates()) {
hash = (37 * hash) + DEPRECATED_ALLOW_DUPLICATES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDeprecatedAllowDuplicates());
}
if (hasRequiresUsage()) {
hash = (37 * hash) + REQUIRES_USAGE_FIELD_NUMBER;
hash = (53 * hash) + requiresUsage_;
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.ExtensionSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.ExtensionSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.ExtensionSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.ExtensionSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.ExtensionSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.ExtensionSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.ExtensionSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.ExtensionSpec 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 dev.amp.validator.ValidatorProtos.ExtensionSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.ExtensionSpec 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 dev.amp.validator.ValidatorProtos.ExtensionSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.ExtensionSpec 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(dev.amp.validator.ValidatorProtos.ExtensionSpec 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;
}
/**
*
* Specs specific to AMP Extensions. This is a field within TagSpec that
* replaces the standard tagspec list of attributes, requirements, etc.
* NEXT AVAILABLE TAG: 11
*
*
* Protobuf type {@code amp.validator.ExtensionSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.ExtensionSpec)
dev.amp.validator.ValidatorProtos.ExtensionSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ExtensionSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ExtensionSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.ExtensionSpec.class, dev.amp.validator.ValidatorProtos.ExtensionSpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.ExtensionSpec.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
version_ =
com.google.protobuf.LazyStringArrayList.emptyList();
versionName_ = "";
deprecatedVersion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bentoSupportedVersion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
extensionType_ = 1;
deprecatedAllowDuplicates_ = false;
requiresUsage_ = 1;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_ExtensionSpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ExtensionSpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.ExtensionSpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ExtensionSpec build() {
dev.amp.validator.ValidatorProtos.ExtensionSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ExtensionSpec buildPartial() {
dev.amp.validator.ValidatorProtos.ExtensionSpec result = new dev.amp.validator.ValidatorProtos.ExtensionSpec(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.ExtensionSpec result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
version_.makeImmutable();
result.version_ = version_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.versionName_ = versionName_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
deprecatedVersion_.makeImmutable();
result.deprecatedVersion_ = deprecatedVersion_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
bentoSupportedVersion_.makeImmutable();
result.bentoSupportedVersion_ = bentoSupportedVersion_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.extensionType_ = extensionType_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.deprecatedAllowDuplicates_ = deprecatedAllowDuplicates_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.requiresUsage_ = requiresUsage_;
to_bitField0_ |= 0x00000010;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.ExtensionSpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.ExtensionSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.ExtensionSpec other) {
if (other == dev.amp.validator.ValidatorProtos.ExtensionSpec.getDefaultInstance()) return this;
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.version_.isEmpty()) {
if (version_.isEmpty()) {
version_ = other.version_;
bitField0_ |= 0x00000002;
} else {
ensureVersionIsMutable();
version_.addAll(other.version_);
}
onChanged();
}
if (other.hasVersionName()) {
versionName_ = other.versionName_;
bitField0_ |= 0x00000004;
onChanged();
}
if (!other.deprecatedVersion_.isEmpty()) {
if (deprecatedVersion_.isEmpty()) {
deprecatedVersion_ = other.deprecatedVersion_;
bitField0_ |= 0x00000008;
} else {
ensureDeprecatedVersionIsMutable();
deprecatedVersion_.addAll(other.deprecatedVersion_);
}
onChanged();
}
if (!other.bentoSupportedVersion_.isEmpty()) {
if (bentoSupportedVersion_.isEmpty()) {
bentoSupportedVersion_ = other.bentoSupportedVersion_;
bitField0_ |= 0x00000010;
} else {
ensureBentoSupportedVersionIsMutable();
bentoSupportedVersion_.addAll(other.bentoSupportedVersion_);
}
onChanged();
}
if (other.hasExtensionType()) {
setExtensionType(other.getExtensionType());
}
if (other.hasDeprecatedAllowDuplicates()) {
setDeprecatedAllowDuplicates(other.getDeprecatedAllowDuplicates());
}
if (other.hasRequiresUsage()) {
setRequiresUsage(other.getRequiresUsage());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
name_ = input.readBytes();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureVersionIsMutable();
version_.add(bs);
break;
} // case 18
case 26: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureDeprecatedVersionIsMutable();
deprecatedVersion_.add(bs);
break;
} // case 26
case 48: {
deprecatedAllowDuplicates_ = input.readBool();
bitField0_ |= 0x00000040;
break;
} // case 48
case 56: {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement tmpValue =
dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(7, tmpRaw);
} else {
requiresUsage_ = tmpRaw;
bitField0_ |= 0x00000080;
}
break;
} // case 56
case 64: {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType tmpValue =
dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(8, tmpRaw);
} else {
extensionType_ = tmpRaw;
bitField0_ |= 0x00000020;
}
break;
} // case 64
case 74: {
versionName_ = input.readBytes();
bitField0_ |= 0x00000004;
break;
} // case 74
case 82: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureBentoSupportedVersionIsMutable();
bentoSupportedVersion_.add(bs);
break;
} // case 82
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* e.g. "amp-video". This is used both as the attribute value for the
* 'custom-element' attribute value as well as part of the 'src' attribute
* value.
*
*
* optional string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList version_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureVersionIsMutable() {
if (!version_.isModifiable()) {
version_ = new com.google.protobuf.LazyStringArrayList(version_);
}
bitField0_ |= 0x00000002;
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @return A list containing the version.
*/
public com.google.protobuf.ProtocolStringList
getVersionList() {
version_.makeImmutable();
return version_;
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @return The count of version.
*/
public int getVersionCount() {
return version_.size();
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @param index The index of the element to return.
* @return The version at the given index.
*/
public java.lang.String getVersion(int index) {
return version_.get(index);
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @param index The index of the value to return.
* @return The bytes of the version at the given index.
*/
public com.google.protobuf.ByteString
getVersionBytes(int index) {
return version_.getByteString(index);
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @param index The index to set the value at.
* @param value The version to set.
* @return This builder for chaining.
*/
public Builder setVersion(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureVersionIsMutable();
version_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @param value The version to add.
* @return This builder for chaining.
*/
public Builder addVersion(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureVersionIsMutable();
version_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @param values The version to add.
* @return This builder for chaining.
*/
public Builder addAllVersion(
java.lang.Iterable values) {
ensureVersionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, version_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @return This builder for chaining.
*/
public Builder clearVersion() {
version_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* e.g. "0.1", "1.0", "latest".
*
*
* repeated string version = 2;
* @param value The bytes of the version to add.
* @return This builder for chaining.
*/
public Builder addVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureVersionIsMutable();
version_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object versionName_ = "";
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @return Whether the versionName field is set.
*/
public boolean hasVersionName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @return The versionName.
*/
public java.lang.String getVersionName() {
java.lang.Object ref = versionName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
versionName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @return The bytes for versionName.
*/
public com.google.protobuf.ByteString
getVersionNameBytes() {
java.lang.Object ref = versionName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
versionName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @param value The versionName to set.
* @return This builder for chaining.
*/
public Builder setVersionName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
versionName_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @return This builder for chaining.
*/
public Builder clearVersionName() {
versionName_ = getDefaultInstance().getVersionName();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* If multiple TagSpecs for the same extension exist, separated by version,
* specify a version_name string to disambiguate their spec_names. For
* example, "v1.0" or "v0.1-0.2". This string will become part of the name
* used for referring to this extension in validator error messages.
*
*
* optional string version_name = 9;
* @param value The bytes for versionName to set.
* @return This builder for chaining.
*/
public Builder setVersionNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
versionName_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList deprecatedVersion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureDeprecatedVersionIsMutable() {
if (!deprecatedVersion_.isModifiable()) {
deprecatedVersion_ = new com.google.protobuf.LazyStringArrayList(deprecatedVersion_);
}
bitField0_ |= 0x00000008;
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @return A list containing the deprecatedVersion.
*/
public com.google.protobuf.ProtocolStringList
getDeprecatedVersionList() {
deprecatedVersion_.makeImmutable();
return deprecatedVersion_;
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @return The count of deprecatedVersion.
*/
public int getDeprecatedVersionCount() {
return deprecatedVersion_.size();
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @param index The index of the element to return.
* @return The deprecatedVersion at the given index.
*/
public java.lang.String getDeprecatedVersion(int index) {
return deprecatedVersion_.get(index);
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @param index The index of the value to return.
* @return The bytes of the deprecatedVersion at the given index.
*/
public com.google.protobuf.ByteString
getDeprecatedVersionBytes(int index) {
return deprecatedVersion_.getByteString(index);
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @param index The index to set the value at.
* @param value The deprecatedVersion to set.
* @return This builder for chaining.
*/
public Builder setDeprecatedVersion(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureDeprecatedVersionIsMutable();
deprecatedVersion_.set(index, value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @param value The deprecatedVersion to add.
* @return This builder for chaining.
*/
public Builder addDeprecatedVersion(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureDeprecatedVersionIsMutable();
deprecatedVersion_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @param values The deprecatedVersion to add.
* @return This builder for chaining.
*/
public Builder addAllDeprecatedVersion(
java.lang.Iterable values) {
ensureDeprecatedVersionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, deprecatedVersion_);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @return This builder for chaining.
*/
public Builder clearDeprecatedVersion() {
deprecatedVersion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);;
onChanged();
return this;
}
/**
*
* deprecated_version must be a strict subset of version. If the version
* matches a deprecated_version, validation will emit a warning.
*
*
* repeated string deprecated_version = 3;
* @param value The bytes of the deprecatedVersion to add.
* @return This builder for chaining.
*/
public Builder addDeprecatedVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureDeprecatedVersionIsMutable();
deprecatedVersion_.add(value);
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList bentoSupportedVersion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureBentoSupportedVersionIsMutable() {
if (!bentoSupportedVersion_.isModifiable()) {
bentoSupportedVersion_ = new com.google.protobuf.LazyStringArrayList(bentoSupportedVersion_);
}
bitField0_ |= 0x00000010;
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @return A list containing the bentoSupportedVersion.
*/
public com.google.protobuf.ProtocolStringList
getBentoSupportedVersionList() {
bentoSupportedVersion_.makeImmutable();
return bentoSupportedVersion_;
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @return The count of bentoSupportedVersion.
*/
public int getBentoSupportedVersionCount() {
return bentoSupportedVersion_.size();
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @param index The index of the element to return.
* @return The bentoSupportedVersion at the given index.
*/
public java.lang.String getBentoSupportedVersion(int index) {
return bentoSupportedVersion_.get(index);
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @param index The index of the value to return.
* @return The bytes of the bentoSupportedVersion at the given index.
*/
public com.google.protobuf.ByteString
getBentoSupportedVersionBytes(int index) {
return bentoSupportedVersion_.getByteString(index);
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @param index The index to set the value at.
* @param value The bentoSupportedVersion to set.
* @return This builder for chaining.
*/
public Builder setBentoSupportedVersion(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureBentoSupportedVersionIsMutable();
bentoSupportedVersion_.set(index, value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @param value The bentoSupportedVersion to add.
* @return This builder for chaining.
*/
public Builder addBentoSupportedVersion(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureBentoSupportedVersionIsMutable();
bentoSupportedVersion_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @param values The bentoSupportedVersion to add.
* @return This builder for chaining.
*/
public Builder addAllBentoSupportedVersion(
java.lang.Iterable values) {
ensureBentoSupportedVersionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, bentoSupportedVersion_);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @return This builder for chaining.
*/
public Builder clearBentoSupportedVersion() {
bentoSupportedVersion_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);;
onChanged();
return this;
}
/**
*
* Bento supported versions (e.g. "1.0").
*
*
* repeated string bento_supported_version = 10;
* @param value The bytes of the bentoSupportedVersion to add.
* @return This builder for chaining.
*/
public Builder addBentoSupportedVersionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureBentoSupportedVersionIsMutable();
bentoSupportedVersion_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private int extensionType_ = 1;
/**
* optional .amp.validator.ExtensionSpec.ExtensionType extension_type = 8 [default = CUSTOM_ELEMENT];
* @return Whether the extensionType field is set.
*/
@java.lang.Override public boolean hasExtensionType() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional .amp.validator.ExtensionSpec.ExtensionType extension_type = 8 [default = CUSTOM_ELEMENT];
* @return The extensionType.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType getExtensionType() {
dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType result = dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType.forNumber(extensionType_);
return result == null ? dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType.CUSTOM_ELEMENT : result;
}
/**
* optional .amp.validator.ExtensionSpec.ExtensionType extension_type = 8 [default = CUSTOM_ELEMENT];
* @param value The extensionType to set.
* @return This builder for chaining.
*/
public Builder setExtensionType(dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
extensionType_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .amp.validator.ExtensionSpec.ExtensionType extension_type = 8 [default = CUSTOM_ELEMENT];
* @return This builder for chaining.
*/
public Builder clearExtensionType() {
bitField0_ = (bitField0_ & ~0x00000020);
extensionType_ = 1;
onChanged();
return this;
}
private boolean deprecatedAllowDuplicates_ ;
/**
*
* For older tags, we did not originally require that the tag only be included
* once, so those tags are exempted from the multiple inclusion ban.
*
*
* optional bool deprecated_allow_duplicates = 6 [default = false];
* @return Whether the deprecatedAllowDuplicates field is set.
*/
@java.lang.Override
public boolean hasDeprecatedAllowDuplicates() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* For older tags, we did not originally require that the tag only be included
* once, so those tags are exempted from the multiple inclusion ban.
*
*
* optional bool deprecated_allow_duplicates = 6 [default = false];
* @return The deprecatedAllowDuplicates.
*/
@java.lang.Override
public boolean getDeprecatedAllowDuplicates() {
return deprecatedAllowDuplicates_;
}
/**
*
* For older tags, we did not originally require that the tag only be included
* once, so those tags are exempted from the multiple inclusion ban.
*
*
* optional bool deprecated_allow_duplicates = 6 [default = false];
* @param value The deprecatedAllowDuplicates to set.
* @return This builder for chaining.
*/
public Builder setDeprecatedAllowDuplicates(boolean value) {
deprecatedAllowDuplicates_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* For older tags, we did not originally require that the tag only be included
* once, so those tags are exempted from the multiple inclusion ban.
*
*
* optional bool deprecated_allow_duplicates = 6 [default = false];
* @return This builder for chaining.
*/
public Builder clearDeprecatedAllowDuplicates() {
bitField0_ = (bitField0_ & ~0x00000040);
deprecatedAllowDuplicates_ = false;
onChanged();
return this;
}
private int requiresUsage_ = 1;
/**
* optional .amp.validator.ExtensionSpec.ExtensionUsageRequirement requires_usage = 7 [default = ERROR];
* @return Whether the requiresUsage field is set.
*/
@java.lang.Override public boolean hasRequiresUsage() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
* optional .amp.validator.ExtensionSpec.ExtensionUsageRequirement requires_usage = 7 [default = ERROR];
* @return The requiresUsage.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement getRequiresUsage() {
dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement result = dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement.forNumber(requiresUsage_);
return result == null ? dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement.ERROR : result;
}
/**
* optional .amp.validator.ExtensionSpec.ExtensionUsageRequirement requires_usage = 7 [default = ERROR];
* @param value The requiresUsage to set.
* @return This builder for chaining.
*/
public Builder setRequiresUsage(dev.amp.validator.ValidatorProtos.ExtensionSpec.ExtensionUsageRequirement value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
requiresUsage_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .amp.validator.ExtensionSpec.ExtensionUsageRequirement requires_usage = 7 [default = ERROR];
* @return This builder for chaining.
*/
public Builder clearRequiresUsage() {
bitField0_ = (bitField0_ & ~0x00000080);
requiresUsage_ = 1;
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:amp.validator.ExtensionSpec)
}
// @@protoc_insertion_point(class_scope:amp.validator.ExtensionSpec)
private static final dev.amp.validator.ValidatorProtos.ExtensionSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.ExtensionSpec();
}
public static dev.amp.validator.ValidatorProtos.ExtensionSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ExtensionSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ExtensionSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HtmlFormatOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.HtmlFormat)
com.google.protobuf.MessageOrBuilder {
}
/**
*
* The HtmlFormat is the declared format in the top-level html tag, which
* prescribes a particular set of validation rules. This should be kept in sync
* with Request.HtmlFormat in
* github.com/ampproject/amppackager/transformer/request/request.proto.
*
*
* Protobuf type {@code amp.validator.HtmlFormat}
*/
public static final class HtmlFormat extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.HtmlFormat)
HtmlFormatOrBuilder {
private static final long serialVersionUID = 0L;
// Use HtmlFormat.newBuilder() to construct.
private HtmlFormat(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private HtmlFormat() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HtmlFormat();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_HtmlFormat_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_HtmlFormat_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.HtmlFormat.class, dev.amp.validator.ValidatorProtos.HtmlFormat.Builder.class);
}
/**
*
* NEXT AVAILABLE TAG: 6
*
*
* Protobuf enum {@code amp.validator.HtmlFormat.Code}
*/
public enum Code
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Never used
*
*
* UNKNOWN_CODE = 0;
*/
UNKNOWN_CODE(0),
/**
* AMP = 1;
*/
AMP(1),
/**
* AMP4ADS = 2;
*/
AMP4ADS(2),
/**
* AMP4EMAIL = 3;
*/
AMP4EMAIL(3),
/**
*
* Currently unused
*
*
* EXPERIMENTAL = 4;
*/
EXPERIMENTAL(4),
;
/**
*
* Never used
*
*
* UNKNOWN_CODE = 0;
*/
public static final int UNKNOWN_CODE_VALUE = 0;
/**
* AMP = 1;
*/
public static final int AMP_VALUE = 1;
/**
* AMP4ADS = 2;
*/
public static final int AMP4ADS_VALUE = 2;
/**
* AMP4EMAIL = 3;
*/
public static final int AMP4EMAIL_VALUE = 3;
/**
*
* Currently unused
*
*
* EXPERIMENTAL = 4;
*/
public static final int EXPERIMENTAL_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 Code 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 Code forNumber(int value) {
switch (value) {
case 0: return UNKNOWN_CODE;
case 1: return AMP;
case 2: return AMP4ADS;
case 3: return AMP4EMAIL;
case 4: return EXPERIMENTAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Code> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Code findValueByNumber(int number) {
return Code.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 dev.amp.validator.ValidatorProtos.HtmlFormat.getDescriptor().getEnumTypes().get(0);
}
private static final Code[] VALUES = values();
public static Code 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 Code(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:amp.validator.HtmlFormat.Code)
}
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 {
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.HtmlFormat)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.HtmlFormat other = (dev.amp.validator.ValidatorProtos.HtmlFormat) obj;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.HtmlFormat parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.HtmlFormat parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.HtmlFormat parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.HtmlFormat parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.HtmlFormat parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.HtmlFormat parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.HtmlFormat parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.HtmlFormat 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 dev.amp.validator.ValidatorProtos.HtmlFormat parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.HtmlFormat 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 dev.amp.validator.ValidatorProtos.HtmlFormat parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.HtmlFormat 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(dev.amp.validator.ValidatorProtos.HtmlFormat 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;
}
/**
*
* The HtmlFormat is the declared format in the top-level html tag, which
* prescribes a particular set of validation rules. This should be kept in sync
* with Request.HtmlFormat in
* github.com/ampproject/amppackager/transformer/request/request.proto.
*
*
* Protobuf type {@code amp.validator.HtmlFormat}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.HtmlFormat)
dev.amp.validator.ValidatorProtos.HtmlFormatOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_HtmlFormat_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_HtmlFormat_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.HtmlFormat.class, dev.amp.validator.ValidatorProtos.HtmlFormat.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.HtmlFormat.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_HtmlFormat_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.HtmlFormat getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.HtmlFormat.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.HtmlFormat build() {
dev.amp.validator.ValidatorProtos.HtmlFormat result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.HtmlFormat buildPartial() {
dev.amp.validator.ValidatorProtos.HtmlFormat result = new dev.amp.validator.ValidatorProtos.HtmlFormat(this);
onBuilt();
return result;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.HtmlFormat) {
return mergeFrom((dev.amp.validator.ValidatorProtos.HtmlFormat)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.HtmlFormat other) {
if (other == dev.amp.validator.ValidatorProtos.HtmlFormat.getDefaultInstance()) return this;
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
@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:amp.validator.HtmlFormat)
}
// @@protoc_insertion_point(class_scope:amp.validator.HtmlFormat)
private static final dev.amp.validator.ValidatorProtos.HtmlFormat DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new dev.amp.validator.ValidatorProtos.HtmlFormat();
}
public static dev.amp.validator.ValidatorProtos.HtmlFormat getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HtmlFormat parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.HtmlFormat getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TagSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:amp.validator.TagSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @return A list containing the htmlFormat.
*/
java.util.List getHtmlFormatList();
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @return The count of htmlFormat.
*/
int getHtmlFormatCount();
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @param index The index of the element to return.
* @return The htmlFormat at the given index.
*/
dev.amp.validator.ValidatorProtos.HtmlFormat.Code getHtmlFormat(int index);
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @return A list containing the enabledBy.
*/
java.util.List
getEnabledByList();
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @return The count of enabledBy.
*/
int getEnabledByCount();
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @param index The index of the element to return.
* @return The enabledBy at the given index.
*/
java.lang.String getEnabledBy(int index);
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @param index The index of the value to return.
* @return The bytes of the enabledBy at the given index.
*/
com.google.protobuf.ByteString
getEnabledByBytes(int index);
/**
* repeated string disabled_by = 36;
* @return A list containing the disabledBy.
*/
java.util.List
getDisabledByList();
/**
* repeated string disabled_by = 36;
* @return The count of disabledBy.
*/
int getDisabledByCount();
/**
* repeated string disabled_by = 36;
* @param index The index of the element to return.
* @return The disabledBy at the given index.
*/
java.lang.String getDisabledBy(int index);
/**
* repeated string disabled_by = 36;
* @param index The index of the value to return.
* @return The bytes of the disabledBy at the given index.
*/
com.google.protobuf.ByteString
getDisabledByBytes(int index);
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @return Whether the tagName field is set.
*/
boolean hasTagName();
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @return The tagName.
*/
java.lang.String getTagName();
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @return The bytes for tagName.
*/
com.google.protobuf.ByteString
getTagNameBytes();
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @return Whether the specName field is set.
*/
boolean hasSpecName();
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @return The specName.
*/
java.lang.String getSpecName();
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @return The bytes for specName.
*/
com.google.protobuf.ByteString
getSpecNameBytes();
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @return Whether the descriptiveName field is set.
*/
boolean hasDescriptiveName();
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @return The descriptiveName.
*/
java.lang.String getDescriptiveName();
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @return The bytes for descriptiveName.
*/
com.google.protobuf.ByteString
getDescriptiveNameBytes();
/**
* optional .amp.validator.TagSpec.NamedId named_id = 33 [default = NOT_SET];
* @return Whether the namedId field is set.
*/
boolean hasNamedId();
/**
* optional .amp.validator.TagSpec.NamedId named_id = 33 [default = NOT_SET];
* @return The namedId.
*/
dev.amp.validator.ValidatorProtos.TagSpec.NamedId getNamedId();
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
* @return Whether the extensionSpec field is set.
*/
boolean hasExtensionSpec();
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
* @return The extensionSpec.
*/
dev.amp.validator.ValidatorProtos.ExtensionSpec getExtensionSpec();
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
*/
dev.amp.validator.ValidatorProtos.ExtensionSpecOrBuilder getExtensionSpecOrBuilder();
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @return A list containing the requiresExtension.
*/
java.util.List
getRequiresExtensionList();
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @return The count of requiresExtension.
*/
int getRequiresExtensionCount();
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @param index The index of the element to return.
* @return The requiresExtension at the given index.
*/
java.lang.String getRequiresExtension(int index);
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @param index The index of the value to return.
* @return The bytes of the requiresExtension at the given index.
*/
com.google.protobuf.ByteString
getRequiresExtensionBytes(int index);
/**
*
* If true, a tag conforming to this tag spec must occur at least once
* within the document.
*
*
* optional bool mandatory = 3;
* @return Whether the mandatory field is set.
*/
boolean hasMandatory();
/**
*
* If true, a tag conforming to this tag spec must occur at least once
* within the document.
*
*
* optional bool mandatory = 3;
* @return The mandatory.
*/
boolean getMandatory();
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @return Whether the mandatoryAlternatives field is set.
*/
boolean hasMandatoryAlternatives();
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @return The mandatoryAlternatives.
*/
java.lang.String getMandatoryAlternatives();
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @return The bytes for mandatoryAlternatives.
*/
com.google.protobuf.ByteString
getMandatoryAlternativesBytes();
/**
*
* If true, a tag conforming to this tag spec may occur at most once within
* the document.
*
*
* optional bool unique = 5;
* @return Whether the unique field is set.
*/
boolean hasUnique();
/**
*
* If true, a tag conforming to this tag spec may occur at most once within
* the document.
*
*
* optional bool unique = 5;
* @return The unique.
*/
boolean getUnique();
/**
*
* If true, a tag conforming to this tag spec should occur at most once within
* the document. That is, unlike for unique, we'll emit a warning.
*
*
* optional bool unique_warning = 25;
* @return Whether the uniqueWarning field is set.
*/
boolean hasUniqueWarning();
/**
*
* If true, a tag conforming to this tag spec should occur at most once within
* the document. That is, unlike for unique, we'll emit a warning.
*
*
* optional bool unique_warning = 25;
* @return The uniqueWarning.
*/
boolean getUniqueWarning();
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @return Whether the mandatoryParent field is set.
*/
boolean hasMandatoryParent();
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @return The mandatoryParent.
*/
java.lang.String getMandatoryParent();
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @return The bytes for mandatoryParent.
*/
com.google.protobuf.ByteString
getMandatoryParentBytes();
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @return Whether the mandatoryAncestor field is set.
*/
boolean hasMandatoryAncestor();
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @return The mandatoryAncestor.
*/
java.lang.String getMandatoryAncestor();
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @return The bytes for mandatoryAncestor.
*/
com.google.protobuf.ByteString
getMandatoryAncestorBytes();
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @return Whether the mandatoryAncestorSuggestedAlternative field is set.
*/
boolean hasMandatoryAncestorSuggestedAlternative();
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @return The mandatoryAncestorSuggestedAlternative.
*/
java.lang.String getMandatoryAncestorSuggestedAlternative();
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @return The bytes for mandatoryAncestorSuggestedAlternative.
*/
com.google.protobuf.ByteString
getMandatoryAncestorSuggestedAlternativeBytes();
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @return A list containing the disallowedAncestor.
*/
java.util.List
getDisallowedAncestorList();
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @return The count of disallowedAncestor.
*/
int getDisallowedAncestorCount();
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @param index The index of the element to return.
* @return The disallowedAncestor at the given index.
*/
java.lang.String getDisallowedAncestor(int index);
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @param index The index of the value to return.
* @return The bytes of the disallowedAncestor at the given index.
*/
com.google.protobuf.ByteString
getDisallowedAncestorBytes(int index);
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @return Whether the descendantTagList field is set.
*/
boolean hasDescendantTagList();
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @return The descendantTagList.
*/
java.lang.String getDescendantTagList();
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @return The bytes for descendantTagList.
*/
com.google.protobuf.ByteString
getDescendantTagListBytes();
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @return A list containing the alsoRequiresTagWarning.
*/
java.util.List
getAlsoRequiresTagWarningList();
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @return The count of alsoRequiresTagWarning.
*/
int getAlsoRequiresTagWarningCount();
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @param index The index of the element to return.
* @return The alsoRequiresTagWarning at the given index.
*/
java.lang.String getAlsoRequiresTagWarning(int index);
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @param index The index of the value to return.
* @return The bytes of the alsoRequiresTagWarning at the given index.
*/
com.google.protobuf.ByteString
getAlsoRequiresTagWarningBytes(int index);
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @return A list containing the satisfiesCondition.
*/
java.util.List
getSatisfiesConditionList();
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @return The count of satisfiesCondition.
*/
int getSatisfiesConditionCount();
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @param index The index of the element to return.
* @return The satisfiesCondition at the given index.
*/
java.lang.String getSatisfiesCondition(int index);
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @param index The index of the value to return.
* @return The bytes of the satisfiesCondition at the given index.
*/
com.google.protobuf.ByteString
getSatisfiesConditionBytes(int index);
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @return A list containing the requiresCondition.
*/
java.util.List
getRequiresConditionList();
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @return The count of requiresCondition.
*/
int getRequiresConditionCount();
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @param index The index of the element to return.
* @return The requiresCondition at the given index.
*/
java.lang.String getRequiresCondition(int index);
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @param index The index of the value to return.
* @return The bytes of the requiresCondition at the given index.
*/
com.google.protobuf.ByteString
getRequiresConditionBytes(int index);
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @return A list containing the excludesCondition.
*/
java.util.List
getExcludesConditionList();
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @return The count of excludesCondition.
*/
int getExcludesConditionCount();
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @param index The index of the element to return.
* @return The excludesCondition at the given index.
*/
java.lang.String getExcludesCondition(int index);
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @param index The index of the value to return.
* @return The bytes of the excludesCondition at the given index.
*/
com.google.protobuf.ByteString
getExcludesConditionBytes(int index);
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @return Whether the deprecation field is set.
*/
boolean hasDeprecation();
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @return The deprecation.
*/
java.lang.String getDeprecation();
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @return The bytes for deprecation.
*/
com.google.protobuf.ByteString
getDeprecationBytes();
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @return Whether the deprecationUrl field is set.
*/
boolean hasDeprecationUrl();
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @return The deprecationUrl.
*/
java.lang.String getDeprecationUrl();
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @return The bytes for deprecationUrl.
*/
com.google.protobuf.ByteString
getDeprecationUrlBytes();
/**
*
* This TagSpec will only validate against attributes explicitly
* listed within the TagSpec (attrs and attr_lists). No attributes
* from $GLOBAL_ATTRS and $AMP_LAYOUT_ATTRS are valid unless explicitly
* added as an attribute within the TagSpec. The field `amp_layout` is not
* allowed to be set when `explicit_attrs_only` is true.
*
*
* optional bool explicit_attrs_only = 34 [default = false];
* @return Whether the explicitAttrsOnly field is set.
*/
boolean hasExplicitAttrsOnly();
/**
*
* This TagSpec will only validate against attributes explicitly
* listed within the TagSpec (attrs and attr_lists). No attributes
* from $GLOBAL_ATTRS and $AMP_LAYOUT_ATTRS are valid unless explicitly
* added as an attribute within the TagSpec. The field `amp_layout` is not
* allowed to be set when `explicit_attrs_only` is true.
*
*
* optional bool explicit_attrs_only = 34 [default = false];
* @return The explicitAttrsOnly.
*/
boolean getExplicitAttrsOnly();
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
java.util.List
getAttrsList();
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
dev.amp.validator.ValidatorProtos.AttrSpec getAttrs(int index);
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
int getAttrsCount();
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
java.util.List
getAttrsOrBuilderList();
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder getAttrsOrBuilder(
int index);
/**
*
* Top level attr lists of shared tags, identified by unique key
* (see attr_lists map in ValidatorRules).
*
*
* repeated string attr_lists = 8;
* @return A list containing the attrLists.
*/
java.util.List
getAttrListsList();
/**
*
* Top level attr lists of shared tags, identified by unique key
* (see attr_lists map in ValidatorRules).
*
*
* repeated string attr_lists = 8;
* @return The count of attrLists.
*/
int getAttrListsCount();
/**
*
* Top level attr lists of shared tags, identified by unique key
* (see attr_lists map in ValidatorRules).
*
*
* repeated string attr_lists = 8;
* @param index The index of the element to return.
* @return The attrLists at the given index.
*/
java.lang.String getAttrLists(int index);
/**
*
* Top level attr lists of shared tags, identified by unique key
* (see attr_lists map in ValidatorRules).
*
*
* repeated string attr_lists = 8;
* @param index The index of the value to return.
* @return The bytes of the attrLists at the given index.
*/
com.google.protobuf.ByteString
getAttrListsBytes(int index);
/**
*
* Note that these are evaluated after a particular TagSpec
* has been evaluated. Unlike other checks in this TagSpec, we
* no longer have the ability to fall back on a different TagSpec.
*
*
* optional .amp.validator.CdataSpec cdata = 12;
* @return Whether the cdata field is set.
*/
boolean hasCdata();
/**
*
* Note that these are evaluated after a particular TagSpec
* has been evaluated. Unlike other checks in this TagSpec, we
* no longer have the ability to fall back on a different TagSpec.
*
*
* optional .amp.validator.CdataSpec cdata = 12;
* @return The cdata.
*/
dev.amp.validator.ValidatorProtos.CdataSpec getCdata();
/**
*
* Note that these are evaluated after a particular TagSpec
* has been evaluated. Unlike other checks in this TagSpec, we
* no longer have the ability to fall back on a different TagSpec.
*
*
* optional .amp.validator.CdataSpec cdata = 12;
*/
dev.amp.validator.ValidatorProtos.CdataSpecOrBuilder getCdataOrBuilder();
/**
*
* Specifies which tags can be the child tags, that is, immediately children
* of this tag in the document.
*
*
* optional .amp.validator.ChildTagSpec child_tags = 19;
* @return Whether the childTags field is set.
*/
boolean hasChildTags();
/**
*
* Specifies which tags can be the child tags, that is, immediately children
* of this tag in the document.
*
*
* optional .amp.validator.ChildTagSpec child_tags = 19;
* @return The childTags.
*/
dev.amp.validator.ValidatorProtos.ChildTagSpec getChildTags();
/**
*
* Specifies which tags can be the child tags, that is, immediately children
* of this tag in the document.
*
*
* optional .amp.validator.ChildTagSpec child_tags = 19;
*/
dev.amp.validator.ValidatorProtos.ChildTagSpecOrBuilder getChildTagsOrBuilder();
/**
*
* If set to true, this tag cannot have any siblings.
*
*
* optional bool siblings_disallowed = 30 [default = false];
* @return Whether the siblingsDisallowed field is set.
*/
boolean hasSiblingsDisallowed();
/**
*
* If set to true, this tag cannot have any siblings.
*
*
* optional bool siblings_disallowed = 30 [default = false];
* @return The siblingsDisallowed.
*/
boolean getSiblingsDisallowed();
/**
*
* If set to true, this tag must be the last child of its parent.
*
*
* optional bool mandatory_last_child = 31 [default = false];
* @return Whether the mandatoryLastChild field is set.
*/
boolean hasMandatoryLastChild();
/**
*
* If set to true, this tag must be the last child of its parent.
*
*
* optional bool mandatory_last_child = 31 [default = false];
* @return The mandatoryLastChild.
*/
boolean getMandatoryLastChild();
/**
*
* The reference_points defined by this TagSpec instance determine how
* specific child tags are identified. Please see the comment for the
* ReferencePoint message.
*
*
* repeated .amp.validator.ReferencePoint reference_points = 20;
*/
java.util.List
getReferencePointsList();
/**
*
* The reference_points defined by this TagSpec instance determine how
* specific child tags are identified. Please see the comment for the
* ReferencePoint message.
*
*
* repeated .amp.validator.ReferencePoint reference_points = 20;
*/
dev.amp.validator.ValidatorProtos.ReferencePoint getReferencePoints(int index);
/**
*
* The reference_points defined by this TagSpec instance determine how
* specific child tags are identified. Please see the comment for the
* ReferencePoint message.
*
*
* repeated .amp.validator.ReferencePoint reference_points = 20;
*/
int getReferencePointsCount();
/**
*
* The reference_points defined by this TagSpec instance determine how
* specific child tags are identified. Please see the comment for the
* ReferencePoint message.
*
*
* repeated .amp.validator.ReferencePoint reference_points = 20;
*/
java.util.List
getReferencePointsOrBuilderList();
/**
*
* The reference_points defined by this TagSpec instance determine how
* specific child tags are identified. Please see the comment for the
* ReferencePoint message.
*
*
* repeated .amp.validator.ReferencePoint reference_points = 20;
*/
dev.amp.validator.ValidatorProtos.ReferencePointOrBuilder getReferencePointsOrBuilder(
int index);
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec. If a TagSpec contains a requires_extension field,
* spec_url will be inherited from the named extension, unless overridden
* by the setting it here.
*
*
* optional string spec_url = 10;
* @return Whether the specUrl field is set.
*/
boolean hasSpecUrl();
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec. If a TagSpec contains a requires_extension field,
* spec_url will be inherited from the named extension, unless overridden
* by the setting it here.
*
*
* optional string spec_url = 10;
* @return The specUrl.
*/
java.lang.String getSpecUrl();
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec. If a TagSpec contains a requires_extension field,
* spec_url will be inherited from the named extension, unless overridden
* by the setting it here.
*
*
* optional string spec_url = 10;
* @return The bytes for specUrl.
*/
com.google.protobuf.ByteString
getSpecUrlBytes();
/**
*
* If set, specifies which AMP Layouts are supported by this element.
*
*
* optional .amp.validator.AmpLayout amp_layout = 11;
* @return Whether the ampLayout field is set.
*/
boolean hasAmpLayout();
/**
*
* If set, specifies which AMP Layouts are supported by this element.
*
*
* optional .amp.validator.AmpLayout amp_layout = 11;
* @return The ampLayout.
*/
dev.amp.validator.ValidatorProtos.AmpLayout getAmpLayout();
/**
*
* If set, specifies which AMP Layouts are supported by this element.
*
*
* optional .amp.validator.AmpLayout amp_layout = 11;
*/
dev.amp.validator.ValidatorProtos.AmpLayoutOrBuilder getAmpLayoutOrBuilder();
/**
*
* If set, triggers related validation rules for descendants of this tag.
*
*
* optional .amp.validator.AncestorMarker mark_descendants = 38;
* @return Whether the markDescendants field is set.
*/
boolean hasMarkDescendants();
/**
*
* If set, triggers related validation rules for descendants of this tag.
*
*
* optional .amp.validator.AncestorMarker mark_descendants = 38;
* @return The markDescendants.
*/
dev.amp.validator.ValidatorProtos.AncestorMarker getMarkDescendants();
/**
*
* If set, triggers related validation rules for descendants of this tag.
*
*
* optional .amp.validator.AncestorMarker mark_descendants = 38;
*/
dev.amp.validator.ValidatorProtos.AncestorMarkerOrBuilder getMarkDescendantsOrBuilder();
}
/**
*
* Tags that are not covered by at least one of these specs are disallowed.
* Some tags are mandatory. Note that the tag name is not unique, that is,
* there can be multiple tag specs covering the same name, e.g., for
* multiple meta tags (with different attributes).
* NEXT AVAILABLE TAG: 40
*
*
* Protobuf type {@code amp.validator.TagSpec}
*/
public static final class TagSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:amp.validator.TagSpec)
TagSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use TagSpec.newBuilder() to construct.
private TagSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) {
super(builder);
}
private TagSpec() {
htmlFormat_ = java.util.Collections.emptyList();
enabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
disabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
tagName_ = "";
specName_ = "";
descriptiveName_ = "";
namedId_ = 0;
requiresExtension_ =
com.google.protobuf.LazyStringArrayList.emptyList();
mandatoryAlternatives_ = "";
mandatoryParent_ = "";
mandatoryAncestor_ = "";
mandatoryAncestorSuggestedAlternative_ = "";
disallowedAncestor_ =
com.google.protobuf.LazyStringArrayList.emptyList();
descendantTagList_ = "";
alsoRequiresTagWarning_ =
com.google.protobuf.LazyStringArrayList.emptyList();
satisfiesCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
requiresCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
excludesCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
deprecation_ = "";
deprecationUrl_ = "";
attrs_ = java.util.Collections.emptyList();
attrLists_ =
com.google.protobuf.LazyStringArrayList.emptyList();
referencePoints_ = java.util.Collections.emptyList();
specUrl_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new TagSpec();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_TagSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_TagSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.TagSpec.class, dev.amp.validator.ValidatorProtos.TagSpec.Builder.class);
}
/**
*
* NamedId's are used to uniquely identify specific TagSpecs in the
* validator rules in a stable manner. Most TagSpecs have no set NamedId.
* If a TagSpec has a NamedId it must be unique. In other words, no two
* TagSpec's may have the same NamedId except for the NOT_SET (0) value.
* NEXT AVAILABLE TAG: 3
*
*
* Protobuf enum {@code amp.validator.TagSpec.NamedId}
*/
public enum NamedId
implements com.google.protobuf.ProtocolMessageEnum {
/**
* NOT_SET = 0;
*/
NOT_SET(0),
/**
*
* By convention, the first "word" in the Id should be the tag_name.
*
*
* LINK_FONT_STYLESHEET = 1;
*/
LINK_FONT_STYLESHEET(1),
/**
* STYLE_AMP_CUSTOM = 2;
*/
STYLE_AMP_CUSTOM(2),
;
/**
* NOT_SET = 0;
*/
public static final int NOT_SET_VALUE = 0;
/**
*
* By convention, the first "word" in the Id should be the tag_name.
*
*
* LINK_FONT_STYLESHEET = 1;
*/
public static final int LINK_FONT_STYLESHEET_VALUE = 1;
/**
* STYLE_AMP_CUSTOM = 2;
*/
public static final int STYLE_AMP_CUSTOM_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 NamedId 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 NamedId forNumber(int value) {
switch (value) {
case 0: return NOT_SET;
case 1: return LINK_FONT_STYLESHEET;
case 2: return STYLE_AMP_CUSTOM;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
NamedId> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public NamedId findValueByNumber(int number) {
return NamedId.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 dev.amp.validator.ValidatorProtos.TagSpec.getDescriptor().getEnumTypes().get(0);
}
private static final NamedId[] VALUES = values();
public static NamedId 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 NamedId(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:amp.validator.TagSpec.NamedId)
}
private int bitField0_;
public static final int HTML_FORMAT_FIELD_NUMBER = 21;
@SuppressWarnings("serial")
private java.util.List htmlFormat_;
private static final com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.HtmlFormat.Code> htmlFormat_converter_ =
new com.google.protobuf.Internal.ListAdapter.Converter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.HtmlFormat.Code>() {
public dev.amp.validator.ValidatorProtos.HtmlFormat.Code convert(java.lang.Integer from) {
dev.amp.validator.ValidatorProtos.HtmlFormat.Code result = dev.amp.validator.ValidatorProtos.HtmlFormat.Code.forNumber(from);
return result == null ? dev.amp.validator.ValidatorProtos.HtmlFormat.Code.UNKNOWN_CODE : result;
}
};
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @return A list containing the htmlFormat.
*/
@java.lang.Override
public java.util.List getHtmlFormatList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.HtmlFormat.Code>(htmlFormat_, htmlFormat_converter_);
}
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @return The count of htmlFormat.
*/
@java.lang.Override
public int getHtmlFormatCount() {
return htmlFormat_.size();
}
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @param index The index of the element to return.
* @return The htmlFormat at the given index.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.HtmlFormat.Code getHtmlFormat(int index) {
return htmlFormat_converter_.convert(htmlFormat_.get(index));
}
public static final int ENABLED_BY_FIELD_NUMBER = 35;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList enabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @return A list containing the enabledBy.
*/
public com.google.protobuf.ProtocolStringList
getEnabledByList() {
return enabledBy_;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @return The count of enabledBy.
*/
public int getEnabledByCount() {
return enabledBy_.size();
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @param index The index of the element to return.
* @return The enabledBy at the given index.
*/
public java.lang.String getEnabledBy(int index) {
return enabledBy_.get(index);
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @param index The index of the value to return.
* @return The bytes of the enabledBy at the given index.
*/
public com.google.protobuf.ByteString
getEnabledByBytes(int index) {
return enabledBy_.getByteString(index);
}
public static final int DISABLED_BY_FIELD_NUMBER = 36;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList disabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* repeated string disabled_by = 36;
* @return A list containing the disabledBy.
*/
public com.google.protobuf.ProtocolStringList
getDisabledByList() {
return disabledBy_;
}
/**
* repeated string disabled_by = 36;
* @return The count of disabledBy.
*/
public int getDisabledByCount() {
return disabledBy_.size();
}
/**
* repeated string disabled_by = 36;
* @param index The index of the element to return.
* @return The disabledBy at the given index.
*/
public java.lang.String getDisabledBy(int index) {
return disabledBy_.get(index);
}
/**
* repeated string disabled_by = 36;
* @param index The index of the value to return.
* @return The bytes of the disabledBy at the given index.
*/
public com.google.protobuf.ByteString
getDisabledByBytes(int index) {
return disabledBy_.getByteString(index);
}
public static final int TAG_NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object tagName_ = "";
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @return Whether the tagName field is set.
*/
@java.lang.Override
public boolean hasTagName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @return The tagName.
*/
@java.lang.Override
public java.lang.String getTagName() {
java.lang.Object ref = tagName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
tagName_ = s;
}
return s;
}
}
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @return The bytes for tagName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTagNameBytes() {
java.lang.Object ref = tagName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tagName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SPEC_NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object specName_ = "";
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @return Whether the specName field is set.
*/
@java.lang.Override
public boolean hasSpecName() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @return The specName.
*/
@java.lang.Override
public java.lang.String getSpecName() {
java.lang.Object ref = specName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
specName_ = s;
}
return s;
}
}
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @return The bytes for specName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSpecNameBytes() {
java.lang.Object ref = specName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
specName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTIVE_NAME_FIELD_NUMBER = 39;
@SuppressWarnings("serial")
private volatile java.lang.Object descriptiveName_ = "";
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @return Whether the descriptiveName field is set.
*/
@java.lang.Override
public boolean hasDescriptiveName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @return The descriptiveName.
*/
@java.lang.Override
public java.lang.String getDescriptiveName() {
java.lang.Object ref = descriptiveName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
descriptiveName_ = s;
}
return s;
}
}
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @return The bytes for descriptiveName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptiveNameBytes() {
java.lang.Object ref = descriptiveName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
descriptiveName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAMED_ID_FIELD_NUMBER = 33;
private int namedId_ = 0;
/**
* optional .amp.validator.TagSpec.NamedId named_id = 33 [default = NOT_SET];
* @return Whether the namedId field is set.
*/
@java.lang.Override public boolean hasNamedId() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .amp.validator.TagSpec.NamedId named_id = 33 [default = NOT_SET];
* @return The namedId.
*/
@java.lang.Override public dev.amp.validator.ValidatorProtos.TagSpec.NamedId getNamedId() {
dev.amp.validator.ValidatorProtos.TagSpec.NamedId result = dev.amp.validator.ValidatorProtos.TagSpec.NamedId.forNumber(namedId_);
return result == null ? dev.amp.validator.ValidatorProtos.TagSpec.NamedId.NOT_SET : result;
}
public static final int EXTENSION_SPEC_FIELD_NUMBER = 27;
private dev.amp.validator.ValidatorProtos.ExtensionSpec extensionSpec_;
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
* @return Whether the extensionSpec field is set.
*/
@java.lang.Override
public boolean hasExtensionSpec() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
* @return The extensionSpec.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ExtensionSpec getExtensionSpec() {
return extensionSpec_ == null ? dev.amp.validator.ValidatorProtos.ExtensionSpec.getDefaultInstance() : extensionSpec_;
}
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ExtensionSpecOrBuilder getExtensionSpecOrBuilder() {
return extensionSpec_ == null ? dev.amp.validator.ValidatorProtos.ExtensionSpec.getDefaultInstance() : extensionSpec_;
}
public static final int REQUIRES_EXTENSION_FIELD_NUMBER = 28;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList requiresExtension_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @return A list containing the requiresExtension.
*/
public com.google.protobuf.ProtocolStringList
getRequiresExtensionList() {
return requiresExtension_;
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @return The count of requiresExtension.
*/
public int getRequiresExtensionCount() {
return requiresExtension_.size();
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @param index The index of the element to return.
* @return The requiresExtension at the given index.
*/
public java.lang.String getRequiresExtension(int index) {
return requiresExtension_.get(index);
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @param index The index of the value to return.
* @return The bytes of the requiresExtension at the given index.
*/
public com.google.protobuf.ByteString
getRequiresExtensionBytes(int index) {
return requiresExtension_.getByteString(index);
}
public static final int MANDATORY_FIELD_NUMBER = 3;
private boolean mandatory_ = false;
/**
*
* If true, a tag conforming to this tag spec must occur at least once
* within the document.
*
*
* optional bool mandatory = 3;
* @return Whether the mandatory field is set.
*/
@java.lang.Override
public boolean hasMandatory() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* If true, a tag conforming to this tag spec must occur at least once
* within the document.
*
*
* optional bool mandatory = 3;
* @return The mandatory.
*/
@java.lang.Override
public boolean getMandatory() {
return mandatory_;
}
public static final int MANDATORY_ALTERNATIVES_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object mandatoryAlternatives_ = "";
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @return Whether the mandatoryAlternatives field is set.
*/
@java.lang.Override
public boolean hasMandatoryAlternatives() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @return The mandatoryAlternatives.
*/
@java.lang.Override
public java.lang.String getMandatoryAlternatives() {
java.lang.Object ref = mandatoryAlternatives_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryAlternatives_ = s;
}
return s;
}
}
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @return The bytes for mandatoryAlternatives.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMandatoryAlternativesBytes() {
java.lang.Object ref = mandatoryAlternatives_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryAlternatives_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int UNIQUE_FIELD_NUMBER = 5;
private boolean unique_ = false;
/**
*
* If true, a tag conforming to this tag spec may occur at most once within
* the document.
*
*
* optional bool unique = 5;
* @return Whether the unique field is set.
*/
@java.lang.Override
public boolean hasUnique() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* If true, a tag conforming to this tag spec may occur at most once within
* the document.
*
*
* optional bool unique = 5;
* @return The unique.
*/
@java.lang.Override
public boolean getUnique() {
return unique_;
}
public static final int UNIQUE_WARNING_FIELD_NUMBER = 25;
private boolean uniqueWarning_ = false;
/**
*
* If true, a tag conforming to this tag spec should occur at most once within
* the document. That is, unlike for unique, we'll emit a warning.
*
*
* optional bool unique_warning = 25;
* @return Whether the uniqueWarning field is set.
*/
@java.lang.Override
public boolean hasUniqueWarning() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
* If true, a tag conforming to this tag spec should occur at most once within
* the document. That is, unlike for unique, we'll emit a warning.
*
*
* optional bool unique_warning = 25;
* @return The uniqueWarning.
*/
@java.lang.Override
public boolean getUniqueWarning() {
return uniqueWarning_;
}
public static final int MANDATORY_PARENT_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object mandatoryParent_ = "";
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @return Whether the mandatoryParent field is set.
*/
@java.lang.Override
public boolean hasMandatoryParent() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @return The mandatoryParent.
*/
@java.lang.Override
public java.lang.String getMandatoryParent() {
java.lang.Object ref = mandatoryParent_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryParent_ = s;
}
return s;
}
}
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @return The bytes for mandatoryParent.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMandatoryParentBytes() {
java.lang.Object ref = mandatoryParent_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryParent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MANDATORY_ANCESTOR_FIELD_NUMBER = 15;
@SuppressWarnings("serial")
private volatile java.lang.Object mandatoryAncestor_ = "";
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @return Whether the mandatoryAncestor field is set.
*/
@java.lang.Override
public boolean hasMandatoryAncestor() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @return The mandatoryAncestor.
*/
@java.lang.Override
public java.lang.String getMandatoryAncestor() {
java.lang.Object ref = mandatoryAncestor_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryAncestor_ = s;
}
return s;
}
}
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @return The bytes for mandatoryAncestor.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMandatoryAncestorBytes() {
java.lang.Object ref = mandatoryAncestor_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryAncestor_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MANDATORY_ANCESTOR_SUGGESTED_ALTERNATIVE_FIELD_NUMBER = 16;
@SuppressWarnings("serial")
private volatile java.lang.Object mandatoryAncestorSuggestedAlternative_ = "";
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @return Whether the mandatoryAncestorSuggestedAlternative field is set.
*/
@java.lang.Override
public boolean hasMandatoryAncestorSuggestedAlternative() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @return The mandatoryAncestorSuggestedAlternative.
*/
@java.lang.Override
public java.lang.String getMandatoryAncestorSuggestedAlternative() {
java.lang.Object ref = mandatoryAncestorSuggestedAlternative_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryAncestorSuggestedAlternative_ = s;
}
return s;
}
}
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @return The bytes for mandatoryAncestorSuggestedAlternative.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getMandatoryAncestorSuggestedAlternativeBytes() {
java.lang.Object ref = mandatoryAncestorSuggestedAlternative_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryAncestorSuggestedAlternative_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISALLOWED_ANCESTOR_FIELD_NUMBER = 13;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList disallowedAncestor_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @return A list containing the disallowedAncestor.
*/
public com.google.protobuf.ProtocolStringList
getDisallowedAncestorList() {
return disallowedAncestor_;
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @return The count of disallowedAncestor.
*/
public int getDisallowedAncestorCount() {
return disallowedAncestor_.size();
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @param index The index of the element to return.
* @return The disallowedAncestor at the given index.
*/
public java.lang.String getDisallowedAncestor(int index) {
return disallowedAncestor_.get(index);
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @param index The index of the value to return.
* @return The bytes of the disallowedAncestor at the given index.
*/
public com.google.protobuf.ByteString
getDisallowedAncestorBytes(int index) {
return disallowedAncestor_.getByteString(index);
}
public static final int DESCENDANT_TAG_LIST_FIELD_NUMBER = 29;
@SuppressWarnings("serial")
private volatile java.lang.Object descendantTagList_ = "";
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @return Whether the descendantTagList field is set.
*/
@java.lang.Override
public boolean hasDescendantTagList() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @return The descendantTagList.
*/
@java.lang.Override
public java.lang.String getDescendantTagList() {
java.lang.Object ref = descendantTagList_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
descendantTagList_ = s;
}
return s;
}
}
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @return The bytes for descendantTagList.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescendantTagListBytes() {
java.lang.Object ref = descendantTagList_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
descendantTagList_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ALSO_REQUIRES_TAG_WARNING_FIELD_NUMBER = 22;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList alsoRequiresTagWarning_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @return A list containing the alsoRequiresTagWarning.
*/
public com.google.protobuf.ProtocolStringList
getAlsoRequiresTagWarningList() {
return alsoRequiresTagWarning_;
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @return The count of alsoRequiresTagWarning.
*/
public int getAlsoRequiresTagWarningCount() {
return alsoRequiresTagWarning_.size();
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @param index The index of the element to return.
* @return The alsoRequiresTagWarning at the given index.
*/
public java.lang.String getAlsoRequiresTagWarning(int index) {
return alsoRequiresTagWarning_.get(index);
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @param index The index of the value to return.
* @return The bytes of the alsoRequiresTagWarning at the given index.
*/
public com.google.protobuf.ByteString
getAlsoRequiresTagWarningBytes(int index) {
return alsoRequiresTagWarning_.getByteString(index);
}
public static final int SATISFIES_CONDITION_FIELD_NUMBER = 23;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList satisfiesCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @return A list containing the satisfiesCondition.
*/
public com.google.protobuf.ProtocolStringList
getSatisfiesConditionList() {
return satisfiesCondition_;
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @return The count of satisfiesCondition.
*/
public int getSatisfiesConditionCount() {
return satisfiesCondition_.size();
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @param index The index of the element to return.
* @return The satisfiesCondition at the given index.
*/
public java.lang.String getSatisfiesCondition(int index) {
return satisfiesCondition_.get(index);
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @param index The index of the value to return.
* @return The bytes of the satisfiesCondition at the given index.
*/
public com.google.protobuf.ByteString
getSatisfiesConditionBytes(int index) {
return satisfiesCondition_.getByteString(index);
}
public static final int REQUIRES_CONDITION_FIELD_NUMBER = 24;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList requiresCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @return A list containing the requiresCondition.
*/
public com.google.protobuf.ProtocolStringList
getRequiresConditionList() {
return requiresCondition_;
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @return The count of requiresCondition.
*/
public int getRequiresConditionCount() {
return requiresCondition_.size();
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @param index The index of the element to return.
* @return The requiresCondition at the given index.
*/
public java.lang.String getRequiresCondition(int index) {
return requiresCondition_.get(index);
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @param index The index of the value to return.
* @return The bytes of the requiresCondition at the given index.
*/
public com.google.protobuf.ByteString
getRequiresConditionBytes(int index) {
return requiresCondition_.getByteString(index);
}
public static final int EXCLUDES_CONDITION_FIELD_NUMBER = 32;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList excludesCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @return A list containing the excludesCondition.
*/
public com.google.protobuf.ProtocolStringList
getExcludesConditionList() {
return excludesCondition_;
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @return The count of excludesCondition.
*/
public int getExcludesConditionCount() {
return excludesCondition_.size();
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @param index The index of the element to return.
* @return The excludesCondition at the given index.
*/
public java.lang.String getExcludesCondition(int index) {
return excludesCondition_.get(index);
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @param index The index of the value to return.
* @return The bytes of the excludesCondition at the given index.
*/
public com.google.protobuf.ByteString
getExcludesConditionBytes(int index) {
return excludesCondition_.getByteString(index);
}
public static final int DEPRECATION_FIELD_NUMBER = 17;
@SuppressWarnings("serial")
private volatile java.lang.Object deprecation_ = "";
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @return Whether the deprecation field is set.
*/
@java.lang.Override
public boolean hasDeprecation() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @return The deprecation.
*/
@java.lang.Override
public java.lang.String getDeprecation() {
java.lang.Object ref = deprecation_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
deprecation_ = s;
}
return s;
}
}
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @return The bytes for deprecation.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDeprecationBytes() {
java.lang.Object ref = deprecation_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deprecation_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEPRECATION_URL_FIELD_NUMBER = 18;
@SuppressWarnings("serial")
private volatile java.lang.Object deprecationUrl_ = "";
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @return Whether the deprecationUrl field is set.
*/
@java.lang.Override
public boolean hasDeprecationUrl() {
return ((bitField0_ & 0x00004000) != 0);
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @return The deprecationUrl.
*/
@java.lang.Override
public java.lang.String getDeprecationUrl() {
java.lang.Object ref = deprecationUrl_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
deprecationUrl_ = s;
}
return s;
}
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @return The bytes for deprecationUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDeprecationUrlBytes() {
java.lang.Object ref = deprecationUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deprecationUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXPLICIT_ATTRS_ONLY_FIELD_NUMBER = 34;
private boolean explicitAttrsOnly_ = false;
/**
*
* This TagSpec will only validate against attributes explicitly
* listed within the TagSpec (attrs and attr_lists). No attributes
* from $GLOBAL_ATTRS and $AMP_LAYOUT_ATTRS are valid unless explicitly
* added as an attribute within the TagSpec. The field `amp_layout` is not
* allowed to be set when `explicit_attrs_only` is true.
*
*
* optional bool explicit_attrs_only = 34 [default = false];
* @return Whether the explicitAttrsOnly field is set.
*/
@java.lang.Override
public boolean hasExplicitAttrsOnly() {
return ((bitField0_ & 0x00008000) != 0);
}
/**
*
* This TagSpec will only validate against attributes explicitly
* listed within the TagSpec (attrs and attr_lists). No attributes
* from $GLOBAL_ATTRS and $AMP_LAYOUT_ATTRS are valid unless explicitly
* added as an attribute within the TagSpec. The field `amp_layout` is not
* allowed to be set when `explicit_attrs_only` is true.
*
*
* optional bool explicit_attrs_only = 34 [default = false];
* @return The explicitAttrsOnly.
*/
@java.lang.Override
public boolean getExplicitAttrsOnly() {
return explicitAttrsOnly_;
}
public static final int ATTRS_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private java.util.List attrs_;
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
@java.lang.Override
public java.util.List getAttrsList() {
return attrs_;
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
@java.lang.Override
public java.util.List
getAttrsOrBuilderList() {
return attrs_;
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
@java.lang.Override
public int getAttrsCount() {
return attrs_.size();
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrSpec getAttrs(int index) {
return attrs_.get(index);
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder getAttrsOrBuilder(
int index) {
return attrs_.get(index);
}
public static final int ATTR_LISTS_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList attrLists_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Top level attr lists of shared tags, identified by unique key
* (see attr_lists map in ValidatorRules).
*
*
* repeated string attr_lists = 8;
* @return A list containing the attrLists.
*/
public com.google.protobuf.ProtocolStringList
getAttrListsList() {
return attrLists_;
}
/**
*
* Top level attr lists of shared tags, identified by unique key
* (see attr_lists map in ValidatorRules).
*
*
* repeated string attr_lists = 8;
* @return The count of attrLists.
*/
public int getAttrListsCount() {
return attrLists_.size();
}
/**
*
* Top level attr lists of shared tags, identified by unique key
* (see attr_lists map in ValidatorRules).
*
*
* repeated string attr_lists = 8;
* @param index The index of the element to return.
* @return The attrLists at the given index.
*/
public java.lang.String getAttrLists(int index) {
return attrLists_.get(index);
}
/**
*
* Top level attr lists of shared tags, identified by unique key
* (see attr_lists map in ValidatorRules).
*
*
* repeated string attr_lists = 8;
* @param index The index of the value to return.
* @return The bytes of the attrLists at the given index.
*/
public com.google.protobuf.ByteString
getAttrListsBytes(int index) {
return attrLists_.getByteString(index);
}
public static final int CDATA_FIELD_NUMBER = 12;
private dev.amp.validator.ValidatorProtos.CdataSpec cdata_;
/**
*
* Note that these are evaluated after a particular TagSpec
* has been evaluated. Unlike other checks in this TagSpec, we
* no longer have the ability to fall back on a different TagSpec.
*
*
* optional .amp.validator.CdataSpec cdata = 12;
* @return Whether the cdata field is set.
*/
@java.lang.Override
public boolean hasCdata() {
return ((bitField0_ & 0x00010000) != 0);
}
/**
*
* Note that these are evaluated after a particular TagSpec
* has been evaluated. Unlike other checks in this TagSpec, we
* no longer have the ability to fall back on a different TagSpec.
*
*
* optional .amp.validator.CdataSpec cdata = 12;
* @return The cdata.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CdataSpec getCdata() {
return cdata_ == null ? dev.amp.validator.ValidatorProtos.CdataSpec.getDefaultInstance() : cdata_;
}
/**
*
* Note that these are evaluated after a particular TagSpec
* has been evaluated. Unlike other checks in this TagSpec, we
* no longer have the ability to fall back on a different TagSpec.
*
*
* optional .amp.validator.CdataSpec cdata = 12;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.CdataSpecOrBuilder getCdataOrBuilder() {
return cdata_ == null ? dev.amp.validator.ValidatorProtos.CdataSpec.getDefaultInstance() : cdata_;
}
public static final int CHILD_TAGS_FIELD_NUMBER = 19;
private dev.amp.validator.ValidatorProtos.ChildTagSpec childTags_;
/**
*
* Specifies which tags can be the child tags, that is, immediately children
* of this tag in the document.
*
*
* optional .amp.validator.ChildTagSpec child_tags = 19;
* @return Whether the childTags field is set.
*/
@java.lang.Override
public boolean hasChildTags() {
return ((bitField0_ & 0x00020000) != 0);
}
/**
*
* Specifies which tags can be the child tags, that is, immediately children
* of this tag in the document.
*
*
* optional .amp.validator.ChildTagSpec child_tags = 19;
* @return The childTags.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ChildTagSpec getChildTags() {
return childTags_ == null ? dev.amp.validator.ValidatorProtos.ChildTagSpec.getDefaultInstance() : childTags_;
}
/**
*
* Specifies which tags can be the child tags, that is, immediately children
* of this tag in the document.
*
*
* optional .amp.validator.ChildTagSpec child_tags = 19;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ChildTagSpecOrBuilder getChildTagsOrBuilder() {
return childTags_ == null ? dev.amp.validator.ValidatorProtos.ChildTagSpec.getDefaultInstance() : childTags_;
}
public static final int SIBLINGS_DISALLOWED_FIELD_NUMBER = 30;
private boolean siblingsDisallowed_ = false;
/**
*
* If set to true, this tag cannot have any siblings.
*
*
* optional bool siblings_disallowed = 30 [default = false];
* @return Whether the siblingsDisallowed field is set.
*/
@java.lang.Override
public boolean hasSiblingsDisallowed() {
return ((bitField0_ & 0x00040000) != 0);
}
/**
*
* If set to true, this tag cannot have any siblings.
*
*
* optional bool siblings_disallowed = 30 [default = false];
* @return The siblingsDisallowed.
*/
@java.lang.Override
public boolean getSiblingsDisallowed() {
return siblingsDisallowed_;
}
public static final int MANDATORY_LAST_CHILD_FIELD_NUMBER = 31;
private boolean mandatoryLastChild_ = false;
/**
*
* If set to true, this tag must be the last child of its parent.
*
*
* optional bool mandatory_last_child = 31 [default = false];
* @return Whether the mandatoryLastChild field is set.
*/
@java.lang.Override
public boolean hasMandatoryLastChild() {
return ((bitField0_ & 0x00080000) != 0);
}
/**
*
* If set to true, this tag must be the last child of its parent.
*
*
* optional bool mandatory_last_child = 31 [default = false];
* @return The mandatoryLastChild.
*/
@java.lang.Override
public boolean getMandatoryLastChild() {
return mandatoryLastChild_;
}
public static final int REFERENCE_POINTS_FIELD_NUMBER = 20;
@SuppressWarnings("serial")
private java.util.List referencePoints_;
/**
*
* The reference_points defined by this TagSpec instance determine how
* specific child tags are identified. Please see the comment for the
* ReferencePoint message.
*
*
* repeated .amp.validator.ReferencePoint reference_points = 20;
*/
@java.lang.Override
public java.util.List getReferencePointsList() {
return referencePoints_;
}
/**
*
* The reference_points defined by this TagSpec instance determine how
* specific child tags are identified. Please see the comment for the
* ReferencePoint message.
*
*
* repeated .amp.validator.ReferencePoint reference_points = 20;
*/
@java.lang.Override
public java.util.List
getReferencePointsOrBuilderList() {
return referencePoints_;
}
/**
*
* The reference_points defined by this TagSpec instance determine how
* specific child tags are identified. Please see the comment for the
* ReferencePoint message.
*
*
* repeated .amp.validator.ReferencePoint reference_points = 20;
*/
@java.lang.Override
public int getReferencePointsCount() {
return referencePoints_.size();
}
/**
*
* The reference_points defined by this TagSpec instance determine how
* specific child tags are identified. Please see the comment for the
* ReferencePoint message.
*
*
* repeated .amp.validator.ReferencePoint reference_points = 20;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ReferencePoint getReferencePoints(int index) {
return referencePoints_.get(index);
}
/**
*
* The reference_points defined by this TagSpec instance determine how
* specific child tags are identified. Please see the comment for the
* ReferencePoint message.
*
*
* repeated .amp.validator.ReferencePoint reference_points = 20;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.ReferencePointOrBuilder getReferencePointsOrBuilder(
int index) {
return referencePoints_.get(index);
}
public static final int SPEC_URL_FIELD_NUMBER = 10;
@SuppressWarnings("serial")
private volatile java.lang.Object specUrl_ = "";
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec. If a TagSpec contains a requires_extension field,
* spec_url will be inherited from the named extension, unless overridden
* by the setting it here.
*
*
* optional string spec_url = 10;
* @return Whether the specUrl field is set.
*/
@java.lang.Override
public boolean hasSpecUrl() {
return ((bitField0_ & 0x00100000) != 0);
}
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec. If a TagSpec contains a requires_extension field,
* spec_url will be inherited from the named extension, unless overridden
* by the setting it here.
*
*
* optional string spec_url = 10;
* @return The specUrl.
*/
@java.lang.Override
public java.lang.String getSpecUrl() {
java.lang.Object ref = specUrl_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
specUrl_ = s;
}
return s;
}
}
/**
*
* If provided, a URL which linking to a section / sentence in the
* AMP HTML spec. If a TagSpec contains a requires_extension field,
* spec_url will be inherited from the named extension, unless overridden
* by the setting it here.
*
*
* optional string spec_url = 10;
* @return The bytes for specUrl.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSpecUrlBytes() {
java.lang.Object ref = specUrl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
specUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AMP_LAYOUT_FIELD_NUMBER = 11;
private dev.amp.validator.ValidatorProtos.AmpLayout ampLayout_;
/**
*
* If set, specifies which AMP Layouts are supported by this element.
*
*
* optional .amp.validator.AmpLayout amp_layout = 11;
* @return Whether the ampLayout field is set.
*/
@java.lang.Override
public boolean hasAmpLayout() {
return ((bitField0_ & 0x00200000) != 0);
}
/**
*
* If set, specifies which AMP Layouts are supported by this element.
*
*
* optional .amp.validator.AmpLayout amp_layout = 11;
* @return The ampLayout.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AmpLayout getAmpLayout() {
return ampLayout_ == null ? dev.amp.validator.ValidatorProtos.AmpLayout.getDefaultInstance() : ampLayout_;
}
/**
*
* If set, specifies which AMP Layouts are supported by this element.
*
*
* optional .amp.validator.AmpLayout amp_layout = 11;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AmpLayoutOrBuilder getAmpLayoutOrBuilder() {
return ampLayout_ == null ? dev.amp.validator.ValidatorProtos.AmpLayout.getDefaultInstance() : ampLayout_;
}
public static final int MARK_DESCENDANTS_FIELD_NUMBER = 38;
private dev.amp.validator.ValidatorProtos.AncestorMarker markDescendants_;
/**
*
* If set, triggers related validation rules for descendants of this tag.
*
*
* optional .amp.validator.AncestorMarker mark_descendants = 38;
* @return Whether the markDescendants field is set.
*/
@java.lang.Override
public boolean hasMarkDescendants() {
return ((bitField0_ & 0x00400000) != 0);
}
/**
*
* If set, triggers related validation rules for descendants of this tag.
*
*
* optional .amp.validator.AncestorMarker mark_descendants = 38;
* @return The markDescendants.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AncestorMarker getMarkDescendants() {
return markDescendants_ == null ? dev.amp.validator.ValidatorProtos.AncestorMarker.getDefaultInstance() : markDescendants_;
}
/**
*
* If set, triggers related validation rules for descendants of this tag.
*
*
* optional .amp.validator.AncestorMarker mark_descendants = 38;
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.AncestorMarkerOrBuilder getMarkDescendantsOrBuilder() {
return markDescendants_ == null ? dev.amp.validator.ValidatorProtos.AncestorMarker.getDefaultInstance() : markDescendants_;
}
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)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, tagName_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, specName_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeBool(3, mandatory_);
}
if (((bitField0_ & 0x00000040) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mandatoryAlternatives_);
}
if (((bitField0_ & 0x00000080) != 0)) {
output.writeBool(5, unique_);
}
if (((bitField0_ & 0x00000200) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, mandatoryParent_);
}
for (int i = 0; i < attrs_.size(); i++) {
output.writeMessage(7, attrs_.get(i));
}
for (int i = 0; i < attrLists_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, attrLists_.getRaw(i));
}
if (((bitField0_ & 0x00100000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, specUrl_);
}
if (((bitField0_ & 0x00200000) != 0)) {
output.writeMessage(11, getAmpLayout());
}
if (((bitField0_ & 0x00010000) != 0)) {
output.writeMessage(12, getCdata());
}
for (int i = 0; i < disallowedAncestor_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, disallowedAncestor_.getRaw(i));
}
if (((bitField0_ & 0x00000400) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 15, mandatoryAncestor_);
}
if (((bitField0_ & 0x00000800) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 16, mandatoryAncestorSuggestedAlternative_);
}
if (((bitField0_ & 0x00002000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 17, deprecation_);
}
if (((bitField0_ & 0x00004000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 18, deprecationUrl_);
}
if (((bitField0_ & 0x00020000) != 0)) {
output.writeMessage(19, getChildTags());
}
for (int i = 0; i < referencePoints_.size(); i++) {
output.writeMessage(20, referencePoints_.get(i));
}
for (int i = 0; i < htmlFormat_.size(); i++) {
output.writeEnum(21, htmlFormat_.get(i));
}
for (int i = 0; i < alsoRequiresTagWarning_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 22, alsoRequiresTagWarning_.getRaw(i));
}
for (int i = 0; i < satisfiesCondition_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 23, satisfiesCondition_.getRaw(i));
}
for (int i = 0; i < requiresCondition_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 24, requiresCondition_.getRaw(i));
}
if (((bitField0_ & 0x00000100) != 0)) {
output.writeBool(25, uniqueWarning_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(27, getExtensionSpec());
}
for (int i = 0; i < requiresExtension_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 28, requiresExtension_.getRaw(i));
}
if (((bitField0_ & 0x00001000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 29, descendantTagList_);
}
if (((bitField0_ & 0x00040000) != 0)) {
output.writeBool(30, siblingsDisallowed_);
}
if (((bitField0_ & 0x00080000) != 0)) {
output.writeBool(31, mandatoryLastChild_);
}
for (int i = 0; i < excludesCondition_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 32, excludesCondition_.getRaw(i));
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeEnum(33, namedId_);
}
if (((bitField0_ & 0x00008000) != 0)) {
output.writeBool(34, explicitAttrsOnly_);
}
for (int i = 0; i < enabledBy_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 35, enabledBy_.getRaw(i));
}
for (int i = 0; i < disabledBy_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 36, disabledBy_.getRaw(i));
}
if (((bitField0_ & 0x00400000) != 0)) {
output.writeMessage(38, getMarkDescendants());
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 39, descriptiveName_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, tagName_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, specName_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, mandatory_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mandatoryAlternatives_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(5, unique_);
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, mandatoryParent_);
}
for (int i = 0; i < attrs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, attrs_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < attrLists_.size(); i++) {
dataSize += computeStringSizeNoTag(attrLists_.getRaw(i));
}
size += dataSize;
size += 1 * getAttrListsList().size();
}
if (((bitField0_ & 0x00100000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, specUrl_);
}
if (((bitField0_ & 0x00200000) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getAmpLayout());
}
if (((bitField0_ & 0x00010000) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, getCdata());
}
{
int dataSize = 0;
for (int i = 0; i < disallowedAncestor_.size(); i++) {
dataSize += computeStringSizeNoTag(disallowedAncestor_.getRaw(i));
}
size += dataSize;
size += 1 * getDisallowedAncestorList().size();
}
if (((bitField0_ & 0x00000400) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, mandatoryAncestor_);
}
if (((bitField0_ & 0x00000800) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, mandatoryAncestorSuggestedAlternative_);
}
if (((bitField0_ & 0x00002000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, deprecation_);
}
if (((bitField0_ & 0x00004000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, deprecationUrl_);
}
if (((bitField0_ & 0x00020000) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(19, getChildTags());
}
for (int i = 0; i < referencePoints_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(20, referencePoints_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < htmlFormat_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeEnumSizeNoTag(htmlFormat_.get(i));
}
size += dataSize;
size += 2 * htmlFormat_.size();
}
{
int dataSize = 0;
for (int i = 0; i < alsoRequiresTagWarning_.size(); i++) {
dataSize += computeStringSizeNoTag(alsoRequiresTagWarning_.getRaw(i));
}
size += dataSize;
size += 2 * getAlsoRequiresTagWarningList().size();
}
{
int dataSize = 0;
for (int i = 0; i < satisfiesCondition_.size(); i++) {
dataSize += computeStringSizeNoTag(satisfiesCondition_.getRaw(i));
}
size += dataSize;
size += 2 * getSatisfiesConditionList().size();
}
{
int dataSize = 0;
for (int i = 0; i < requiresCondition_.size(); i++) {
dataSize += computeStringSizeNoTag(requiresCondition_.getRaw(i));
}
size += dataSize;
size += 2 * getRequiresConditionList().size();
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(25, uniqueWarning_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(27, getExtensionSpec());
}
{
int dataSize = 0;
for (int i = 0; i < requiresExtension_.size(); i++) {
dataSize += computeStringSizeNoTag(requiresExtension_.getRaw(i));
}
size += dataSize;
size += 2 * getRequiresExtensionList().size();
}
if (((bitField0_ & 0x00001000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(29, descendantTagList_);
}
if (((bitField0_ & 0x00040000) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(30, siblingsDisallowed_);
}
if (((bitField0_ & 0x00080000) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(31, mandatoryLastChild_);
}
{
int dataSize = 0;
for (int i = 0; i < excludesCondition_.size(); i++) {
dataSize += computeStringSizeNoTag(excludesCondition_.getRaw(i));
}
size += dataSize;
size += 2 * getExcludesConditionList().size();
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(33, namedId_);
}
if (((bitField0_ & 0x00008000) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(34, explicitAttrsOnly_);
}
{
int dataSize = 0;
for (int i = 0; i < enabledBy_.size(); i++) {
dataSize += computeStringSizeNoTag(enabledBy_.getRaw(i));
}
size += dataSize;
size += 2 * getEnabledByList().size();
}
{
int dataSize = 0;
for (int i = 0; i < disabledBy_.size(); i++) {
dataSize += computeStringSizeNoTag(disabledBy_.getRaw(i));
}
size += dataSize;
size += 2 * getDisabledByList().size();
}
if (((bitField0_ & 0x00400000) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(38, getMarkDescendants());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(39, descriptiveName_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof dev.amp.validator.ValidatorProtos.TagSpec)) {
return super.equals(obj);
}
dev.amp.validator.ValidatorProtos.TagSpec other = (dev.amp.validator.ValidatorProtos.TagSpec) obj;
if (!htmlFormat_.equals(other.htmlFormat_)) return false;
if (!getEnabledByList()
.equals(other.getEnabledByList())) return false;
if (!getDisabledByList()
.equals(other.getDisabledByList())) return false;
if (hasTagName() != other.hasTagName()) return false;
if (hasTagName()) {
if (!getTagName()
.equals(other.getTagName())) return false;
}
if (hasSpecName() != other.hasSpecName()) return false;
if (hasSpecName()) {
if (!getSpecName()
.equals(other.getSpecName())) return false;
}
if (hasDescriptiveName() != other.hasDescriptiveName()) return false;
if (hasDescriptiveName()) {
if (!getDescriptiveName()
.equals(other.getDescriptiveName())) return false;
}
if (hasNamedId() != other.hasNamedId()) return false;
if (hasNamedId()) {
if (namedId_ != other.namedId_) return false;
}
if (hasExtensionSpec() != other.hasExtensionSpec()) return false;
if (hasExtensionSpec()) {
if (!getExtensionSpec()
.equals(other.getExtensionSpec())) return false;
}
if (!getRequiresExtensionList()
.equals(other.getRequiresExtensionList())) return false;
if (hasMandatory() != other.hasMandatory()) return false;
if (hasMandatory()) {
if (getMandatory()
!= other.getMandatory()) return false;
}
if (hasMandatoryAlternatives() != other.hasMandatoryAlternatives()) return false;
if (hasMandatoryAlternatives()) {
if (!getMandatoryAlternatives()
.equals(other.getMandatoryAlternatives())) return false;
}
if (hasUnique() != other.hasUnique()) return false;
if (hasUnique()) {
if (getUnique()
!= other.getUnique()) return false;
}
if (hasUniqueWarning() != other.hasUniqueWarning()) return false;
if (hasUniqueWarning()) {
if (getUniqueWarning()
!= other.getUniqueWarning()) return false;
}
if (hasMandatoryParent() != other.hasMandatoryParent()) return false;
if (hasMandatoryParent()) {
if (!getMandatoryParent()
.equals(other.getMandatoryParent())) return false;
}
if (hasMandatoryAncestor() != other.hasMandatoryAncestor()) return false;
if (hasMandatoryAncestor()) {
if (!getMandatoryAncestor()
.equals(other.getMandatoryAncestor())) return false;
}
if (hasMandatoryAncestorSuggestedAlternative() != other.hasMandatoryAncestorSuggestedAlternative()) return false;
if (hasMandatoryAncestorSuggestedAlternative()) {
if (!getMandatoryAncestorSuggestedAlternative()
.equals(other.getMandatoryAncestorSuggestedAlternative())) return false;
}
if (!getDisallowedAncestorList()
.equals(other.getDisallowedAncestorList())) return false;
if (hasDescendantTagList() != other.hasDescendantTagList()) return false;
if (hasDescendantTagList()) {
if (!getDescendantTagList()
.equals(other.getDescendantTagList())) return false;
}
if (!getAlsoRequiresTagWarningList()
.equals(other.getAlsoRequiresTagWarningList())) return false;
if (!getSatisfiesConditionList()
.equals(other.getSatisfiesConditionList())) return false;
if (!getRequiresConditionList()
.equals(other.getRequiresConditionList())) return false;
if (!getExcludesConditionList()
.equals(other.getExcludesConditionList())) return false;
if (hasDeprecation() != other.hasDeprecation()) return false;
if (hasDeprecation()) {
if (!getDeprecation()
.equals(other.getDeprecation())) return false;
}
if (hasDeprecationUrl() != other.hasDeprecationUrl()) return false;
if (hasDeprecationUrl()) {
if (!getDeprecationUrl()
.equals(other.getDeprecationUrl())) return false;
}
if (hasExplicitAttrsOnly() != other.hasExplicitAttrsOnly()) return false;
if (hasExplicitAttrsOnly()) {
if (getExplicitAttrsOnly()
!= other.getExplicitAttrsOnly()) return false;
}
if (!getAttrsList()
.equals(other.getAttrsList())) return false;
if (!getAttrListsList()
.equals(other.getAttrListsList())) return false;
if (hasCdata() != other.hasCdata()) return false;
if (hasCdata()) {
if (!getCdata()
.equals(other.getCdata())) return false;
}
if (hasChildTags() != other.hasChildTags()) return false;
if (hasChildTags()) {
if (!getChildTags()
.equals(other.getChildTags())) return false;
}
if (hasSiblingsDisallowed() != other.hasSiblingsDisallowed()) return false;
if (hasSiblingsDisallowed()) {
if (getSiblingsDisallowed()
!= other.getSiblingsDisallowed()) return false;
}
if (hasMandatoryLastChild() != other.hasMandatoryLastChild()) return false;
if (hasMandatoryLastChild()) {
if (getMandatoryLastChild()
!= other.getMandatoryLastChild()) return false;
}
if (!getReferencePointsList()
.equals(other.getReferencePointsList())) return false;
if (hasSpecUrl() != other.hasSpecUrl()) return false;
if (hasSpecUrl()) {
if (!getSpecUrl()
.equals(other.getSpecUrl())) return false;
}
if (hasAmpLayout() != other.hasAmpLayout()) return false;
if (hasAmpLayout()) {
if (!getAmpLayout()
.equals(other.getAmpLayout())) return false;
}
if (hasMarkDescendants() != other.hasMarkDescendants()) return false;
if (hasMarkDescendants()) {
if (!getMarkDescendants()
.equals(other.getMarkDescendants())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getHtmlFormatCount() > 0) {
hash = (37 * hash) + HTML_FORMAT_FIELD_NUMBER;
hash = (53 * hash) + htmlFormat_.hashCode();
}
if (getEnabledByCount() > 0) {
hash = (37 * hash) + ENABLED_BY_FIELD_NUMBER;
hash = (53 * hash) + getEnabledByList().hashCode();
}
if (getDisabledByCount() > 0) {
hash = (37 * hash) + DISABLED_BY_FIELD_NUMBER;
hash = (53 * hash) + getDisabledByList().hashCode();
}
if (hasTagName()) {
hash = (37 * hash) + TAG_NAME_FIELD_NUMBER;
hash = (53 * hash) + getTagName().hashCode();
}
if (hasSpecName()) {
hash = (37 * hash) + SPEC_NAME_FIELD_NUMBER;
hash = (53 * hash) + getSpecName().hashCode();
}
if (hasDescriptiveName()) {
hash = (37 * hash) + DESCRIPTIVE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDescriptiveName().hashCode();
}
if (hasNamedId()) {
hash = (37 * hash) + NAMED_ID_FIELD_NUMBER;
hash = (53 * hash) + namedId_;
}
if (hasExtensionSpec()) {
hash = (37 * hash) + EXTENSION_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getExtensionSpec().hashCode();
}
if (getRequiresExtensionCount() > 0) {
hash = (37 * hash) + REQUIRES_EXTENSION_FIELD_NUMBER;
hash = (53 * hash) + getRequiresExtensionList().hashCode();
}
if (hasMandatory()) {
hash = (37 * hash) + MANDATORY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMandatory());
}
if (hasMandatoryAlternatives()) {
hash = (37 * hash) + MANDATORY_ALTERNATIVES_FIELD_NUMBER;
hash = (53 * hash) + getMandatoryAlternatives().hashCode();
}
if (hasUnique()) {
hash = (37 * hash) + UNIQUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getUnique());
}
if (hasUniqueWarning()) {
hash = (37 * hash) + UNIQUE_WARNING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getUniqueWarning());
}
if (hasMandatoryParent()) {
hash = (37 * hash) + MANDATORY_PARENT_FIELD_NUMBER;
hash = (53 * hash) + getMandatoryParent().hashCode();
}
if (hasMandatoryAncestor()) {
hash = (37 * hash) + MANDATORY_ANCESTOR_FIELD_NUMBER;
hash = (53 * hash) + getMandatoryAncestor().hashCode();
}
if (hasMandatoryAncestorSuggestedAlternative()) {
hash = (37 * hash) + MANDATORY_ANCESTOR_SUGGESTED_ALTERNATIVE_FIELD_NUMBER;
hash = (53 * hash) + getMandatoryAncestorSuggestedAlternative().hashCode();
}
if (getDisallowedAncestorCount() > 0) {
hash = (37 * hash) + DISALLOWED_ANCESTOR_FIELD_NUMBER;
hash = (53 * hash) + getDisallowedAncestorList().hashCode();
}
if (hasDescendantTagList()) {
hash = (37 * hash) + DESCENDANT_TAG_LIST_FIELD_NUMBER;
hash = (53 * hash) + getDescendantTagList().hashCode();
}
if (getAlsoRequiresTagWarningCount() > 0) {
hash = (37 * hash) + ALSO_REQUIRES_TAG_WARNING_FIELD_NUMBER;
hash = (53 * hash) + getAlsoRequiresTagWarningList().hashCode();
}
if (getSatisfiesConditionCount() > 0) {
hash = (37 * hash) + SATISFIES_CONDITION_FIELD_NUMBER;
hash = (53 * hash) + getSatisfiesConditionList().hashCode();
}
if (getRequiresConditionCount() > 0) {
hash = (37 * hash) + REQUIRES_CONDITION_FIELD_NUMBER;
hash = (53 * hash) + getRequiresConditionList().hashCode();
}
if (getExcludesConditionCount() > 0) {
hash = (37 * hash) + EXCLUDES_CONDITION_FIELD_NUMBER;
hash = (53 * hash) + getExcludesConditionList().hashCode();
}
if (hasDeprecation()) {
hash = (37 * hash) + DEPRECATION_FIELD_NUMBER;
hash = (53 * hash) + getDeprecation().hashCode();
}
if (hasDeprecationUrl()) {
hash = (37 * hash) + DEPRECATION_URL_FIELD_NUMBER;
hash = (53 * hash) + getDeprecationUrl().hashCode();
}
if (hasExplicitAttrsOnly()) {
hash = (37 * hash) + EXPLICIT_ATTRS_ONLY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getExplicitAttrsOnly());
}
if (getAttrsCount() > 0) {
hash = (37 * hash) + ATTRS_FIELD_NUMBER;
hash = (53 * hash) + getAttrsList().hashCode();
}
if (getAttrListsCount() > 0) {
hash = (37 * hash) + ATTR_LISTS_FIELD_NUMBER;
hash = (53 * hash) + getAttrListsList().hashCode();
}
if (hasCdata()) {
hash = (37 * hash) + CDATA_FIELD_NUMBER;
hash = (53 * hash) + getCdata().hashCode();
}
if (hasChildTags()) {
hash = (37 * hash) + CHILD_TAGS_FIELD_NUMBER;
hash = (53 * hash) + getChildTags().hashCode();
}
if (hasSiblingsDisallowed()) {
hash = (37 * hash) + SIBLINGS_DISALLOWED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getSiblingsDisallowed());
}
if (hasMandatoryLastChild()) {
hash = (37 * hash) + MANDATORY_LAST_CHILD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMandatoryLastChild());
}
if (getReferencePointsCount() > 0) {
hash = (37 * hash) + REFERENCE_POINTS_FIELD_NUMBER;
hash = (53 * hash) + getReferencePointsList().hashCode();
}
if (hasSpecUrl()) {
hash = (37 * hash) + SPEC_URL_FIELD_NUMBER;
hash = (53 * hash) + getSpecUrl().hashCode();
}
if (hasAmpLayout()) {
hash = (37 * hash) + AMP_LAYOUT_FIELD_NUMBER;
hash = (53 * hash) + getAmpLayout().hashCode();
}
if (hasMarkDescendants()) {
hash = (37 * hash) + MARK_DESCENDANTS_FIELD_NUMBER;
hash = (53 * hash) + getMarkDescendants().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static dev.amp.validator.ValidatorProtos.TagSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.TagSpec parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.TagSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.TagSpec parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.TagSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static dev.amp.validator.ValidatorProtos.TagSpec parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static dev.amp.validator.ValidatorProtos.TagSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.TagSpec 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 dev.amp.validator.ValidatorProtos.TagSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.TagSpec 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 dev.amp.validator.ValidatorProtos.TagSpec parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static dev.amp.validator.ValidatorProtos.TagSpec 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(dev.amp.validator.ValidatorProtos.TagSpec 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;
}
/**
*
* Tags that are not covered by at least one of these specs are disallowed.
* Some tags are mandatory. Note that the tag name is not unique, that is,
* there can be multiple tag specs covering the same name, e.g., for
* multiple meta tags (with different attributes).
* NEXT AVAILABLE TAG: 40
*
*
* Protobuf type {@code amp.validator.TagSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:amp.validator.TagSpec)
dev.amp.validator.ValidatorProtos.TagSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_TagSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_TagSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
dev.amp.validator.ValidatorProtos.TagSpec.class, dev.amp.validator.ValidatorProtos.TagSpec.Builder.class);
}
// Construct using dev.amp.validator.ValidatorProtos.TagSpec.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getExtensionSpecFieldBuilder();
getAttrsFieldBuilder();
getCdataFieldBuilder();
getChildTagsFieldBuilder();
getReferencePointsFieldBuilder();
getAmpLayoutFieldBuilder();
getMarkDescendantsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
bitField1_ = 0;
htmlFormat_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
enabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
disabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
tagName_ = "";
specName_ = "";
descriptiveName_ = "";
namedId_ = 0;
extensionSpec_ = null;
if (extensionSpecBuilder_ != null) {
extensionSpecBuilder_.dispose();
extensionSpecBuilder_ = null;
}
requiresExtension_ =
com.google.protobuf.LazyStringArrayList.emptyList();
mandatory_ = false;
mandatoryAlternatives_ = "";
unique_ = false;
uniqueWarning_ = false;
mandatoryParent_ = "";
mandatoryAncestor_ = "";
mandatoryAncestorSuggestedAlternative_ = "";
disallowedAncestor_ =
com.google.protobuf.LazyStringArrayList.emptyList();
descendantTagList_ = "";
alsoRequiresTagWarning_ =
com.google.protobuf.LazyStringArrayList.emptyList();
satisfiesCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
requiresCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
excludesCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
deprecation_ = "";
deprecationUrl_ = "";
explicitAttrsOnly_ = false;
if (attrsBuilder_ == null) {
attrs_ = java.util.Collections.emptyList();
} else {
attrs_ = null;
attrsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x02000000);
attrLists_ =
com.google.protobuf.LazyStringArrayList.emptyList();
cdata_ = null;
if (cdataBuilder_ != null) {
cdataBuilder_.dispose();
cdataBuilder_ = null;
}
childTags_ = null;
if (childTagsBuilder_ != null) {
childTagsBuilder_.dispose();
childTagsBuilder_ = null;
}
siblingsDisallowed_ = false;
mandatoryLastChild_ = false;
if (referencePointsBuilder_ == null) {
referencePoints_ = java.util.Collections.emptyList();
} else {
referencePoints_ = null;
referencePointsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x80000000);
specUrl_ = "";
ampLayout_ = null;
if (ampLayoutBuilder_ != null) {
ampLayoutBuilder_.dispose();
ampLayoutBuilder_ = null;
}
markDescendants_ = null;
if (markDescendantsBuilder_ != null) {
markDescendantsBuilder_.dispose();
markDescendantsBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return dev.amp.validator.ValidatorProtos.internal_static_amp_validator_TagSpec_descriptor;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.TagSpec getDefaultInstanceForType() {
return dev.amp.validator.ValidatorProtos.TagSpec.getDefaultInstance();
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.TagSpec build() {
dev.amp.validator.ValidatorProtos.TagSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public dev.amp.validator.ValidatorProtos.TagSpec buildPartial() {
dev.amp.validator.ValidatorProtos.TagSpec result = new dev.amp.validator.ValidatorProtos.TagSpec(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
if (bitField1_ != 0) { buildPartial1(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(dev.amp.validator.ValidatorProtos.TagSpec result) {
if (((bitField0_ & 0x00000001) != 0)) {
htmlFormat_ = java.util.Collections.unmodifiableList(htmlFormat_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.htmlFormat_ = htmlFormat_;
if (attrsBuilder_ == null) {
if (((bitField0_ & 0x02000000) != 0)) {
attrs_ = java.util.Collections.unmodifiableList(attrs_);
bitField0_ = (bitField0_ & ~0x02000000);
}
result.attrs_ = attrs_;
} else {
result.attrs_ = attrsBuilder_.build();
}
if (referencePointsBuilder_ == null) {
if (((bitField0_ & 0x80000000) != 0)) {
referencePoints_ = java.util.Collections.unmodifiableList(referencePoints_);
bitField0_ = (bitField0_ & ~0x80000000);
}
result.referencePoints_ = referencePoints_;
} else {
result.referencePoints_ = referencePointsBuilder_.build();
}
}
private void buildPartial0(dev.amp.validator.ValidatorProtos.TagSpec result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
enabledBy_.makeImmutable();
result.enabledBy_ = enabledBy_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
disabledBy_.makeImmutable();
result.disabledBy_ = disabledBy_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.tagName_ = tagName_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.specName_ = specName_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.descriptiveName_ = descriptiveName_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.namedId_ = namedId_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.extensionSpec_ = extensionSpecBuilder_ == null
? extensionSpec_
: extensionSpecBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
requiresExtension_.makeImmutable();
result.requiresExtension_ = requiresExtension_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.mandatory_ = mandatory_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.mandatoryAlternatives_ = mandatoryAlternatives_;
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.unique_ = unique_;
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.uniqueWarning_ = uniqueWarning_;
to_bitField0_ |= 0x00000100;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.mandatoryParent_ = mandatoryParent_;
to_bitField0_ |= 0x00000200;
}
if (((from_bitField0_ & 0x00004000) != 0)) {
result.mandatoryAncestor_ = mandatoryAncestor_;
to_bitField0_ |= 0x00000400;
}
if (((from_bitField0_ & 0x00008000) != 0)) {
result.mandatoryAncestorSuggestedAlternative_ = mandatoryAncestorSuggestedAlternative_;
to_bitField0_ |= 0x00000800;
}
if (((from_bitField0_ & 0x00010000) != 0)) {
disallowedAncestor_.makeImmutable();
result.disallowedAncestor_ = disallowedAncestor_;
}
if (((from_bitField0_ & 0x00020000) != 0)) {
result.descendantTagList_ = descendantTagList_;
to_bitField0_ |= 0x00001000;
}
if (((from_bitField0_ & 0x00040000) != 0)) {
alsoRequiresTagWarning_.makeImmutable();
result.alsoRequiresTagWarning_ = alsoRequiresTagWarning_;
}
if (((from_bitField0_ & 0x00080000) != 0)) {
satisfiesCondition_.makeImmutable();
result.satisfiesCondition_ = satisfiesCondition_;
}
if (((from_bitField0_ & 0x00100000) != 0)) {
requiresCondition_.makeImmutable();
result.requiresCondition_ = requiresCondition_;
}
if (((from_bitField0_ & 0x00200000) != 0)) {
excludesCondition_.makeImmutable();
result.excludesCondition_ = excludesCondition_;
}
if (((from_bitField0_ & 0x00400000) != 0)) {
result.deprecation_ = deprecation_;
to_bitField0_ |= 0x00002000;
}
if (((from_bitField0_ & 0x00800000) != 0)) {
result.deprecationUrl_ = deprecationUrl_;
to_bitField0_ |= 0x00004000;
}
if (((from_bitField0_ & 0x01000000) != 0)) {
result.explicitAttrsOnly_ = explicitAttrsOnly_;
to_bitField0_ |= 0x00008000;
}
if (((from_bitField0_ & 0x04000000) != 0)) {
attrLists_.makeImmutable();
result.attrLists_ = attrLists_;
}
if (((from_bitField0_ & 0x08000000) != 0)) {
result.cdata_ = cdataBuilder_ == null
? cdata_
: cdataBuilder_.build();
to_bitField0_ |= 0x00010000;
}
if (((from_bitField0_ & 0x10000000) != 0)) {
result.childTags_ = childTagsBuilder_ == null
? childTags_
: childTagsBuilder_.build();
to_bitField0_ |= 0x00020000;
}
if (((from_bitField0_ & 0x20000000) != 0)) {
result.siblingsDisallowed_ = siblingsDisallowed_;
to_bitField0_ |= 0x00040000;
}
if (((from_bitField0_ & 0x40000000) != 0)) {
result.mandatoryLastChild_ = mandatoryLastChild_;
to_bitField0_ |= 0x00080000;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartial1(dev.amp.validator.ValidatorProtos.TagSpec result) {
int from_bitField1_ = bitField1_;
int to_bitField0_ = 0;
if (((from_bitField1_ & 0x00000001) != 0)) {
result.specUrl_ = specUrl_;
to_bitField0_ |= 0x00100000;
}
if (((from_bitField1_ & 0x00000002) != 0)) {
result.ampLayout_ = ampLayoutBuilder_ == null
? ampLayout_
: ampLayoutBuilder_.build();
to_bitField0_ |= 0x00200000;
}
if (((from_bitField1_ & 0x00000004) != 0)) {
result.markDescendants_ = markDescendantsBuilder_ == null
? markDescendants_
: markDescendantsBuilder_.build();
to_bitField0_ |= 0x00400000;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof dev.amp.validator.ValidatorProtos.TagSpec) {
return mergeFrom((dev.amp.validator.ValidatorProtos.TagSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(dev.amp.validator.ValidatorProtos.TagSpec other) {
if (other == dev.amp.validator.ValidatorProtos.TagSpec.getDefaultInstance()) return this;
if (!other.htmlFormat_.isEmpty()) {
if (htmlFormat_.isEmpty()) {
htmlFormat_ = other.htmlFormat_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureHtmlFormatIsMutable();
htmlFormat_.addAll(other.htmlFormat_);
}
onChanged();
}
if (!other.enabledBy_.isEmpty()) {
if (enabledBy_.isEmpty()) {
enabledBy_ = other.enabledBy_;
bitField0_ |= 0x00000002;
} else {
ensureEnabledByIsMutable();
enabledBy_.addAll(other.enabledBy_);
}
onChanged();
}
if (!other.disabledBy_.isEmpty()) {
if (disabledBy_.isEmpty()) {
disabledBy_ = other.disabledBy_;
bitField0_ |= 0x00000004;
} else {
ensureDisabledByIsMutable();
disabledBy_.addAll(other.disabledBy_);
}
onChanged();
}
if (other.hasTagName()) {
tagName_ = other.tagName_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasSpecName()) {
specName_ = other.specName_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasDescriptiveName()) {
descriptiveName_ = other.descriptiveName_;
bitField0_ |= 0x00000020;
onChanged();
}
if (other.hasNamedId()) {
setNamedId(other.getNamedId());
}
if (other.hasExtensionSpec()) {
mergeExtensionSpec(other.getExtensionSpec());
}
if (!other.requiresExtension_.isEmpty()) {
if (requiresExtension_.isEmpty()) {
requiresExtension_ = other.requiresExtension_;
bitField0_ |= 0x00000100;
} else {
ensureRequiresExtensionIsMutable();
requiresExtension_.addAll(other.requiresExtension_);
}
onChanged();
}
if (other.hasMandatory()) {
setMandatory(other.getMandatory());
}
if (other.hasMandatoryAlternatives()) {
mandatoryAlternatives_ = other.mandatoryAlternatives_;
bitField0_ |= 0x00000400;
onChanged();
}
if (other.hasUnique()) {
setUnique(other.getUnique());
}
if (other.hasUniqueWarning()) {
setUniqueWarning(other.getUniqueWarning());
}
if (other.hasMandatoryParent()) {
mandatoryParent_ = other.mandatoryParent_;
bitField0_ |= 0x00002000;
onChanged();
}
if (other.hasMandatoryAncestor()) {
mandatoryAncestor_ = other.mandatoryAncestor_;
bitField0_ |= 0x00004000;
onChanged();
}
if (other.hasMandatoryAncestorSuggestedAlternative()) {
mandatoryAncestorSuggestedAlternative_ = other.mandatoryAncestorSuggestedAlternative_;
bitField0_ |= 0x00008000;
onChanged();
}
if (!other.disallowedAncestor_.isEmpty()) {
if (disallowedAncestor_.isEmpty()) {
disallowedAncestor_ = other.disallowedAncestor_;
bitField0_ |= 0x00010000;
} else {
ensureDisallowedAncestorIsMutable();
disallowedAncestor_.addAll(other.disallowedAncestor_);
}
onChanged();
}
if (other.hasDescendantTagList()) {
descendantTagList_ = other.descendantTagList_;
bitField0_ |= 0x00020000;
onChanged();
}
if (!other.alsoRequiresTagWarning_.isEmpty()) {
if (alsoRequiresTagWarning_.isEmpty()) {
alsoRequiresTagWarning_ = other.alsoRequiresTagWarning_;
bitField0_ |= 0x00040000;
} else {
ensureAlsoRequiresTagWarningIsMutable();
alsoRequiresTagWarning_.addAll(other.alsoRequiresTagWarning_);
}
onChanged();
}
if (!other.satisfiesCondition_.isEmpty()) {
if (satisfiesCondition_.isEmpty()) {
satisfiesCondition_ = other.satisfiesCondition_;
bitField0_ |= 0x00080000;
} else {
ensureSatisfiesConditionIsMutable();
satisfiesCondition_.addAll(other.satisfiesCondition_);
}
onChanged();
}
if (!other.requiresCondition_.isEmpty()) {
if (requiresCondition_.isEmpty()) {
requiresCondition_ = other.requiresCondition_;
bitField0_ |= 0x00100000;
} else {
ensureRequiresConditionIsMutable();
requiresCondition_.addAll(other.requiresCondition_);
}
onChanged();
}
if (!other.excludesCondition_.isEmpty()) {
if (excludesCondition_.isEmpty()) {
excludesCondition_ = other.excludesCondition_;
bitField0_ |= 0x00200000;
} else {
ensureExcludesConditionIsMutable();
excludesCondition_.addAll(other.excludesCondition_);
}
onChanged();
}
if (other.hasDeprecation()) {
deprecation_ = other.deprecation_;
bitField0_ |= 0x00400000;
onChanged();
}
if (other.hasDeprecationUrl()) {
deprecationUrl_ = other.deprecationUrl_;
bitField0_ |= 0x00800000;
onChanged();
}
if (other.hasExplicitAttrsOnly()) {
setExplicitAttrsOnly(other.getExplicitAttrsOnly());
}
if (attrsBuilder_ == null) {
if (!other.attrs_.isEmpty()) {
if (attrs_.isEmpty()) {
attrs_ = other.attrs_;
bitField0_ = (bitField0_ & ~0x02000000);
} else {
ensureAttrsIsMutable();
attrs_.addAll(other.attrs_);
}
onChanged();
}
} else {
if (!other.attrs_.isEmpty()) {
if (attrsBuilder_.isEmpty()) {
attrsBuilder_.dispose();
attrsBuilder_ = null;
attrs_ = other.attrs_;
bitField0_ = (bitField0_ & ~0x02000000);
attrsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getAttrsFieldBuilder() : null;
} else {
attrsBuilder_.addAllMessages(other.attrs_);
}
}
}
if (!other.attrLists_.isEmpty()) {
if (attrLists_.isEmpty()) {
attrLists_ = other.attrLists_;
bitField0_ |= 0x04000000;
} else {
ensureAttrListsIsMutable();
attrLists_.addAll(other.attrLists_);
}
onChanged();
}
if (other.hasCdata()) {
mergeCdata(other.getCdata());
}
if (other.hasChildTags()) {
mergeChildTags(other.getChildTags());
}
if (other.hasSiblingsDisallowed()) {
setSiblingsDisallowed(other.getSiblingsDisallowed());
}
if (other.hasMandatoryLastChild()) {
setMandatoryLastChild(other.getMandatoryLastChild());
}
if (referencePointsBuilder_ == null) {
if (!other.referencePoints_.isEmpty()) {
if (referencePoints_.isEmpty()) {
referencePoints_ = other.referencePoints_;
bitField0_ = (bitField0_ & ~0x80000000);
} else {
ensureReferencePointsIsMutable();
referencePoints_.addAll(other.referencePoints_);
}
onChanged();
}
} else {
if (!other.referencePoints_.isEmpty()) {
if (referencePointsBuilder_.isEmpty()) {
referencePointsBuilder_.dispose();
referencePointsBuilder_ = null;
referencePoints_ = other.referencePoints_;
bitField0_ = (bitField0_ & ~0x80000000);
referencePointsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getReferencePointsFieldBuilder() : null;
} else {
referencePointsBuilder_.addAllMessages(other.referencePoints_);
}
}
}
if (other.hasSpecUrl()) {
specUrl_ = other.specUrl_;
bitField1_ |= 0x00000001;
onChanged();
}
if (other.hasAmpLayout()) {
mergeAmpLayout(other.getAmpLayout());
}
if (other.hasMarkDescendants()) {
mergeMarkDescendants(other.getMarkDescendants());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
tagName_ = input.readBytes();
bitField0_ |= 0x00000008;
break;
} // case 10
case 18: {
specName_ = input.readBytes();
bitField0_ |= 0x00000010;
break;
} // case 18
case 24: {
mandatory_ = input.readBool();
bitField0_ |= 0x00000200;
break;
} // case 24
case 34: {
mandatoryAlternatives_ = input.readBytes();
bitField0_ |= 0x00000400;
break;
} // case 34
case 40: {
unique_ = input.readBool();
bitField0_ |= 0x00000800;
break;
} // case 40
case 50: {
mandatoryParent_ = input.readBytes();
bitField0_ |= 0x00002000;
break;
} // case 50
case 58: {
dev.amp.validator.ValidatorProtos.AttrSpec m =
input.readMessage(
dev.amp.validator.ValidatorProtos.AttrSpec.PARSER,
extensionRegistry);
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
attrs_.add(m);
} else {
attrsBuilder_.addMessage(m);
}
break;
} // case 58
case 66: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureAttrListsIsMutable();
attrLists_.add(bs);
break;
} // case 66
case 82: {
specUrl_ = input.readBytes();
bitField1_ |= 0x00000001;
break;
} // case 82
case 90: {
input.readMessage(
getAmpLayoutFieldBuilder().getBuilder(),
extensionRegistry);
bitField1_ |= 0x00000002;
break;
} // case 90
case 98: {
input.readMessage(
getCdataFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x08000000;
break;
} // case 98
case 106: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureDisallowedAncestorIsMutable();
disallowedAncestor_.add(bs);
break;
} // case 106
case 122: {
mandatoryAncestor_ = input.readBytes();
bitField0_ |= 0x00004000;
break;
} // case 122
case 130: {
mandatoryAncestorSuggestedAlternative_ = input.readBytes();
bitField0_ |= 0x00008000;
break;
} // case 130
case 138: {
deprecation_ = input.readBytes();
bitField0_ |= 0x00400000;
break;
} // case 138
case 146: {
deprecationUrl_ = input.readBytes();
bitField0_ |= 0x00800000;
break;
} // case 146
case 154: {
input.readMessage(
getChildTagsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x10000000;
break;
} // case 154
case 162: {
dev.amp.validator.ValidatorProtos.ReferencePoint m =
input.readMessage(
dev.amp.validator.ValidatorProtos.ReferencePoint.PARSER,
extensionRegistry);
if (referencePointsBuilder_ == null) {
ensureReferencePointsIsMutable();
referencePoints_.add(m);
} else {
referencePointsBuilder_.addMessage(m);
}
break;
} // case 162
case 168: {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.HtmlFormat.Code tmpValue =
dev.amp.validator.ValidatorProtos.HtmlFormat.Code.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(21, tmpRaw);
} else {
ensureHtmlFormatIsMutable();
htmlFormat_.add(tmpRaw);
}
break;
} // case 168
case 170: {
int length = input.readRawVarint32();
int oldLimit = input.pushLimit(length);
while(input.getBytesUntilLimit() > 0) {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.HtmlFormat.Code tmpValue =
dev.amp.validator.ValidatorProtos.HtmlFormat.Code.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(21, tmpRaw);
} else {
ensureHtmlFormatIsMutable();
htmlFormat_.add(tmpRaw);
}
}
input.popLimit(oldLimit);
break;
} // case 170
case 178: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureAlsoRequiresTagWarningIsMutable();
alsoRequiresTagWarning_.add(bs);
break;
} // case 178
case 186: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureSatisfiesConditionIsMutable();
satisfiesCondition_.add(bs);
break;
} // case 186
case 194: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureRequiresConditionIsMutable();
requiresCondition_.add(bs);
break;
} // case 194
case 200: {
uniqueWarning_ = input.readBool();
bitField0_ |= 0x00001000;
break;
} // case 200
case 218: {
input.readMessage(
getExtensionSpecFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 218
case 226: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureRequiresExtensionIsMutable();
requiresExtension_.add(bs);
break;
} // case 226
case 234: {
descendantTagList_ = input.readBytes();
bitField0_ |= 0x00020000;
break;
} // case 234
case 240: {
siblingsDisallowed_ = input.readBool();
bitField0_ |= 0x20000000;
break;
} // case 240
case 248: {
mandatoryLastChild_ = input.readBool();
bitField0_ |= 0x40000000;
break;
} // case 248
case 258: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureExcludesConditionIsMutable();
excludesCondition_.add(bs);
break;
} // case 258
case 264: {
int tmpRaw = input.readEnum();
dev.amp.validator.ValidatorProtos.TagSpec.NamedId tmpValue =
dev.amp.validator.ValidatorProtos.TagSpec.NamedId.forNumber(tmpRaw);
if (tmpValue == null) {
mergeUnknownVarintField(33, tmpRaw);
} else {
namedId_ = tmpRaw;
bitField0_ |= 0x00000040;
}
break;
} // case 264
case 272: {
explicitAttrsOnly_ = input.readBool();
bitField0_ |= 0x01000000;
break;
} // case 272
case 282: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureEnabledByIsMutable();
enabledBy_.add(bs);
break;
} // case 282
case 290: {
com.google.protobuf.ByteString bs = input.readBytes();
ensureDisabledByIsMutable();
disabledBy_.add(bs);
break;
} // case 290
case 306: {
input.readMessage(
getMarkDescendantsFieldBuilder().getBuilder(),
extensionRegistry);
bitField1_ |= 0x00000004;
break;
} // case 306
case 314: {
descriptiveName_ = input.readBytes();
bitField0_ |= 0x00000020;
break;
} // case 314
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int bitField1_;
private java.util.List htmlFormat_ =
java.util.Collections.emptyList();
private void ensureHtmlFormatIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
htmlFormat_ = new java.util.ArrayList(htmlFormat_);
bitField0_ |= 0x00000001;
}
}
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @return A list containing the htmlFormat.
*/
public java.util.List getHtmlFormatList() {
return new com.google.protobuf.Internal.ListAdapter<
java.lang.Integer, dev.amp.validator.ValidatorProtos.HtmlFormat.Code>(htmlFormat_, htmlFormat_converter_);
}
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @return The count of htmlFormat.
*/
public int getHtmlFormatCount() {
return htmlFormat_.size();
}
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @param index The index of the element to return.
* @return The htmlFormat at the given index.
*/
public dev.amp.validator.ValidatorProtos.HtmlFormat.Code getHtmlFormat(int index) {
return htmlFormat_converter_.convert(htmlFormat_.get(index));
}
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @param index The index to set the value at.
* @param value The htmlFormat to set.
* @return This builder for chaining.
*/
public Builder setHtmlFormat(
int index, dev.amp.validator.ValidatorProtos.HtmlFormat.Code value) {
if (value == null) {
throw new NullPointerException();
}
ensureHtmlFormatIsMutable();
htmlFormat_.set(index, value.getNumber());
onChanged();
return this;
}
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @param value The htmlFormat to add.
* @return This builder for chaining.
*/
public Builder addHtmlFormat(dev.amp.validator.ValidatorProtos.HtmlFormat.Code value) {
if (value == null) {
throw new NullPointerException();
}
ensureHtmlFormatIsMutable();
htmlFormat_.add(value.getNumber());
onChanged();
return this;
}
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @param values The htmlFormat to add.
* @return This builder for chaining.
*/
public Builder addAllHtmlFormat(
java.lang.Iterable values) {
ensureHtmlFormatIsMutable();
for (dev.amp.validator.ValidatorProtos.HtmlFormat.Code value : values) {
htmlFormat_.add(value.getNumber());
}
onChanged();
return this;
}
/**
*
* The html_format field tells the validator for which html formats
* (ie: (<html ⚡> vs <html a4⚡>) this HTML TagSpec is allowed to validate.
* The repeated field is not allowed to be empty, it must have at least one
* HtmlFormat.
*
*
* repeated .amp.validator.HtmlFormat.Code html_format = 21;
* @return This builder for chaining.
*/
public Builder clearHtmlFormat() {
htmlFormat_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList enabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureEnabledByIsMutable() {
if (!enabledBy_.isModifiable()) {
enabledBy_ = new com.google.protobuf.LazyStringArrayList(enabledBy_);
}
bitField0_ |= 0x00000002;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @return A list containing the enabledBy.
*/
public com.google.protobuf.ProtocolStringList
getEnabledByList() {
enabledBy_.makeImmutable();
return enabledBy_;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @return The count of enabledBy.
*/
public int getEnabledByCount() {
return enabledBy_.size();
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @param index The index of the element to return.
* @return The enabledBy at the given index.
*/
public java.lang.String getEnabledBy(int index) {
return enabledBy_.get(index);
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @param index The index of the value to return.
* @return The bytes of the enabledBy at the given index.
*/
public com.google.protobuf.ByteString
getEnabledByBytes(int index) {
return enabledBy_.getByteString(index);
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @param index The index to set the value at.
* @param value The enabledBy to set.
* @return This builder for chaining.
*/
public Builder setEnabledBy(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureEnabledByIsMutable();
enabledBy_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @param value The enabledBy to add.
* @return This builder for chaining.
*/
public Builder addEnabledBy(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureEnabledByIsMutable();
enabledBy_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @param values The enabledBy to add.
* @return This builder for chaining.
*/
public Builder addAllEnabledBy(
java.lang.Iterable values) {
ensureEnabledByIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, enabledBy_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @return This builder for chaining.
*/
public Builder clearEnabledBy() {
enabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
* If provided, the Type Identifier(s) that either enable or disable
* this TagSpec. If a Type Identifier is in `enabled_by` then this
* TagSpec will be used in validating parsed documents which include that Type
* Identifier. If a Type Identifier is in `disabled_by` then this
* TagSpec will not be used in validating parsed documents which include that
* Type Identifier. A TagSpec can not have both `enabled_by` and `disabled_by`
* set.
*
*
* repeated string enabled_by = 35;
* @param value The bytes of the enabledBy to add.
* @return This builder for chaining.
*/
public Builder addEnabledByBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureEnabledByIsMutable();
enabledBy_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList disabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureDisabledByIsMutable() {
if (!disabledBy_.isModifiable()) {
disabledBy_ = new com.google.protobuf.LazyStringArrayList(disabledBy_);
}
bitField0_ |= 0x00000004;
}
/**
* repeated string disabled_by = 36;
* @return A list containing the disabledBy.
*/
public com.google.protobuf.ProtocolStringList
getDisabledByList() {
disabledBy_.makeImmutable();
return disabledBy_;
}
/**
* repeated string disabled_by = 36;
* @return The count of disabledBy.
*/
public int getDisabledByCount() {
return disabledBy_.size();
}
/**
* repeated string disabled_by = 36;
* @param index The index of the element to return.
* @return The disabledBy at the given index.
*/
public java.lang.String getDisabledBy(int index) {
return disabledBy_.get(index);
}
/**
* repeated string disabled_by = 36;
* @param index The index of the value to return.
* @return The bytes of the disabledBy at the given index.
*/
public com.google.protobuf.ByteString
getDisabledByBytes(int index) {
return disabledBy_.getByteString(index);
}
/**
* repeated string disabled_by = 36;
* @param index The index to set the value at.
* @param value The disabledBy to set.
* @return This builder for chaining.
*/
public Builder setDisabledBy(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureDisabledByIsMutable();
disabledBy_.set(index, value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* repeated string disabled_by = 36;
* @param value The disabledBy to add.
* @return This builder for chaining.
*/
public Builder addDisabledBy(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureDisabledByIsMutable();
disabledBy_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* repeated string disabled_by = 36;
* @param values The disabledBy to add.
* @return This builder for chaining.
*/
public Builder addAllDisabledBy(
java.lang.Iterable values) {
ensureDisabledByIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, disabledBy_);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* repeated string disabled_by = 36;
* @return This builder for chaining.
*/
public Builder clearDisabledBy() {
disabledBy_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);;
onChanged();
return this;
}
/**
* repeated string disabled_by = 36;
* @param value The bytes of the disabledBy to add.
* @return This builder for chaining.
*/
public Builder addDisabledByBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureDisabledByIsMutable();
disabledBy_.add(value);
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object tagName_ = "";
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @return Whether the tagName field is set.
*/
public boolean hasTagName() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @return The tagName.
*/
public java.lang.String getTagName() {
java.lang.Object ref = tagName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
tagName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @return The bytes for tagName.
*/
public com.google.protobuf.ByteString
getTagNameBytes() {
java.lang.Object ref = tagName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
tagName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @param value The tagName to set.
* @return This builder for chaining.
*/
public Builder setTagName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
tagName_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @return This builder for chaining.
*/
public Builder clearTagName() {
tagName_ = getDefaultInstance().getTagName();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* Use UPPER-CASE tag names only. If adding the same tag twice, then they must
* also have a spec_name string which is unique throughout all detail.
* Note: "$REFERENCE_POINT" is a special tag_name value.
* Reference points are partial tag specs which don't have a defined
* tag_name.
*
*
* optional string tag_name = 1;
* @param value The bytes for tagName to set.
* @return This builder for chaining.
*/
public Builder setTagNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
tagName_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object specName_ = "";
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @return Whether the specName field is set.
*/
public boolean hasSpecName() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @return The specName.
*/
public java.lang.String getSpecName() {
java.lang.Object ref = specName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
specName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @return The bytes for specName.
*/
public com.google.protobuf.ByteString
getSpecNameBytes() {
java.lang.Object ref = specName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
specName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @param value The specName to set.
* @return This builder for chaining.
*/
public Builder setSpecName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
specName_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @return This builder for chaining.
*/
public Builder clearSpecName() {
specName_ = getDefaultInstance().getSpecName();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* If provided, the spec_name must be unique within the validator
* rules. This string forms a a unique id for this TagSpec. If not set, the
* tag_name field is used as the unique id. This string is not used in error
* messages, see descriptive_name for that.
*
*
* optional string spec_name = 2;
* @param value The bytes for specName to set.
* @return This builder for chaining.
*/
public Builder setSpecNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
specName_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private java.lang.Object descriptiveName_ = "";
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @return Whether the descriptiveName field is set.
*/
public boolean hasDescriptiveName() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @return The descriptiveName.
*/
public java.lang.String getDescriptiveName() {
java.lang.Object ref = descriptiveName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
descriptiveName_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @return The bytes for descriptiveName.
*/
public com.google.protobuf.ByteString
getDescriptiveNameBytes() {
java.lang.Object ref = descriptiveName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
descriptiveName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @param value The descriptiveName to set.
* @return This builder for chaining.
*/
public Builder setDescriptiveName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
descriptiveName_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @return This builder for chaining.
*/
public Builder clearDescriptiveName() {
descriptiveName_ = getDefaultInstance().getDescriptiveName();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
* If `tag_name` is not a sufficient descriptor for error messages having to
* do with this tag spec, provide a `descriptive_name` value, which if present
* will be used in place of `tag_name`. Typically `descriptive_name` should
* include the tag_name in it, and should avoid using < and > in case
* downstream libraries of the validator fail to properly HTML escape rendered
* error strings.
*
*
* optional string descriptive_name = 39;
* @param value The bytes for descriptiveName to set.
* @return This builder for chaining.
*/
public Builder setDescriptiveNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
descriptiveName_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
private int namedId_ = 0;
/**
* optional .amp.validator.TagSpec.NamedId named_id = 33 [default = NOT_SET];
* @return Whether the namedId field is set.
*/
@java.lang.Override public boolean hasNamedId() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
* optional .amp.validator.TagSpec.NamedId named_id = 33 [default = NOT_SET];
* @return The namedId.
*/
@java.lang.Override
public dev.amp.validator.ValidatorProtos.TagSpec.NamedId getNamedId() {
dev.amp.validator.ValidatorProtos.TagSpec.NamedId result = dev.amp.validator.ValidatorProtos.TagSpec.NamedId.forNumber(namedId_);
return result == null ? dev.amp.validator.ValidatorProtos.TagSpec.NamedId.NOT_SET : result;
}
/**
* optional .amp.validator.TagSpec.NamedId named_id = 33 [default = NOT_SET];
* @param value The namedId to set.
* @return This builder for chaining.
*/
public Builder setNamedId(dev.amp.validator.ValidatorProtos.TagSpec.NamedId value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000040;
namedId_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .amp.validator.TagSpec.NamedId named_id = 33 [default = NOT_SET];
* @return This builder for chaining.
*/
public Builder clearNamedId() {
bitField0_ = (bitField0_ & ~0x00000040);
namedId_ = 0;
onChanged();
return this;
}
private dev.amp.validator.ValidatorProtos.ExtensionSpec extensionSpec_;
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.ExtensionSpec, dev.amp.validator.ValidatorProtos.ExtensionSpec.Builder, dev.amp.validator.ValidatorProtos.ExtensionSpecOrBuilder> extensionSpecBuilder_;
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
* @return Whether the extensionSpec field is set.
*/
public boolean hasExtensionSpec() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
* @return The extensionSpec.
*/
public dev.amp.validator.ValidatorProtos.ExtensionSpec getExtensionSpec() {
if (extensionSpecBuilder_ == null) {
return extensionSpec_ == null ? dev.amp.validator.ValidatorProtos.ExtensionSpec.getDefaultInstance() : extensionSpec_;
} else {
return extensionSpecBuilder_.getMessage();
}
}
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
*/
public Builder setExtensionSpec(dev.amp.validator.ValidatorProtos.ExtensionSpec value) {
if (extensionSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
extensionSpec_ = value;
} else {
extensionSpecBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
*/
public Builder setExtensionSpec(
dev.amp.validator.ValidatorProtos.ExtensionSpec.Builder builderForValue) {
if (extensionSpecBuilder_ == null) {
extensionSpec_ = builderForValue.build();
} else {
extensionSpecBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
*/
public Builder mergeExtensionSpec(dev.amp.validator.ValidatorProtos.ExtensionSpec value) {
if (extensionSpecBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
extensionSpec_ != null &&
extensionSpec_ != dev.amp.validator.ValidatorProtos.ExtensionSpec.getDefaultInstance()) {
getExtensionSpecBuilder().mergeFrom(value);
} else {
extensionSpec_ = value;
}
} else {
extensionSpecBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
*/
public Builder clearExtensionSpec() {
bitField0_ = (bitField0_ & ~0x00000080);
extensionSpec_ = null;
if (extensionSpecBuilder_ != null) {
extensionSpecBuilder_.dispose();
extensionSpecBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
*/
public dev.amp.validator.ValidatorProtos.ExtensionSpec.Builder getExtensionSpecBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getExtensionSpecFieldBuilder().getBuilder();
}
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
*/
public dev.amp.validator.ValidatorProtos.ExtensionSpecOrBuilder getExtensionSpecOrBuilder() {
if (extensionSpecBuilder_ != null) {
return extensionSpecBuilder_.getMessageOrBuilder();
} else {
return extensionSpec_ == null ?
dev.amp.validator.ValidatorProtos.ExtensionSpec.getDefaultInstance() : extensionSpec_;
}
}
/**
*
* If provided, this is a SCRIPT tag defining an amp custom element
* extension. The other fields, such as expected attributes, will be
* validated by the extension spec rules.
*
*
* optional .amp.validator.ExtensionSpec extension_spec = 27;
*/
private com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.ExtensionSpec, dev.amp.validator.ValidatorProtos.ExtensionSpec.Builder, dev.amp.validator.ValidatorProtos.ExtensionSpecOrBuilder>
getExtensionSpecFieldBuilder() {
if (extensionSpecBuilder_ == null) {
extensionSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
dev.amp.validator.ValidatorProtos.ExtensionSpec, dev.amp.validator.ValidatorProtos.ExtensionSpec.Builder, dev.amp.validator.ValidatorProtos.ExtensionSpecOrBuilder>(
getExtensionSpec(),
getParentForChildren(),
isClean());
extensionSpec_ = null;
}
return extensionSpecBuilder_;
}
private com.google.protobuf.LazyStringArrayList requiresExtension_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureRequiresExtensionIsMutable() {
if (!requiresExtension_.isModifiable()) {
requiresExtension_ = new com.google.protobuf.LazyStringArrayList(requiresExtension_);
}
bitField0_ |= 0x00000100;
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @return A list containing the requiresExtension.
*/
public com.google.protobuf.ProtocolStringList
getRequiresExtensionList() {
requiresExtension_.makeImmutable();
return requiresExtension_;
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @return The count of requiresExtension.
*/
public int getRequiresExtensionCount() {
return requiresExtension_.size();
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @param index The index of the element to return.
* @return The requiresExtension at the given index.
*/
public java.lang.String getRequiresExtension(int index) {
return requiresExtension_.get(index);
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @param index The index of the value to return.
* @return The bytes of the requiresExtension at the given index.
*/
public com.google.protobuf.ByteString
getRequiresExtensionBytes(int index) {
return requiresExtension_.getByteString(index);
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @param index The index to set the value at.
* @param value The requiresExtension to set.
* @return This builder for chaining.
*/
public Builder setRequiresExtension(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureRequiresExtensionIsMutable();
requiresExtension_.set(index, value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @param value The requiresExtension to add.
* @return This builder for chaining.
*/
public Builder addRequiresExtension(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureRequiresExtensionIsMutable();
requiresExtension_.add(value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @param values The requiresExtension to add.
* @return This builder for chaining.
*/
public Builder addAllRequiresExtension(
java.lang.Iterable values) {
ensureRequiresExtensionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, requiresExtension_);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @return This builder for chaining.
*/
public Builder clearRequiresExtension() {
requiresExtension_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);;
onChanged();
return this;
}
/**
*
* If set, this tag is considered part of an amp extended component, and
* requires that the named extended component script tag is present on the
* page.
*
*
* repeated string requires_extension = 28;
* @param value The bytes of the requiresExtension to add.
* @return This builder for chaining.
*/
public Builder addRequiresExtensionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureRequiresExtensionIsMutable();
requiresExtension_.add(value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
private boolean mandatory_ ;
/**
*
* If true, a tag conforming to this tag spec must occur at least once
* within the document.
*
*
* optional bool mandatory = 3;
* @return Whether the mandatory field is set.
*/
@java.lang.Override
public boolean hasMandatory() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
* If true, a tag conforming to this tag spec must occur at least once
* within the document.
*
*
* optional bool mandatory = 3;
* @return The mandatory.
*/
@java.lang.Override
public boolean getMandatory() {
return mandatory_;
}
/**
*
* If true, a tag conforming to this tag spec must occur at least once
* within the document.
*
*
* optional bool mandatory = 3;
* @param value The mandatory to set.
* @return This builder for chaining.
*/
public Builder setMandatory(boolean value) {
mandatory_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
* If true, a tag conforming to this tag spec must occur at least once
* within the document.
*
*
* optional bool mandatory = 3;
* @return This builder for chaining.
*/
public Builder clearMandatory() {
bitField0_ = (bitField0_ & ~0x00000200);
mandatory_ = false;
onChanged();
return this;
}
private java.lang.Object mandatoryAlternatives_ = "";
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @return Whether the mandatoryAlternatives field is set.
*/
public boolean hasMandatoryAlternatives() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @return The mandatoryAlternatives.
*/
public java.lang.String getMandatoryAlternatives() {
java.lang.Object ref = mandatoryAlternatives_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryAlternatives_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @return The bytes for mandatoryAlternatives.
*/
public com.google.protobuf.ByteString
getMandatoryAlternativesBytes() {
java.lang.Object ref = mandatoryAlternatives_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryAlternatives_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @param value The mandatoryAlternatives to set.
* @return This builder for chaining.
*/
public Builder setMandatoryAlternatives(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
mandatoryAlternatives_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @return This builder for chaining.
*/
public Builder clearMandatoryAlternatives() {
mandatoryAlternatives_ = getDefaultInstance().getMandatoryAlternatives();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
/**
*
* A string identifying that this tag belongs to a set of alternative
* choices from which at least one needs to be satisfied.
*
*
* optional string mandatory_alternatives = 4;
* @param value The bytes for mandatoryAlternatives to set.
* @return This builder for chaining.
*/
public Builder setMandatoryAlternativesBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
mandatoryAlternatives_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
private boolean unique_ ;
/**
*
* If true, a tag conforming to this tag spec may occur at most once within
* the document.
*
*
* optional bool unique = 5;
* @return Whether the unique field is set.
*/
@java.lang.Override
public boolean hasUnique() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
* If true, a tag conforming to this tag spec may occur at most once within
* the document.
*
*
* optional bool unique = 5;
* @return The unique.
*/
@java.lang.Override
public boolean getUnique() {
return unique_;
}
/**
*
* If true, a tag conforming to this tag spec may occur at most once within
* the document.
*
*
* optional bool unique = 5;
* @param value The unique to set.
* @return This builder for chaining.
*/
public Builder setUnique(boolean value) {
unique_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
* If true, a tag conforming to this tag spec may occur at most once within
* the document.
*
*
* optional bool unique = 5;
* @return This builder for chaining.
*/
public Builder clearUnique() {
bitField0_ = (bitField0_ & ~0x00000800);
unique_ = false;
onChanged();
return this;
}
private boolean uniqueWarning_ ;
/**
*
* If true, a tag conforming to this tag spec should occur at most once within
* the document. That is, unlike for unique, we'll emit a warning.
*
*
* optional bool unique_warning = 25;
* @return Whether the uniqueWarning field is set.
*/
@java.lang.Override
public boolean hasUniqueWarning() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
* If true, a tag conforming to this tag spec should occur at most once within
* the document. That is, unlike for unique, we'll emit a warning.
*
*
* optional bool unique_warning = 25;
* @return The uniqueWarning.
*/
@java.lang.Override
public boolean getUniqueWarning() {
return uniqueWarning_;
}
/**
*
* If true, a tag conforming to this tag spec should occur at most once within
* the document. That is, unlike for unique, we'll emit a warning.
*
*
* optional bool unique_warning = 25;
* @param value The uniqueWarning to set.
* @return This builder for chaining.
*/
public Builder setUniqueWarning(boolean value) {
uniqueWarning_ = value;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
* If true, a tag conforming to this tag spec should occur at most once within
* the document. That is, unlike for unique, we'll emit a warning.
*
*
* optional bool unique_warning = 25;
* @return This builder for chaining.
*/
public Builder clearUniqueWarning() {
bitField0_ = (bitField0_ & ~0x00001000);
uniqueWarning_ = false;
onChanged();
return this;
}
private java.lang.Object mandatoryParent_ = "";
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @return Whether the mandatoryParent field is set.
*/
public boolean hasMandatoryParent() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @return The mandatoryParent.
*/
public java.lang.String getMandatoryParent() {
java.lang.Object ref = mandatoryParent_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryParent_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @return The bytes for mandatoryParent.
*/
public com.google.protobuf.ByteString
getMandatoryParentBytes() {
java.lang.Object ref = mandatoryParent_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryParent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @param value The mandatoryParent to set.
* @return This builder for chaining.
*/
public Builder setMandatoryParent(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
mandatoryParent_ = value;
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @return This builder for chaining.
*/
public Builder clearMandatoryParent() {
mandatoryParent_ = getDefaultInstance().getMandatoryParent();
bitField0_ = (bitField0_ & ~0x00002000);
onChanged();
return this;
}
/**
*
* If set to "$ROOT", this tag must be the root tag.
* If set to any other string, the tag must be the direct child of the
* specified mandatory parent tag.
*
*
* optional string mandatory_parent = 6;
* @param value The bytes for mandatoryParent to set.
* @return This builder for chaining.
*/
public Builder setMandatoryParentBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
mandatoryParent_ = value;
bitField0_ |= 0x00002000;
onChanged();
return this;
}
private java.lang.Object mandatoryAncestor_ = "";
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @return Whether the mandatoryAncestor field is set.
*/
public boolean hasMandatoryAncestor() {
return ((bitField0_ & 0x00004000) != 0);
}
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @return The mandatoryAncestor.
*/
public java.lang.String getMandatoryAncestor() {
java.lang.Object ref = mandatoryAncestor_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryAncestor_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @return The bytes for mandatoryAncestor.
*/
public com.google.protobuf.ByteString
getMandatoryAncestorBytes() {
java.lang.Object ref = mandatoryAncestor_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryAncestor_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @param value The mandatoryAncestor to set.
* @return This builder for chaining.
*/
public Builder setMandatoryAncestor(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
mandatoryAncestor_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @return This builder for chaining.
*/
public Builder clearMandatoryAncestor() {
mandatoryAncestor_ = getDefaultInstance().getMandatoryAncestor();
bitField0_ = (bitField0_ & ~0x00004000);
onChanged();
return this;
}
/**
*
* If set, the tag must descend from (not necessarily direct parent of) the
* specified mandatory parent string which is either a tag name or a tag
* spec_name (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* optional string mandatory_ancestor = 15;
* @param value The bytes for mandatoryAncestor to set.
* @return This builder for chaining.
*/
public Builder setMandatoryAncestorBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
mandatoryAncestor_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
private java.lang.Object mandatoryAncestorSuggestedAlternative_ = "";
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @return Whether the mandatoryAncestorSuggestedAlternative field is set.
*/
public boolean hasMandatoryAncestorSuggestedAlternative() {
return ((bitField0_ & 0x00008000) != 0);
}
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @return The mandatoryAncestorSuggestedAlternative.
*/
public java.lang.String getMandatoryAncestorSuggestedAlternative() {
java.lang.Object ref = mandatoryAncestorSuggestedAlternative_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
mandatoryAncestorSuggestedAlternative_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @return The bytes for mandatoryAncestorSuggestedAlternative.
*/
public com.google.protobuf.ByteString
getMandatoryAncestorSuggestedAlternativeBytes() {
java.lang.Object ref = mandatoryAncestorSuggestedAlternative_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
mandatoryAncestorSuggestedAlternative_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @param value The mandatoryAncestorSuggestedAlternative to set.
* @return This builder for chaining.
*/
public Builder setMandatoryAncestorSuggestedAlternative(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
mandatoryAncestorSuggestedAlternative_ = value;
bitField0_ |= 0x00008000;
onChanged();
return this;
}
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @return This builder for chaining.
*/
public Builder clearMandatoryAncestorSuggestedAlternative() {
mandatoryAncestorSuggestedAlternative_ = getDefaultInstance().getMandatoryAncestorSuggestedAlternative();
bitField0_ = (bitField0_ & ~0x00008000);
onChanged();
return this;
}
/**
*
* Use only for tags where mandatory_ancestor is set. If tag validation fails
* due to the mandatory_ancestor, and this field is set, then the error
* detail will suggest the tag specified here as an alternative to consider.
*
*
* optional string mandatory_ancestor_suggested_alternative = 16;
* @param value The bytes for mandatoryAncestorSuggestedAlternative to set.
* @return This builder for chaining.
*/
public Builder setMandatoryAncestorSuggestedAlternativeBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
mandatoryAncestorSuggestedAlternative_ = value;
bitField0_ |= 0x00008000;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList disallowedAncestor_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureDisallowedAncestorIsMutable() {
if (!disallowedAncestor_.isModifiable()) {
disallowedAncestor_ = new com.google.protobuf.LazyStringArrayList(disallowedAncestor_);
}
bitField0_ |= 0x00010000;
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @return A list containing the disallowedAncestor.
*/
public com.google.protobuf.ProtocolStringList
getDisallowedAncestorList() {
disallowedAncestor_.makeImmutable();
return disallowedAncestor_;
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @return The count of disallowedAncestor.
*/
public int getDisallowedAncestorCount() {
return disallowedAncestor_.size();
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @param index The index of the element to return.
* @return The disallowedAncestor at the given index.
*/
public java.lang.String getDisallowedAncestor(int index) {
return disallowedAncestor_.get(index);
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @param index The index of the value to return.
* @return The bytes of the disallowedAncestor at the given index.
*/
public com.google.protobuf.ByteString
getDisallowedAncestorBytes(int index) {
return disallowedAncestor_.getByteString(index);
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @param index The index to set the value at.
* @param value The disallowedAncestor to set.
* @return This builder for chaining.
*/
public Builder setDisallowedAncestor(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureDisallowedAncestorIsMutable();
disallowedAncestor_.set(index, value);
bitField0_ |= 0x00010000;
onChanged();
return this;
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @param value The disallowedAncestor to add.
* @return This builder for chaining.
*/
public Builder addDisallowedAncestor(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureDisallowedAncestorIsMutable();
disallowedAncestor_.add(value);
bitField0_ |= 0x00010000;
onChanged();
return this;
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @param values The disallowedAncestor to add.
* @return This builder for chaining.
*/
public Builder addAllDisallowedAncestor(
java.lang.Iterable values) {
ensureDisallowedAncestorIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, disallowedAncestor_);
bitField0_ |= 0x00010000;
onChanged();
return this;
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @return This builder for chaining.
*/
public Builder clearDisallowedAncestor() {
disallowedAncestor_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00010000);;
onChanged();
return this;
}
/**
*
* This tag may not descend from any tag with any of these tag names or tag
* spec_names (e.g. tag.name = "!DOCTYPE" or tag.spec_name = "html doctype").
*
*
* repeated string disallowed_ancestor = 13;
* @param value The bytes of the disallowedAncestor to add.
* @return This builder for chaining.
*/
public Builder addDisallowedAncestorBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureDisallowedAncestorIsMutable();
disallowedAncestor_.add(value);
bitField0_ |= 0x00010000;
onChanged();
return this;
}
private java.lang.Object descendantTagList_ = "";
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @return Whether the descendantTagList field is set.
*/
public boolean hasDescendantTagList() {
return ((bitField0_ & 0x00020000) != 0);
}
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @return The descendantTagList.
*/
public java.lang.String getDescendantTagList() {
java.lang.Object ref = descendantTagList_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
descendantTagList_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @return The bytes for descendantTagList.
*/
public com.google.protobuf.ByteString
getDescendantTagListBytes() {
java.lang.Object ref = descendantTagList_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
descendantTagList_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @param value The descendantTagList to set.
* @return This builder for chaining.
*/
public Builder setDescendantTagList(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
descendantTagList_ = value;
bitField0_ |= 0x00020000;
onChanged();
return this;
}
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @return This builder for chaining.
*/
public Builder clearDescendantTagList() {
descendantTagList_ = getDefaultInstance().getDescendantTagList();
bitField0_ = (bitField0_ & ~0x00020000);
onChanged();
return this;
}
/**
*
* If set, all of the tag's descendants must be tags from the named list.
* A tag not in the named list will generate an error.
*
*
* optional string descendant_tag_list = 29;
* @param value The bytes for descendantTagList to set.
* @return This builder for chaining.
*/
public Builder setDescendantTagListBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
descendantTagList_ = value;
bitField0_ |= 0x00020000;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList alsoRequiresTagWarning_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureAlsoRequiresTagWarningIsMutable() {
if (!alsoRequiresTagWarning_.isModifiable()) {
alsoRequiresTagWarning_ = new com.google.protobuf.LazyStringArrayList(alsoRequiresTagWarning_);
}
bitField0_ |= 0x00040000;
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @return A list containing the alsoRequiresTagWarning.
*/
public com.google.protobuf.ProtocolStringList
getAlsoRequiresTagWarningList() {
alsoRequiresTagWarning_.makeImmutable();
return alsoRequiresTagWarning_;
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @return The count of alsoRequiresTagWarning.
*/
public int getAlsoRequiresTagWarningCount() {
return alsoRequiresTagWarning_.size();
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @param index The index of the element to return.
* @return The alsoRequiresTagWarning at the given index.
*/
public java.lang.String getAlsoRequiresTagWarning(int index) {
return alsoRequiresTagWarning_.get(index);
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @param index The index of the value to return.
* @return The bytes of the alsoRequiresTagWarning at the given index.
*/
public com.google.protobuf.ByteString
getAlsoRequiresTagWarningBytes(int index) {
return alsoRequiresTagWarning_.getByteString(index);
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @param index The index to set the value at.
* @param value The alsoRequiresTagWarning to set.
* @return This builder for chaining.
*/
public Builder setAlsoRequiresTagWarning(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureAlsoRequiresTagWarningIsMutable();
alsoRequiresTagWarning_.set(index, value);
bitField0_ |= 0x00040000;
onChanged();
return this;
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @param value The alsoRequiresTagWarning to add.
* @return This builder for chaining.
*/
public Builder addAlsoRequiresTagWarning(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureAlsoRequiresTagWarningIsMutable();
alsoRequiresTagWarning_.add(value);
bitField0_ |= 0x00040000;
onChanged();
return this;
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @param values The alsoRequiresTagWarning to add.
* @return This builder for chaining.
*/
public Builder addAllAlsoRequiresTagWarning(
java.lang.Iterable values) {
ensureAlsoRequiresTagWarningIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, alsoRequiresTagWarning_);
bitField0_ |= 0x00040000;
onChanged();
return this;
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @return This builder for chaining.
*/
public Builder clearAlsoRequiresTagWarning() {
alsoRequiresTagWarning_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00040000);;
onChanged();
return this;
}
/**
*
* If set, other tags - identified by their detail string - must be
* present as well or a warning will be issued (will not invalidate doc).
*
*
* repeated string also_requires_tag_warning = 22;
* @param value The bytes of the alsoRequiresTagWarning to add.
* @return This builder for chaining.
*/
public Builder addAlsoRequiresTagWarningBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureAlsoRequiresTagWarningIsMutable();
alsoRequiresTagWarning_.add(value);
bitField0_ |= 0x00040000;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList satisfiesCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureSatisfiesConditionIsMutable() {
if (!satisfiesCondition_.isModifiable()) {
satisfiesCondition_ = new com.google.protobuf.LazyStringArrayList(satisfiesCondition_);
}
bitField0_ |= 0x00080000;
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @return A list containing the satisfiesCondition.
*/
public com.google.protobuf.ProtocolStringList
getSatisfiesConditionList() {
satisfiesCondition_.makeImmutable();
return satisfiesCondition_;
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @return The count of satisfiesCondition.
*/
public int getSatisfiesConditionCount() {
return satisfiesCondition_.size();
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @param index The index of the element to return.
* @return The satisfiesCondition at the given index.
*/
public java.lang.String getSatisfiesCondition(int index) {
return satisfiesCondition_.get(index);
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @param index The index of the value to return.
* @return The bytes of the satisfiesCondition at the given index.
*/
public com.google.protobuf.ByteString
getSatisfiesConditionBytes(int index) {
return satisfiesCondition_.getByteString(index);
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @param index The index to set the value at.
* @param value The satisfiesCondition to set.
* @return This builder for chaining.
*/
public Builder setSatisfiesCondition(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureSatisfiesConditionIsMutable();
satisfiesCondition_.set(index, value);
bitField0_ |= 0x00080000;
onChanged();
return this;
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @param value The satisfiesCondition to add.
* @return This builder for chaining.
*/
public Builder addSatisfiesCondition(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureSatisfiesConditionIsMutable();
satisfiesCondition_.add(value);
bitField0_ |= 0x00080000;
onChanged();
return this;
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @param values The satisfiesCondition to add.
* @return This builder for chaining.
*/
public Builder addAllSatisfiesCondition(
java.lang.Iterable values) {
ensureSatisfiesConditionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, satisfiesCondition_);
bitField0_ |= 0x00080000;
onChanged();
return this;
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @return This builder for chaining.
*/
public Builder clearSatisfiesCondition() {
satisfiesCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00080000);;
onChanged();
return this;
}
/**
*
* Expresses a generic condition which is satisfied if this tag is found. Used
* in combination with the `requires` attribute on a different tag.
*
*
* repeated string satisfies_condition = 23;
* @param value The bytes of the satisfiesCondition to add.
* @return This builder for chaining.
*/
public Builder addSatisfiesConditionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureSatisfiesConditionIsMutable();
satisfiesCondition_.add(value);
bitField0_ |= 0x00080000;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList requiresCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureRequiresConditionIsMutable() {
if (!requiresCondition_.isModifiable()) {
requiresCondition_ = new com.google.protobuf.LazyStringArrayList(requiresCondition_);
}
bitField0_ |= 0x00100000;
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @return A list containing the requiresCondition.
*/
public com.google.protobuf.ProtocolStringList
getRequiresConditionList() {
requiresCondition_.makeImmutable();
return requiresCondition_;
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @return The count of requiresCondition.
*/
public int getRequiresConditionCount() {
return requiresCondition_.size();
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @param index The index of the element to return.
* @return The requiresCondition at the given index.
*/
public java.lang.String getRequiresCondition(int index) {
return requiresCondition_.get(index);
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @param index The index of the value to return.
* @return The bytes of the requiresCondition at the given index.
*/
public com.google.protobuf.ByteString
getRequiresConditionBytes(int index) {
return requiresCondition_.getByteString(index);
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @param index The index to set the value at.
* @param value The requiresCondition to set.
* @return This builder for chaining.
*/
public Builder setRequiresCondition(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureRequiresConditionIsMutable();
requiresCondition_.set(index, value);
bitField0_ |= 0x00100000;
onChanged();
return this;
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @param value The requiresCondition to add.
* @return This builder for chaining.
*/
public Builder addRequiresCondition(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureRequiresConditionIsMutable();
requiresCondition_.add(value);
bitField0_ |= 0x00100000;
onChanged();
return this;
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @param values The requiresCondition to add.
* @return This builder for chaining.
*/
public Builder addAllRequiresCondition(
java.lang.Iterable values) {
ensureRequiresConditionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, requiresCondition_);
bitField0_ |= 0x00100000;
onChanged();
return this;
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @return This builder for chaining.
*/
public Builder clearRequiresCondition() {
requiresCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00100000);;
onChanged();
return this;
}
/**
*
* Expresses a generic condition which must be satisfied if this tag is found.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string requires_condition = 24;
* @param value The bytes of the requiresCondition to add.
* @return This builder for chaining.
*/
public Builder addRequiresConditionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureRequiresConditionIsMutable();
requiresCondition_.add(value);
bitField0_ |= 0x00100000;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList excludesCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureExcludesConditionIsMutable() {
if (!excludesCondition_.isModifiable()) {
excludesCondition_ = new com.google.protobuf.LazyStringArrayList(excludesCondition_);
}
bitField0_ |= 0x00200000;
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @return A list containing the excludesCondition.
*/
public com.google.protobuf.ProtocolStringList
getExcludesConditionList() {
excludesCondition_.makeImmutable();
return excludesCondition_;
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @return The count of excludesCondition.
*/
public int getExcludesConditionCount() {
return excludesCondition_.size();
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @param index The index of the element to return.
* @return The excludesCondition at the given index.
*/
public java.lang.String getExcludesCondition(int index) {
return excludesCondition_.get(index);
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @param index The index of the value to return.
* @return The bytes of the excludesCondition at the given index.
*/
public com.google.protobuf.ByteString
getExcludesConditionBytes(int index) {
return excludesCondition_.getByteString(index);
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @param index The index to set the value at.
* @param value The excludesCondition to set.
* @return This builder for chaining.
*/
public Builder setExcludesCondition(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureExcludesConditionIsMutable();
excludesCondition_.set(index, value);
bitField0_ |= 0x00200000;
onChanged();
return this;
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @param value The excludesCondition to add.
* @return This builder for chaining.
*/
public Builder addExcludesCondition(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureExcludesConditionIsMutable();
excludesCondition_.add(value);
bitField0_ |= 0x00200000;
onChanged();
return this;
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @param values The excludesCondition to add.
* @return This builder for chaining.
*/
public Builder addAllExcludesCondition(
java.lang.Iterable values) {
ensureExcludesConditionIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, excludesCondition_);
bitField0_ |= 0x00200000;
onChanged();
return this;
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @return This builder for chaining.
*/
public Builder clearExcludesCondition() {
excludesCondition_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00200000);;
onChanged();
return this;
}
/**
*
* The excludes field is a generic condition, which must not be satisfied if
* this tag is found. Otherwise a TAG_EXCLUDED_BY_TAG error will be generated.
* Used in combination with the `satisfies` attributes on a different tag.
*
*
* repeated string excludes_condition = 32;
* @param value The bytes of the excludesCondition to add.
* @return This builder for chaining.
*/
public Builder addExcludesConditionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
ensureExcludesConditionIsMutable();
excludesCondition_.add(value);
bitField0_ |= 0x00200000;
onChanged();
return this;
}
private java.lang.Object deprecation_ = "";
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @return Whether the deprecation field is set.
*/
public boolean hasDeprecation() {
return ((bitField0_ & 0x00400000) != 0);
}
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @return The deprecation.
*/
public java.lang.String getDeprecation() {
java.lang.Object ref = deprecation_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
deprecation_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @return The bytes for deprecation.
*/
public com.google.protobuf.ByteString
getDeprecationBytes() {
java.lang.Object ref = deprecation_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deprecation_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @param value The deprecation to set.
* @return This builder for chaining.
*/
public Builder setDeprecation(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
deprecation_ = value;
bitField0_ |= 0x00400000;
onChanged();
return this;
}
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @return This builder for chaining.
*/
public Builder clearDeprecation() {
deprecation_ = getDefaultInstance().getDeprecation();
bitField0_ = (bitField0_ & ~0x00400000);
onChanged();
return this;
}
/**
*
* If set, generates a DEPRECATED_TAG error with severity WARNING.
* The value of the deprecation field indicates what to use instead,
* e.g. the name of a tag.
*
*
* optional string deprecation = 17;
* @param value The bytes for deprecation to set.
* @return This builder for chaining.
*/
public Builder setDeprecationBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
deprecation_ = value;
bitField0_ |= 0x00400000;
onChanged();
return this;
}
private java.lang.Object deprecationUrl_ = "";
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @return Whether the deprecationUrl field is set.
*/
public boolean hasDeprecationUrl() {
return ((bitField0_ & 0x00800000) != 0);
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @return The deprecationUrl.
*/
public java.lang.String getDeprecationUrl() {
java.lang.Object ref = deprecationUrl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
deprecationUrl_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @return The bytes for deprecationUrl.
*/
public com.google.protobuf.ByteString
getDeprecationUrlBytes() {
java.lang.Object ref = deprecationUrl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deprecationUrl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @param value The deprecationUrl to set.
* @return This builder for chaining.
*/
public Builder setDeprecationUrl(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
deprecationUrl_ = value;
bitField0_ |= 0x00800000;
onChanged();
return this;
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @return This builder for chaining.
*/
public Builder clearDeprecationUrl() {
deprecationUrl_ = getDefaultInstance().getDeprecationUrl();
bitField0_ = (bitField0_ & ~0x00800000);
onChanged();
return this;
}
/**
*
* If provided, a URL which links to the AMP HTML spec for this deprecation.
*
*
* optional string deprecation_url = 18;
* @param value The bytes for deprecationUrl to set.
* @return This builder for chaining.
*/
public Builder setDeprecationUrlBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
deprecationUrl_ = value;
bitField0_ |= 0x00800000;
onChanged();
return this;
}
private boolean explicitAttrsOnly_ ;
/**
*
* This TagSpec will only validate against attributes explicitly
* listed within the TagSpec (attrs and attr_lists). No attributes
* from $GLOBAL_ATTRS and $AMP_LAYOUT_ATTRS are valid unless explicitly
* added as an attribute within the TagSpec. The field `amp_layout` is not
* allowed to be set when `explicit_attrs_only` is true.
*
*
* optional bool explicit_attrs_only = 34 [default = false];
* @return Whether the explicitAttrsOnly field is set.
*/
@java.lang.Override
public boolean hasExplicitAttrsOnly() {
return ((bitField0_ & 0x01000000) != 0);
}
/**
*
* This TagSpec will only validate against attributes explicitly
* listed within the TagSpec (attrs and attr_lists). No attributes
* from $GLOBAL_ATTRS and $AMP_LAYOUT_ATTRS are valid unless explicitly
* added as an attribute within the TagSpec. The field `amp_layout` is not
* allowed to be set when `explicit_attrs_only` is true.
*
*
* optional bool explicit_attrs_only = 34 [default = false];
* @return The explicitAttrsOnly.
*/
@java.lang.Override
public boolean getExplicitAttrsOnly() {
return explicitAttrsOnly_;
}
/**
*
* This TagSpec will only validate against attributes explicitly
* listed within the TagSpec (attrs and attr_lists). No attributes
* from $GLOBAL_ATTRS and $AMP_LAYOUT_ATTRS are valid unless explicitly
* added as an attribute within the TagSpec. The field `amp_layout` is not
* allowed to be set when `explicit_attrs_only` is true.
*
*
* optional bool explicit_attrs_only = 34 [default = false];
* @param value The explicitAttrsOnly to set.
* @return This builder for chaining.
*/
public Builder setExplicitAttrsOnly(boolean value) {
explicitAttrsOnly_ = value;
bitField0_ |= 0x01000000;
onChanged();
return this;
}
/**
*
* This TagSpec will only validate against attributes explicitly
* listed within the TagSpec (attrs and attr_lists). No attributes
* from $GLOBAL_ATTRS and $AMP_LAYOUT_ATTRS are valid unless explicitly
* added as an attribute within the TagSpec. The field `amp_layout` is not
* allowed to be set when `explicit_attrs_only` is true.
*
*
* optional bool explicit_attrs_only = 34 [default = false];
* @return This builder for chaining.
*/
public Builder clearExplicitAttrsOnly() {
bitField0_ = (bitField0_ & ~0x01000000);
explicitAttrsOnly_ = false;
onChanged();
return this;
}
private java.util.List attrs_ =
java.util.Collections.emptyList();
private void ensureAttrsIsMutable() {
if (!((bitField0_ & 0x02000000) != 0)) {
attrs_ = new java.util.ArrayList(attrs_);
bitField0_ |= 0x02000000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AttrSpec, dev.amp.validator.ValidatorProtos.AttrSpec.Builder, dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder> attrsBuilder_;
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public java.util.List getAttrsList() {
if (attrsBuilder_ == null) {
return java.util.Collections.unmodifiableList(attrs_);
} else {
return attrsBuilder_.getMessageList();
}
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public int getAttrsCount() {
if (attrsBuilder_ == null) {
return attrs_.size();
} else {
return attrsBuilder_.getCount();
}
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public dev.amp.validator.ValidatorProtos.AttrSpec getAttrs(int index) {
if (attrsBuilder_ == null) {
return attrs_.get(index);
} else {
return attrsBuilder_.getMessage(index);
}
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public Builder setAttrs(
int index, dev.amp.validator.ValidatorProtos.AttrSpec value) {
if (attrsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttrsIsMutable();
attrs_.set(index, value);
onChanged();
} else {
attrsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public Builder setAttrs(
int index, dev.amp.validator.ValidatorProtos.AttrSpec.Builder builderForValue) {
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
attrs_.set(index, builderForValue.build());
onChanged();
} else {
attrsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public Builder addAttrs(dev.amp.validator.ValidatorProtos.AttrSpec value) {
if (attrsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttrsIsMutable();
attrs_.add(value);
onChanged();
} else {
attrsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public Builder addAttrs(
int index, dev.amp.validator.ValidatorProtos.AttrSpec value) {
if (attrsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAttrsIsMutable();
attrs_.add(index, value);
onChanged();
} else {
attrsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public Builder addAttrs(
dev.amp.validator.ValidatorProtos.AttrSpec.Builder builderForValue) {
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
attrs_.add(builderForValue.build());
onChanged();
} else {
attrsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public Builder addAttrs(
int index, dev.amp.validator.ValidatorProtos.AttrSpec.Builder builderForValue) {
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
attrs_.add(index, builderForValue.build());
onChanged();
} else {
attrsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public Builder addAllAttrs(
java.lang.Iterable values) {
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, attrs_);
onChanged();
} else {
attrsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public Builder clearAttrs() {
if (attrsBuilder_ == null) {
attrs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x02000000);
onChanged();
} else {
attrsBuilder_.clear();
}
return this;
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public Builder removeAttrs(int index) {
if (attrsBuilder_ == null) {
ensureAttrsIsMutable();
attrs_.remove(index);
onChanged();
} else {
attrsBuilder_.remove(index);
}
return this;
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public dev.amp.validator.ValidatorProtos.AttrSpec.Builder getAttrsBuilder(
int index) {
return getAttrsFieldBuilder().getBuilder(index);
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder getAttrsOrBuilder(
int index) {
if (attrsBuilder_ == null) {
return attrs_.get(index); } else {
return attrsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public java.util.List
getAttrsOrBuilderList() {
if (attrsBuilder_ != null) {
return attrsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(attrs_);
}
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public dev.amp.validator.ValidatorProtos.AttrSpec.Builder addAttrsBuilder() {
return getAttrsFieldBuilder().addBuilder(
dev.amp.validator.ValidatorProtos.AttrSpec.getDefaultInstance());
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public dev.amp.validator.ValidatorProtos.AttrSpec.Builder addAttrsBuilder(
int index) {
return getAttrsFieldBuilder().addBuilder(
index, dev.amp.validator.ValidatorProtos.AttrSpec.getDefaultInstance());
}
/**
*
* Attribute specifications related to this tag.
*
*
* repeated .amp.validator.AttrSpec attrs = 7;
*/
public java.util.List
getAttrsBuilderList() {
return getAttrsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AttrSpec, dev.amp.validator.ValidatorProtos.AttrSpec.Builder, dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder>
getAttrsFieldBuilder() {
if (attrsBuilder_ == null) {
attrsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
dev.amp.validator.ValidatorProtos.AttrSpec, dev.amp.validator.ValidatorProtos.AttrSpec.Builder, dev.amp.validator.ValidatorProtos.AttrSpecOrBuilder>(
attrs_,
((bitField0_ & 0x02000000) != 0),
getParentForChildren(),
isClean());
attrs_ = null;
}
return attrsBuilder_;
}
private com.google.protobuf.LazyStringArrayList attrLists_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureAttrListsIsMutable() {
if (!attrLists_.isModifiable()) {
attrLists_ = new com.google.protobuf.LazyStringArrayList(attrLists_);
}
bitField0_ |= 0x04000000;
}
/**
*