All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opencannabis.schema.media.AttachedMedia Maven / Gradle / Ivy

The newest version!
/*
 * Copyright 2019, Momentum Ideas Co.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: media/MediaItem.proto

package io.opencannabis.schema.media;

public final class AttachedMedia {
  private AttachedMedia() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  /**
   * 
   * Specifies the states an individual media item may exist in. This covers the process of uploading/provisioning a media
   * item, optimizing/compressing/transforming it, and marking it as ready for serving.
   * 
* * Protobuf enum {@code opencannabis.media.MediaStatus} */ public enum MediaStatus implements com.google.protobuf.ProtocolMessageEnum { /** *
     * The media item has been provisioned, but is not yet subject to a resume-able write operation (at which point, the
     * media item would be 'PENDING').
     * 
* * PROVISIONED = 0; */ PROVISIONED(0), /** *
     * The media item is in the process of being uploaded or otherwise processed. It is not ready yet to be served and may
     * not even yet have underlying data written.
     * 
* * PENDING = 1; */ PENDING(1), /** *
     * Data for the subject media item has been uploaded and written, but the media item has yet to be attached to its
     * subject data in the backing datastore, so it is not ready for serving yet.
     * 
* * UPLOADED = 2; */ UPLOADED(2), /** *
     * This media item is ready to be served, and may include an optimized serving URL to be used instead of the raw URL
     * for the item in storage.
     * 
* * READY = 3; */ READY(3), UNRECOGNIZED(-1), ; /** *
     * The media item has been provisioned, but is not yet subject to a resume-able write operation (at which point, the
     * media item would be 'PENDING').
     * 
* * PROVISIONED = 0; */ public static final int PROVISIONED_VALUE = 0; /** *
     * The media item is in the process of being uploaded or otherwise processed. It is not ready yet to be served and may
     * not even yet have underlying data written.
     * 
* * PENDING = 1; */ public static final int PENDING_VALUE = 1; /** *
     * Data for the subject media item has been uploaded and written, but the media item has yet to be attached to its
     * subject data in the backing datastore, so it is not ready for serving yet.
     * 
* * UPLOADED = 2; */ public static final int UPLOADED_VALUE = 2; /** *
     * This media item is ready to be served, and may include an optimized serving URL to be used instead of the raw URL
     * for the item in storage.
     * 
* * READY = 3; */ public static final int READY_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static MediaStatus valueOf(int value) { return forNumber(value); } public static MediaStatus forNumber(int value) { switch (value) { case 0: return PROVISIONED; case 1: return PENDING; case 2: return UPLOADED; case 3: return READY; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< MediaStatus> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public MediaStatus findValueByNumber(int number) { return MediaStatus.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 io.opencannabis.schema.media.AttachedMedia.getDescriptor().getEnumTypes().get(0); } private static final MediaStatus[] VALUES = values(); public static MediaStatus valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private MediaStatus(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:opencannabis.media.MediaStatus) } /** *
   * Specifies the allowed access scope for an individual media item. By default, uploaded items are accessible to users
   * at the same partner location as the uploading user. That access can be extended to the entire partner (all locations)
   * or the media item can be published for public serving.
   * 
* * Protobuf enum {@code opencannabis.media.MediaPrivacy} */ public enum MediaPrivacy implements com.google.protobuf.ProtocolMessageEnum { /** *
     * Default privacy mode. At the time of this writing, this is defined as an access scheme where all users with read
     * permission on the partner location account matching the uploading user are granted access.
     * 
* * DEFAULT_PRIVACY = 0; */ DEFAULT_PRIVACY(0), /** *
     * All accounts in the entire partner organization should be able to see, access, and download this media item.
     * 
* * PARTNER = 1; */ PARTNER(1), /** *
     * The subject media item is published globally, and can be accessed by anyone with the link on the open Internet.
     * 
* * PUBLIC = 2; */ PUBLIC(2), UNRECOGNIZED(-1), ; /** *
     * Default privacy mode. At the time of this writing, this is defined as an access scheme where all users with read
     * permission on the partner location account matching the uploading user are granted access.
     * 
* * DEFAULT_PRIVACY = 0; */ public static final int DEFAULT_PRIVACY_VALUE = 0; /** *
     * All accounts in the entire partner organization should be able to see, access, and download this media item.
     * 
* * PARTNER = 1; */ public static final int PARTNER_VALUE = 1; /** *
     * The subject media item is published globally, and can be accessed by anyone with the link on the open Internet.
     * 
* * PUBLIC = 2; */ public static final int PUBLIC_VALUE = 2; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static MediaPrivacy valueOf(int value) { return forNumber(value); } public static MediaPrivacy forNumber(int value) { switch (value) { case 0: return DEFAULT_PRIVACY; case 1: return PARTNER; case 2: return PUBLIC; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< MediaPrivacy> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public MediaPrivacy findValueByNumber(int number) { return MediaPrivacy.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 io.opencannabis.schema.media.AttachedMedia.getDescriptor().getEnumTypes().get(1); } private static final MediaPrivacy[] VALUES = values(); public static MediaPrivacy valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private MediaPrivacy(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:opencannabis.media.MediaPrivacy) } public interface MediaSubjectOrBuilder extends // @@protoc_insertion_point(interface_extends:opencannabis.media.MediaSubject) com.google.protobuf.MessageOrBuilder { /** *
     * Specify a product key as the subject parent of this media.
     * 
* * .opencannabis.base.ProductKey product = 2; */ boolean hasProduct(); /** *
     * Specify a product key as the subject parent of this media.
     * 
* * .opencannabis.base.ProductKey product = 2; */ io.opencannabis.schema.base.BaseProductKey.ProductKey getProduct(); /** *
     * Specify a product key as the subject parent of this media.
     * 
* * .opencannabis.base.ProductKey product = 2; */ io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder getProductOrBuilder(); /** *
     * Specify a partner as the subject parent of this media.
     * 
* * string partner = 3; */ java.lang.String getPartner(); /** *
     * Specify a partner as the subject parent of this media.
     * 
* * string partner = 3; */ com.google.protobuf.ByteString getPartnerBytes(); /** *
     * Specify a partner and location as the subject parent of this media.
     * 
* * string location = 4; */ java.lang.String getLocation(); /** *
     * Specify a partner and location as the subject parent of this media.
     * 
* * string location = 4; */ com.google.protobuf.ByteString getLocationBytes(); /** *
     * Specify this media as global. This is a special flag that should only be used internally.
     * 
* * bool global = 5; */ boolean getGlobal(); public io.opencannabis.schema.media.AttachedMedia.MediaSubject.AttachmentCase getAttachmentCase(); } /** *
   * Specifies the subject properties of this media. That is to say, properties of the item of which this media is the
   * subject. Also referred to as this media item's "parent" in some cases.
   * 
* * Protobuf type {@code opencannabis.media.MediaSubject} */ public static final class MediaSubject extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opencannabis.media.MediaSubject) MediaSubjectOrBuilder { private static final long serialVersionUID = 0L; // Use MediaSubject.newBuilder() to construct. private MediaSubject(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MediaSubject() { } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MediaSubject( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 18: { io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder subBuilder = null; if (attachmentCase_ == 2) { subBuilder = ((io.opencannabis.schema.base.BaseProductKey.ProductKey) attachment_).toBuilder(); } attachment_ = input.readMessage(io.opencannabis.schema.base.BaseProductKey.ProductKey.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.opencannabis.schema.base.BaseProductKey.ProductKey) attachment_); attachment_ = subBuilder.buildPartial(); } attachmentCase_ = 2; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); attachmentCase_ = 3; attachment_ = s; break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); attachmentCase_ = 4; attachment_ = s; break; } case 40: { attachmentCase_ = 5; attachment_ = input.readBool(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaSubject_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaSubject_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.media.AttachedMedia.MediaSubject.class, io.opencannabis.schema.media.AttachedMedia.MediaSubject.Builder.class); } private int attachmentCase_ = 0; private java.lang.Object attachment_; public enum AttachmentCase implements com.google.protobuf.Internal.EnumLite { PRODUCT(2), PARTNER(3), LOCATION(4), GLOBAL(5), ATTACHMENT_NOT_SET(0); private final int value; private AttachmentCase(int value) { this.value = value; } /** * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static AttachmentCase valueOf(int value) { return forNumber(value); } public static AttachmentCase forNumber(int value) { switch (value) { case 2: return PRODUCT; case 3: return PARTNER; case 4: return LOCATION; case 5: return GLOBAL; case 0: return ATTACHMENT_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public AttachmentCase getAttachmentCase() { return AttachmentCase.forNumber( attachmentCase_); } public static final int PRODUCT_FIELD_NUMBER = 2; /** *
     * Specify a product key as the subject parent of this media.
     * 
* * .opencannabis.base.ProductKey product = 2; */ public boolean hasProduct() { return attachmentCase_ == 2; } /** *
     * Specify a product key as the subject parent of this media.
     * 
* * .opencannabis.base.ProductKey product = 2; */ public io.opencannabis.schema.base.BaseProductKey.ProductKey getProduct() { if (attachmentCase_ == 2) { return (io.opencannabis.schema.base.BaseProductKey.ProductKey) attachment_; } return io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance(); } /** *
     * Specify a product key as the subject parent of this media.
     * 
* * .opencannabis.base.ProductKey product = 2; */ public io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder getProductOrBuilder() { if (attachmentCase_ == 2) { return (io.opencannabis.schema.base.BaseProductKey.ProductKey) attachment_; } return io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance(); } public static final int PARTNER_FIELD_NUMBER = 3; /** *
     * Specify a partner as the subject parent of this media.
     * 
* * string partner = 3; */ public java.lang.String getPartner() { java.lang.Object ref = ""; if (attachmentCase_ == 3) { ref = attachment_; } 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 (attachmentCase_ == 3) { attachment_ = s; } return s; } } /** *
     * Specify a partner as the subject parent of this media.
     * 
* * string partner = 3; */ public com.google.protobuf.ByteString getPartnerBytes() { java.lang.Object ref = ""; if (attachmentCase_ == 3) { ref = attachment_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (attachmentCase_ == 3) { attachment_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LOCATION_FIELD_NUMBER = 4; /** *
     * Specify a partner and location as the subject parent of this media.
     * 
* * string location = 4; */ public java.lang.String getLocation() { java.lang.Object ref = ""; if (attachmentCase_ == 4) { ref = attachment_; } 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 (attachmentCase_ == 4) { attachment_ = s; } return s; } } /** *
     * Specify a partner and location as the subject parent of this media.
     * 
* * string location = 4; */ public com.google.protobuf.ByteString getLocationBytes() { java.lang.Object ref = ""; if (attachmentCase_ == 4) { ref = attachment_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (attachmentCase_ == 4) { attachment_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int GLOBAL_FIELD_NUMBER = 5; /** *
     * Specify this media as global. This is a special flag that should only be used internally.
     * 
* * bool global = 5; */ public boolean getGlobal() { if (attachmentCase_ == 5) { return (java.lang.Boolean) attachment_; } return false; } 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 (attachmentCase_ == 2) { output.writeMessage(2, (io.opencannabis.schema.base.BaseProductKey.ProductKey) attachment_); } if (attachmentCase_ == 3) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, attachment_); } if (attachmentCase_ == 4) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, attachment_); } if (attachmentCase_ == 5) { output.writeBool( 5, (boolean)((java.lang.Boolean) attachment_)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (attachmentCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (io.opencannabis.schema.base.BaseProductKey.ProductKey) attachment_); } if (attachmentCase_ == 3) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, attachment_); } if (attachmentCase_ == 4) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, attachment_); } if (attachmentCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeBoolSize( 5, (boolean)((java.lang.Boolean) attachment_)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.opencannabis.schema.media.AttachedMedia.MediaSubject)) { return super.equals(obj); } io.opencannabis.schema.media.AttachedMedia.MediaSubject other = (io.opencannabis.schema.media.AttachedMedia.MediaSubject) obj; if (!getAttachmentCase().equals(other.getAttachmentCase())) return false; switch (attachmentCase_) { case 2: if (!getProduct() .equals(other.getProduct())) return false; break; case 3: if (!getPartner() .equals(other.getPartner())) return false; break; case 4: if (!getLocation() .equals(other.getLocation())) return false; break; case 5: if (getGlobal() != other.getGlobal()) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); switch (attachmentCase_) { case 2: hash = (37 * hash) + PRODUCT_FIELD_NUMBER; hash = (53 * hash) + getProduct().hashCode(); break; case 3: hash = (37 * hash) + PARTNER_FIELD_NUMBER; hash = (53 * hash) + getPartner().hashCode(); break; case 4: hash = (37 * hash) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); break; case 5: hash = (37 * hash) + GLOBAL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getGlobal()); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opencannabis.schema.media.AttachedMedia.MediaSubject parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.media.AttachedMedia.MediaSubject parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.media.AttachedMedia.MediaSubject parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.media.AttachedMedia.MediaSubject parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.media.AttachedMedia.MediaSubject parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.media.AttachedMedia.MediaSubject parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.media.AttachedMedia.MediaSubject parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.media.AttachedMedia.MediaSubject 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 io.opencannabis.schema.media.AttachedMedia.MediaSubject parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opencannabis.schema.media.AttachedMedia.MediaSubject 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 io.opencannabis.schema.media.AttachedMedia.MediaSubject parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.media.AttachedMedia.MediaSubject 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(io.opencannabis.schema.media.AttachedMedia.MediaSubject 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 the subject properties of this media. That is to say, properties of the item of which this media is the
     * subject. Also referred to as this media item's "parent" in some cases.
     * 
* * Protobuf type {@code opencannabis.media.MediaSubject} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opencannabis.media.MediaSubject) io.opencannabis.schema.media.AttachedMedia.MediaSubjectOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaSubject_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaSubject_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.media.AttachedMedia.MediaSubject.class, io.opencannabis.schema.media.AttachedMedia.MediaSubject.Builder.class); } // Construct using io.opencannabis.schema.media.AttachedMedia.MediaSubject.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); attachmentCase_ = 0; attachment_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaSubject_descriptor; } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaSubject getDefaultInstanceForType() { return io.opencannabis.schema.media.AttachedMedia.MediaSubject.getDefaultInstance(); } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaSubject build() { io.opencannabis.schema.media.AttachedMedia.MediaSubject result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaSubject buildPartial() { io.opencannabis.schema.media.AttachedMedia.MediaSubject result = new io.opencannabis.schema.media.AttachedMedia.MediaSubject(this); if (attachmentCase_ == 2) { if (productBuilder_ == null) { result.attachment_ = attachment_; } else { result.attachment_ = productBuilder_.build(); } } if (attachmentCase_ == 3) { result.attachment_ = attachment_; } if (attachmentCase_ == 4) { result.attachment_ = attachment_; } if (attachmentCase_ == 5) { result.attachment_ = attachment_; } result.attachmentCase_ = attachmentCase_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.opencannabis.schema.media.AttachedMedia.MediaSubject) { return mergeFrom((io.opencannabis.schema.media.AttachedMedia.MediaSubject)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opencannabis.schema.media.AttachedMedia.MediaSubject other) { if (other == io.opencannabis.schema.media.AttachedMedia.MediaSubject.getDefaultInstance()) return this; switch (other.getAttachmentCase()) { case PRODUCT: { mergeProduct(other.getProduct()); break; } case PARTNER: { attachmentCase_ = 3; attachment_ = other.attachment_; onChanged(); break; } case LOCATION: { attachmentCase_ = 4; attachment_ = other.attachment_; onChanged(); break; } case GLOBAL: { setGlobal(other.getGlobal()); break; } case ATTACHMENT_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.opencannabis.schema.media.AttachedMedia.MediaSubject parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opencannabis.schema.media.AttachedMedia.MediaSubject) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int attachmentCase_ = 0; private java.lang.Object attachment_; public AttachmentCase getAttachmentCase() { return AttachmentCase.forNumber( attachmentCase_); } public Builder clearAttachment() { attachmentCase_ = 0; attachment_ = null; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.base.BaseProductKey.ProductKey, io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder, io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder> productBuilder_; /** *
       * Specify a product key as the subject parent of this media.
       * 
