// Generated by the protocol buffer compiler. DO NOT EDIT! // source: userfeedback/proto/annotations.proto package userfeedback; public final class Annotations { private Annotations() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } public interface AnnotationOrBuilder extends com.google.protobuf.MessageOrBuilder { // required .userfeedback.Rectangle rectangle = 1; /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ boolean hasRectangle(); /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ userfeedback.Math.Rectangle getRectangle(); /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ userfeedback.Math.RectangleOrBuilder getRectangleOrBuilder(); // optional string snippet = 2; /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ boolean hasSnippet(); /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ java.lang.String getSnippet(); /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ com.google.protobuf.ByteString getSnippetBytes(); // optional .userfeedback.HtmlPath annotatedElementPath = 3; /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ boolean hasAnnotatedElementPath(); /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ userfeedback.Dom.HtmlPath getAnnotatedElementPath(); /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ userfeedback.Dom.HtmlPathOrBuilder getAnnotatedElementPathOrBuilder(); // repeated string attached_metadata = 4; /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ java.util.List<java.lang.String> getAttachedMetadataList(); /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ int getAttachedMetadataCount(); /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ java.lang.String getAttachedMetadata(int index); /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ com.google.protobuf.ByteString getAttachedMetadataBytes(int index); } /** * Protobuf type {@code userfeedback.Annotation} * * <pre> * An annotation drawn by the user on the screenshot of a web page. * </pre> */ public static final class Annotation extends com.google.protobuf.GeneratedMessage implements AnnotationOrBuilder { // Use Annotation.newBuilder() to construct. private Annotation(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); } private Annotation(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); } private static final Annotation defaultInstance; public static Annotation getDefaultInstance() { return defaultInstance; } public Annotation getDefaultInstanceForType() { return defaultInstance; } private final com.google.protobuf.UnknownFieldSet unknownFields; @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Annotation( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { initFields(); int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } case 10: { userfeedback.Math.Rectangle.Builder subBuilder = null; if (((bitField0_ & 0x00000001) == 0x00000001)) { subBuilder = rectangle_.toBuilder(); } rectangle_ = input.readMessage(userfeedback.Math.Rectangle.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(rectangle_); rectangle_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000001; break; } case 18: { bitField0_ |= 0x00000002; snippet_ = input.readBytes(); break; } case 26: { userfeedback.Dom.HtmlPath.Builder subBuilder = null; if (((bitField0_ & 0x00000004) == 0x00000004)) { subBuilder = annotatedElementPath_.toBuilder(); } annotatedElementPath_ = input.readMessage(userfeedback.Dom.HtmlPath.PARSER, extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(annotatedElementPath_); annotatedElementPath_ = subBuilder.buildPartial(); } bitField0_ |= 0x00000004; break; } case 34: { if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { attachedMetadata_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000008; } attachedMetadata_.add(input.readBytes()); break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e.getMessage()).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { attachedMetadata_ = new com.google.protobuf.UnmodifiableLazyStringList(attachedMetadata_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return userfeedback.Annotations.internal_static_userfeedback_Annotation_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return userfeedback.Annotations.internal_static_userfeedback_Annotation_fieldAccessorTable .ensureFieldAccessorsInitialized( userfeedback.Annotations.Annotation.class, userfeedback.Annotations.Annotation.Builder.class); } public static com.google.protobuf.Parser<Annotation> PARSER = new com.google.protobuf.AbstractParser<Annotation>() { public Annotation parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Annotation(input, extensionRegistry); } }; @java.lang.Override public com.google.protobuf.Parser<Annotation> getParserForType() { return PARSER; } private int bitField0_; // required .userfeedback.Rectangle rectangle = 1; public static final int RECTANGLE_FIELD_NUMBER = 1; private userfeedback.Math.Rectangle rectangle_; /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ public boolean hasRectangle() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ public userfeedback.Math.Rectangle getRectangle() { return rectangle_; } /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ public userfeedback.Math.RectangleOrBuilder getRectangleOrBuilder() { return rectangle_; } // optional string snippet = 2; public static final int SNIPPET_FIELD_NUMBER = 2; private java.lang.Object snippet_; /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ public boolean hasSnippet() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ public java.lang.String getSnippet() { java.lang.Object ref = snippet_; 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()) { snippet_ = s; } return s; } } /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ public com.google.protobuf.ByteString getSnippetBytes() { java.lang.Object ref = snippet_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); snippet_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // optional .userfeedback.HtmlPath annotatedElementPath = 3; public static final int ANNOTATEDELEMENTPATH_FIELD_NUMBER = 3; private userfeedback.Dom.HtmlPath annotatedElementPath_; /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ public boolean hasAnnotatedElementPath() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ public userfeedback.Dom.HtmlPath getAnnotatedElementPath() { return annotatedElementPath_; } /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ public userfeedback.Dom.HtmlPathOrBuilder getAnnotatedElementPathOrBuilder() { return annotatedElementPath_; } // repeated string attached_metadata = 4; public static final int ATTACHED_METADATA_FIELD_NUMBER = 4; private com.google.protobuf.LazyStringList attachedMetadata_; /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public java.util.List<java.lang.String> getAttachedMetadataList() { return attachedMetadata_; } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public int getAttachedMetadataCount() { return attachedMetadata_.size(); } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public java.lang.String getAttachedMetadata(int index) { return attachedMetadata_.get(index); } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public com.google.protobuf.ByteString getAttachedMetadataBytes(int index) { return attachedMetadata_.getByteString(index); } private void initFields() { rectangle_ = userfeedback.Math.Rectangle.getDefaultInstance(); snippet_ = ""; annotatedElementPath_ = userfeedback.Dom.HtmlPath.getDefaultInstance(); attachedMetadata_ = com.google.protobuf.LazyStringArrayList.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasRectangle()) { memoizedIsInitialized = 0; return false; } if (!getRectangle().isInitialized()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeMessage(1, rectangle_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getSnippetBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeMessage(3, annotatedElementPath_); } for (int i = 0; i < attachedMetadata_.size(); i++) { output.writeBytes(4, attachedMetadata_.getByteString(i)); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, rectangle_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getSnippetBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, annotatedElementPath_); } { int dataSize = 0; for (int i = 0; i < attachedMetadata_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(attachedMetadata_.getByteString(i)); } size += dataSize; size += 1 * getAttachedMetadataList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } private static final long serialVersionUID = 0L; @java.lang.Override protected java.lang.Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static userfeedback.Annotations.Annotation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static userfeedback.Annotations.Annotation parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static userfeedback.Annotations.Annotation parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static userfeedback.Annotations.Annotation parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static userfeedback.Annotations.Annotation parseFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static userfeedback.Annotations.Annotation parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static userfeedback.Annotations.Annotation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return PARSER.parseDelimitedFrom(input); } public static userfeedback.Annotations.Annotation parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseDelimitedFrom(input, extensionRegistry); } public static userfeedback.Annotations.Annotation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return PARSER.parseFrom(input); } public static userfeedback.Annotations.Annotation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return PARSER.parseFrom(input, extensionRegistry); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(userfeedback.Annotations.Annotation prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * Protobuf type {@code userfeedback.Annotation} * * <pre> * An annotation drawn by the user on the screenshot of a web page. * </pre> */ public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements userfeedback.Annotations.AnnotationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return userfeedback.Annotations.internal_static_userfeedback_Annotation_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return userfeedback.Annotations.internal_static_userfeedback_Annotation_fieldAccessorTable .ensureFieldAccessorsInitialized( userfeedback.Annotations.Annotation.class, userfeedback.Annotations.Annotation.Builder.class); } // Construct using userfeedback.Annotations.Annotation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessage.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { getRectangleFieldBuilder(); getAnnotatedElementPathFieldBuilder(); } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); if (rectangleBuilder_ == null) { rectangle_ = userfeedback.Math.Rectangle.getDefaultInstance(); } else { rectangleBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); snippet_ = ""; bitField0_ = (bitField0_ & ~0x00000002); if (annotatedElementPathBuilder_ == null) { annotatedElementPath_ = userfeedback.Dom.HtmlPath.getDefaultInstance(); } else { annotatedElementPathBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); attachedMetadata_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return userfeedback.Annotations.internal_static_userfeedback_Annotation_descriptor; } public userfeedback.Annotations.Annotation getDefaultInstanceForType() { return userfeedback.Annotations.Annotation.getDefaultInstance(); } public userfeedback.Annotations.Annotation build() { userfeedback.Annotations.Annotation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } public userfeedback.Annotations.Annotation buildPartial() { userfeedback.Annotations.Annotation result = new userfeedback.Annotations.Annotation(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } if (rectangleBuilder_ == null) { result.rectangle_ = rectangle_; } else { result.rectangle_ = rectangleBuilder_.build(); } if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.snippet_ = snippet_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } if (annotatedElementPathBuilder_ == null) { result.annotatedElementPath_ = annotatedElementPath_; } else { result.annotatedElementPath_ = annotatedElementPathBuilder_.build(); } if (((bitField0_ & 0x00000008) == 0x00000008)) { attachedMetadata_ = new com.google.protobuf.UnmodifiableLazyStringList( attachedMetadata_); bitField0_ = (bitField0_ & ~0x00000008); } result.attachedMetadata_ = attachedMetadata_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof userfeedback.Annotations.Annotation) { return mergeFrom((userfeedback.Annotations.Annotation)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(userfeedback.Annotations.Annotation other) { if (other == userfeedback.Annotations.Annotation.getDefaultInstance()) return this; if (other.hasRectangle()) { mergeRectangle(other.getRectangle()); } if (other.hasSnippet()) { bitField0_ |= 0x00000002; snippet_ = other.snippet_; onChanged(); } if (other.hasAnnotatedElementPath()) { mergeAnnotatedElementPath(other.getAnnotatedElementPath()); } if (!other.attachedMetadata_.isEmpty()) { if (attachedMetadata_.isEmpty()) { attachedMetadata_ = other.attachedMetadata_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureAttachedMetadataIsMutable(); attachedMetadata_.addAll(other.attachedMetadata_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasRectangle()) { return false; } if (!getRectangle().isInitialized()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { userfeedback.Annotations.Annotation parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (userfeedback.Annotations.Annotation) e.getUnfinishedMessage(); throw e; } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; // required .userfeedback.Rectangle rectangle = 1; private userfeedback.Math.Rectangle rectangle_ = userfeedback.Math.Rectangle.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< userfeedback.Math.Rectangle, userfeedback.Math.Rectangle.Builder, userfeedback.Math.RectangleOrBuilder> rectangleBuilder_; /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ public boolean hasRectangle() { return ((bitField0_ & 0x00000001) == 0x00000001); } /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ public userfeedback.Math.Rectangle getRectangle() { if (rectangleBuilder_ == null) { return rectangle_; } else { return rectangleBuilder_.getMessage(); } } /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ public Builder setRectangle(userfeedback.Math.Rectangle value) { if (rectangleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } rectangle_ = value; onChanged(); } else { rectangleBuilder_.setMessage(value); } bitField0_ |= 0x00000001; return this; } /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ public Builder setRectangle( userfeedback.Math.Rectangle.Builder builderForValue) { if (rectangleBuilder_ == null) { rectangle_ = builderForValue.build(); onChanged(); } else { rectangleBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; return this; } /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ public Builder mergeRectangle(userfeedback.Math.Rectangle value) { if (rectangleBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001) && rectangle_ != userfeedback.Math.Rectangle.getDefaultInstance()) { rectangle_ = userfeedback.Math.Rectangle.newBuilder(rectangle_).mergeFrom(value).buildPartial(); } else { rectangle_ = value; } onChanged(); } else { rectangleBuilder_.mergeFrom(value); } bitField0_ |= 0x00000001; return this; } /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ public Builder clearRectangle() { if (rectangleBuilder_ == null) { rectangle_ = userfeedback.Math.Rectangle.getDefaultInstance(); onChanged(); } else { rectangleBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); return this; } /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ public userfeedback.Math.Rectangle.Builder getRectangleBuilder() { bitField0_ |= 0x00000001; onChanged(); return getRectangleFieldBuilder().getBuilder(); } /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ public userfeedback.Math.RectangleOrBuilder getRectangleOrBuilder() { if (rectangleBuilder_ != null) { return rectangleBuilder_.getMessageOrBuilder(); } else { return rectangle_; } } /** * <code>required .userfeedback.Rectangle rectangle = 1;</code> * * <pre> * A rectangular area covered by this annotation on annotated image. * The (0, 0) coordinate is placed in the top-left corner of the image. * One unit corresponds to one pixel. * </pre> */ private com.google.protobuf.SingleFieldBuilder< userfeedback.Math.Rectangle, userfeedback.Math.Rectangle.Builder, userfeedback.Math.RectangleOrBuilder> getRectangleFieldBuilder() { if (rectangleBuilder_ == null) { rectangleBuilder_ = new com.google.protobuf.SingleFieldBuilder< userfeedback.Math.Rectangle, userfeedback.Math.Rectangle.Builder, userfeedback.Math.RectangleOrBuilder>( rectangle_, getParentForChildren(), isClean()); rectangle_ = null; } return rectangleBuilder_; } // optional string snippet = 2; private java.lang.Object snippet_ = ""; /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ public boolean hasSnippet() { return ((bitField0_ & 0x00000002) == 0x00000002); } /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ public java.lang.String getSnippet() { java.lang.Object ref = snippet_; if (!(ref instanceof java.lang.String)) { java.lang.String s = ((com.google.protobuf.ByteString) ref) .toStringUtf8(); snippet_ = s; return s; } else { return (java.lang.String) ref; } } /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ public com.google.protobuf.ByteString getSnippetBytes() { java.lang.Object ref = snippet_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); snippet_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ public Builder setSnippet( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; snippet_ = value; onChanged(); return this; } /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ public Builder clearSnippet() { bitField0_ = (bitField0_ & ~0x00000002); snippet_ = getDefaultInstance().getSnippet(); onChanged(); return this; } /** * <code>optional string snippet = 2;</code> * * <pre> * A snippet of text displayed inside annotated portion of a web page. * </pre> */ public Builder setSnippetBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; snippet_ = value; onChanged(); return this; } // optional .userfeedback.HtmlPath annotatedElementPath = 3; private userfeedback.Dom.HtmlPath annotatedElementPath_ = userfeedback.Dom.HtmlPath.getDefaultInstance(); private com.google.protobuf.SingleFieldBuilder< userfeedback.Dom.HtmlPath, userfeedback.Dom.HtmlPath.Builder, userfeedback.Dom.HtmlPathOrBuilder> annotatedElementPathBuilder_; /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ public boolean hasAnnotatedElementPath() { return ((bitField0_ & 0x00000004) == 0x00000004); } /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ public userfeedback.Dom.HtmlPath getAnnotatedElementPath() { if (annotatedElementPathBuilder_ == null) { return annotatedElementPath_; } else { return annotatedElementPathBuilder_.getMessage(); } } /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ public Builder setAnnotatedElementPath(userfeedback.Dom.HtmlPath value) { if (annotatedElementPathBuilder_ == null) { if (value == null) { throw new NullPointerException(); } annotatedElementPath_ = value; onChanged(); } else { annotatedElementPathBuilder_.setMessage(value); } bitField0_ |= 0x00000004; return this; } /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ public Builder setAnnotatedElementPath( userfeedback.Dom.HtmlPath.Builder builderForValue) { if (annotatedElementPathBuilder_ == null) { annotatedElementPath_ = builderForValue.build(); onChanged(); } else { annotatedElementPathBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; return this; } /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ public Builder mergeAnnotatedElementPath(userfeedback.Dom.HtmlPath value) { if (annotatedElementPathBuilder_ == null) { if (((bitField0_ & 0x00000004) == 0x00000004) && annotatedElementPath_ != userfeedback.Dom.HtmlPath.getDefaultInstance()) { annotatedElementPath_ = userfeedback.Dom.HtmlPath.newBuilder(annotatedElementPath_).mergeFrom(value).buildPartial(); } else { annotatedElementPath_ = value; } onChanged(); } else { annotatedElementPathBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; return this; } /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ public Builder clearAnnotatedElementPath() { if (annotatedElementPathBuilder_ == null) { annotatedElementPath_ = userfeedback.Dom.HtmlPath.getDefaultInstance(); onChanged(); } else { annotatedElementPathBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); return this; } /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ public userfeedback.Dom.HtmlPath.Builder getAnnotatedElementPathBuilder() { bitField0_ |= 0x00000004; onChanged(); return getAnnotatedElementPathFieldBuilder().getBuilder(); } /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ public userfeedback.Dom.HtmlPathOrBuilder getAnnotatedElementPathOrBuilder() { if (annotatedElementPathBuilder_ != null) { return annotatedElementPathBuilder_.getMessageOrBuilder(); } else { return annotatedElementPath_; } } /** * <code>optional .userfeedback.HtmlPath annotatedElementPath = 3;</code> * * <pre> * A path from root element of the document to the annotated element. * </pre> */ private com.google.protobuf.SingleFieldBuilder< userfeedback.Dom.HtmlPath, userfeedback.Dom.HtmlPath.Builder, userfeedback.Dom.HtmlPathOrBuilder> getAnnotatedElementPathFieldBuilder() { if (annotatedElementPathBuilder_ == null) { annotatedElementPathBuilder_ = new com.google.protobuf.SingleFieldBuilder< userfeedback.Dom.HtmlPath, userfeedback.Dom.HtmlPath.Builder, userfeedback.Dom.HtmlPathOrBuilder>( annotatedElementPath_, getParentForChildren(), isClean()); annotatedElementPath_ = null; } return annotatedElementPathBuilder_; } // repeated string attached_metadata = 4; private com.google.protobuf.LazyStringList attachedMetadata_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureAttachedMetadataIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { attachedMetadata_ = new com.google.protobuf.LazyStringArrayList(attachedMetadata_); bitField0_ |= 0x00000008; } } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public java.util.List<java.lang.String> getAttachedMetadataList() { return java.util.Collections.unmodifiableList(attachedMetadata_); } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public int getAttachedMetadataCount() { return attachedMetadata_.size(); } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public java.lang.String getAttachedMetadata(int index) { return attachedMetadata_.get(index); } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public com.google.protobuf.ByteString getAttachedMetadataBytes(int index) { return attachedMetadata_.getByteString(index); } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public Builder setAttachedMetadata( int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAttachedMetadataIsMutable(); attachedMetadata_.set(index, value); onChanged(); return this; } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public Builder addAttachedMetadata( java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureAttachedMetadataIsMutable(); attachedMetadata_.add(value); onChanged(); return this; } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public Builder addAllAttachedMetadata( java.lang.Iterable<java.lang.String> values) { ensureAttachedMetadataIsMutable(); super.addAll(values, attachedMetadata_); onChanged(); return this; } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public Builder clearAttachedMetadata() { attachedMetadata_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * <code>repeated string attached_metadata = 4;</code> * * <pre> * The metadata attached to the highlighted element via the * 'google-feedback-data' attribute. This field is repeated as it collects * the metadata all the way up the dom tree to establish context. * </pre> */ public Builder addAttachedMetadataBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } ensureAttachedMetadataIsMutable(); attachedMetadata_.add(value); onChanged(); return this; } // @@protoc_insertion_point(builder_scope:userfeedback.Annotation) } static { defaultInstance = new Annotation(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:userfeedback.Annotation) } private static com.google.protobuf.Descriptors.Descriptor internal_static_userfeedback_Annotation_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_userfeedback_Annotation_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n$userfeedback/proto/annotations.proto\022\014" + "userfeedback\032\035userfeedback/proto/math.pr" + "oto\032\034userfeedback/proto/dom.proto\"\232\001\n\nAn" + "notation\022*\n\trectangle\030\001 \002(\0132\027.userfeedba" + "ck.Rectangle\022\017\n\007snippet\030\002 \001(\t\0224\n\024annotat" + "edElementPath\030\003 \001(\0132\026.userfeedback.HtmlP" + "ath\022\031\n\021attached_metadata\030\004 \003(\t" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; internal_static_userfeedback_Annotation_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_userfeedback_Annotation_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_userfeedback_Annotation_descriptor, new java.lang.String[] { "Rectangle", "Snippet", "AnnotatedElementPath", "AttachedMetadata", }); return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { userfeedback.Math.getDescriptor(), userfeedback.Dom.getDescriptor(), }, assigner); } // @@protoc_insertion_point(outer_class_scope) }