/java/src/com/google/publicalerts/cap/Resource.java
https://code.google.com/p/cap-library/ · Java · 871 lines · 804 code · 50 blank · 17 comment · 154 complexity · 163b53668e2be41988000349e1f3fd34 MD5 · raw file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- package com.google.publicalerts.cap;
- public final class Resource extends
- com.google.protobuf.GeneratedMessage
- implements ResourceOrBuilder {
- // Use Resource.newBuilder() to construct.
- private Resource(Builder builder) {
- super(builder);
- }
- private Resource(boolean noInit) {}
-
- private static final Resource defaultInstance;
- public static Resource getDefaultInstance() {
- return defaultInstance;
- }
-
- public Resource getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Resource_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Resource_fieldAccessorTable;
- }
-
- private int bitField0_;
- // required string resource_desc = 1;
- public static final int RESOURCE_DESC_FIELD_NUMBER = 1;
- private java.lang.Object resourceDesc_;
- public boolean hasResourceDesc() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getResourceDesc() {
- java.lang.Object ref = resourceDesc_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- resourceDesc_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getResourceDescBytes() {
- java.lang.Object ref = resourceDesc_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- resourceDesc_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string mime_type = 2;
- public static final int MIME_TYPE_FIELD_NUMBER = 2;
- private java.lang.Object mimeType_;
- public boolean hasMimeType() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public String getMimeType() {
- java.lang.Object ref = mimeType_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- mimeType_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getMimeTypeBytes() {
- java.lang.Object ref = mimeType_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- mimeType_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional int64 size = 3;
- public static final int SIZE_FIELD_NUMBER = 3;
- private long size_;
- public boolean hasSize() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public long getSize() {
- return size_;
- }
-
- // optional string uri = 4;
- public static final int URI_FIELD_NUMBER = 4;
- private java.lang.Object uri_;
- public boolean hasUri() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- public String getUri() {
- java.lang.Object ref = uri_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- uri_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getUriBytes() {
- java.lang.Object ref = uri_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- uri_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string deref_uri = 5;
- public static final int DEREF_URI_FIELD_NUMBER = 5;
- private java.lang.Object derefUri_;
- public boolean hasDerefUri() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- public String getDerefUri() {
- java.lang.Object ref = derefUri_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- derefUri_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getDerefUriBytes() {
- java.lang.Object ref = derefUri_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- derefUri_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- // optional string digest = 6;
- public static final int DIGEST_FIELD_NUMBER = 6;
- private java.lang.Object digest_;
- public boolean hasDigest() {
- return ((bitField0_ & 0x00000020) == 0x00000020);
- }
- public String getDigest() {
- java.lang.Object ref = digest_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (com.google.protobuf.Internal.isValidUtf8(bs)) {
- digest_ = s;
- }
- return s;
- }
- }
- private com.google.protobuf.ByteString getDigestBytes() {
- java.lang.Object ref = digest_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((String) ref);
- digest_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private void initFields() {
- resourceDesc_ = "";
- mimeType_ = "";
- size_ = 0L;
- uri_ = "";
- derefUri_ = "";
- digest_ = "";
- }
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized != -1) return isInitialized == 1;
-
- if (!hasResourceDesc()) {
- 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.writeBytes(1, getResourceDescBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- output.writeBytes(2, getMimeTypeBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- output.writeInt64(3, size_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- output.writeBytes(4, getUriBytes());
- }
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
- output.writeBytes(5, getDerefUriBytes());
- }
- if (((bitField0_ & 0x00000020) == 0x00000020)) {
- output.writeBytes(6, getDigestBytes());
- }
- 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
- .computeBytesSize(1, getResourceDescBytes());
- }
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getMimeTypeBytes());
- }
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(3, size_);
- }
- if (((bitField0_ & 0x00000008) == 0x00000008)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, getUriBytes());
- }
- if (((bitField0_ & 0x00000010) == 0x00000010)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(5, getDerefUriBytes());
- }
- if (((bitField0_ & 0x00000020) == 0x00000020)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(6, getDigestBytes());
- }
- 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();
- }
-
- @java.lang.Override
- public boolean equals(final java.lang.Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof com.google.publicalerts.cap.Resource)) {
- return super.equals(obj);
- }
- com.google.publicalerts.cap.Resource other = (com.google.publicalerts.cap.Resource) obj;
-
- boolean result = true;
- result = result && (hasResourceDesc() == other.hasResourceDesc());
- if (hasResourceDesc()) {
- result = result && getResourceDesc()
- .equals(other.getResourceDesc());
- }
- result = result && (hasMimeType() == other.hasMimeType());
- if (hasMimeType()) {
- result = result && getMimeType()
- .equals(other.getMimeType());
- }
- result = result && (hasSize() == other.hasSize());
- if (hasSize()) {
- result = result && (getSize()
- == other.getSize());
- }
- result = result && (hasUri() == other.hasUri());
- if (hasUri()) {
- result = result && getUri()
- .equals(other.getUri());
- }
- result = result && (hasDerefUri() == other.hasDerefUri());
- if (hasDerefUri()) {
- result = result && getDerefUri()
- .equals(other.getDerefUri());
- }
- result = result && (hasDigest() == other.hasDigest());
- if (hasDigest()) {
- result = result && getDigest()
- .equals(other.getDigest());
- }
- result = result &&
- getUnknownFields().equals(other.getUnknownFields());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- int hash = 41;
- hash = (19 * hash) + getDescriptorForType().hashCode();
- if (hasResourceDesc()) {
- hash = (37 * hash) + RESOURCE_DESC_FIELD_NUMBER;
- hash = (53 * hash) + getResourceDesc().hashCode();
- }
- if (hasMimeType()) {
- hash = (37 * hash) + MIME_TYPE_FIELD_NUMBER;
- hash = (53 * hash) + getMimeType().hashCode();
- }
- if (hasSize()) {
- hash = (37 * hash) + SIZE_FIELD_NUMBER;
- hash = (53 * hash) + hashLong(getSize());
- }
- if (hasUri()) {
- hash = (37 * hash) + URI_FIELD_NUMBER;
- hash = (53 * hash) + getUri().hashCode();
- }
- if (hasDerefUri()) {
- hash = (37 * hash) + DEREF_URI_FIELD_NUMBER;
- hash = (53 * hash) + getDerefUri().hashCode();
- }
- if (hasDigest()) {
- hash = (37 * hash) + DIGEST_FIELD_NUMBER;
- hash = (53 * hash) + getDigest().hashCode();
- }
- hash = (29 * hash) + getUnknownFields().hashCode();
- return hash;
- }
-
- public static com.google.publicalerts.cap.Resource parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.google.publicalerts.cap.Resource parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.google.publicalerts.cap.Resource parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static com.google.publicalerts.cap.Resource parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static com.google.publicalerts.cap.Resource parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.google.publicalerts.cap.Resource parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static com.google.publicalerts.cap.Resource parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.google.publicalerts.cap.Resource parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static com.google.publicalerts.cap.Resource parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static com.google.publicalerts.cap.Resource parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(com.google.publicalerts.cap.Resource 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;
- }
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder>
- implements com.google.publicalerts.cap.ResourceOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Resource_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.publicalerts.cap.Cap.internal_static_publicalerts_cap_Resource_fieldAccessorTable;
- }
-
- // Construct using com.google.publicalerts.cap.Resource.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
- }
- }
- private static Builder create() {
- return new Builder();
- }
-
- public Builder clear() {
- super.clear();
- resourceDesc_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
- mimeType_ = "";
- bitField0_ = (bitField0_ & ~0x00000002);
- size_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000004);
- uri_ = "";
- bitField0_ = (bitField0_ & ~0x00000008);
- derefUri_ = "";
- bitField0_ = (bitField0_ & ~0x00000010);
- digest_ = "";
- bitField0_ = (bitField0_ & ~0x00000020);
- return this;
- }
-
- public Builder clone() {
- return create().mergeFrom(buildPartial());
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return com.google.publicalerts.cap.Resource.getDescriptor();
- }
-
- public com.google.publicalerts.cap.Resource getDefaultInstanceForType() {
- return com.google.publicalerts.cap.Resource.getDefaultInstance();
- }
-
- public com.google.publicalerts.cap.Resource build() {
- com.google.publicalerts.cap.Resource result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- private com.google.publicalerts.cap.Resource buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- com.google.publicalerts.cap.Resource result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return result;
- }
-
- public com.google.publicalerts.cap.Resource buildPartial() {
- com.google.publicalerts.cap.Resource result = new com.google.publicalerts.cap.Resource(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
- to_bitField0_ |= 0x00000001;
- }
- result.resourceDesc_ = resourceDesc_;
- if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
- to_bitField0_ |= 0x00000002;
- }
- result.mimeType_ = mimeType_;
- if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
- to_bitField0_ |= 0x00000004;
- }
- result.size_ = size_;
- if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
- to_bitField0_ |= 0x00000008;
- }
- result.uri_ = uri_;
- if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
- to_bitField0_ |= 0x00000010;
- }
- result.derefUri_ = derefUri_;
- if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
- to_bitField0_ |= 0x00000020;
- }
- result.digest_ = digest_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof com.google.publicalerts.cap.Resource) {
- return mergeFrom((com.google.publicalerts.cap.Resource)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.publicalerts.cap.Resource other) {
- if (other == com.google.publicalerts.cap.Resource.getDefaultInstance()) return this;
- if (other.hasResourceDesc()) {
- setResourceDesc(other.getResourceDesc());
- }
- if (other.hasMimeType()) {
- setMimeType(other.getMimeType());
- }
- if (other.hasSize()) {
- setSize(other.getSize());
- }
- if (other.hasUri()) {
- setUri(other.getUri());
- }
- if (other.hasDerefUri()) {
- setDerefUri(other.getDerefUri());
- }
- if (other.hasDigest()) {
- setDigest(other.getDigest());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- public final boolean isInitialized() {
- if (!hasResourceDesc()) {
-
- return false;
- }
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- onChanged();
- return this;
- }
- break;
- }
- case 10: {
- bitField0_ |= 0x00000001;
- resourceDesc_ = input.readBytes();
- break;
- }
- case 18: {
- bitField0_ |= 0x00000002;
- mimeType_ = input.readBytes();
- break;
- }
- case 24: {
- bitField0_ |= 0x00000004;
- size_ = input.readInt64();
- break;
- }
- case 34: {
- bitField0_ |= 0x00000008;
- uri_ = input.readBytes();
- break;
- }
- case 42: {
- bitField0_ |= 0x00000010;
- derefUri_ = input.readBytes();
- break;
- }
- case 50: {
- bitField0_ |= 0x00000020;
- digest_ = input.readBytes();
- break;
- }
- }
- }
- }
-
- private int bitField0_;
-
- // required string resource_desc = 1;
- private java.lang.Object resourceDesc_ = "";
- public boolean hasResourceDesc() {
- return ((bitField0_ & 0x00000001) == 0x00000001);
- }
- public String getResourceDesc() {
- java.lang.Object ref = resourceDesc_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- resourceDesc_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setResourceDesc(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
- resourceDesc_ = value;
- onChanged();
- return this;
- }
- public Builder clearResourceDesc() {
- bitField0_ = (bitField0_ & ~0x00000001);
- resourceDesc_ = getDefaultInstance().getResourceDesc();
- onChanged();
- return this;
- }
- void setResourceDesc(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000001;
- resourceDesc_ = value;
- onChanged();
- }
-
- // optional string mime_type = 2;
- private java.lang.Object mimeType_ = "";
- public boolean hasMimeType() {
- return ((bitField0_ & 0x00000002) == 0x00000002);
- }
- public String getMimeType() {
- java.lang.Object ref = mimeType_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- mimeType_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setMimeType(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000002;
- mimeType_ = value;
- onChanged();
- return this;
- }
- public Builder clearMimeType() {
- bitField0_ = (bitField0_ & ~0x00000002);
- mimeType_ = getDefaultInstance().getMimeType();
- onChanged();
- return this;
- }
- void setMimeType(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000002;
- mimeType_ = value;
- onChanged();
- }
-
- // optional int64 size = 3;
- private long size_ ;
- public boolean hasSize() {
- return ((bitField0_ & 0x00000004) == 0x00000004);
- }
- public long getSize() {
- return size_;
- }
- public Builder setSize(long value) {
- bitField0_ |= 0x00000004;
- size_ = value;
- onChanged();
- return this;
- }
- public Builder clearSize() {
- bitField0_ = (bitField0_ & ~0x00000004);
- size_ = 0L;
- onChanged();
- return this;
- }
-
- // optional string uri = 4;
- private java.lang.Object uri_ = "";
- public boolean hasUri() {
- return ((bitField0_ & 0x00000008) == 0x00000008);
- }
- public String getUri() {
- java.lang.Object ref = uri_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- uri_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setUri(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- uri_ = value;
- onChanged();
- return this;
- }
- public Builder clearUri() {
- bitField0_ = (bitField0_ & ~0x00000008);
- uri_ = getDefaultInstance().getUri();
- onChanged();
- return this;
- }
- void setUri(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000008;
- uri_ = value;
- onChanged();
- }
-
- // optional string deref_uri = 5;
- private java.lang.Object derefUri_ = "";
- public boolean hasDerefUri() {
- return ((bitField0_ & 0x00000010) == 0x00000010);
- }
- public String getDerefUri() {
- java.lang.Object ref = derefUri_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- derefUri_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setDerefUri(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- derefUri_ = value;
- onChanged();
- return this;
- }
- public Builder clearDerefUri() {
- bitField0_ = (bitField0_ & ~0x00000010);
- derefUri_ = getDefaultInstance().getDerefUri();
- onChanged();
- return this;
- }
- void setDerefUri(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000010;
- derefUri_ = value;
- onChanged();
- }
-
- // optional string digest = 6;
- private java.lang.Object digest_ = "";
- public boolean hasDigest() {
- return ((bitField0_ & 0x00000020) == 0x00000020);
- }
- public String getDigest() {
- java.lang.Object ref = digest_;
- if (!(ref instanceof String)) {
- String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
- digest_ = s;
- return s;
- } else {
- return (String) ref;
- }
- }
- public Builder setDigest(String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000020;
- digest_ = value;
- onChanged();
- return this;
- }
- public Builder clearDigest() {
- bitField0_ = (bitField0_ & ~0x00000020);
- digest_ = getDefaultInstance().getDigest();
- onChanged();
- return this;
- }
- void setDigest(com.google.protobuf.ByteString value) {
- bitField0_ |= 0x00000020;
- digest_ = value;
- onChanged();
- }
-
- // @@protoc_insertion_point(builder_scope:publicalerts.cap.Resource)
- }
-
- static {
- defaultInstance = new Resource(true);
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:publicalerts.cap.Resource)
- }