* * .opencannabis.base.ProductKey product = 2; */ public boolean hasProduct() { return attachmentCase_ == 2; } /** *
       * Specify a product key as the subject parent of this media.
       * 
* * .opencannabis.base.ProductKey product = 2; */ public io.opencannabis.schema.base.BaseProductKey.ProductKey getProduct() { if (productBuilder_ == null) { if (attachmentCase_ == 2) { return (io.opencannabis.schema.base.BaseProductKey.ProductKey) attachment_; } return io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance(); } else { if (attachmentCase_ == 2) { return productBuilder_.getMessage(); } return io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance(); } } /** *
       * Specify a product key as the subject parent of this media.
       * 
* * .opencannabis.base.ProductKey product = 2; */ public Builder setProduct(io.opencannabis.schema.base.BaseProductKey.ProductKey value) { if (productBuilder_ == null) { if (value == null) { throw new NullPointerException(); } attachment_ = value; onChanged(); } else { productBuilder_.setMessage(value); } attachmentCase_ = 2; return this; } /** *
       * Specify a product key as the subject parent of this media.
       * 
* * .opencannabis.base.ProductKey product = 2; */ public Builder setProduct( io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder builderForValue) { if (productBuilder_ == null) { attachment_ = builderForValue.build(); onChanged(); } else { productBuilder_.setMessage(builderForValue.build()); } attachmentCase_ = 2; return this; } /** *
       * Specify a product key as the subject parent of this media.
       * 
* * .opencannabis.base.ProductKey product = 2; */ public Builder mergeProduct(io.opencannabis.schema.base.BaseProductKey.ProductKey value) { if (productBuilder_ == null) { if (attachmentCase_ == 2 && attachment_ != io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance()) { attachment_ = io.opencannabis.schema.base.BaseProductKey.ProductKey.newBuilder((io.opencannabis.schema.base.BaseProductKey.ProductKey) attachment_) .mergeFrom(value).buildPartial(); } else { attachment_ = value; } onChanged(); } else { if (attachmentCase_ == 2) { productBuilder_.mergeFrom(value); } productBuilder_.setMessage(value); } attachmentCase_ = 2; return this; } /** *
       * Specify a product key as the subject parent of this media.
       * 
* * .opencannabis.base.ProductKey product = 2; */ public Builder clearProduct() { if (productBuilder_ == null) { if (attachmentCase_ == 2) { attachmentCase_ = 0; attachment_ = null; onChanged(); } } else { if (attachmentCase_ == 2) { attachmentCase_ = 0; attachment_ = null; } productBuilder_.clear(); } return this; } /** *
       * Specify a product key as the subject parent of this media.
       * 
* * .opencannabis.base.ProductKey product = 2; */ public io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder getProductBuilder() { return getProductFieldBuilder().getBuilder(); } /** *
       * Specify a product key as the subject parent of this media.
       * 
* * .opencannabis.base.ProductKey product = 2; */ public io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder getProductOrBuilder() { if ((attachmentCase_ == 2) && (productBuilder_ != null)) { return productBuilder_.getMessageOrBuilder(); } else { if (attachmentCase_ == 2) { return (io.opencannabis.schema.base.BaseProductKey.ProductKey) attachment_; } return io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance(); } } /** *
       * Specify a product key as the subject parent of this media.
       * 
* * .opencannabis.base.ProductKey product = 2; */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.base.BaseProductKey.ProductKey, io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder, io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder> getProductFieldBuilder() { if (productBuilder_ == null) { if (!(attachmentCase_ == 2)) { attachment_ = io.opencannabis.schema.base.BaseProductKey.ProductKey.getDefaultInstance(); } productBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.base.BaseProductKey.ProductKey, io.opencannabis.schema.base.BaseProductKey.ProductKey.Builder, io.opencannabis.schema.base.BaseProductKey.ProductKeyOrBuilder>( (io.opencannabis.schema.base.BaseProductKey.ProductKey) attachment_, getParentForChildren(), isClean()); attachment_ = null; } attachmentCase_ = 2; onChanged();; return productBuilder_; } /** *
       * Specify a partner as the subject parent of this media.
       * 
* * string partner = 3; */ public java.lang.String getPartner() { java.lang.Object ref = ""; if (attachmentCase_ == 3) { ref = attachment_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (attachmentCase_ == 3) { attachment_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
       * Specify a partner as the subject parent of this media.
       * 
* * string partner = 3; */ public com.google.protobuf.ByteString getPartnerBytes() { java.lang.Object ref = ""; if (attachmentCase_ == 3) { ref = attachment_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (attachmentCase_ == 3) { attachment_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Specify a partner as the subject parent of this media.
       * 
* * string partner = 3; */ public Builder setPartner( java.lang.String value) { if (value == null) { throw new NullPointerException(); } attachmentCase_ = 3; attachment_ = value; onChanged(); return this; } /** *
       * Specify a partner as the subject parent of this media.
       * 
* * string partner = 3; */ public Builder clearPartner() { if (attachmentCase_ == 3) { attachmentCase_ = 0; attachment_ = null; onChanged(); } return this; } /** *
       * Specify a partner as the subject parent of this media.
       * 
* * string partner = 3; */ public Builder setPartnerBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); attachmentCase_ = 3; attachment_ = value; onChanged(); return this; } /** *
       * Specify a partner and location as the subject parent of this media.
       * 
* * string location = 4; */ public java.lang.String getLocation() { java.lang.Object ref = ""; if (attachmentCase_ == 4) { ref = attachment_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (attachmentCase_ == 4) { attachment_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
       * Specify a partner and location as the subject parent of this media.
       * 
* * string location = 4; */ public com.google.protobuf.ByteString getLocationBytes() { java.lang.Object ref = ""; if (attachmentCase_ == 4) { ref = attachment_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (attachmentCase_ == 4) { attachment_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Specify a partner and location as the subject parent of this media.
       * 
* * string location = 4; */ public Builder setLocation( java.lang.String value) { if (value == null) { throw new NullPointerException(); } attachmentCase_ = 4; attachment_ = value; onChanged(); return this; } /** *
       * Specify a partner and location as the subject parent of this media.
       * 
* * string location = 4; */ public Builder clearLocation() { if (attachmentCase_ == 4) { attachmentCase_ = 0; attachment_ = null; onChanged(); } return this; } /** *
       * Specify a partner and location as the subject parent of this media.
       * 
* * string location = 4; */ public Builder setLocationBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); attachmentCase_ = 4; attachment_ = value; onChanged(); return this; } /** *
       * Specify this media as global. This is a special flag that should only be used internally.
       * 
* * bool global = 5; */ public boolean getGlobal() { if (attachmentCase_ == 5) { return (java.lang.Boolean) attachment_; } return false; } /** *
       * Specify this media as global. This is a special flag that should only be used internally.
       * 
* * bool global = 5; */ public Builder setGlobal(boolean value) { attachmentCase_ = 5; attachment_ = value; onChanged(); return this; } /** *
       * Specify this media as global. This is a special flag that should only be used internally.
       * 
* * bool global = 5; */ public Builder clearGlobal() { if (attachmentCase_ == 5) { attachmentCase_ = 0; attachment_ = null; 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:opencannabis.media.MediaSubject) } // @@protoc_insertion_point(class_scope:opencannabis.media.MediaSubject) private static final io.opencannabis.schema.media.AttachedMedia.MediaSubject DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opencannabis.schema.media.AttachedMedia.MediaSubject(); } public static io.opencannabis.schema.media.AttachedMedia.MediaSubject getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MediaSubject parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MediaSubject(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaSubject getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface MediaUploadOrBuilder extends // @@protoc_insertion_point(interface_extends:opencannabis.media.MediaUpload) com.google.protobuf.MessageOrBuilder { /** *
     * Unique token identifying this media upload operation. This token is provisioned when the upload operation begins,
     * and is used to track and later attach the resulting data.
     * 
* * string token = 1 [(.core.field) = { ... } */ java.lang.String getToken(); /** *
     * Unique token identifying this media upload operation. This token is provisioned when the upload operation begins,
     * and is used to track and later attach the resulting data.
     * 
* * string token = 1 [(.core.field) = { ... } */ com.google.protobuf.ByteString getTokenBytes(); /** *
     * Upload operation ID, provided by GCS upon initializing a resume-able upload operation.
     * 
* * string operation = 2 [(.core.field) = { ... } */ java.lang.String getOperation(); /** *
     * Upload operation ID, provided by GCS upon initializing a resume-able upload operation.
     * 
* * string operation = 2 [(.core.field) = { ... } */ com.google.protobuf.ByteString getOperationBytes(); /** *
     * Media item provided during this upload operation.
     * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ boolean hasMedia(); /** *
     * Media item provided during this upload operation.
     * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ io.opencannabis.schema.media.AttachedMedia.MediaItem getMedia(); /** *
     * Media item provided during this upload operation.
     * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder getMediaOrBuilder(); /** *
     * Mime-type for the file uploaded as part of this media operation. This should be known ahead of time.
     * 
* * string mime = 4 [(.core.field) = { ... } */ java.lang.String getMime(); /** *
     * Mime-type for the file uploaded as part of this media operation. This should be known ahead of time.
     * 
* * string mime = 4 [(.core.field) = { ... } */ com.google.protobuf.ByteString getMimeBytes(); /** *
     * Size, in bytes, of the item uploaded in this operation.
     * 
* * uint64 size = 5 [(.core.field) = { ... } */ long getSize(); /** *
     * Whether this upload operation has completed or not.
     * 
* * bool finished = 6 [(.core.field) = { ... } */ boolean getFinished(); /** *
     * MD5 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
     * integrity of uploaded data.
     * 
* * string md5 = 7 [(.core.field) = { ... } */ java.lang.String getMd5(); /** *
     * MD5 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
     * integrity of uploaded data.
     * 
* * string md5 = 7 [(.core.field) = { ... } */ com.google.protobuf.ByteString getMd5Bytes(); /** *
     * CRC32 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
     * integrity of uploaded data.
     * 
* * string crc32 = 8 [(.core.field) = { ... } */ java.lang.String getCrc32(); /** *
     * CRC32 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
     * integrity of uploaded data.
     * 
* * string crc32 = 8 [(.core.field) = { ... } */ com.google.protobuf.ByteString getCrc32Bytes(); /** *
     * User account that initiated this upload operation.
     * 
* * string owner = 9 [(.core.field) = { ... } */ java.lang.String getOwner(); /** *
     * User account that initiated this upload operation.
     * 
* * string owner = 9 [(.core.field) = { ... } */ com.google.protobuf.ByteString getOwnerBytes(); /** *
     * Path to the underlying file in GCS, without a bucket.
     * 
* * string path = 10 [(.core.field) = { ... } */ java.lang.String getPath(); /** *
     * Path to the underlying file in GCS, without a bucket.
     * 
* * string path = 10 [(.core.field) = { ... } */ com.google.protobuf.ByteString getPathBytes(); /** *
     * Parent upload, in cases where an upload is performed over an existing item (overwriting it).
     * 
* * string parent = 11 [(.core.field) = { ... } */ java.lang.String getParent(); /** *
     * Parent upload, in cases where an upload is performed over an existing item (overwriting it).
     * 
* * string parent = 11 [(.core.field) = { ... } */ com.google.protobuf.ByteString getParentBytes(); /** *
     * Timestamp for when this upload operation was created.
     * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ boolean hasCreated(); /** *
     * Timestamp for when this upload operation was created.
     * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ io.opencannabis.schema.temporal.TemporalInstant.Instant getCreated(); /** *
     * Timestamp for when this upload operation was created.
     * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getCreatedOrBuilder(); /** *
     * Timestamp for when this upload operation was completed.
     * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ boolean hasCompleted(); /** *
     * Timestamp for when this upload operation was completed.
     * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ io.opencannabis.schema.temporal.TemporalInstant.Instant getCompleted(); /** *
     * Timestamp for when this upload operation was completed.
     * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getCompletedOrBuilder(); } /** *
   * Describes a pending upload operation, which may be waiting for data to finish uploading to underlying storage before
   * the resulting record is attached to its subject owner (partner/location account, product, user, etc).
   * 
* * Protobuf type {@code opencannabis.media.MediaUpload} */ public static final class MediaUpload extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opencannabis.media.MediaUpload) MediaUploadOrBuilder { private static final long serialVersionUID = 0L; // Use MediaUpload.newBuilder() to construct. private MediaUpload(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MediaUpload() { token_ = ""; operation_ = ""; mime_ = ""; md5_ = ""; crc32_ = ""; owner_ = ""; path_ = ""; parent_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MediaUpload( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); token_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); operation_ = s; break; } case 26: { io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder subBuilder = null; if (media_ != null) { subBuilder = media_.toBuilder(); } media_ = input.readMessage(io.opencannabis.schema.media.AttachedMedia.MediaItem.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(media_); media_ = subBuilder.buildPartial(); } break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); mime_ = s; break; } case 40: { size_ = input.readUInt64(); break; } case 48: { finished_ = input.readBool(); break; } case 58: { java.lang.String s = input.readStringRequireUtf8(); md5_ = s; break; } case 66: { java.lang.String s = input.readStringRequireUtf8(); crc32_ = s; break; } case 74: { java.lang.String s = input.readStringRequireUtf8(); owner_ = s; break; } case 82: { java.lang.String s = input.readStringRequireUtf8(); path_ = s; break; } case 90: { java.lang.String s = input.readStringRequireUtf8(); parent_ = s; break; } case 162: { io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder subBuilder = null; if (created_ != null) { subBuilder = created_.toBuilder(); } created_ = input.readMessage(io.opencannabis.schema.temporal.TemporalInstant.Instant.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(created_); created_ = subBuilder.buildPartial(); } break; } case 170: { io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder subBuilder = null; if (completed_ != null) { subBuilder = completed_.toBuilder(); } completed_ = input.readMessage(io.opencannabis.schema.temporal.TemporalInstant.Instant.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(completed_); completed_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaUpload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaUpload_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.media.AttachedMedia.MediaUpload.class, io.opencannabis.schema.media.AttachedMedia.MediaUpload.Builder.class); } public static final int TOKEN_FIELD_NUMBER = 1; private volatile java.lang.Object token_; /** *
     * Unique token identifying this media upload operation. This token is provisioned when the upload operation begins,
     * and is used to track and later attach the resulting data.
     * 
* * string token = 1 [(.core.field) = { ... } */ public java.lang.String getToken() { java.lang.Object ref = token_; 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(); token_ = s; return s; } } /** *
     * Unique token identifying this media upload operation. This token is provisioned when the upload operation begins,
     * and is used to track and later attach the resulting data.
     * 
* * string token = 1 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getTokenBytes() { java.lang.Object ref = token_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); token_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int OPERATION_FIELD_NUMBER = 2; private volatile java.lang.Object operation_; /** *
     * Upload operation ID, provided by GCS upon initializing a resume-able upload operation.
     * 
* * string operation = 2 [(.core.field) = { ... } */ public java.lang.String getOperation() { java.lang.Object ref = operation_; 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(); operation_ = s; return s; } } /** *
     * Upload operation ID, provided by GCS upon initializing a resume-able upload operation.
     * 
* * string operation = 2 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getOperationBytes() { java.lang.Object ref = operation_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); operation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int MEDIA_FIELD_NUMBER = 3; private io.opencannabis.schema.media.AttachedMedia.MediaItem media_; /** *
     * Media item provided during this upload operation.
     * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ public boolean hasMedia() { return media_ != null; } /** *
     * Media item provided during this upload operation.
     * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ public io.opencannabis.schema.media.AttachedMedia.MediaItem getMedia() { return media_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : media_; } /** *
     * Media item provided during this upload operation.
     * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ public io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder getMediaOrBuilder() { return getMedia(); } public static final int MIME_FIELD_NUMBER = 4; private volatile java.lang.Object mime_; /** *
     * Mime-type for the file uploaded as part of this media operation. This should be known ahead of time.
     * 
* * string mime = 4 [(.core.field) = { ... } */ public java.lang.String getMime() { java.lang.Object ref = mime_; 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(); mime_ = s; return s; } } /** *
     * Mime-type for the file uploaded as part of this media operation. This should be known ahead of time.
     * 
* * string mime = 4 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getMimeBytes() { java.lang.Object ref = mime_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); mime_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SIZE_FIELD_NUMBER = 5; private long size_; /** *
     * Size, in bytes, of the item uploaded in this operation.
     * 
* * uint64 size = 5 [(.core.field) = { ... } */ public long getSize() { return size_; } public static final int FINISHED_FIELD_NUMBER = 6; private boolean finished_; /** *
     * Whether this upload operation has completed or not.
     * 
* * bool finished = 6 [(.core.field) = { ... } */ public boolean getFinished() { return finished_; } public static final int MD5_FIELD_NUMBER = 7; private volatile java.lang.Object md5_; /** *
     * MD5 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
     * integrity of uploaded data.
     * 
* * string md5 = 7 [(.core.field) = { ... } */ public java.lang.String getMd5() { java.lang.Object ref = md5_; 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(); md5_ = s; return s; } } /** *
     * MD5 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
     * integrity of uploaded data.
     * 
* * string md5 = 7 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getMd5Bytes() { java.lang.Object ref = md5_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); md5_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CRC32_FIELD_NUMBER = 8; private volatile java.lang.Object crc32_; /** *
     * CRC32 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
     * integrity of uploaded data.
     * 
* * string crc32 = 8 [(.core.field) = { ... } */ public java.lang.String getCrc32() { java.lang.Object ref = crc32_; 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(); crc32_ = s; return s; } } /** *
     * CRC32 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
     * integrity of uploaded data.
     * 
* * string crc32 = 8 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getCrc32Bytes() { java.lang.Object ref = crc32_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); crc32_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int OWNER_FIELD_NUMBER = 9; private volatile java.lang.Object owner_; /** *
     * User account that initiated this upload operation.
     * 
* * string owner = 9 [(.core.field) = { ... } */ public java.lang.String getOwner() { java.lang.Object ref = owner_; 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(); owner_ = s; return s; } } /** *
     * User account that initiated this upload operation.
     * 
* * string owner = 9 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getOwnerBytes() { java.lang.Object ref = owner_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); owner_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PATH_FIELD_NUMBER = 10; private volatile java.lang.Object path_; /** *
     * Path to the underlying file in GCS, without a bucket.
     * 
* * string path = 10 [(.core.field) = { ... } */ public java.lang.String getPath() { java.lang.Object ref = path_; 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(); path_ = s; return s; } } /** *
     * Path to the underlying file in GCS, without a bucket.
     * 
* * string path = 10 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getPathBytes() { java.lang.Object ref = path_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); path_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PARENT_FIELD_NUMBER = 11; private volatile java.lang.Object parent_; /** *
     * Parent upload, in cases where an upload is performed over an existing item (overwriting it).
     * 
* * string parent = 11 [(.core.field) = { ... } */ public java.lang.String getParent() { java.lang.Object ref = parent_; 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(); parent_ = s; return s; } } /** *
     * Parent upload, in cases where an upload is performed over an existing item (overwriting it).
     * 
* * string parent = 11 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); parent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CREATED_FIELD_NUMBER = 20; private io.opencannabis.schema.temporal.TemporalInstant.Instant created_; /** *
     * Timestamp for when this upload operation was created.
     * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ public boolean hasCreated() { return created_ != null; } /** *
     * Timestamp for when this upload operation was created.
     * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant getCreated() { return created_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : created_; } /** *
     * Timestamp for when this upload operation was created.
     * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getCreatedOrBuilder() { return getCreated(); } public static final int COMPLETED_FIELD_NUMBER = 21; private io.opencannabis.schema.temporal.TemporalInstant.Instant completed_; /** *
     * Timestamp for when this upload operation was completed.
     * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ public boolean hasCompleted() { return completed_ != null; } /** *
     * Timestamp for when this upload operation was completed.
     * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant getCompleted() { return completed_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : completed_; } /** *
     * Timestamp for when this upload operation was completed.
     * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getCompletedOrBuilder() { return getCompleted(); } 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 (!getTokenBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_); } if (!getOperationBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, operation_); } if (media_ != null) { output.writeMessage(3, getMedia()); } if (!getMimeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mime_); } if (size_ != 0L) { output.writeUInt64(5, size_); } if (finished_ != false) { output.writeBool(6, finished_); } if (!getMd5Bytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, md5_); } if (!getCrc32Bytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 8, crc32_); } if (!getOwnerBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, owner_); } if (!getPathBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, path_); } if (!getParentBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, parent_); } if (created_ != null) { output.writeMessage(20, getCreated()); } if (completed_ != null) { output.writeMessage(21, getCompleted()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getTokenBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_); } if (!getOperationBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, operation_); } if (media_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getMedia()); } if (!getMimeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mime_); } if (size_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(5, size_); } if (finished_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(6, finished_); } if (!getMd5Bytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, md5_); } if (!getCrc32Bytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, crc32_); } if (!getOwnerBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, owner_); } if (!getPathBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, path_); } if (!getParentBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, parent_); } if (created_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(20, getCreated()); } if (completed_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(21, getCompleted()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.opencannabis.schema.media.AttachedMedia.MediaUpload)) { return super.equals(obj); } io.opencannabis.schema.media.AttachedMedia.MediaUpload other = (io.opencannabis.schema.media.AttachedMedia.MediaUpload) obj; if (!getToken() .equals(other.getToken())) return false; if (!getOperation() .equals(other.getOperation())) return false; if (hasMedia() != other.hasMedia()) return false; if (hasMedia()) { if (!getMedia() .equals(other.getMedia())) return false; } if (!getMime() .equals(other.getMime())) return false; if (getSize() != other.getSize()) return false; if (getFinished() != other.getFinished()) return false; if (!getMd5() .equals(other.getMd5())) return false; if (!getCrc32() .equals(other.getCrc32())) return false; if (!getOwner() .equals(other.getOwner())) return false; if (!getPath() .equals(other.getPath())) return false; if (!getParent() .equals(other.getParent())) return false; if (hasCreated() != other.hasCreated()) return false; if (hasCreated()) { if (!getCreated() .equals(other.getCreated())) return false; } if (hasCompleted() != other.hasCompleted()) return false; if (hasCompleted()) { if (!getCompleted() .equals(other.getCompleted())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + TOKEN_FIELD_NUMBER; hash = (53 * hash) + getToken().hashCode(); hash = (37 * hash) + OPERATION_FIELD_NUMBER; hash = (53 * hash) + getOperation().hashCode(); if (hasMedia()) { hash = (37 * hash) + MEDIA_FIELD_NUMBER; hash = (53 * hash) + getMedia().hashCode(); } hash = (37 * hash) + MIME_FIELD_NUMBER; hash = (53 * hash) + getMime().hashCode(); hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getSize()); hash = (37 * hash) + FINISHED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getFinished()); hash = (37 * hash) + MD5_FIELD_NUMBER; hash = (53 * hash) + getMd5().hashCode(); hash = (37 * hash) + CRC32_FIELD_NUMBER; hash = (53 * hash) + getCrc32().hashCode(); hash = (37 * hash) + OWNER_FIELD_NUMBER; hash = (53 * hash) + getOwner().hashCode(); hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); hash = (37 * hash) + PARENT_FIELD_NUMBER; hash = (53 * hash) + getParent().hashCode(); if (hasCreated()) { hash = (37 * hash) + CREATED_FIELD_NUMBER; hash = (53 * hash) + getCreated().hashCode(); } if (hasCompleted()) { hash = (37 * hash) + COMPLETED_FIELD_NUMBER; hash = (53 * hash) + getCompleted().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opencannabis.schema.media.AttachedMedia.MediaUpload parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.media.AttachedMedia.MediaUpload parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.media.AttachedMedia.MediaUpload parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.media.AttachedMedia.MediaUpload parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.media.AttachedMedia.MediaUpload parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.media.AttachedMedia.MediaUpload parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.media.AttachedMedia.MediaUpload parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.media.AttachedMedia.MediaUpload 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 io.opencannabis.schema.media.AttachedMedia.MediaUpload parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opencannabis.schema.media.AttachedMedia.MediaUpload 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 io.opencannabis.schema.media.AttachedMedia.MediaUpload parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.media.AttachedMedia.MediaUpload 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(io.opencannabis.schema.media.AttachedMedia.MediaUpload 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; } /** *
     * Describes a pending upload operation, which may be waiting for data to finish uploading to underlying storage before
     * the resulting record is attached to its subject owner (partner/location account, product, user, etc).
     * 
* * Protobuf type {@code opencannabis.media.MediaUpload} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opencannabis.media.MediaUpload) io.opencannabis.schema.media.AttachedMedia.MediaUploadOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaUpload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaUpload_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.media.AttachedMedia.MediaUpload.class, io.opencannabis.schema.media.AttachedMedia.MediaUpload.Builder.class); } // Construct using io.opencannabis.schema.media.AttachedMedia.MediaUpload.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); token_ = ""; operation_ = ""; if (mediaBuilder_ == null) { media_ = null; } else { media_ = null; mediaBuilder_ = null; } mime_ = ""; size_ = 0L; finished_ = false; md5_ = ""; crc32_ = ""; owner_ = ""; path_ = ""; parent_ = ""; if (createdBuilder_ == null) { created_ = null; } else { created_ = null; createdBuilder_ = null; } if (completedBuilder_ == null) { completed_ = null; } else { completed_ = null; completedBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaUpload_descriptor; } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaUpload getDefaultInstanceForType() { return io.opencannabis.schema.media.AttachedMedia.MediaUpload.getDefaultInstance(); } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaUpload build() { io.opencannabis.schema.media.AttachedMedia.MediaUpload result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaUpload buildPartial() { io.opencannabis.schema.media.AttachedMedia.MediaUpload result = new io.opencannabis.schema.media.AttachedMedia.MediaUpload(this); result.token_ = token_; result.operation_ = operation_; if (mediaBuilder_ == null) { result.media_ = media_; } else { result.media_ = mediaBuilder_.build(); } result.mime_ = mime_; result.size_ = size_; result.finished_ = finished_; result.md5_ = md5_; result.crc32_ = crc32_; result.owner_ = owner_; result.path_ = path_; result.parent_ = parent_; if (createdBuilder_ == null) { result.created_ = created_; } else { result.created_ = createdBuilder_.build(); } if (completedBuilder_ == null) { result.completed_ = completed_; } else { result.completed_ = completedBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.opencannabis.schema.media.AttachedMedia.MediaUpload) { return mergeFrom((io.opencannabis.schema.media.AttachedMedia.MediaUpload)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opencannabis.schema.media.AttachedMedia.MediaUpload other) { if (other == io.opencannabis.schema.media.AttachedMedia.MediaUpload.getDefaultInstance()) return this; if (!other.getToken().isEmpty()) { token_ = other.token_; onChanged(); } if (!other.getOperation().isEmpty()) { operation_ = other.operation_; onChanged(); } if (other.hasMedia()) { mergeMedia(other.getMedia()); } if (!other.getMime().isEmpty()) { mime_ = other.mime_; onChanged(); } if (other.getSize() != 0L) { setSize(other.getSize()); } if (other.getFinished() != false) { setFinished(other.getFinished()); } if (!other.getMd5().isEmpty()) { md5_ = other.md5_; onChanged(); } if (!other.getCrc32().isEmpty()) { crc32_ = other.crc32_; onChanged(); } if (!other.getOwner().isEmpty()) { owner_ = other.owner_; onChanged(); } if (!other.getPath().isEmpty()) { path_ = other.path_; onChanged(); } if (!other.getParent().isEmpty()) { parent_ = other.parent_; onChanged(); } if (other.hasCreated()) { mergeCreated(other.getCreated()); } if (other.hasCompleted()) { mergeCompleted(other.getCompleted()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.opencannabis.schema.media.AttachedMedia.MediaUpload parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opencannabis.schema.media.AttachedMedia.MediaUpload) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object token_ = ""; /** *
       * Unique token identifying this media upload operation. This token is provisioned when the upload operation begins,
       * and is used to track and later attach the resulting data.
       * 
* * string token = 1 [(.core.field) = { ... } */ public java.lang.String getToken() { java.lang.Object ref = token_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); token_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Unique token identifying this media upload operation. This token is provisioned when the upload operation begins,
       * and is used to track and later attach the resulting data.
       * 
* * string token = 1 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getTokenBytes() { java.lang.Object ref = token_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); token_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Unique token identifying this media upload operation. This token is provisioned when the upload operation begins,
       * and is used to track and later attach the resulting data.
       * 
* * string token = 1 [(.core.field) = { ... } */ public Builder setToken( java.lang.String value) { if (value == null) { throw new NullPointerException(); } token_ = value; onChanged(); return this; } /** *
       * Unique token identifying this media upload operation. This token is provisioned when the upload operation begins,
       * and is used to track and later attach the resulting data.
       * 
* * string token = 1 [(.core.field) = { ... } */ public Builder clearToken() { token_ = getDefaultInstance().getToken(); onChanged(); return this; } /** *
       * Unique token identifying this media upload operation. This token is provisioned when the upload operation begins,
       * and is used to track and later attach the resulting data.
       * 
* * string token = 1 [(.core.field) = { ... } */ public Builder setTokenBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); token_ = value; onChanged(); return this; } private java.lang.Object operation_ = ""; /** *
       * Upload operation ID, provided by GCS upon initializing a resume-able upload operation.
       * 
* * string operation = 2 [(.core.field) = { ... } */ public java.lang.String getOperation() { java.lang.Object ref = operation_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); operation_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Upload operation ID, provided by GCS upon initializing a resume-able upload operation.
       * 
* * string operation = 2 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getOperationBytes() { java.lang.Object ref = operation_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); operation_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Upload operation ID, provided by GCS upon initializing a resume-able upload operation.
       * 
* * string operation = 2 [(.core.field) = { ... } */ public Builder setOperation( java.lang.String value) { if (value == null) { throw new NullPointerException(); } operation_ = value; onChanged(); return this; } /** *
       * Upload operation ID, provided by GCS upon initializing a resume-able upload operation.
       * 
* * string operation = 2 [(.core.field) = { ... } */ public Builder clearOperation() { operation_ = getDefaultInstance().getOperation(); onChanged(); return this; } /** *
       * Upload operation ID, provided by GCS upon initializing a resume-able upload operation.
       * 
* * string operation = 2 [(.core.field) = { ... } */ public Builder setOperationBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); operation_ = value; onChanged(); return this; } private io.opencannabis.schema.media.AttachedMedia.MediaItem media_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder> mediaBuilder_; /** *
       * Media item provided during this upload operation.
       * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ public boolean hasMedia() { return mediaBuilder_ != null || media_ != null; } /** *
       * Media item provided during this upload operation.
       * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ public io.opencannabis.schema.media.AttachedMedia.MediaItem getMedia() { if (mediaBuilder_ == null) { return media_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : media_; } else { return mediaBuilder_.getMessage(); } } /** *
       * Media item provided during this upload operation.
       * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ public Builder setMedia(io.opencannabis.schema.media.AttachedMedia.MediaItem value) { if (mediaBuilder_ == null) { if (value == null) { throw new NullPointerException(); } media_ = value; onChanged(); } else { mediaBuilder_.setMessage(value); } return this; } /** *
       * Media item provided during this upload operation.
       * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ public Builder setMedia( io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder builderForValue) { if (mediaBuilder_ == null) { media_ = builderForValue.build(); onChanged(); } else { mediaBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Media item provided during this upload operation.
       * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ public Builder mergeMedia(io.opencannabis.schema.media.AttachedMedia.MediaItem value) { if (mediaBuilder_ == null) { if (media_ != null) { media_ = io.opencannabis.schema.media.AttachedMedia.MediaItem.newBuilder(media_).mergeFrom(value).buildPartial(); } else { media_ = value; } onChanged(); } else { mediaBuilder_.mergeFrom(value); } return this; } /** *
       * Media item provided during this upload operation.
       * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ public Builder clearMedia() { if (mediaBuilder_ == null) { media_ = null; onChanged(); } else { media_ = null; mediaBuilder_ = null; } return this; } /** *
       * Media item provided during this upload operation.
       * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ public io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder getMediaBuilder() { onChanged(); return getMediaFieldBuilder().getBuilder(); } /** *
       * Media item provided during this upload operation.
       * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ public io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder getMediaOrBuilder() { if (mediaBuilder_ != null) { return mediaBuilder_.getMessageOrBuilder(); } else { return media_ == null ? io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance() : media_; } } /** *
       * Media item provided during this upload operation.
       * 
* * .opencannabis.media.MediaItem media = 3 [(.core.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder> getMediaFieldBuilder() { if (mediaBuilder_ == null) { mediaBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.AttachedMedia.MediaItem, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder, io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder>( getMedia(), getParentForChildren(), isClean()); media_ = null; } return mediaBuilder_; } private java.lang.Object mime_ = ""; /** *
       * Mime-type for the file uploaded as part of this media operation. This should be known ahead of time.
       * 
* * string mime = 4 [(.core.field) = { ... } */ public java.lang.String getMime() { java.lang.Object ref = mime_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); mime_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Mime-type for the file uploaded as part of this media operation. This should be known ahead of time.
       * 
* * string mime = 4 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getMimeBytes() { java.lang.Object ref = mime_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); mime_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Mime-type for the file uploaded as part of this media operation. This should be known ahead of time.
       * 
* * string mime = 4 [(.core.field) = { ... } */ public Builder setMime( java.lang.String value) { if (value == null) { throw new NullPointerException(); } mime_ = value; onChanged(); return this; } /** *
       * Mime-type for the file uploaded as part of this media operation. This should be known ahead of time.
       * 
* * string mime = 4 [(.core.field) = { ... } */ public Builder clearMime() { mime_ = getDefaultInstance().getMime(); onChanged(); return this; } /** *
       * Mime-type for the file uploaded as part of this media operation. This should be known ahead of time.
       * 
* * string mime = 4 [(.core.field) = { ... } */ public Builder setMimeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); mime_ = value; onChanged(); return this; } private long size_ ; /** *
       * Size, in bytes, of the item uploaded in this operation.
       * 
* * uint64 size = 5 [(.core.field) = { ... } */ public long getSize() { return size_; } /** *
       * Size, in bytes, of the item uploaded in this operation.
       * 
* * uint64 size = 5 [(.core.field) = { ... } */ public Builder setSize(long value) { size_ = value; onChanged(); return this; } /** *
       * Size, in bytes, of the item uploaded in this operation.
       * 
* * uint64 size = 5 [(.core.field) = { ... } */ public Builder clearSize() { size_ = 0L; onChanged(); return this; } private boolean finished_ ; /** *
       * Whether this upload operation has completed or not.
       * 
* * bool finished = 6 [(.core.field) = { ... } */ public boolean getFinished() { return finished_; } /** *
       * Whether this upload operation has completed or not.
       * 
* * bool finished = 6 [(.core.field) = { ... } */ public Builder setFinished(boolean value) { finished_ = value; onChanged(); return this; } /** *
       * Whether this upload operation has completed or not.
       * 
* * bool finished = 6 [(.core.field) = { ... } */ public Builder clearFinished() { finished_ = false; onChanged(); return this; } private java.lang.Object md5_ = ""; /** *
       * MD5 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
       * integrity of uploaded data.
       * 
* * string md5 = 7 [(.core.field) = { ... } */ public java.lang.String getMd5() { java.lang.Object ref = md5_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); md5_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * MD5 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
       * integrity of uploaded data.
       * 
* * string md5 = 7 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getMd5Bytes() { java.lang.Object ref = md5_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); md5_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * MD5 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
       * integrity of uploaded data.
       * 
* * string md5 = 7 [(.core.field) = { ... } */ public Builder setMd5( java.lang.String value) { if (value == null) { throw new NullPointerException(); } md5_ = value; onChanged(); return this; } /** *
       * MD5 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
       * integrity of uploaded data.
       * 
* * string md5 = 7 [(.core.field) = { ... } */ public Builder clearMd5() { md5_ = getDefaultInstance().getMd5(); onChanged(); return this; } /** *
       * MD5 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
       * integrity of uploaded data.
       * 
* * string md5 = 7 [(.core.field) = { ... } */ public Builder setMd5Bytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); md5_ = value; onChanged(); return this; } private java.lang.Object crc32_ = ""; /** *
       * CRC32 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
       * integrity of uploaded data.
       * 
* * string crc32 = 8 [(.core.field) = { ... } */ public java.lang.String getCrc32() { java.lang.Object ref = crc32_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); crc32_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * CRC32 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
       * integrity of uploaded data.
       * 
* * string crc32 = 8 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getCrc32Bytes() { java.lang.Object ref = crc32_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); crc32_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * CRC32 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
       * integrity of uploaded data.
       * 
* * string crc32 = 8 [(.core.field) = { ... } */ public Builder setCrc32( java.lang.String value) { if (value == null) { throw new NullPointerException(); } crc32_ = value; onChanged(); return this; } /** *
       * CRC32 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
       * integrity of uploaded data.
       * 
* * string crc32 = 8 [(.core.field) = { ... } */ public Builder clearCrc32() { crc32_ = getDefaultInstance().getCrc32(); onChanged(); return this; } /** *
       * CRC32 hash for the data uploaded. Usually filled in afterwards but may be specified before the upload to check
       * integrity of uploaded data.
       * 
* * string crc32 = 8 [(.core.field) = { ... } */ public Builder setCrc32Bytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); crc32_ = value; onChanged(); return this; } private java.lang.Object owner_ = ""; /** *
       * User account that initiated this upload operation.
       * 
* * string owner = 9 [(.core.field) = { ... } */ public java.lang.String getOwner() { java.lang.Object ref = owner_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); owner_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * User account that initiated this upload operation.
       * 
* * string owner = 9 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getOwnerBytes() { java.lang.Object ref = owner_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); owner_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * User account that initiated this upload operation.
       * 
* * string owner = 9 [(.core.field) = { ... } */ public Builder setOwner( java.lang.String value) { if (value == null) { throw new NullPointerException(); } owner_ = value; onChanged(); return this; } /** *
       * User account that initiated this upload operation.
       * 
* * string owner = 9 [(.core.field) = { ... } */ public Builder clearOwner() { owner_ = getDefaultInstance().getOwner(); onChanged(); return this; } /** *
       * User account that initiated this upload operation.
       * 
* * string owner = 9 [(.core.field) = { ... } */ public Builder setOwnerBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); owner_ = value; onChanged(); return this; } private java.lang.Object path_ = ""; /** *
       * Path to the underlying file in GCS, without a bucket.
       * 
* * string path = 10 [(.core.field) = { ... } */ public java.lang.String getPath() { java.lang.Object ref = path_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); path_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Path to the underlying file in GCS, without a bucket.
       * 
* * string path = 10 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getPathBytes() { java.lang.Object ref = path_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); path_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Path to the underlying file in GCS, without a bucket.
       * 
* * string path = 10 [(.core.field) = { ... } */ public Builder setPath( java.lang.String value) { if (value == null) { throw new NullPointerException(); } path_ = value; onChanged(); return this; } /** *
       * Path to the underlying file in GCS, without a bucket.
       * 
* * string path = 10 [(.core.field) = { ... } */ public Builder clearPath() { path_ = getDefaultInstance().getPath(); onChanged(); return this; } /** *
       * Path to the underlying file in GCS, without a bucket.
       * 
* * string path = 10 [(.core.field) = { ... } */ public Builder setPathBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); path_ = value; onChanged(); return this; } private java.lang.Object parent_ = ""; /** *
       * Parent upload, in cases where an upload is performed over an existing item (overwriting it).
       * 
* * string parent = 11 [(.core.field) = { ... } */ public java.lang.String getParent() { java.lang.Object ref = parent_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); parent_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Parent upload, in cases where an upload is performed over an existing item (overwriting it).
       * 
* * string parent = 11 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getParentBytes() { java.lang.Object ref = parent_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); parent_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Parent upload, in cases where an upload is performed over an existing item (overwriting it).
       * 
* * string parent = 11 [(.core.field) = { ... } */ public Builder setParent( java.lang.String value) { if (value == null) { throw new NullPointerException(); } parent_ = value; onChanged(); return this; } /** *
       * Parent upload, in cases where an upload is performed over an existing item (overwriting it).
       * 
* * string parent = 11 [(.core.field) = { ... } */ public Builder clearParent() { parent_ = getDefaultInstance().getParent(); onChanged(); return this; } /** *
       * Parent upload, in cases where an upload is performed over an existing item (overwriting it).
       * 
* * string parent = 11 [(.core.field) = { ... } */ public Builder setParentBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); parent_ = value; onChanged(); return this; } private io.opencannabis.schema.temporal.TemporalInstant.Instant created_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> createdBuilder_; /** *
       * Timestamp for when this upload operation was created.
       * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ public boolean hasCreated() { return createdBuilder_ != null || created_ != null; } /** *
       * Timestamp for when this upload operation was created.
       * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant getCreated() { if (createdBuilder_ == null) { return created_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : created_; } else { return createdBuilder_.getMessage(); } } /** *
       * Timestamp for when this upload operation was created.
       * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ public Builder setCreated(io.opencannabis.schema.temporal.TemporalInstant.Instant value) { if (createdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } created_ = value; onChanged(); } else { createdBuilder_.setMessage(value); } return this; } /** *
       * Timestamp for when this upload operation was created.
       * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ public Builder setCreated( io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder builderForValue) { if (createdBuilder_ == null) { created_ = builderForValue.build(); onChanged(); } else { createdBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Timestamp for when this upload operation was created.
       * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ public Builder mergeCreated(io.opencannabis.schema.temporal.TemporalInstant.Instant value) { if (createdBuilder_ == null) { if (created_ != null) { created_ = io.opencannabis.schema.temporal.TemporalInstant.Instant.newBuilder(created_).mergeFrom(value).buildPartial(); } else { created_ = value; } onChanged(); } else { createdBuilder_.mergeFrom(value); } return this; } /** *
       * Timestamp for when this upload operation was created.
       * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ public Builder clearCreated() { if (createdBuilder_ == null) { created_ = null; onChanged(); } else { created_ = null; createdBuilder_ = null; } return this; } /** *
       * Timestamp for when this upload operation was created.
       * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder getCreatedBuilder() { onChanged(); return getCreatedFieldBuilder().getBuilder(); } /** *
       * Timestamp for when this upload operation was created.
       * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getCreatedOrBuilder() { if (createdBuilder_ != null) { return createdBuilder_.getMessageOrBuilder(); } else { return created_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : created_; } } /** *
       * Timestamp for when this upload operation was created.
       * 
* * .opencannabis.temporal.Instant created = 20 [(.core.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> getCreatedFieldBuilder() { if (createdBuilder_ == null) { createdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>( getCreated(), getParentForChildren(), isClean()); created_ = null; } return createdBuilder_; } private io.opencannabis.schema.temporal.TemporalInstant.Instant completed_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> completedBuilder_; /** *
       * Timestamp for when this upload operation was completed.
       * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ public boolean hasCompleted() { return completedBuilder_ != null || completed_ != null; } /** *
       * Timestamp for when this upload operation was completed.
       * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant getCompleted() { if (completedBuilder_ == null) { return completed_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : completed_; } else { return completedBuilder_.getMessage(); } } /** *
       * Timestamp for when this upload operation was completed.
       * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ public Builder setCompleted(io.opencannabis.schema.temporal.TemporalInstant.Instant value) { if (completedBuilder_ == null) { if (value == null) { throw new NullPointerException(); } completed_ = value; onChanged(); } else { completedBuilder_.setMessage(value); } return this; } /** *
       * Timestamp for when this upload operation was completed.
       * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ public Builder setCompleted( io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder builderForValue) { if (completedBuilder_ == null) { completed_ = builderForValue.build(); onChanged(); } else { completedBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Timestamp for when this upload operation was completed.
       * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ public Builder mergeCompleted(io.opencannabis.schema.temporal.TemporalInstant.Instant value) { if (completedBuilder_ == null) { if (completed_ != null) { completed_ = io.opencannabis.schema.temporal.TemporalInstant.Instant.newBuilder(completed_).mergeFrom(value).buildPartial(); } else { completed_ = value; } onChanged(); } else { completedBuilder_.mergeFrom(value); } return this; } /** *
       * Timestamp for when this upload operation was completed.
       * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ public Builder clearCompleted() { if (completedBuilder_ == null) { completed_ = null; onChanged(); } else { completed_ = null; completedBuilder_ = null; } return this; } /** *
       * Timestamp for when this upload operation was completed.
       * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder getCompletedBuilder() { onChanged(); return getCompletedFieldBuilder().getBuilder(); } /** *
       * Timestamp for when this upload operation was completed.
       * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getCompletedOrBuilder() { if (completedBuilder_ != null) { return completedBuilder_.getMessageOrBuilder(); } else { return completed_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : completed_; } } /** *
       * Timestamp for when this upload operation was completed.
       * 
* * .opencannabis.temporal.Instant completed = 21 [(.core.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> getCompletedFieldBuilder() { if (completedBuilder_ == null) { completedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>( getCompleted(), getParentForChildren(), isClean()); completed_ = null; } return completedBuilder_; } @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:opencannabis.media.MediaUpload) } // @@protoc_insertion_point(class_scope:opencannabis.media.MediaUpload) private static final io.opencannabis.schema.media.AttachedMedia.MediaUpload DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opencannabis.schema.media.AttachedMedia.MediaUpload(); } public static io.opencannabis.schema.media.AttachedMedia.MediaUpload getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MediaUpload parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MediaUpload(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaUpload getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface MediaItemOrBuilder extends // @@protoc_insertion_point(interface_extends:opencannabis.media.MediaItem) com.google.protobuf.MessageOrBuilder { /** *
     * Key uniquely identifying this media item.
     * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ boolean hasKey(); /** *
     * Key uniquely identifying this media item.
     * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ io.opencannabis.schema.media.MediaItemKey.MediaKey getKey(); /** *
     * Key uniquely identifying this media item.
     * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ io.opencannabis.schema.media.MediaItemKey.MediaKeyOrBuilder getKeyOrBuilder(); /** * .opencannabis.media.MediaStatus status = 2 [(.core.field) = { ... } */ int getStatusValue(); /** * .opencannabis.media.MediaStatus status = 2 [(.core.field) = { ... } */ io.opencannabis.schema.media.AttachedMedia.MediaStatus getStatus(); /** *
     * Type of media this is describing.
     * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ boolean hasType(); /** *
     * Type of media this is describing.
     * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ io.opencannabis.schema.media.MediaItemType.MediaType getType(); /** *
     * Type of media this is describing.
     * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ io.opencannabis.schema.media.MediaItemType.MediaTypeOrBuilder getTypeOrBuilder(); /** *
     * Friendly name for this media.
     * 
* * string name = 4 [(.core.field) = { ... } */ java.lang.String getName(); /** *
     * Friendly name for this media.
     * 
* * string name = 4 [(.core.field) = { ... } */ com.google.protobuf.ByteString getNameBytes(); /** *
     * Origin URI to this media.
     * 
* * string uri = 5 [(.core.field) = { ... } */ java.lang.String getUri(); /** *
     * Origin URI to this media.
     * 
* * string uri = 5 [(.core.field) = { ... } */ com.google.protobuf.ByteString getUriBytes(); /** *
     * Serving URI for this media, if it differs from the origin URI.
     * 
* * string serving_uri = 6 [(.core.field) = { ... } */ java.lang.String getServingUri(); /** *
     * Serving URI for this media, if it differs from the origin URI.
     * 
* * string serving_uri = 6 [(.core.field) = { ... } */ com.google.protobuf.ByteString getServingUriBytes(); /** *
     * Privacy setting for this media item. Defaults to location-wide access.
     * 
* * .opencannabis.media.MediaPrivacy privacy = 7 [(.core.field) = { ... } */ int getPrivacyValue(); /** *
     * Privacy setting for this media item. Defaults to location-wide access.
     * 
* * .opencannabis.media.MediaPrivacy privacy = 7 [(.core.field) = { ... } */ io.opencannabis.schema.media.AttachedMedia.MediaPrivacy getPrivacy(); /** *
     * Timestamp for when this record was created.
     * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ boolean hasCreated(); /** *
     * Timestamp for when this record was created.
     * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ io.opencannabis.schema.temporal.TemporalInstant.Instant getCreated(); /** *
     * Timestamp for when this record was created.
     * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getCreatedOrBuilder(); /** *
     * Timestamp for when this record was last modified.
     * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ boolean hasModified(); /** *
     * Timestamp for when this record was last modified.
     * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ io.opencannabis.schema.temporal.TemporalInstant.Instant getModified(); /** *
     * Timestamp for when this record was last modified.
     * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getModifiedOrBuilder(); /** *
     * Timestamp for when this media item was originally published.
     * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ boolean hasPublished(); /** *
     * Timestamp for when this media item was originally published.
     * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ io.opencannabis.schema.temporal.TemporalInstant.Instant getPublished(); /** *
     * Timestamp for when this media item was originally published.
     * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getPublishedOrBuilder(); /** *
     * Ownership scope for this media item.
     * 
* * string scope = 11 [(.core.field) = { ... } */ java.lang.String getScope(); /** *
     * Ownership scope for this media item.
     * 
* * string scope = 11 [(.core.field) = { ... } */ com.google.protobuf.ByteString getScopeBytes(); /** *
     * Most recent upload token for this media item.
     * 
* * string token = 12 [(.core.field) = { ... } */ java.lang.String getToken(); /** *
     * Most recent upload token for this media item.
     * 
* * string token = 12 [(.core.field) = { ... } */ com.google.protobuf.ByteString getTokenBytes(); } /** *
   * Describes an individual media item, which can be an image, video, etc. Media at its most basic is simply binary blob
   * data persisted in GCS and tracked with a corresponding DB record. Document types (like PDF, HTML, TXT) are all
   * supported in addition to traditional rich media (images, video, sound).
   * 
* * Protobuf type {@code opencannabis.media.MediaItem} */ public static final class MediaItem extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opencannabis.media.MediaItem) MediaItemOrBuilder { private static final long serialVersionUID = 0L; // Use MediaItem.newBuilder() to construct. private MediaItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MediaItem() { status_ = 0; name_ = ""; uri_ = ""; servingUri_ = ""; privacy_ = 0; scope_ = ""; token_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MediaItem( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { io.opencannabis.schema.media.MediaItemKey.MediaKey.Builder subBuilder = null; if (key_ != null) { subBuilder = key_.toBuilder(); } key_ = input.readMessage(io.opencannabis.schema.media.MediaItemKey.MediaKey.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(key_); key_ = subBuilder.buildPartial(); } break; } case 16: { int rawValue = input.readEnum(); status_ = rawValue; break; } case 26: { io.opencannabis.schema.media.MediaItemType.MediaType.Builder subBuilder = null; if (type_ != null) { subBuilder = type_.toBuilder(); } type_ = input.readMessage(io.opencannabis.schema.media.MediaItemType.MediaType.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(type_); type_ = subBuilder.buildPartial(); } break; } case 34: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 42: { java.lang.String s = input.readStringRequireUtf8(); uri_ = s; break; } case 50: { java.lang.String s = input.readStringRequireUtf8(); servingUri_ = s; break; } case 56: { int rawValue = input.readEnum(); privacy_ = rawValue; break; } case 66: { io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder subBuilder = null; if (created_ != null) { subBuilder = created_.toBuilder(); } created_ = input.readMessage(io.opencannabis.schema.temporal.TemporalInstant.Instant.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(created_); created_ = subBuilder.buildPartial(); } break; } case 74: { io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder subBuilder = null; if (modified_ != null) { subBuilder = modified_.toBuilder(); } modified_ = input.readMessage(io.opencannabis.schema.temporal.TemporalInstant.Instant.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(modified_); modified_ = subBuilder.buildPartial(); } break; } case 82: { io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder subBuilder = null; if (published_ != null) { subBuilder = published_.toBuilder(); } published_ = input.readMessage(io.opencannabis.schema.temporal.TemporalInstant.Instant.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(published_); published_ = subBuilder.buildPartial(); } break; } case 90: { java.lang.String s = input.readStringRequireUtf8(); scope_ = s; break; } case 98: { java.lang.String s = input.readStringRequireUtf8(); token_ = s; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaItem_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaItem_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.media.AttachedMedia.MediaItem.class, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder.class); } public static final int KEY_FIELD_NUMBER = 1; private io.opencannabis.schema.media.MediaItemKey.MediaKey key_; /** *
     * Key uniquely identifying this media item.
     * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ public boolean hasKey() { return key_ != null; } /** *
     * Key uniquely identifying this media item.
     * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ public io.opencannabis.schema.media.MediaItemKey.MediaKey getKey() { return key_ == null ? io.opencannabis.schema.media.MediaItemKey.MediaKey.getDefaultInstance() : key_; } /** *
     * Key uniquely identifying this media item.
     * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ public io.opencannabis.schema.media.MediaItemKey.MediaKeyOrBuilder getKeyOrBuilder() { return getKey(); } public static final int STATUS_FIELD_NUMBER = 2; private int status_; /** * .opencannabis.media.MediaStatus status = 2 [(.core.field) = { ... } */ public int getStatusValue() { return status_; } /** * .opencannabis.media.MediaStatus status = 2 [(.core.field) = { ... } */ public io.opencannabis.schema.media.AttachedMedia.MediaStatus getStatus() { @SuppressWarnings("deprecation") io.opencannabis.schema.media.AttachedMedia.MediaStatus result = io.opencannabis.schema.media.AttachedMedia.MediaStatus.valueOf(status_); return result == null ? io.opencannabis.schema.media.AttachedMedia.MediaStatus.UNRECOGNIZED : result; } public static final int TYPE_FIELD_NUMBER = 3; private io.opencannabis.schema.media.MediaItemType.MediaType type_; /** *
     * Type of media this is describing.
     * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ public boolean hasType() { return type_ != null; } /** *
     * Type of media this is describing.
     * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ public io.opencannabis.schema.media.MediaItemType.MediaType getType() { return type_ == null ? io.opencannabis.schema.media.MediaItemType.MediaType.getDefaultInstance() : type_; } /** *
     * Type of media this is describing.
     * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ public io.opencannabis.schema.media.MediaItemType.MediaTypeOrBuilder getTypeOrBuilder() { return getType(); } public static final int NAME_FIELD_NUMBER = 4; private volatile java.lang.Object name_; /** *
     * Friendly name for this media.
     * 
* * string name = 4 [(.core.field) = { ... } */ 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(); name_ = s; return s; } } /** *
     * Friendly name for this media.
     * 
* * string name = 4 [(.core.field) = { ... } */ 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 URI_FIELD_NUMBER = 5; private volatile java.lang.Object uri_; /** *
     * Origin URI to this media.
     * 
* * string uri = 5 [(.core.field) = { ... } */ public java.lang.String getUri() { java.lang.Object ref = uri_; 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(); uri_ = s; return s; } } /** *
     * Origin URI to this media.
     * 
* * string uri = 5 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getUriBytes() { java.lang.Object ref = uri_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); uri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SERVING_URI_FIELD_NUMBER = 6; private volatile java.lang.Object servingUri_; /** *
     * Serving URI for this media, if it differs from the origin URI.
     * 
* * string serving_uri = 6 [(.core.field) = { ... } */ public java.lang.String getServingUri() { java.lang.Object ref = servingUri_; 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(); servingUri_ = s; return s; } } /** *
     * Serving URI for this media, if it differs from the origin URI.
     * 
* * string serving_uri = 6 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getServingUriBytes() { java.lang.Object ref = servingUri_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); servingUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PRIVACY_FIELD_NUMBER = 7; private int privacy_; /** *
     * Privacy setting for this media item. Defaults to location-wide access.
     * 
* * .opencannabis.media.MediaPrivacy privacy = 7 [(.core.field) = { ... } */ public int getPrivacyValue() { return privacy_; } /** *
     * Privacy setting for this media item. Defaults to location-wide access.
     * 
* * .opencannabis.media.MediaPrivacy privacy = 7 [(.core.field) = { ... } */ public io.opencannabis.schema.media.AttachedMedia.MediaPrivacy getPrivacy() { @SuppressWarnings("deprecation") io.opencannabis.schema.media.AttachedMedia.MediaPrivacy result = io.opencannabis.schema.media.AttachedMedia.MediaPrivacy.valueOf(privacy_); return result == null ? io.opencannabis.schema.media.AttachedMedia.MediaPrivacy.UNRECOGNIZED : result; } public static final int CREATED_FIELD_NUMBER = 8; private io.opencannabis.schema.temporal.TemporalInstant.Instant created_; /** *
     * Timestamp for when this record was created.
     * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ public boolean hasCreated() { return created_ != null; } /** *
     * Timestamp for when this record was created.
     * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant getCreated() { return created_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : created_; } /** *
     * Timestamp for when this record was created.
     * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getCreatedOrBuilder() { return getCreated(); } public static final int MODIFIED_FIELD_NUMBER = 9; private io.opencannabis.schema.temporal.TemporalInstant.Instant modified_; /** *
     * Timestamp for when this record was last modified.
     * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ public boolean hasModified() { return modified_ != null; } /** *
     * Timestamp for when this record was last modified.
     * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant getModified() { return modified_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : modified_; } /** *
     * Timestamp for when this record was last modified.
     * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getModifiedOrBuilder() { return getModified(); } public static final int PUBLISHED_FIELD_NUMBER = 10; private io.opencannabis.schema.temporal.TemporalInstant.Instant published_; /** *
     * Timestamp for when this media item was originally published.
     * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ public boolean hasPublished() { return published_ != null; } /** *
     * Timestamp for when this media item was originally published.
     * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant getPublished() { return published_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : published_; } /** *
     * Timestamp for when this media item was originally published.
     * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getPublishedOrBuilder() { return getPublished(); } public static final int SCOPE_FIELD_NUMBER = 11; private volatile java.lang.Object scope_; /** *
     * Ownership scope for this media item.
     * 
* * string scope = 11 [(.core.field) = { ... } */ public java.lang.String getScope() { java.lang.Object ref = scope_; 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(); scope_ = s; return s; } } /** *
     * Ownership scope for this media item.
     * 
* * string scope = 11 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getScopeBytes() { java.lang.Object ref = scope_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); scope_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int TOKEN_FIELD_NUMBER = 12; private volatile java.lang.Object token_; /** *
     * Most recent upload token for this media item.
     * 
* * string token = 12 [(.core.field) = { ... } */ public java.lang.String getToken() { java.lang.Object ref = token_; 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(); token_ = s; return s; } } /** *
     * Most recent upload token for this media item.
     * 
* * string token = 12 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getTokenBytes() { java.lang.Object ref = token_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); token_ = 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 (key_ != null) { output.writeMessage(1, getKey()); } if (status_ != io.opencannabis.schema.media.AttachedMedia.MediaStatus.PROVISIONED.getNumber()) { output.writeEnum(2, status_); } if (type_ != null) { output.writeMessage(3, getType()); } if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_); } if (!getUriBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, uri_); } if (!getServingUriBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, servingUri_); } if (privacy_ != io.opencannabis.schema.media.AttachedMedia.MediaPrivacy.DEFAULT_PRIVACY.getNumber()) { output.writeEnum(7, privacy_); } if (created_ != null) { output.writeMessage(8, getCreated()); } if (modified_ != null) { output.writeMessage(9, getModified()); } if (published_ != null) { output.writeMessage(10, getPublished()); } if (!getScopeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, scope_); } if (!getTokenBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 12, token_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (key_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getKey()); } if (status_ != io.opencannabis.schema.media.AttachedMedia.MediaStatus.PROVISIONED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, status_); } if (type_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getType()); } if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_); } if (!getUriBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, uri_); } if (!getServingUriBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, servingUri_); } if (privacy_ != io.opencannabis.schema.media.AttachedMedia.MediaPrivacy.DEFAULT_PRIVACY.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(7, privacy_); } if (created_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getCreated()); } if (modified_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, getModified()); } if (published_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, getPublished()); } if (!getScopeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, scope_); } if (!getTokenBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, token_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.opencannabis.schema.media.AttachedMedia.MediaItem)) { return super.equals(obj); } io.opencannabis.schema.media.AttachedMedia.MediaItem other = (io.opencannabis.schema.media.AttachedMedia.MediaItem) obj; if (hasKey() != other.hasKey()) return false; if (hasKey()) { if (!getKey() .equals(other.getKey())) return false; } if (status_ != other.status_) return false; if (hasType() != other.hasType()) return false; if (hasType()) { if (!getType() .equals(other.getType())) return false; } if (!getName() .equals(other.getName())) return false; if (!getUri() .equals(other.getUri())) return false; if (!getServingUri() .equals(other.getServingUri())) return false; if (privacy_ != other.privacy_) return false; if (hasCreated() != other.hasCreated()) return false; if (hasCreated()) { if (!getCreated() .equals(other.getCreated())) return false; } if (hasModified() != other.hasModified()) return false; if (hasModified()) { if (!getModified() .equals(other.getModified())) return false; } if (hasPublished() != other.hasPublished()) return false; if (hasPublished()) { if (!getPublished() .equals(other.getPublished())) return false; } if (!getScope() .equals(other.getScope())) return false; if (!getToken() .equals(other.getToken())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasKey()) { hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); } hash = (37 * hash) + STATUS_FIELD_NUMBER; hash = (53 * hash) + status_; if (hasType()) { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getType().hashCode(); } hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + URI_FIELD_NUMBER; hash = (53 * hash) + getUri().hashCode(); hash = (37 * hash) + SERVING_URI_FIELD_NUMBER; hash = (53 * hash) + getServingUri().hashCode(); hash = (37 * hash) + PRIVACY_FIELD_NUMBER; hash = (53 * hash) + privacy_; if (hasCreated()) { hash = (37 * hash) + CREATED_FIELD_NUMBER; hash = (53 * hash) + getCreated().hashCode(); } if (hasModified()) { hash = (37 * hash) + MODIFIED_FIELD_NUMBER; hash = (53 * hash) + getModified().hashCode(); } if (hasPublished()) { hash = (37 * hash) + PUBLISHED_FIELD_NUMBER; hash = (53 * hash) + getPublished().hashCode(); } hash = (37 * hash) + SCOPE_FIELD_NUMBER; hash = (53 * hash) + getScope().hashCode(); hash = (37 * hash) + TOKEN_FIELD_NUMBER; hash = (53 * hash) + getToken().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opencannabis.schema.media.AttachedMedia.MediaItem parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.media.AttachedMedia.MediaItem parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.media.AttachedMedia.MediaItem parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.media.AttachedMedia.MediaItem parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.media.AttachedMedia.MediaItem parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opencannabis.schema.media.AttachedMedia.MediaItem parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opencannabis.schema.media.AttachedMedia.MediaItem parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.media.AttachedMedia.MediaItem 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 io.opencannabis.schema.media.AttachedMedia.MediaItem parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opencannabis.schema.media.AttachedMedia.MediaItem 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 io.opencannabis.schema.media.AttachedMedia.MediaItem parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opencannabis.schema.media.AttachedMedia.MediaItem 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(io.opencannabis.schema.media.AttachedMedia.MediaItem 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; } /** *
     * Describes an individual media item, which can be an image, video, etc. Media at its most basic is simply binary blob
     * data persisted in GCS and tracked with a corresponding DB record. Document types (like PDF, HTML, TXT) are all
     * supported in addition to traditional rich media (images, video, sound).
     * 
* * Protobuf type {@code opencannabis.media.MediaItem} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opencannabis.media.MediaItem) io.opencannabis.schema.media.AttachedMedia.MediaItemOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaItem_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaItem_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opencannabis.schema.media.AttachedMedia.MediaItem.class, io.opencannabis.schema.media.AttachedMedia.MediaItem.Builder.class); } // Construct using io.opencannabis.schema.media.AttachedMedia.MediaItem.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); if (keyBuilder_ == null) { key_ = null; } else { key_ = null; keyBuilder_ = null; } status_ = 0; if (typeBuilder_ == null) { type_ = null; } else { type_ = null; typeBuilder_ = null; } name_ = ""; uri_ = ""; servingUri_ = ""; privacy_ = 0; if (createdBuilder_ == null) { created_ = null; } else { created_ = null; createdBuilder_ = null; } if (modifiedBuilder_ == null) { modified_ = null; } else { modified_ = null; modifiedBuilder_ = null; } if (publishedBuilder_ == null) { published_ = null; } else { published_ = null; publishedBuilder_ = null; } scope_ = ""; token_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opencannabis.schema.media.AttachedMedia.internal_static_opencannabis_media_MediaItem_descriptor; } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaItem getDefaultInstanceForType() { return io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance(); } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaItem build() { io.opencannabis.schema.media.AttachedMedia.MediaItem result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaItem buildPartial() { io.opencannabis.schema.media.AttachedMedia.MediaItem result = new io.opencannabis.schema.media.AttachedMedia.MediaItem(this); if (keyBuilder_ == null) { result.key_ = key_; } else { result.key_ = keyBuilder_.build(); } result.status_ = status_; if (typeBuilder_ == null) { result.type_ = type_; } else { result.type_ = typeBuilder_.build(); } result.name_ = name_; result.uri_ = uri_; result.servingUri_ = servingUri_; result.privacy_ = privacy_; if (createdBuilder_ == null) { result.created_ = created_; } else { result.created_ = createdBuilder_.build(); } if (modifiedBuilder_ == null) { result.modified_ = modified_; } else { result.modified_ = modifiedBuilder_.build(); } if (publishedBuilder_ == null) { result.published_ = published_; } else { result.published_ = publishedBuilder_.build(); } result.scope_ = scope_; result.token_ = token_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.opencannabis.schema.media.AttachedMedia.MediaItem) { return mergeFrom((io.opencannabis.schema.media.AttachedMedia.MediaItem)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opencannabis.schema.media.AttachedMedia.MediaItem other) { if (other == io.opencannabis.schema.media.AttachedMedia.MediaItem.getDefaultInstance()) return this; if (other.hasKey()) { mergeKey(other.getKey()); } if (other.status_ != 0) { setStatusValue(other.getStatusValue()); } if (other.hasType()) { mergeType(other.getType()); } if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getUri().isEmpty()) { uri_ = other.uri_; onChanged(); } if (!other.getServingUri().isEmpty()) { servingUri_ = other.servingUri_; onChanged(); } if (other.privacy_ != 0) { setPrivacyValue(other.getPrivacyValue()); } if (other.hasCreated()) { mergeCreated(other.getCreated()); } if (other.hasModified()) { mergeModified(other.getModified()); } if (other.hasPublished()) { mergePublished(other.getPublished()); } if (!other.getScope().isEmpty()) { scope_ = other.scope_; onChanged(); } if (!other.getToken().isEmpty()) { token_ = other.token_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.opencannabis.schema.media.AttachedMedia.MediaItem parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opencannabis.schema.media.AttachedMedia.MediaItem) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private io.opencannabis.schema.media.MediaItemKey.MediaKey key_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.MediaItemKey.MediaKey, io.opencannabis.schema.media.MediaItemKey.MediaKey.Builder, io.opencannabis.schema.media.MediaItemKey.MediaKeyOrBuilder> keyBuilder_; /** *
       * Key uniquely identifying this media item.
       * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ public boolean hasKey() { return keyBuilder_ != null || key_ != null; } /** *
       * Key uniquely identifying this media item.
       * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ public io.opencannabis.schema.media.MediaItemKey.MediaKey getKey() { if (keyBuilder_ == null) { return key_ == null ? io.opencannabis.schema.media.MediaItemKey.MediaKey.getDefaultInstance() : key_; } else { return keyBuilder_.getMessage(); } } /** *
       * Key uniquely identifying this media item.
       * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ public Builder setKey(io.opencannabis.schema.media.MediaItemKey.MediaKey value) { if (keyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } key_ = value; onChanged(); } else { keyBuilder_.setMessage(value); } return this; } /** *
       * Key uniquely identifying this media item.
       * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ public Builder setKey( io.opencannabis.schema.media.MediaItemKey.MediaKey.Builder builderForValue) { if (keyBuilder_ == null) { key_ = builderForValue.build(); onChanged(); } else { keyBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Key uniquely identifying this media item.
       * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ public Builder mergeKey(io.opencannabis.schema.media.MediaItemKey.MediaKey value) { if (keyBuilder_ == null) { if (key_ != null) { key_ = io.opencannabis.schema.media.MediaItemKey.MediaKey.newBuilder(key_).mergeFrom(value).buildPartial(); } else { key_ = value; } onChanged(); } else { keyBuilder_.mergeFrom(value); } return this; } /** *
       * Key uniquely identifying this media item.
       * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ public Builder clearKey() { if (keyBuilder_ == null) { key_ = null; onChanged(); } else { key_ = null; keyBuilder_ = null; } return this; } /** *
       * Key uniquely identifying this media item.
       * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ public io.opencannabis.schema.media.MediaItemKey.MediaKey.Builder getKeyBuilder() { onChanged(); return getKeyFieldBuilder().getBuilder(); } /** *
       * Key uniquely identifying this media item.
       * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ public io.opencannabis.schema.media.MediaItemKey.MediaKeyOrBuilder getKeyOrBuilder() { if (keyBuilder_ != null) { return keyBuilder_.getMessageOrBuilder(); } else { return key_ == null ? io.opencannabis.schema.media.MediaItemKey.MediaKey.getDefaultInstance() : key_; } } /** *
       * Key uniquely identifying this media item.
       * 
* * .opencannabis.media.MediaKey key = 1 [(.core.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.MediaItemKey.MediaKey, io.opencannabis.schema.media.MediaItemKey.MediaKey.Builder, io.opencannabis.schema.media.MediaItemKey.MediaKeyOrBuilder> getKeyFieldBuilder() { if (keyBuilder_ == null) { keyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.MediaItemKey.MediaKey, io.opencannabis.schema.media.MediaItemKey.MediaKey.Builder, io.opencannabis.schema.media.MediaItemKey.MediaKeyOrBuilder>( getKey(), getParentForChildren(), isClean()); key_ = null; } return keyBuilder_; } private int status_ = 0; /** * .opencannabis.media.MediaStatus status = 2 [(.core.field) = { ... } */ public int getStatusValue() { return status_; } /** * .opencannabis.media.MediaStatus status = 2 [(.core.field) = { ... } */ public Builder setStatusValue(int value) { status_ = value; onChanged(); return this; } /** * .opencannabis.media.MediaStatus status = 2 [(.core.field) = { ... } */ public io.opencannabis.schema.media.AttachedMedia.MediaStatus getStatus() { @SuppressWarnings("deprecation") io.opencannabis.schema.media.AttachedMedia.MediaStatus result = io.opencannabis.schema.media.AttachedMedia.MediaStatus.valueOf(status_); return result == null ? io.opencannabis.schema.media.AttachedMedia.MediaStatus.UNRECOGNIZED : result; } /** * .opencannabis.media.MediaStatus status = 2 [(.core.field) = { ... } */ public Builder setStatus(io.opencannabis.schema.media.AttachedMedia.MediaStatus value) { if (value == null) { throw new NullPointerException(); } status_ = value.getNumber(); onChanged(); return this; } /** * .opencannabis.media.MediaStatus status = 2 [(.core.field) = { ... } */ public Builder clearStatus() { status_ = 0; onChanged(); return this; } private io.opencannabis.schema.media.MediaItemType.MediaType type_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.MediaItemType.MediaType, io.opencannabis.schema.media.MediaItemType.MediaType.Builder, io.opencannabis.schema.media.MediaItemType.MediaTypeOrBuilder> typeBuilder_; /** *
       * Type of media this is describing.
       * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ public boolean hasType() { return typeBuilder_ != null || type_ != null; } /** *
       * Type of media this is describing.
       * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ public io.opencannabis.schema.media.MediaItemType.MediaType getType() { if (typeBuilder_ == null) { return type_ == null ? io.opencannabis.schema.media.MediaItemType.MediaType.getDefaultInstance() : type_; } else { return typeBuilder_.getMessage(); } } /** *
       * Type of media this is describing.
       * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ public Builder setType(io.opencannabis.schema.media.MediaItemType.MediaType value) { if (typeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } type_ = value; onChanged(); } else { typeBuilder_.setMessage(value); } return this; } /** *
       * Type of media this is describing.
       * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ public Builder setType( io.opencannabis.schema.media.MediaItemType.MediaType.Builder builderForValue) { if (typeBuilder_ == null) { type_ = builderForValue.build(); onChanged(); } else { typeBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Type of media this is describing.
       * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ public Builder mergeType(io.opencannabis.schema.media.MediaItemType.MediaType value) { if (typeBuilder_ == null) { if (type_ != null) { type_ = io.opencannabis.schema.media.MediaItemType.MediaType.newBuilder(type_).mergeFrom(value).buildPartial(); } else { type_ = value; } onChanged(); } else { typeBuilder_.mergeFrom(value); } return this; } /** *
       * Type of media this is describing.
       * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ public Builder clearType() { if (typeBuilder_ == null) { type_ = null; onChanged(); } else { type_ = null; typeBuilder_ = null; } return this; } /** *
       * Type of media this is describing.
       * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ public io.opencannabis.schema.media.MediaItemType.MediaType.Builder getTypeBuilder() { onChanged(); return getTypeFieldBuilder().getBuilder(); } /** *
       * Type of media this is describing.
       * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ public io.opencannabis.schema.media.MediaItemType.MediaTypeOrBuilder getTypeOrBuilder() { if (typeBuilder_ != null) { return typeBuilder_.getMessageOrBuilder(); } else { return type_ == null ? io.opencannabis.schema.media.MediaItemType.MediaType.getDefaultInstance() : type_; } } /** *
       * Type of media this is describing.
       * 
* * .opencannabis.media.MediaType type = 3 [(.core.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.MediaItemType.MediaType, io.opencannabis.schema.media.MediaItemType.MediaType.Builder, io.opencannabis.schema.media.MediaItemType.MediaTypeOrBuilder> getTypeFieldBuilder() { if (typeBuilder_ == null) { typeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.media.MediaItemType.MediaType, io.opencannabis.schema.media.MediaItemType.MediaType.Builder, io.opencannabis.schema.media.MediaItemType.MediaTypeOrBuilder>( getType(), getParentForChildren(), isClean()); type_ = null; } return typeBuilder_; } private java.lang.Object name_ = ""; /** *
       * Friendly name for this media.
       * 
* * string name = 4 [(.core.field) = { ... } */ 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(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Friendly name for this media.
       * 
* * string name = 4 [(.core.field) = { ... } */ 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; } } /** *
       * Friendly name for this media.
       * 
* * string name = 4 [(.core.field) = { ... } */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
       * Friendly name for this media.
       * 
* * string name = 4 [(.core.field) = { ... } */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * Friendly name for this media.
       * 
* * string name = 4 [(.core.field) = { ... } */ public Builder setNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); name_ = value; onChanged(); return this; } private java.lang.Object uri_ = ""; /** *
       * Origin URI to this media.
       * 
* * string uri = 5 [(.core.field) = { ... } */ public java.lang.String getUri() { java.lang.Object ref = uri_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); uri_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Origin URI to this media.
       * 
* * string uri = 5 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getUriBytes() { java.lang.Object ref = uri_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); uri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Origin URI to this media.
       * 
* * string uri = 5 [(.core.field) = { ... } */ public Builder setUri( java.lang.String value) { if (value == null) { throw new NullPointerException(); } uri_ = value; onChanged(); return this; } /** *
       * Origin URI to this media.
       * 
* * string uri = 5 [(.core.field) = { ... } */ public Builder clearUri() { uri_ = getDefaultInstance().getUri(); onChanged(); return this; } /** *
       * Origin URI to this media.
       * 
* * string uri = 5 [(.core.field) = { ... } */ public Builder setUriBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); uri_ = value; onChanged(); return this; } private java.lang.Object servingUri_ = ""; /** *
       * Serving URI for this media, if it differs from the origin URI.
       * 
* * string serving_uri = 6 [(.core.field) = { ... } */ public java.lang.String getServingUri() { java.lang.Object ref = servingUri_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); servingUri_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Serving URI for this media, if it differs from the origin URI.
       * 
* * string serving_uri = 6 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getServingUriBytes() { java.lang.Object ref = servingUri_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); servingUri_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Serving URI for this media, if it differs from the origin URI.
       * 
* * string serving_uri = 6 [(.core.field) = { ... } */ public Builder setServingUri( java.lang.String value) { if (value == null) { throw new NullPointerException(); } servingUri_ = value; onChanged(); return this; } /** *
       * Serving URI for this media, if it differs from the origin URI.
       * 
* * string serving_uri = 6 [(.core.field) = { ... } */ public Builder clearServingUri() { servingUri_ = getDefaultInstance().getServingUri(); onChanged(); return this; } /** *
       * Serving URI for this media, if it differs from the origin URI.
       * 
* * string serving_uri = 6 [(.core.field) = { ... } */ public Builder setServingUriBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); servingUri_ = value; onChanged(); return this; } private int privacy_ = 0; /** *
       * Privacy setting for this media item. Defaults to location-wide access.
       * 
* * .opencannabis.media.MediaPrivacy privacy = 7 [(.core.field) = { ... } */ public int getPrivacyValue() { return privacy_; } /** *
       * Privacy setting for this media item. Defaults to location-wide access.
       * 
* * .opencannabis.media.MediaPrivacy privacy = 7 [(.core.field) = { ... } */ public Builder setPrivacyValue(int value) { privacy_ = value; onChanged(); return this; } /** *
       * Privacy setting for this media item. Defaults to location-wide access.
       * 
* * .opencannabis.media.MediaPrivacy privacy = 7 [(.core.field) = { ... } */ public io.opencannabis.schema.media.AttachedMedia.MediaPrivacy getPrivacy() { @SuppressWarnings("deprecation") io.opencannabis.schema.media.AttachedMedia.MediaPrivacy result = io.opencannabis.schema.media.AttachedMedia.MediaPrivacy.valueOf(privacy_); return result == null ? io.opencannabis.schema.media.AttachedMedia.MediaPrivacy.UNRECOGNIZED : result; } /** *
       * Privacy setting for this media item. Defaults to location-wide access.
       * 
* * .opencannabis.media.MediaPrivacy privacy = 7 [(.core.field) = { ... } */ public Builder setPrivacy(io.opencannabis.schema.media.AttachedMedia.MediaPrivacy value) { if (value == null) { throw new NullPointerException(); } privacy_ = value.getNumber(); onChanged(); return this; } /** *
       * Privacy setting for this media item. Defaults to location-wide access.
       * 
* * .opencannabis.media.MediaPrivacy privacy = 7 [(.core.field) = { ... } */ public Builder clearPrivacy() { privacy_ = 0; onChanged(); return this; } private io.opencannabis.schema.temporal.TemporalInstant.Instant created_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> createdBuilder_; /** *
       * Timestamp for when this record was created.
       * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ public boolean hasCreated() { return createdBuilder_ != null || created_ != null; } /** *
       * Timestamp for when this record was created.
       * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant getCreated() { if (createdBuilder_ == null) { return created_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : created_; } else { return createdBuilder_.getMessage(); } } /** *
       * Timestamp for when this record was created.
       * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ public Builder setCreated(io.opencannabis.schema.temporal.TemporalInstant.Instant value) { if (createdBuilder_ == null) { if (value == null) { throw new NullPointerException(); } created_ = value; onChanged(); } else { createdBuilder_.setMessage(value); } return this; } /** *
       * Timestamp for when this record was created.
       * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ public Builder setCreated( io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder builderForValue) { if (createdBuilder_ == null) { created_ = builderForValue.build(); onChanged(); } else { createdBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Timestamp for when this record was created.
       * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ public Builder mergeCreated(io.opencannabis.schema.temporal.TemporalInstant.Instant value) { if (createdBuilder_ == null) { if (created_ != null) { created_ = io.opencannabis.schema.temporal.TemporalInstant.Instant.newBuilder(created_).mergeFrom(value).buildPartial(); } else { created_ = value; } onChanged(); } else { createdBuilder_.mergeFrom(value); } return this; } /** *
       * Timestamp for when this record was created.
       * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ public Builder clearCreated() { if (createdBuilder_ == null) { created_ = null; onChanged(); } else { created_ = null; createdBuilder_ = null; } return this; } /** *
       * Timestamp for when this record was created.
       * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder getCreatedBuilder() { onChanged(); return getCreatedFieldBuilder().getBuilder(); } /** *
       * Timestamp for when this record was created.
       * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getCreatedOrBuilder() { if (createdBuilder_ != null) { return createdBuilder_.getMessageOrBuilder(); } else { return created_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : created_; } } /** *
       * Timestamp for when this record was created.
       * 
* * .opencannabis.temporal.Instant created = 8 [(.core.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> getCreatedFieldBuilder() { if (createdBuilder_ == null) { createdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>( getCreated(), getParentForChildren(), isClean()); created_ = null; } return createdBuilder_; } private io.opencannabis.schema.temporal.TemporalInstant.Instant modified_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> modifiedBuilder_; /** *
       * Timestamp for when this record was last modified.
       * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ public boolean hasModified() { return modifiedBuilder_ != null || modified_ != null; } /** *
       * Timestamp for when this record was last modified.
       * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant getModified() { if (modifiedBuilder_ == null) { return modified_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : modified_; } else { return modifiedBuilder_.getMessage(); } } /** *
       * Timestamp for when this record was last modified.
       * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ public Builder setModified(io.opencannabis.schema.temporal.TemporalInstant.Instant value) { if (modifiedBuilder_ == null) { if (value == null) { throw new NullPointerException(); } modified_ = value; onChanged(); } else { modifiedBuilder_.setMessage(value); } return this; } /** *
       * Timestamp for when this record was last modified.
       * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ public Builder setModified( io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder builderForValue) { if (modifiedBuilder_ == null) { modified_ = builderForValue.build(); onChanged(); } else { modifiedBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Timestamp for when this record was last modified.
       * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ public Builder mergeModified(io.opencannabis.schema.temporal.TemporalInstant.Instant value) { if (modifiedBuilder_ == null) { if (modified_ != null) { modified_ = io.opencannabis.schema.temporal.TemporalInstant.Instant.newBuilder(modified_).mergeFrom(value).buildPartial(); } else { modified_ = value; } onChanged(); } else { modifiedBuilder_.mergeFrom(value); } return this; } /** *
       * Timestamp for when this record was last modified.
       * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ public Builder clearModified() { if (modifiedBuilder_ == null) { modified_ = null; onChanged(); } else { modified_ = null; modifiedBuilder_ = null; } return this; } /** *
       * Timestamp for when this record was last modified.
       * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder getModifiedBuilder() { onChanged(); return getModifiedFieldBuilder().getBuilder(); } /** *
       * Timestamp for when this record was last modified.
       * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getModifiedOrBuilder() { if (modifiedBuilder_ != null) { return modifiedBuilder_.getMessageOrBuilder(); } else { return modified_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : modified_; } } /** *
       * Timestamp for when this record was last modified.
       * 
* * .opencannabis.temporal.Instant modified = 9 [(.core.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> getModifiedFieldBuilder() { if (modifiedBuilder_ == null) { modifiedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>( getModified(), getParentForChildren(), isClean()); modified_ = null; } return modifiedBuilder_; } private io.opencannabis.schema.temporal.TemporalInstant.Instant published_; private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> publishedBuilder_; /** *
       * Timestamp for when this media item was originally published.
       * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ public boolean hasPublished() { return publishedBuilder_ != null || published_ != null; } /** *
       * Timestamp for when this media item was originally published.
       * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant getPublished() { if (publishedBuilder_ == null) { return published_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : published_; } else { return publishedBuilder_.getMessage(); } } /** *
       * Timestamp for when this media item was originally published.
       * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ public Builder setPublished(io.opencannabis.schema.temporal.TemporalInstant.Instant value) { if (publishedBuilder_ == null) { if (value == null) { throw new NullPointerException(); } published_ = value; onChanged(); } else { publishedBuilder_.setMessage(value); } return this; } /** *
       * Timestamp for when this media item was originally published.
       * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ public Builder setPublished( io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder builderForValue) { if (publishedBuilder_ == null) { published_ = builderForValue.build(); onChanged(); } else { publishedBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Timestamp for when this media item was originally published.
       * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ public Builder mergePublished(io.opencannabis.schema.temporal.TemporalInstant.Instant value) { if (publishedBuilder_ == null) { if (published_ != null) { published_ = io.opencannabis.schema.temporal.TemporalInstant.Instant.newBuilder(published_).mergeFrom(value).buildPartial(); } else { published_ = value; } onChanged(); } else { publishedBuilder_.mergeFrom(value); } return this; } /** *
       * Timestamp for when this media item was originally published.
       * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ public Builder clearPublished() { if (publishedBuilder_ == null) { published_ = null; onChanged(); } else { published_ = null; publishedBuilder_ = null; } return this; } /** *
       * Timestamp for when this media item was originally published.
       * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder getPublishedBuilder() { onChanged(); return getPublishedFieldBuilder().getBuilder(); } /** *
       * Timestamp for when this media item was originally published.
       * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ public io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder getPublishedOrBuilder() { if (publishedBuilder_ != null) { return publishedBuilder_.getMessageOrBuilder(); } else { return published_ == null ? io.opencannabis.schema.temporal.TemporalInstant.Instant.getDefaultInstance() : published_; } } /** *
       * Timestamp for when this media item was originally published.
       * 
* * .opencannabis.temporal.Instant published = 10 [(.core.field) = { ... } */ private com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder> getPublishedFieldBuilder() { if (publishedBuilder_ == null) { publishedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opencannabis.schema.temporal.TemporalInstant.Instant, io.opencannabis.schema.temporal.TemporalInstant.Instant.Builder, io.opencannabis.schema.temporal.TemporalInstant.InstantOrBuilder>( getPublished(), getParentForChildren(), isClean()); published_ = null; } return publishedBuilder_; } private java.lang.Object scope_ = ""; /** *
       * Ownership scope for this media item.
       * 
* * string scope = 11 [(.core.field) = { ... } */ public java.lang.String getScope() { java.lang.Object ref = scope_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); scope_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Ownership scope for this media item.
       * 
* * string scope = 11 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getScopeBytes() { java.lang.Object ref = scope_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); scope_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Ownership scope for this media item.
       * 
* * string scope = 11 [(.core.field) = { ... } */ public Builder setScope( java.lang.String value) { if (value == null) { throw new NullPointerException(); } scope_ = value; onChanged(); return this; } /** *
       * Ownership scope for this media item.
       * 
* * string scope = 11 [(.core.field) = { ... } */ public Builder clearScope() { scope_ = getDefaultInstance().getScope(); onChanged(); return this; } /** *
       * Ownership scope for this media item.
       * 
* * string scope = 11 [(.core.field) = { ... } */ public Builder setScopeBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); scope_ = value; onChanged(); return this; } private java.lang.Object token_ = ""; /** *
       * Most recent upload token for this media item.
       * 
* * string token = 12 [(.core.field) = { ... } */ public java.lang.String getToken() { java.lang.Object ref = token_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); token_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Most recent upload token for this media item.
       * 
* * string token = 12 [(.core.field) = { ... } */ public com.google.protobuf.ByteString getTokenBytes() { java.lang.Object ref = token_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); token_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Most recent upload token for this media item.
       * 
* * string token = 12 [(.core.field) = { ... } */ public Builder setToken( java.lang.String value) { if (value == null) { throw new NullPointerException(); } token_ = value; onChanged(); return this; } /** *
       * Most recent upload token for this media item.
       * 
* * string token = 12 [(.core.field) = { ... } */ public Builder clearToken() { token_ = getDefaultInstance().getToken(); onChanged(); return this; } /** *
       * Most recent upload token for this media item.
       * 
* * string token = 12 [(.core.field) = { ... } */ public Builder setTokenBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); token_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:opencannabis.media.MediaItem) } // @@protoc_insertion_point(class_scope:opencannabis.media.MediaItem) private static final io.opencannabis.schema.media.AttachedMedia.MediaItem DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opencannabis.schema.media.AttachedMedia.MediaItem(); } public static io.opencannabis.schema.media.AttachedMedia.MediaItem getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MediaItem parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MediaItem(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.opencannabis.schema.media.AttachedMedia.MediaItem getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_opencannabis_media_MediaSubject_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_opencannabis_media_MediaSubject_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_opencannabis_media_MediaUpload_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_opencannabis_media_MediaUpload_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_opencannabis_media_MediaItem_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_opencannabis_media_MediaItem_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\025media/MediaItem.proto\022\022opencannabis.me" + "dia\032\024core/Datamodel.proto\032\024media/MediaKe" + "y.proto\032\025media/MediaType.proto\032\025base/Pro" + "ductKey.proto\032\026identity/UserKey.proto\032\030p" + "artner/PartnerKey.proto\032\031partner/Locatio" + "nKey.proto\032\026temporal/Instant.proto\"\207\001\n\014M" + "ediaSubject\0220\n\007product\030\002 \001(\0132\035.opencanna" + "bis.base.ProductKeyH\000\022\021\n\007partner\030\003 \001(\tH\000" + "\022\022\n\010location\030\004 \001(\tH\000\022\020\n\006global\030\005 \001(\010H\000B\014" + "\n\nattachment\"\240\010\n\013MediaUpload\022E\n\005token\030\001 " + "\001(\tB6\302\265\003\002\010\002\302\265\003,\022*Unique ID/token for thi" + "s upload operation.\022>\n\toperation\030\002 \001(\tB+" + "\302\265\003\'\022%Upload operation ID, assigned by G" + "CS.\022s\n\005media\030\003 \001(\0132\035.opencannabis.media." + "MediaItemBE\322\265\003\002\010\000\302\265\003;\0229Media item to be " + "attached after this operation completes." + "\022S\n\004mime\030\004 \001(\tBE\302\265\003A\022?Mimetype for the f" + "ile uploaded as part of this media opera" + "tion.\022K\n\004size\030\005 \001(\004B=\302\265\0039\0227Size, in byte" + "s, of the item uploaded in this operatio" + "n.\022K\n\010finished\030\006 \001(\010B9\302\265\0035\0223Whether this" + " upload operation has completed or not.\022" + "2\n\003md5\030\007 \001(\tB%\302\265\003!\022\037MD5 hash for the dat" + "a uploaded.\0226\n\005crc32\030\010 \001(\tB\'\302\265\003#\022!CRC32 " + "hash for the data uploaded.\022G\n\005owner\030\t \001" + "(\tB8\302\265\0034\0222User account that initiated th" + "is upload operation.\0227\n\004path\030\n \001(\tB)\302\265\003%" + "\022#Path in GCS to the underlying file.\022G\n" + "\006parent\030\013 \001(\tB7\302\265\0033\0221Previous upload ver" + "sion for this same media item.\022l\n\007create" + "d\030\024 \001(\0132\036.opencannabis.temporal.InstantB" + ";\302\265\0037\0225Timestamp for when this upload op" + "eration was created.\022p\n\tcompleted\030\025 \001(\0132" + "\036.opencannabis.temporal.InstantB=\302\265\0039\0227T" + "imestamp for when this upload operation " + "was completed.:\017\202\367\002\013\010\002\022\007uploads\"\220\010\n\tMedi" + "aItem\022`\n\003key\030\001 \001(\0132\034.opencannabis.media." + "MediaKeyB5\302\265\003\002\010\001\302\265\003+\022)Key uniquely ident" + "ifying this media item.\022]\n\006status\030\002 \001(\0162" + "\037.opencannabis.media.MediaStatusB,\302\265\003(\022&" + "Status for this individual media item.\022T" + "\n\004type\030\003 \001(\0132\035.opencannabis.media.MediaT" + "ypeB\'\302\265\003#\022!Type of media this is describ" + "ing.\0221\n\004name\030\004 \001(\tB#\302\265\003\037\022\035Friendly name " + "for this media.\022.\n\003uri\030\005 \001(\tB!\302\265\003\035\022\033Abso" + "lute URI to this media.\022Y\n\013serving_uri\030\006" + " \001(\tBD\302\265\003@\022>Serving URI for this media, " + "if it differs from the origin URI.\022Z\n\007pr" + "ivacy\030\007 \001(\0162 .opencannabis.media.MediaPr" + "ivacyB\'\302\265\003#\022!Privacy mode for this media" + " item.\022b\n\007created\030\010 \001(\0132\036.opencannabis.t" + "emporal.InstantB1\302\265\003-\022+Timestamp for whe" + "n this record was created.\022i\n\010modified\030\t" + " \001(\0132\036.opencannabis.temporal.InstantB7\302\265" + "\0033\0221Timestamp for when this record was l" + "ast modified.\022u\n\tpublished\030\n \001(\0132\036.openc" + "annabis.temporal.InstantBB\302\265\003>\022




© 2015 - 2025 Weber Informatics LLC | Privacy Policy