
com.google.storage.v2.Object Maven / Gradle / Ivy
/*
* Copyright 2020 Google LLC
*
* 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
*
* https://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: google/storage/v2/storage.proto
package com.google.storage.v2;
/**
*
*
*
* An object.
*
*
* Protobuf type {@code google.storage.v2.Object}
*/
public final class Object extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.storage.v2.Object)
ObjectOrBuilder {
private static final long serialVersionUID = 0L;
// Use Object.newBuilder() to construct.
private Object(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Object() {
name_ = "";
bucket_ = "";
etag_ = "";
storageClass_ = "";
contentEncoding_ = "";
contentDisposition_ = "";
cacheControl_ = "";
acl_ = java.util.Collections.emptyList();
contentLanguage_ = "";
contentType_ = "";
kmsKey_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Object();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private Object(
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();
name_ = s;
break;
}
case 18:
{
java.lang.String s = input.readStringRequireUtf8();
bucket_ = s;
break;
}
case 24:
{
generation_ = input.readInt64();
break;
}
case 32:
{
metageneration_ = input.readInt64();
break;
}
case 42:
{
java.lang.String s = input.readStringRequireUtf8();
storageClass_ = s;
break;
}
case 48:
{
size_ = input.readInt64();
break;
}
case 58:
{
java.lang.String s = input.readStringRequireUtf8();
contentEncoding_ = s;
break;
}
case 66:
{
java.lang.String s = input.readStringRequireUtf8();
contentDisposition_ = s;
break;
}
case 74:
{
java.lang.String s = input.readStringRequireUtf8();
cacheControl_ = s;
break;
}
case 82:
{
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
acl_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
acl_.add(
input.readMessage(
com.google.storage.v2.ObjectAccessControl.parser(), extensionRegistry));
break;
}
case 90:
{
java.lang.String s = input.readStringRequireUtf8();
contentLanguage_ = s;
break;
}
case 98:
{
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (deleteTime_ != null) {
subBuilder = deleteTime_.toBuilder();
}
deleteTime_ =
input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(deleteTime_);
deleteTime_ = subBuilder.buildPartial();
}
break;
}
case 106:
{
java.lang.String s = input.readStringRequireUtf8();
contentType_ = s;
break;
}
case 114:
{
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (createTime_ != null) {
subBuilder = createTime_.toBuilder();
}
createTime_ =
input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(createTime_);
createTime_ = subBuilder.buildPartial();
}
break;
}
case 120:
{
componentCount_ = input.readInt32();
break;
}
case 130:
{
com.google.storage.v2.ObjectChecksums.Builder subBuilder = null;
if (checksums_ != null) {
subBuilder = checksums_.toBuilder();
}
checksums_ =
input.readMessage(
com.google.storage.v2.ObjectChecksums.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(checksums_);
checksums_ = subBuilder.buildPartial();
}
break;
}
case 138:
{
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (updateTime_ != null) {
subBuilder = updateTime_.toBuilder();
}
updateTime_ =
input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(updateTime_);
updateTime_ = subBuilder.buildPartial();
}
break;
}
case 146:
{
java.lang.String s = input.readStringRequireUtf8();
kmsKey_ = s;
break;
}
case 154:
{
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (updateStorageClassTime_ != null) {
subBuilder = updateStorageClassTime_.toBuilder();
}
updateStorageClassTime_ =
input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(updateStorageClassTime_);
updateStorageClassTime_ = subBuilder.buildPartial();
}
break;
}
case 160:
{
temporaryHold_ = input.readBool();
break;
}
case 170:
{
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (retentionExpireTime_ != null) {
subBuilder = retentionExpireTime_.toBuilder();
}
retentionExpireTime_ =
input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(retentionExpireTime_);
retentionExpireTime_ = subBuilder.buildPartial();
}
break;
}
case 178:
{
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
metadata_ =
com.google.protobuf.MapField.newMapField(
MetadataDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry metadata__ =
input.readMessage(
MetadataDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue());
break;
}
case 184:
{
bitField0_ |= 0x00000001;
eventBasedHold_ = input.readBool();
break;
}
case 194:
{
com.google.storage.v2.Owner.Builder subBuilder = null;
if (owner_ != null) {
subBuilder = owner_.toBuilder();
}
owner_ = input.readMessage(com.google.storage.v2.Owner.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(owner_);
owner_ = subBuilder.buildPartial();
}
break;
}
case 202:
{
com.google.storage.v2.CustomerEncryption.Builder subBuilder = null;
if (customerEncryption_ != null) {
subBuilder = customerEncryption_.toBuilder();
}
customerEncryption_ =
input.readMessage(
com.google.storage.v2.CustomerEncryption.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(customerEncryption_);
customerEncryption_ = subBuilder.buildPartial();
}
break;
}
case 210:
{
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (customTime_ != null) {
subBuilder = customTime_.toBuilder();
}
customTime_ =
input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(customTime_);
customTime_ = subBuilder.buildPartial();
}
break;
}
case 218:
{
java.lang.String s = input.readStringRequireUtf8();
etag_ = s;
break;
}
default:
{
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
acl_ = java.util.Collections.unmodifiableList(acl_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.storage.v2.StorageProto.internal_static_google_storage_v2_Object_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(int number) {
switch (number) {
case 22:
return internalGetMetadata();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.storage.v2.StorageProto
.internal_static_google_storage_v2_Object_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.storage.v2.Object.class, com.google.storage.v2.Object.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
*
*
*
* Immutable. The name of this object. Nearly any sequence of unicode characters is
* valid. See
* [Guidelines](https://cloud.google.com/storage/docs/naming-objects).
* Example: `test.txt`
* The `name` field by itself does not uniquely identify a Cloud Storage
* object. A Cloud Storage object is uniquely identified by the tuple of
* (bucket, object, generation).
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
*
*
* Immutable. The name of this object. Nearly any sequence of unicode characters is
* valid. See
* [Guidelines](https://cloud.google.com/storage/docs/naming-objects).
* Example: `test.txt`
* The `name` field by itself does not uniquely identify a Cloud Storage
* object. A Cloud Storage object is uniquely identified by the tuple of
* (bucket, object, generation).
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int BUCKET_FIELD_NUMBER = 2;
private volatile java.lang.Object bucket_;
/**
*
*
*
* Immutable. The name of the bucket containing this object.
*
*
*
* string bucket = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @return The bucket.
*/
@java.lang.Override
public java.lang.String getBucket() {
java.lang.Object ref = bucket_;
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();
bucket_ = s;
return s;
}
}
/**
*
*
*
* Immutable. The name of the bucket containing this object.
*
*
*
* string bucket = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for bucket.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBucketBytes() {
java.lang.Object ref = bucket_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
bucket_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ETAG_FIELD_NUMBER = 27;
private volatile java.lang.Object etag_;
/**
*
*
*
* The etag of the object.
* If included in the metadata of an update or delete request message, the
* operation will only be performed if the etag matches that of the live
* object.
*
*
* string etag = 27;
*
* @return The etag.
*/
@java.lang.Override
public java.lang.String getEtag() {
java.lang.Object ref = etag_;
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();
etag_ = s;
return s;
}
}
/**
*
*
*
* The etag of the object.
* If included in the metadata of an update or delete request message, the
* operation will only be performed if the etag matches that of the live
* object.
*
*
* string etag = 27;
*
* @return The bytes for etag.
*/
@java.lang.Override
public com.google.protobuf.ByteString getEtagBytes() {
java.lang.Object ref = etag_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
etag_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int GENERATION_FIELD_NUMBER = 3;
private long generation_;
/**
*
*
*
* Immutable. The content generation of this object. Used for object versioning.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 generation = 3 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The generation.
*/
@java.lang.Override
public long getGeneration() {
return generation_;
}
public static final int METAGENERATION_FIELD_NUMBER = 4;
private long metageneration_;
/**
*
*
*
* Output only. The version of the metadata for this generation of this object. Used for
* preconditions and for detecting changes in metadata. A metageneration
* number is only meaningful in the context of a particular generation of a
* particular object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 metageneration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The metageneration.
*/
@java.lang.Override
public long getMetageneration() {
return metageneration_;
}
public static final int STORAGE_CLASS_FIELD_NUMBER = 5;
private volatile java.lang.Object storageClass_;
/**
*
*
*
* Storage class of the object.
*
*
* string storage_class = 5;
*
* @return The storageClass.
*/
@java.lang.Override
public java.lang.String getStorageClass() {
java.lang.Object ref = storageClass_;
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();
storageClass_ = s;
return s;
}
}
/**
*
*
*
* Storage class of the object.
*
*
* string storage_class = 5;
*
* @return The bytes for storageClass.
*/
@java.lang.Override
public com.google.protobuf.ByteString getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SIZE_FIELD_NUMBER = 6;
private long size_;
/**
*
*
*
* Output only. Content-Length of the object data in bytes, matching
* [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 size = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The size.
*/
@java.lang.Override
public long getSize() {
return size_;
}
public static final int CONTENT_ENCODING_FIELD_NUMBER = 7;
private volatile java.lang.Object contentEncoding_;
/**
*
*
*
* Content-Encoding of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
*
*
* string content_encoding = 7;
*
* @return The contentEncoding.
*/
@java.lang.Override
public java.lang.String getContentEncoding() {
java.lang.Object ref = contentEncoding_;
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();
contentEncoding_ = s;
return s;
}
}
/**
*
*
*
* Content-Encoding of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
*
*
* string content_encoding = 7;
*
* @return The bytes for contentEncoding.
*/
@java.lang.Override
public com.google.protobuf.ByteString getContentEncodingBytes() {
java.lang.Object ref = contentEncoding_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentEncoding_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CONTENT_DISPOSITION_FIELD_NUMBER = 8;
private volatile java.lang.Object contentDisposition_;
/**
*
*
*
* Content-Disposition of the object data, matching
* [https://tools.ietf.org/html/rfc6266][RFC 6266].
*
*
* string content_disposition = 8;
*
* @return The contentDisposition.
*/
@java.lang.Override
public java.lang.String getContentDisposition() {
java.lang.Object ref = contentDisposition_;
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();
contentDisposition_ = s;
return s;
}
}
/**
*
*
*
* Content-Disposition of the object data, matching
* [https://tools.ietf.org/html/rfc6266][RFC 6266].
*
*
* string content_disposition = 8;
*
* @return The bytes for contentDisposition.
*/
@java.lang.Override
public com.google.protobuf.ByteString getContentDispositionBytes() {
java.lang.Object ref = contentDisposition_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentDisposition_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CACHE_CONTROL_FIELD_NUMBER = 9;
private volatile java.lang.Object cacheControl_;
/**
*
*
*
* Cache-Control directive for the object data, matching
* [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
* If omitted, and the object is accessible to all anonymous users, the
* default will be `public, max-age=3600`.
*
*
* string cache_control = 9;
*
* @return The cacheControl.
*/
@java.lang.Override
public java.lang.String getCacheControl() {
java.lang.Object ref = cacheControl_;
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();
cacheControl_ = s;
return s;
}
}
/**
*
*
*
* Cache-Control directive for the object data, matching
* [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
* If omitted, and the object is accessible to all anonymous users, the
* default will be `public, max-age=3600`.
*
*
* string cache_control = 9;
*
* @return The bytes for cacheControl.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCacheControlBytes() {
java.lang.Object ref = cacheControl_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
cacheControl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ACL_FIELD_NUMBER = 10;
private java.util.List acl_;
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
@java.lang.Override
public java.util.List getAclList() {
return acl_;
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
@java.lang.Override
public java.util.List extends com.google.storage.v2.ObjectAccessControlOrBuilder>
getAclOrBuilderList() {
return acl_;
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
@java.lang.Override
public int getAclCount() {
return acl_.size();
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
@java.lang.Override
public com.google.storage.v2.ObjectAccessControl getAcl(int index) {
return acl_.get(index);
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
@java.lang.Override
public com.google.storage.v2.ObjectAccessControlOrBuilder getAclOrBuilder(int index) {
return acl_.get(index);
}
public static final int CONTENT_LANGUAGE_FIELD_NUMBER = 11;
private volatile java.lang.Object contentLanguage_;
/**
*
*
*
* Content-Language of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
*
*
* string content_language = 11;
*
* @return The contentLanguage.
*/
@java.lang.Override
public java.lang.String getContentLanguage() {
java.lang.Object ref = contentLanguage_;
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();
contentLanguage_ = s;
return s;
}
}
/**
*
*
*
* Content-Language of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
*
*
* string content_language = 11;
*
* @return The bytes for contentLanguage.
*/
@java.lang.Override
public com.google.protobuf.ByteString getContentLanguageBytes() {
java.lang.Object ref = contentLanguage_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentLanguage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DELETE_TIME_FIELD_NUMBER = 12;
private com.google.protobuf.Timestamp deleteTime_;
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the deleteTime field is set.
*/
@java.lang.Override
public boolean hasDeleteTime() {
return deleteTime_ != null;
}
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The deleteTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getDeleteTime() {
return deleteTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deleteTime_;
}
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() {
return getDeleteTime();
}
public static final int CONTENT_TYPE_FIELD_NUMBER = 13;
private volatile java.lang.Object contentType_;
/**
*
*
*
* Content-Type of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
* If an object is stored without a Content-Type, it is served as
* `application/octet-stream`.
*
*
* string content_type = 13;
*
* @return The contentType.
*/
@java.lang.Override
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
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();
contentType_ = s;
return s;
}
}
/**
*
*
*
* Content-Type of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
* If an object is stored without a Content-Type, it is served as
* `application/octet-stream`.
*
*
* string content_type = 13;
*
* @return The bytes for contentType.
*/
@java.lang.Override
public com.google.protobuf.ByteString getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATE_TIME_FIELD_NUMBER = 14;
private com.google.protobuf.Timestamp createTime_;
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the createTime field is set.
*/
@java.lang.Override
public boolean hasCreateTime() {
return createTime_ != null;
}
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The createTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreateTime() {
return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
}
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
return getCreateTime();
}
public static final int COMPONENT_COUNT_FIELD_NUMBER = 15;
private int componentCount_;
/**
*
*
*
* Output only. Number of underlying components that make up this object. Components are
* accumulated by compose operations.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int32 component_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The componentCount.
*/
@java.lang.Override
public int getComponentCount() {
return componentCount_;
}
public static final int CHECKSUMS_FIELD_NUMBER = 16;
private com.google.storage.v2.ObjectChecksums checksums_;
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the checksums field is set.
*/
@java.lang.Override
public boolean hasChecksums() {
return checksums_ != null;
}
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The checksums.
*/
@java.lang.Override
public com.google.storage.v2.ObjectChecksums getChecksums() {
return checksums_ == null
? com.google.storage.v2.ObjectChecksums.getDefaultInstance()
: checksums_;
}
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.storage.v2.ObjectChecksumsOrBuilder getChecksumsOrBuilder() {
return getChecksums();
}
public static final int UPDATE_TIME_FIELD_NUMBER = 17;
private com.google.protobuf.Timestamp updateTime_;
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the updateTime field is set.
*/
@java.lang.Override
public boolean hasUpdateTime() {
return updateTime_ != null;
}
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The updateTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getUpdateTime() {
return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
}
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
return getUpdateTime();
}
public static final int KMS_KEY_FIELD_NUMBER = 18;
private volatile java.lang.Object kmsKey_;
/**
*
*
*
* Cloud KMS Key used to encrypt this object, if the object is encrypted by
* such a key.
*
*
* string kms_key = 18 [(.google.api.resource_reference) = { ... }
*
* @return The kmsKey.
*/
@java.lang.Override
public java.lang.String getKmsKey() {
java.lang.Object ref = kmsKey_;
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();
kmsKey_ = s;
return s;
}
}
/**
*
*
*
* Cloud KMS Key used to encrypt this object, if the object is encrypted by
* such a key.
*
*
* string kms_key = 18 [(.google.api.resource_reference) = { ... }
*
* @return The bytes for kmsKey.
*/
@java.lang.Override
public com.google.protobuf.ByteString getKmsKeyBytes() {
java.lang.Object ref = kmsKey_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kmsKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int UPDATE_STORAGE_CLASS_TIME_FIELD_NUMBER = 19;
private com.google.protobuf.Timestamp updateStorageClassTime_;
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the updateStorageClassTime field is set.
*/
@java.lang.Override
public boolean hasUpdateStorageClassTime() {
return updateStorageClassTime_ != null;
}
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The updateStorageClassTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getUpdateStorageClassTime() {
return updateStorageClassTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: updateStorageClassTime_;
}
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getUpdateStorageClassTimeOrBuilder() {
return getUpdateStorageClassTime();
}
public static final int TEMPORARY_HOLD_FIELD_NUMBER = 20;
private boolean temporaryHold_;
/**
*
*
*
* Whether an object is under temporary hold. While this flag is set to true,
* the object is protected against deletion and overwrites. A common use case
* of this flag is regulatory investigations where objects need to be retained
* while the investigation is ongoing. Note that unlike event-based hold,
* temporary hold does not impact retention expiration time of an object.
*
*
* bool temporary_hold = 20;
*
* @return The temporaryHold.
*/
@java.lang.Override
public boolean getTemporaryHold() {
return temporaryHold_;
}
public static final int RETENTION_EXPIRE_TIME_FIELD_NUMBER = 21;
private com.google.protobuf.Timestamp retentionExpireTime_;
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*
* @return Whether the retentionExpireTime field is set.
*/
@java.lang.Override
public boolean hasRetentionExpireTime() {
return retentionExpireTime_ != null;
}
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*
* @return The retentionExpireTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getRetentionExpireTime() {
return retentionExpireTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: retentionExpireTime_;
}
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getRetentionExpireTimeOrBuilder() {
return getRetentionExpireTime();
}
public static final int METADATA_FIELD_NUMBER = 22;
private static final class MetadataDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.storage.v2.StorageProto
.internal_static_google_storage_v2_Object_MetadataEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField metadata_;
private com.google.protobuf.MapField internalGetMetadata() {
if (metadata_ == null) {
return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry);
}
return metadata_;
}
public int getMetadataCount() {
return internalGetMetadata().getMap().size();
}
/**
*
*
*
* User-provided metadata, in key/value pairs.
*
*
* map<string, string> metadata = 22;
*/
@java.lang.Override
public boolean containsMetadata(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetMetadata().getMap().containsKey(key);
}
/** Use {@link #getMetadataMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetadata() {
return getMetadataMap();
}
/**
*
*
*
* User-provided metadata, in key/value pairs.
*
*
* map<string, string> metadata = 22;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
*
*
*
* User-provided metadata, in key/value pairs.
*
*
* map<string, string> metadata = 22;
*/
@java.lang.Override
public java.lang.String getMetadataOrDefault(
java.lang.String key, java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetMetadata().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* User-provided metadata, in key/value pairs.
*
*
* map<string, string> metadata = 22;
*/
@java.lang.Override
public java.lang.String getMetadataOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetMetadata().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int EVENT_BASED_HOLD_FIELD_NUMBER = 23;
private boolean eventBasedHold_;
/**
*
*
*
* Whether an object is under event-based hold.
* An event-based hold is a way to force the retention of an object until
* after some event occurs. Once the hold is released by explicitly setting
* this field to false, the object will become subject to any bucket-level
* retention policy, except that the retention duration will be calculated
* from the time the event based hold was lifted, rather than the time the
* object was created.
* In a WriteObject request, not setting this field implies that the value
* should be taken from the parent bucket's "default_event_based_hold" field.
* In a response, this field will always be set to true or false.
*
*
* optional bool event_based_hold = 23;
*
* @return Whether the eventBasedHold field is set.
*/
@java.lang.Override
public boolean hasEventBasedHold() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Whether an object is under event-based hold.
* An event-based hold is a way to force the retention of an object until
* after some event occurs. Once the hold is released by explicitly setting
* this field to false, the object will become subject to any bucket-level
* retention policy, except that the retention duration will be calculated
* from the time the event based hold was lifted, rather than the time the
* object was created.
* In a WriteObject request, not setting this field implies that the value
* should be taken from the parent bucket's "default_event_based_hold" field.
* In a response, this field will always be set to true or false.
*
*
* optional bool event_based_hold = 23;
*
* @return The eventBasedHold.
*/
@java.lang.Override
public boolean getEventBasedHold() {
return eventBasedHold_;
}
public static final int OWNER_FIELD_NUMBER = 24;
private com.google.storage.v2.Owner owner_;
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return Whether the owner field is set.
*/
@java.lang.Override
public boolean hasOwner() {
return owner_ != null;
}
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The owner.
*/
@java.lang.Override
public com.google.storage.v2.Owner getOwner() {
return owner_ == null ? com.google.storage.v2.Owner.getDefaultInstance() : owner_;
}
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*/
@java.lang.Override
public com.google.storage.v2.OwnerOrBuilder getOwnerOrBuilder() {
return getOwner();
}
public static final int CUSTOMER_ENCRYPTION_FIELD_NUMBER = 25;
private com.google.storage.v2.CustomerEncryption customerEncryption_;
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*
* @return Whether the customerEncryption field is set.
*/
@java.lang.Override
public boolean hasCustomerEncryption() {
return customerEncryption_ != null;
}
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*
* @return The customerEncryption.
*/
@java.lang.Override
public com.google.storage.v2.CustomerEncryption getCustomerEncryption() {
return customerEncryption_ == null
? com.google.storage.v2.CustomerEncryption.getDefaultInstance()
: customerEncryption_;
}
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*/
@java.lang.Override
public com.google.storage.v2.CustomerEncryptionOrBuilder getCustomerEncryptionOrBuilder() {
return getCustomerEncryption();
}
public static final int CUSTOM_TIME_FIELD_NUMBER = 26;
private com.google.protobuf.Timestamp customTime_;
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*
* @return Whether the customTime field is set.
*/
@java.lang.Override
public boolean hasCustomTime() {
return customTime_ != null;
}
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*
* @return The customTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCustomTime() {
return customTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : customTime_;
}
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCustomTimeOrBuilder() {
return getCustomTime();
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucket_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, bucket_);
}
if (generation_ != 0L) {
output.writeInt64(3, generation_);
}
if (metageneration_ != 0L) {
output.writeInt64(4, metageneration_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageClass_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, storageClass_);
}
if (size_ != 0L) {
output.writeInt64(6, size_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentEncoding_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, contentEncoding_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentDisposition_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, contentDisposition_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cacheControl_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, cacheControl_);
}
for (int i = 0; i < acl_.size(); i++) {
output.writeMessage(10, acl_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentLanguage_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, contentLanguage_);
}
if (deleteTime_ != null) {
output.writeMessage(12, getDeleteTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, contentType_);
}
if (createTime_ != null) {
output.writeMessage(14, getCreateTime());
}
if (componentCount_ != 0) {
output.writeInt32(15, componentCount_);
}
if (checksums_ != null) {
output.writeMessage(16, getChecksums());
}
if (updateTime_ != null) {
output.writeMessage(17, getUpdateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 18, kmsKey_);
}
if (updateStorageClassTime_ != null) {
output.writeMessage(19, getUpdateStorageClassTime());
}
if (temporaryHold_ != false) {
output.writeBool(20, temporaryHold_);
}
if (retentionExpireTime_ != null) {
output.writeMessage(21, getRetentionExpireTime());
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 22);
if (((bitField0_ & 0x00000001) != 0)) {
output.writeBool(23, eventBasedHold_);
}
if (owner_ != null) {
output.writeMessage(24, getOwner());
}
if (customerEncryption_ != null) {
output.writeMessage(25, getCustomerEncryption());
}
if (customTime_ != null) {
output.writeMessage(26, getCustomTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 27, etag_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(bucket_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, bucket_);
}
if (generation_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, generation_);
}
if (metageneration_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, metageneration_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(storageClass_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, storageClass_);
}
if (size_ != 0L) {
size += com.google.protobuf.CodedOutputStream.computeInt64Size(6, size_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentEncoding_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, contentEncoding_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentDisposition_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, contentDisposition_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cacheControl_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, cacheControl_);
}
for (int i = 0; i < acl_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, acl_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentLanguage_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, contentLanguage_);
}
if (deleteTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getDeleteTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(contentType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, contentType_);
}
if (createTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getCreateTime());
}
if (componentCount_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(15, componentCount_);
}
if (checksums_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getChecksums());
}
if (updateTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(17, getUpdateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, kmsKey_);
}
if (updateStorageClassTime_ != null) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(19, getUpdateStorageClassTime());
}
if (temporaryHold_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(20, temporaryHold_);
}
if (retentionExpireTime_ != null) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(21, getRetentionExpireTime());
}
for (java.util.Map.Entry entry :
internalGetMetadata().getMap().entrySet()) {
com.google.protobuf.MapEntry metadata__ =
MetadataDefaultEntryHolder.defaultEntry
.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, metadata__);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(23, eventBasedHold_);
}
if (owner_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(24, getOwner());
}
if (customerEncryption_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, getCustomerEncryption());
}
if (customTime_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, getCustomTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(27, etag_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.storage.v2.Object)) {
return super.equals(obj);
}
com.google.storage.v2.Object other = (com.google.storage.v2.Object) obj;
if (!getName().equals(other.getName())) return false;
if (!getBucket().equals(other.getBucket())) return false;
if (!getEtag().equals(other.getEtag())) return false;
if (getGeneration() != other.getGeneration()) return false;
if (getMetageneration() != other.getMetageneration()) return false;
if (!getStorageClass().equals(other.getStorageClass())) return false;
if (getSize() != other.getSize()) return false;
if (!getContentEncoding().equals(other.getContentEncoding())) return false;
if (!getContentDisposition().equals(other.getContentDisposition())) return false;
if (!getCacheControl().equals(other.getCacheControl())) return false;
if (!getAclList().equals(other.getAclList())) return false;
if (!getContentLanguage().equals(other.getContentLanguage())) return false;
if (hasDeleteTime() != other.hasDeleteTime()) return false;
if (hasDeleteTime()) {
if (!getDeleteTime().equals(other.getDeleteTime())) return false;
}
if (!getContentType().equals(other.getContentType())) return false;
if (hasCreateTime() != other.hasCreateTime()) return false;
if (hasCreateTime()) {
if (!getCreateTime().equals(other.getCreateTime())) return false;
}
if (getComponentCount() != other.getComponentCount()) return false;
if (hasChecksums() != other.hasChecksums()) return false;
if (hasChecksums()) {
if (!getChecksums().equals(other.getChecksums())) return false;
}
if (hasUpdateTime() != other.hasUpdateTime()) return false;
if (hasUpdateTime()) {
if (!getUpdateTime().equals(other.getUpdateTime())) return false;
}
if (!getKmsKey().equals(other.getKmsKey())) return false;
if (hasUpdateStorageClassTime() != other.hasUpdateStorageClassTime()) return false;
if (hasUpdateStorageClassTime()) {
if (!getUpdateStorageClassTime().equals(other.getUpdateStorageClassTime())) return false;
}
if (getTemporaryHold() != other.getTemporaryHold()) return false;
if (hasRetentionExpireTime() != other.hasRetentionExpireTime()) return false;
if (hasRetentionExpireTime()) {
if (!getRetentionExpireTime().equals(other.getRetentionExpireTime())) return false;
}
if (!internalGetMetadata().equals(other.internalGetMetadata())) return false;
if (hasEventBasedHold() != other.hasEventBasedHold()) return false;
if (hasEventBasedHold()) {
if (getEventBasedHold() != other.getEventBasedHold()) return false;
}
if (hasOwner() != other.hasOwner()) return false;
if (hasOwner()) {
if (!getOwner().equals(other.getOwner())) return false;
}
if (hasCustomerEncryption() != other.hasCustomerEncryption()) return false;
if (hasCustomerEncryption()) {
if (!getCustomerEncryption().equals(other.getCustomerEncryption())) return false;
}
if (hasCustomTime() != other.hasCustomTime()) return false;
if (hasCustomTime()) {
if (!getCustomTime().equals(other.getCustomTime())) 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) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + BUCKET_FIELD_NUMBER;
hash = (53 * hash) + getBucket().hashCode();
hash = (37 * hash) + ETAG_FIELD_NUMBER;
hash = (53 * hash) + getEtag().hashCode();
hash = (37 * hash) + GENERATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGeneration());
hash = (37 * hash) + METAGENERATION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getMetageneration());
hash = (37 * hash) + STORAGE_CLASS_FIELD_NUMBER;
hash = (53 * hash) + getStorageClass().hashCode();
hash = (37 * hash) + SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSize());
hash = (37 * hash) + CONTENT_ENCODING_FIELD_NUMBER;
hash = (53 * hash) + getContentEncoding().hashCode();
hash = (37 * hash) + CONTENT_DISPOSITION_FIELD_NUMBER;
hash = (53 * hash) + getContentDisposition().hashCode();
hash = (37 * hash) + CACHE_CONTROL_FIELD_NUMBER;
hash = (53 * hash) + getCacheControl().hashCode();
if (getAclCount() > 0) {
hash = (37 * hash) + ACL_FIELD_NUMBER;
hash = (53 * hash) + getAclList().hashCode();
}
hash = (37 * hash) + CONTENT_LANGUAGE_FIELD_NUMBER;
hash = (53 * hash) + getContentLanguage().hashCode();
if (hasDeleteTime()) {
hash = (37 * hash) + DELETE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getDeleteTime().hashCode();
}
hash = (37 * hash) + CONTENT_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getContentType().hashCode();
if (hasCreateTime()) {
hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCreateTime().hashCode();
}
hash = (37 * hash) + COMPONENT_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getComponentCount();
if (hasChecksums()) {
hash = (37 * hash) + CHECKSUMS_FIELD_NUMBER;
hash = (53 * hash) + getChecksums().hashCode();
}
if (hasUpdateTime()) {
hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getUpdateTime().hashCode();
}
hash = (37 * hash) + KMS_KEY_FIELD_NUMBER;
hash = (53 * hash) + getKmsKey().hashCode();
if (hasUpdateStorageClassTime()) {
hash = (37 * hash) + UPDATE_STORAGE_CLASS_TIME_FIELD_NUMBER;
hash = (53 * hash) + getUpdateStorageClassTime().hashCode();
}
hash = (37 * hash) + TEMPORARY_HOLD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTemporaryHold());
if (hasRetentionExpireTime()) {
hash = (37 * hash) + RETENTION_EXPIRE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getRetentionExpireTime().hashCode();
}
if (!internalGetMetadata().getMap().isEmpty()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + internalGetMetadata().hashCode();
}
if (hasEventBasedHold()) {
hash = (37 * hash) + EVENT_BASED_HOLD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEventBasedHold());
}
if (hasOwner()) {
hash = (37 * hash) + OWNER_FIELD_NUMBER;
hash = (53 * hash) + getOwner().hashCode();
}
if (hasCustomerEncryption()) {
hash = (37 * hash) + CUSTOMER_ENCRYPTION_FIELD_NUMBER;
hash = (53 * hash) + getCustomerEncryption().hashCode();
}
if (hasCustomTime()) {
hash = (37 * hash) + CUSTOM_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCustomTime().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.storage.v2.Object parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.storage.v2.Object parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.storage.v2.Object parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.storage.v2.Object parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.storage.v2.Object parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.storage.v2.Object parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.storage.v2.Object parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.storage.v2.Object parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.storage.v2.Object parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.storage.v2.Object parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.storage.v2.Object parseFrom(com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.storage.v2.Object parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.storage.v2.Object prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* An object.
*
*
* Protobuf type {@code google.storage.v2.Object}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.storage.v2.Object)
com.google.storage.v2.ObjectOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.storage.v2.StorageProto.internal_static_google_storage_v2_Object_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(int number) {
switch (number) {
case 22:
return internalGetMetadata();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
switch (number) {
case 22:
return internalGetMutableMetadata();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.storage.v2.StorageProto
.internal_static_google_storage_v2_Object_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.storage.v2.Object.class, com.google.storage.v2.Object.Builder.class);
}
// Construct using com.google.storage.v2.Object.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getAclFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
bucket_ = "";
etag_ = "";
generation_ = 0L;
metageneration_ = 0L;
storageClass_ = "";
size_ = 0L;
contentEncoding_ = "";
contentDisposition_ = "";
cacheControl_ = "";
if (aclBuilder_ == null) {
acl_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
aclBuilder_.clear();
}
contentLanguage_ = "";
if (deleteTimeBuilder_ == null) {
deleteTime_ = null;
} else {
deleteTime_ = null;
deleteTimeBuilder_ = null;
}
contentType_ = "";
if (createTimeBuilder_ == null) {
createTime_ = null;
} else {
createTime_ = null;
createTimeBuilder_ = null;
}
componentCount_ = 0;
if (checksumsBuilder_ == null) {
checksums_ = null;
} else {
checksums_ = null;
checksumsBuilder_ = null;
}
if (updateTimeBuilder_ == null) {
updateTime_ = null;
} else {
updateTime_ = null;
updateTimeBuilder_ = null;
}
kmsKey_ = "";
if (updateStorageClassTimeBuilder_ == null) {
updateStorageClassTime_ = null;
} else {
updateStorageClassTime_ = null;
updateStorageClassTimeBuilder_ = null;
}
temporaryHold_ = false;
if (retentionExpireTimeBuilder_ == null) {
retentionExpireTime_ = null;
} else {
retentionExpireTime_ = null;
retentionExpireTimeBuilder_ = null;
}
internalGetMutableMetadata().clear();
eventBasedHold_ = false;
bitField0_ = (bitField0_ & ~0x00000004);
if (ownerBuilder_ == null) {
owner_ = null;
} else {
owner_ = null;
ownerBuilder_ = null;
}
if (customerEncryptionBuilder_ == null) {
customerEncryption_ = null;
} else {
customerEncryption_ = null;
customerEncryptionBuilder_ = null;
}
if (customTimeBuilder_ == null) {
customTime_ = null;
} else {
customTime_ = null;
customTimeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.storage.v2.StorageProto.internal_static_google_storage_v2_Object_descriptor;
}
@java.lang.Override
public com.google.storage.v2.Object getDefaultInstanceForType() {
return com.google.storage.v2.Object.getDefaultInstance();
}
@java.lang.Override
public com.google.storage.v2.Object build() {
com.google.storage.v2.Object result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.storage.v2.Object buildPartial() {
com.google.storage.v2.Object result = new com.google.storage.v2.Object(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
result.name_ = name_;
result.bucket_ = bucket_;
result.etag_ = etag_;
result.generation_ = generation_;
result.metageneration_ = metageneration_;
result.storageClass_ = storageClass_;
result.size_ = size_;
result.contentEncoding_ = contentEncoding_;
result.contentDisposition_ = contentDisposition_;
result.cacheControl_ = cacheControl_;
if (aclBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
acl_ = java.util.Collections.unmodifiableList(acl_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.acl_ = acl_;
} else {
result.acl_ = aclBuilder_.build();
}
result.contentLanguage_ = contentLanguage_;
if (deleteTimeBuilder_ == null) {
result.deleteTime_ = deleteTime_;
} else {
result.deleteTime_ = deleteTimeBuilder_.build();
}
result.contentType_ = contentType_;
if (createTimeBuilder_ == null) {
result.createTime_ = createTime_;
} else {
result.createTime_ = createTimeBuilder_.build();
}
result.componentCount_ = componentCount_;
if (checksumsBuilder_ == null) {
result.checksums_ = checksums_;
} else {
result.checksums_ = checksumsBuilder_.build();
}
if (updateTimeBuilder_ == null) {
result.updateTime_ = updateTime_;
} else {
result.updateTime_ = updateTimeBuilder_.build();
}
result.kmsKey_ = kmsKey_;
if (updateStorageClassTimeBuilder_ == null) {
result.updateStorageClassTime_ = updateStorageClassTime_;
} else {
result.updateStorageClassTime_ = updateStorageClassTimeBuilder_.build();
}
result.temporaryHold_ = temporaryHold_;
if (retentionExpireTimeBuilder_ == null) {
result.retentionExpireTime_ = retentionExpireTime_;
} else {
result.retentionExpireTime_ = retentionExpireTimeBuilder_.build();
}
result.metadata_ = internalGetMetadata();
result.metadata_.makeImmutable();
if (((from_bitField0_ & 0x00000004) != 0)) {
result.eventBasedHold_ = eventBasedHold_;
to_bitField0_ |= 0x00000001;
}
if (ownerBuilder_ == null) {
result.owner_ = owner_;
} else {
result.owner_ = ownerBuilder_.build();
}
if (customerEncryptionBuilder_ == null) {
result.customerEncryption_ = customerEncryption_;
} else {
result.customerEncryption_ = customerEncryptionBuilder_.build();
}
if (customTimeBuilder_ == null) {
result.customTime_ = customTime_;
} else {
result.customTime_ = customTimeBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.storage.v2.Object) {
return mergeFrom((com.google.storage.v2.Object) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.storage.v2.Object other) {
if (other == com.google.storage.v2.Object.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getBucket().isEmpty()) {
bucket_ = other.bucket_;
onChanged();
}
if (!other.getEtag().isEmpty()) {
etag_ = other.etag_;
onChanged();
}
if (other.getGeneration() != 0L) {
setGeneration(other.getGeneration());
}
if (other.getMetageneration() != 0L) {
setMetageneration(other.getMetageneration());
}
if (!other.getStorageClass().isEmpty()) {
storageClass_ = other.storageClass_;
onChanged();
}
if (other.getSize() != 0L) {
setSize(other.getSize());
}
if (!other.getContentEncoding().isEmpty()) {
contentEncoding_ = other.contentEncoding_;
onChanged();
}
if (!other.getContentDisposition().isEmpty()) {
contentDisposition_ = other.contentDisposition_;
onChanged();
}
if (!other.getCacheControl().isEmpty()) {
cacheControl_ = other.cacheControl_;
onChanged();
}
if (aclBuilder_ == null) {
if (!other.acl_.isEmpty()) {
if (acl_.isEmpty()) {
acl_ = other.acl_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAclIsMutable();
acl_.addAll(other.acl_);
}
onChanged();
}
} else {
if (!other.acl_.isEmpty()) {
if (aclBuilder_.isEmpty()) {
aclBuilder_.dispose();
aclBuilder_ = null;
acl_ = other.acl_;
bitField0_ = (bitField0_ & ~0x00000001);
aclBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getAclFieldBuilder()
: null;
} else {
aclBuilder_.addAllMessages(other.acl_);
}
}
}
if (!other.getContentLanguage().isEmpty()) {
contentLanguage_ = other.contentLanguage_;
onChanged();
}
if (other.hasDeleteTime()) {
mergeDeleteTime(other.getDeleteTime());
}
if (!other.getContentType().isEmpty()) {
contentType_ = other.contentType_;
onChanged();
}
if (other.hasCreateTime()) {
mergeCreateTime(other.getCreateTime());
}
if (other.getComponentCount() != 0) {
setComponentCount(other.getComponentCount());
}
if (other.hasChecksums()) {
mergeChecksums(other.getChecksums());
}
if (other.hasUpdateTime()) {
mergeUpdateTime(other.getUpdateTime());
}
if (!other.getKmsKey().isEmpty()) {
kmsKey_ = other.kmsKey_;
onChanged();
}
if (other.hasUpdateStorageClassTime()) {
mergeUpdateStorageClassTime(other.getUpdateStorageClassTime());
}
if (other.getTemporaryHold() != false) {
setTemporaryHold(other.getTemporaryHold());
}
if (other.hasRetentionExpireTime()) {
mergeRetentionExpireTime(other.getRetentionExpireTime());
}
internalGetMutableMetadata().mergeFrom(other.internalGetMetadata());
if (other.hasEventBasedHold()) {
setEventBasedHold(other.getEventBasedHold());
}
if (other.hasOwner()) {
mergeOwner(other.getOwner());
}
if (other.hasCustomerEncryption()) {
mergeCustomerEncryption(other.getCustomerEncryption());
}
if (other.hasCustomTime()) {
mergeCustomTime(other.getCustomTime());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
com.google.storage.v2.Object parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.storage.v2.Object) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* Immutable. The name of this object. Nearly any sequence of unicode characters is
* valid. See
* [Guidelines](https://cloud.google.com/storage/docs/naming-objects).
* Example: `test.txt`
* The `name` field by itself does not uniquely identify a Cloud Storage
* object. A Cloud Storage object is uniquely identified by the tuple of
* (bucket, object, generation).
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Immutable. The name of this object. Nearly any sequence of unicode characters is
* valid. See
* [Guidelines](https://cloud.google.com/storage/docs/naming-objects).
* Example: `test.txt`
* The `name` field by itself does not uniquely identify a Cloud Storage
* object. A Cloud Storage object is uniquely identified by the tuple of
* (bucket, object, generation).
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Immutable. The name of this object. Nearly any sequence of unicode characters is
* valid. See
* [Guidelines](https://cloud.google.com/storage/docs/naming-objects).
* Example: `test.txt`
* The `name` field by itself does not uniquely identify a Cloud Storage
* object. A Cloud Storage object is uniquely identified by the tuple of
* (bucket, object, generation).
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
*
*
* Immutable. The name of this object. Nearly any sequence of unicode characters is
* valid. See
* [Guidelines](https://cloud.google.com/storage/docs/naming-objects).
* Example: `test.txt`
* The `name` field by itself does not uniquely identify a Cloud Storage
* object. A Cloud Storage object is uniquely identified by the tuple of
* (bucket, object, generation).
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
*
*
* Immutable. The name of this object. Nearly any sequence of unicode characters is
* valid. See
* [Guidelines](https://cloud.google.com/storage/docs/naming-objects).
* Example: `test.txt`
* The `name` field by itself does not uniquely identify a Cloud Storage
* object. A Cloud Storage object is uniquely identified by the tuple of
* (bucket, object, generation).
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object bucket_ = "";
/**
*
*
*
* Immutable. The name of the bucket containing this object.
*
*
*
* string bucket = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @return The bucket.
*/
public java.lang.String getBucket() {
java.lang.Object ref = bucket_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
bucket_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Immutable. The name of the bucket containing this object.
*
*
*
* string bucket = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for bucket.
*/
public com.google.protobuf.ByteString getBucketBytes() {
java.lang.Object ref = bucket_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
bucket_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Immutable. The name of the bucket containing this object.
*
*
*
* string bucket = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @param value The bucket to set.
* @return This builder for chaining.
*/
public Builder setBucket(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bucket_ = value;
onChanged();
return this;
}
/**
*
*
*
* Immutable. The name of the bucket containing this object.
*
*
*
* string bucket = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @return This builder for chaining.
*/
public Builder clearBucket() {
bucket_ = getDefaultInstance().getBucket();
onChanged();
return this;
}
/**
*
*
*
* Immutable. The name of the bucket containing this object.
*
*
*
* string bucket = 2 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.resource_reference) = { ... }
*
*
* @param value The bytes for bucket to set.
* @return This builder for chaining.
*/
public Builder setBucketBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
bucket_ = value;
onChanged();
return this;
}
private java.lang.Object etag_ = "";
/**
*
*
*
* The etag of the object.
* If included in the metadata of an update or delete request message, the
* operation will only be performed if the etag matches that of the live
* object.
*
*
* string etag = 27;
*
* @return The etag.
*/
public java.lang.String getEtag() {
java.lang.Object ref = etag_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
etag_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The etag of the object.
* If included in the metadata of an update or delete request message, the
* operation will only be performed if the etag matches that of the live
* object.
*
*
* string etag = 27;
*
* @return The bytes for etag.
*/
public com.google.protobuf.ByteString getEtagBytes() {
java.lang.Object ref = etag_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
etag_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The etag of the object.
* If included in the metadata of an update or delete request message, the
* operation will only be performed if the etag matches that of the live
* object.
*
*
* string etag = 27;
*
* @param value The etag to set.
* @return This builder for chaining.
*/
public Builder setEtag(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
etag_ = value;
onChanged();
return this;
}
/**
*
*
*
* The etag of the object.
* If included in the metadata of an update or delete request message, the
* operation will only be performed if the etag matches that of the live
* object.
*
*
* string etag = 27;
*
* @return This builder for chaining.
*/
public Builder clearEtag() {
etag_ = getDefaultInstance().getEtag();
onChanged();
return this;
}
/**
*
*
*
* The etag of the object.
* If included in the metadata of an update or delete request message, the
* operation will only be performed if the etag matches that of the live
* object.
*
*
* string etag = 27;
*
* @param value The bytes for etag to set.
* @return This builder for chaining.
*/
public Builder setEtagBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
etag_ = value;
onChanged();
return this;
}
private long generation_;
/**
*
*
*
* Immutable. The content generation of this object. Used for object versioning.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 generation = 3 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The generation.
*/
@java.lang.Override
public long getGeneration() {
return generation_;
}
/**
*
*
*
* Immutable. The content generation of this object. Used for object versioning.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 generation = 3 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The generation to set.
* @return This builder for chaining.
*/
public Builder setGeneration(long value) {
generation_ = value;
onChanged();
return this;
}
/**
*
*
*
* Immutable. The content generation of this object. Used for object versioning.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 generation = 3 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return This builder for chaining.
*/
public Builder clearGeneration() {
generation_ = 0L;
onChanged();
return this;
}
private long metageneration_;
/**
*
*
*
* Output only. The version of the metadata for this generation of this object. Used for
* preconditions and for detecting changes in metadata. A metageneration
* number is only meaningful in the context of a particular generation of a
* particular object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 metageneration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The metageneration.
*/
@java.lang.Override
public long getMetageneration() {
return metageneration_;
}
/**
*
*
*
* Output only. The version of the metadata for this generation of this object. Used for
* preconditions and for detecting changes in metadata. A metageneration
* number is only meaningful in the context of a particular generation of a
* particular object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 metageneration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The metageneration to set.
* @return This builder for chaining.
*/
public Builder setMetageneration(long value) {
metageneration_ = value;
onChanged();
return this;
}
/**
*
*
*
* Output only. The version of the metadata for this generation of this object. Used for
* preconditions and for detecting changes in metadata. A metageneration
* number is only meaningful in the context of a particular generation of a
* particular object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 metageneration = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearMetageneration() {
metageneration_ = 0L;
onChanged();
return this;
}
private java.lang.Object storageClass_ = "";
/**
*
*
*
* Storage class of the object.
*
*
* string storage_class = 5;
*
* @return The storageClass.
*/
public java.lang.String getStorageClass() {
java.lang.Object ref = storageClass_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
storageClass_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Storage class of the object.
*
*
* string storage_class = 5;
*
* @return The bytes for storageClass.
*/
public com.google.protobuf.ByteString getStorageClassBytes() {
java.lang.Object ref = storageClass_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
storageClass_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Storage class of the object.
*
*
* string storage_class = 5;
*
* @param value The storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClass(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
storageClass_ = value;
onChanged();
return this;
}
/**
*
*
*
* Storage class of the object.
*
*
* string storage_class = 5;
*
* @return This builder for chaining.
*/
public Builder clearStorageClass() {
storageClass_ = getDefaultInstance().getStorageClass();
onChanged();
return this;
}
/**
*
*
*
* Storage class of the object.
*
*
* string storage_class = 5;
*
* @param value The bytes for storageClass to set.
* @return This builder for chaining.
*/
public Builder setStorageClassBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
storageClass_ = value;
onChanged();
return this;
}
private long size_;
/**
*
*
*
* Output only. Content-Length of the object data in bytes, matching
* [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 size = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The size.
*/
@java.lang.Override
public long getSize() {
return size_;
}
/**
*
*
*
* Output only. Content-Length of the object data in bytes, matching
* [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 size = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The size to set.
* @return This builder for chaining.
*/
public Builder setSize(long value) {
size_ = value;
onChanged();
return this;
}
/**
*
*
*
* Output only. Content-Length of the object data in bytes, matching
* [https://tools.ietf.org/html/rfc7230#section-3.3.2][RFC 7230 §3.3.2].
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int64 size = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearSize() {
size_ = 0L;
onChanged();
return this;
}
private java.lang.Object contentEncoding_ = "";
/**
*
*
*
* Content-Encoding of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
*
*
* string content_encoding = 7;
*
* @return The contentEncoding.
*/
public java.lang.String getContentEncoding() {
java.lang.Object ref = contentEncoding_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contentEncoding_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Content-Encoding of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
*
*
* string content_encoding = 7;
*
* @return The bytes for contentEncoding.
*/
public com.google.protobuf.ByteString getContentEncodingBytes() {
java.lang.Object ref = contentEncoding_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentEncoding_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Content-Encoding of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
*
*
* string content_encoding = 7;
*
* @param value The contentEncoding to set.
* @return This builder for chaining.
*/
public Builder setContentEncoding(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contentEncoding_ = value;
onChanged();
return this;
}
/**
*
*
*
* Content-Encoding of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
*
*
* string content_encoding = 7;
*
* @return This builder for chaining.
*/
public Builder clearContentEncoding() {
contentEncoding_ = getDefaultInstance().getContentEncoding();
onChanged();
return this;
}
/**
*
*
*
* Content-Encoding of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.2.2][RFC 7231 §3.1.2.2]
*
*
* string content_encoding = 7;
*
* @param value The bytes for contentEncoding to set.
* @return This builder for chaining.
*/
public Builder setContentEncodingBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contentEncoding_ = value;
onChanged();
return this;
}
private java.lang.Object contentDisposition_ = "";
/**
*
*
*
* Content-Disposition of the object data, matching
* [https://tools.ietf.org/html/rfc6266][RFC 6266].
*
*
* string content_disposition = 8;
*
* @return The contentDisposition.
*/
public java.lang.String getContentDisposition() {
java.lang.Object ref = contentDisposition_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contentDisposition_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Content-Disposition of the object data, matching
* [https://tools.ietf.org/html/rfc6266][RFC 6266].
*
*
* string content_disposition = 8;
*
* @return The bytes for contentDisposition.
*/
public com.google.protobuf.ByteString getContentDispositionBytes() {
java.lang.Object ref = contentDisposition_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentDisposition_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Content-Disposition of the object data, matching
* [https://tools.ietf.org/html/rfc6266][RFC 6266].
*
*
* string content_disposition = 8;
*
* @param value The contentDisposition to set.
* @return This builder for chaining.
*/
public Builder setContentDisposition(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contentDisposition_ = value;
onChanged();
return this;
}
/**
*
*
*
* Content-Disposition of the object data, matching
* [https://tools.ietf.org/html/rfc6266][RFC 6266].
*
*
* string content_disposition = 8;
*
* @return This builder for chaining.
*/
public Builder clearContentDisposition() {
contentDisposition_ = getDefaultInstance().getContentDisposition();
onChanged();
return this;
}
/**
*
*
*
* Content-Disposition of the object data, matching
* [https://tools.ietf.org/html/rfc6266][RFC 6266].
*
*
* string content_disposition = 8;
*
* @param value The bytes for contentDisposition to set.
* @return This builder for chaining.
*/
public Builder setContentDispositionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contentDisposition_ = value;
onChanged();
return this;
}
private java.lang.Object cacheControl_ = "";
/**
*
*
*
* Cache-Control directive for the object data, matching
* [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
* If omitted, and the object is accessible to all anonymous users, the
* default will be `public, max-age=3600`.
*
*
* string cache_control = 9;
*
* @return The cacheControl.
*/
public java.lang.String getCacheControl() {
java.lang.Object ref = cacheControl_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
cacheControl_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Cache-Control directive for the object data, matching
* [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
* If omitted, and the object is accessible to all anonymous users, the
* default will be `public, max-age=3600`.
*
*
* string cache_control = 9;
*
* @return The bytes for cacheControl.
*/
public com.google.protobuf.ByteString getCacheControlBytes() {
java.lang.Object ref = cacheControl_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
cacheControl_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Cache-Control directive for the object data, matching
* [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
* If omitted, and the object is accessible to all anonymous users, the
* default will be `public, max-age=3600`.
*
*
* string cache_control = 9;
*
* @param value The cacheControl to set.
* @return This builder for chaining.
*/
public Builder setCacheControl(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
cacheControl_ = value;
onChanged();
return this;
}
/**
*
*
*
* Cache-Control directive for the object data, matching
* [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
* If omitted, and the object is accessible to all anonymous users, the
* default will be `public, max-age=3600`.
*
*
* string cache_control = 9;
*
* @return This builder for chaining.
*/
public Builder clearCacheControl() {
cacheControl_ = getDefaultInstance().getCacheControl();
onChanged();
return this;
}
/**
*
*
*
* Cache-Control directive for the object data, matching
* [https://tools.ietf.org/html/rfc7234#section-5.2"][RFC 7234 §5.2].
* If omitted, and the object is accessible to all anonymous users, the
* default will be `public, max-age=3600`.
*
*
* string cache_control = 9;
*
* @param value The bytes for cacheControl to set.
* @return This builder for chaining.
*/
public Builder setCacheControlBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
cacheControl_ = value;
onChanged();
return this;
}
private java.util.List acl_ =
java.util.Collections.emptyList();
private void ensureAclIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
acl_ = new java.util.ArrayList(acl_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.storage.v2.ObjectAccessControl,
com.google.storage.v2.ObjectAccessControl.Builder,
com.google.storage.v2.ObjectAccessControlOrBuilder>
aclBuilder_;
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public java.util.List getAclList() {
if (aclBuilder_ == null) {
return java.util.Collections.unmodifiableList(acl_);
} else {
return aclBuilder_.getMessageList();
}
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public int getAclCount() {
if (aclBuilder_ == null) {
return acl_.size();
} else {
return aclBuilder_.getCount();
}
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public com.google.storage.v2.ObjectAccessControl getAcl(int index) {
if (aclBuilder_ == null) {
return acl_.get(index);
} else {
return aclBuilder_.getMessage(index);
}
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public Builder setAcl(int index, com.google.storage.v2.ObjectAccessControl value) {
if (aclBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAclIsMutable();
acl_.set(index, value);
onChanged();
} else {
aclBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public Builder setAcl(
int index, com.google.storage.v2.ObjectAccessControl.Builder builderForValue) {
if (aclBuilder_ == null) {
ensureAclIsMutable();
acl_.set(index, builderForValue.build());
onChanged();
} else {
aclBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public Builder addAcl(com.google.storage.v2.ObjectAccessControl value) {
if (aclBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAclIsMutable();
acl_.add(value);
onChanged();
} else {
aclBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public Builder addAcl(int index, com.google.storage.v2.ObjectAccessControl value) {
if (aclBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAclIsMutable();
acl_.add(index, value);
onChanged();
} else {
aclBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public Builder addAcl(com.google.storage.v2.ObjectAccessControl.Builder builderForValue) {
if (aclBuilder_ == null) {
ensureAclIsMutable();
acl_.add(builderForValue.build());
onChanged();
} else {
aclBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public Builder addAcl(
int index, com.google.storage.v2.ObjectAccessControl.Builder builderForValue) {
if (aclBuilder_ == null) {
ensureAclIsMutable();
acl_.add(index, builderForValue.build());
onChanged();
} else {
aclBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public Builder addAllAcl(
java.lang.Iterable extends com.google.storage.v2.ObjectAccessControl> values) {
if (aclBuilder_ == null) {
ensureAclIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, acl_);
onChanged();
} else {
aclBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public Builder clearAcl() {
if (aclBuilder_ == null) {
acl_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
aclBuilder_.clear();
}
return this;
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public Builder removeAcl(int index) {
if (aclBuilder_ == null) {
ensureAclIsMutable();
acl_.remove(index);
onChanged();
} else {
aclBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public com.google.storage.v2.ObjectAccessControl.Builder getAclBuilder(int index) {
return getAclFieldBuilder().getBuilder(index);
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public com.google.storage.v2.ObjectAccessControlOrBuilder getAclOrBuilder(int index) {
if (aclBuilder_ == null) {
return acl_.get(index);
} else {
return aclBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public java.util.List extends com.google.storage.v2.ObjectAccessControlOrBuilder>
getAclOrBuilderList() {
if (aclBuilder_ != null) {
return aclBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(acl_);
}
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public com.google.storage.v2.ObjectAccessControl.Builder addAclBuilder() {
return getAclFieldBuilder()
.addBuilder(com.google.storage.v2.ObjectAccessControl.getDefaultInstance());
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public com.google.storage.v2.ObjectAccessControl.Builder addAclBuilder(int index) {
return getAclFieldBuilder()
.addBuilder(index, com.google.storage.v2.ObjectAccessControl.getDefaultInstance());
}
/**
*
*
*
* Access controls on the object.
* If iamConfig.uniformBucketLevelAccess is enabled on the parent
* bucket, requests to set, read, or modify acl is an error.
*
*
* repeated .google.storage.v2.ObjectAccessControl acl = 10;
*/
public java.util.List getAclBuilderList() {
return getAclFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.storage.v2.ObjectAccessControl,
com.google.storage.v2.ObjectAccessControl.Builder,
com.google.storage.v2.ObjectAccessControlOrBuilder>
getAclFieldBuilder() {
if (aclBuilder_ == null) {
aclBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.storage.v2.ObjectAccessControl,
com.google.storage.v2.ObjectAccessControl.Builder,
com.google.storage.v2.ObjectAccessControlOrBuilder>(
acl_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
acl_ = null;
}
return aclBuilder_;
}
private java.lang.Object contentLanguage_ = "";
/**
*
*
*
* Content-Language of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
*
*
* string content_language = 11;
*
* @return The contentLanguage.
*/
public java.lang.String getContentLanguage() {
java.lang.Object ref = contentLanguage_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contentLanguage_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Content-Language of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
*
*
* string content_language = 11;
*
* @return The bytes for contentLanguage.
*/
public com.google.protobuf.ByteString getContentLanguageBytes() {
java.lang.Object ref = contentLanguage_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentLanguage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Content-Language of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
*
*
* string content_language = 11;
*
* @param value The contentLanguage to set.
* @return This builder for chaining.
*/
public Builder setContentLanguage(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contentLanguage_ = value;
onChanged();
return this;
}
/**
*
*
*
* Content-Language of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
*
*
* string content_language = 11;
*
* @return This builder for chaining.
*/
public Builder clearContentLanguage() {
contentLanguage_ = getDefaultInstance().getContentLanguage();
onChanged();
return this;
}
/**
*
*
*
* Content-Language of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.3.2][RFC 7231 §3.1.3.2].
*
*
* string content_language = 11;
*
* @param value The bytes for contentLanguage to set.
* @return This builder for chaining.
*/
public Builder setContentLanguageBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contentLanguage_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp deleteTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
deleteTimeBuilder_;
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the deleteTime field is set.
*/
public boolean hasDeleteTime() {
return deleteTimeBuilder_ != null || deleteTime_ != null;
}
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The deleteTime.
*/
public com.google.protobuf.Timestamp getDeleteTime() {
if (deleteTimeBuilder_ == null) {
return deleteTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: deleteTime_;
} else {
return deleteTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setDeleteTime(com.google.protobuf.Timestamp value) {
if (deleteTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
deleteTime_ = value;
onChanged();
} else {
deleteTimeBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (deleteTimeBuilder_ == null) {
deleteTime_ = builderForValue.build();
onChanged();
} else {
deleteTimeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) {
if (deleteTimeBuilder_ == null) {
if (deleteTime_ != null) {
deleteTime_ =
com.google.protobuf.Timestamp.newBuilder(deleteTime_).mergeFrom(value).buildPartial();
} else {
deleteTime_ = value;
}
onChanged();
} else {
deleteTimeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearDeleteTime() {
if (deleteTimeBuilder_ == null) {
deleteTime_ = null;
onChanged();
} else {
deleteTime_ = null;
deleteTimeBuilder_ = null;
}
return this;
}
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() {
onChanged();
return getDeleteTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() {
if (deleteTimeBuilder_ != null) {
return deleteTimeBuilder_.getMessageOrBuilder();
} else {
return deleteTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: deleteTime_;
}
}
/**
*
*
*
* Output only. The deletion time of the object. Will be returned if and only if this
* version of the object has been deleted.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp delete_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getDeleteTimeFieldBuilder() {
if (deleteTimeBuilder_ == null) {
deleteTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getDeleteTime(), getParentForChildren(), isClean());
deleteTime_ = null;
}
return deleteTimeBuilder_;
}
private java.lang.Object contentType_ = "";
/**
*
*
*
* Content-Type of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
* If an object is stored without a Content-Type, it is served as
* `application/octet-stream`.
*
*
* string content_type = 13;
*
* @return The contentType.
*/
public java.lang.String getContentType() {
java.lang.Object ref = contentType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
contentType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Content-Type of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
* If an object is stored without a Content-Type, it is served as
* `application/octet-stream`.
*
*
* string content_type = 13;
*
* @return The bytes for contentType.
*/
public com.google.protobuf.ByteString getContentTypeBytes() {
java.lang.Object ref = contentType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
contentType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Content-Type of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
* If an object is stored without a Content-Type, it is served as
* `application/octet-stream`.
*
*
* string content_type = 13;
*
* @param value The contentType to set.
* @return This builder for chaining.
*/
public Builder setContentType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
contentType_ = value;
onChanged();
return this;
}
/**
*
*
*
* Content-Type of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
* If an object is stored without a Content-Type, it is served as
* `application/octet-stream`.
*
*
* string content_type = 13;
*
* @return This builder for chaining.
*/
public Builder clearContentType() {
contentType_ = getDefaultInstance().getContentType();
onChanged();
return this;
}
/**
*
*
*
* Content-Type of the object data, matching
* [https://tools.ietf.org/html/rfc7231#section-3.1.1.5][RFC 7231 §3.1.1.5].
* If an object is stored without a Content-Type, it is served as
* `application/octet-stream`.
*
*
* string content_type = 13;
*
* @param value The bytes for contentType to set.
* @return This builder for chaining.
*/
public Builder setContentTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
contentType_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
createTimeBuilder_;
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the createTime field is set.
*/
public boolean hasCreateTime() {
return createTimeBuilder_ != null || createTime_ != null;
}
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The createTime.
*/
public com.google.protobuf.Timestamp getCreateTime() {
if (createTimeBuilder_ == null) {
return createTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: createTime_;
} else {
return createTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setCreateTime(com.google.protobuf.Timestamp value) {
if (createTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createTime_ = value;
onChanged();
} else {
createTimeBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (createTimeBuilder_ == null) {
createTime_ = builderForValue.build();
onChanged();
} else {
createTimeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
if (createTimeBuilder_ == null) {
if (createTime_ != null) {
createTime_ =
com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial();
} else {
createTime_ = value;
}
onChanged();
} else {
createTimeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearCreateTime() {
if (createTimeBuilder_ == null) {
createTime_ = null;
onChanged();
} else {
createTime_ = null;
createTimeBuilder_ = null;
}
return this;
}
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
onChanged();
return getCreateTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
if (createTimeBuilder_ != null) {
return createTimeBuilder_.getMessageOrBuilder();
} else {
return createTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: createTime_;
}
}
/**
*
*
*
* Output only. The creation time of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp create_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder() {
if (createTimeBuilder_ == null) {
createTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getCreateTime(), getParentForChildren(), isClean());
createTime_ = null;
}
return createTimeBuilder_;
}
private int componentCount_;
/**
*
*
*
* Output only. Number of underlying components that make up this object. Components are
* accumulated by compose operations.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int32 component_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The componentCount.
*/
@java.lang.Override
public int getComponentCount() {
return componentCount_;
}
/**
*
*
*
* Output only. Number of underlying components that make up this object. Components are
* accumulated by compose operations.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int32 component_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The componentCount to set.
* @return This builder for chaining.
*/
public Builder setComponentCount(int value) {
componentCount_ = value;
onChanged();
return this;
}
/**
*
*
*
* Output only. Number of underlying components that make up this object. Components are
* accumulated by compose operations.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* int32 component_count = 15 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearComponentCount() {
componentCount_ = 0;
onChanged();
return this;
}
private com.google.storage.v2.ObjectChecksums checksums_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.storage.v2.ObjectChecksums,
com.google.storage.v2.ObjectChecksums.Builder,
com.google.storage.v2.ObjectChecksumsOrBuilder>
checksumsBuilder_;
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the checksums field is set.
*/
public boolean hasChecksums() {
return checksumsBuilder_ != null || checksums_ != null;
}
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The checksums.
*/
public com.google.storage.v2.ObjectChecksums getChecksums() {
if (checksumsBuilder_ == null) {
return checksums_ == null
? com.google.storage.v2.ObjectChecksums.getDefaultInstance()
: checksums_;
} else {
return checksumsBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setChecksums(com.google.storage.v2.ObjectChecksums value) {
if (checksumsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
checksums_ = value;
onChanged();
} else {
checksumsBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setChecksums(com.google.storage.v2.ObjectChecksums.Builder builderForValue) {
if (checksumsBuilder_ == null) {
checksums_ = builderForValue.build();
onChanged();
} else {
checksumsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeChecksums(com.google.storage.v2.ObjectChecksums value) {
if (checksumsBuilder_ == null) {
if (checksums_ != null) {
checksums_ =
com.google.storage.v2.ObjectChecksums.newBuilder(checksums_)
.mergeFrom(value)
.buildPartial();
} else {
checksums_ = value;
}
onChanged();
} else {
checksumsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearChecksums() {
if (checksumsBuilder_ == null) {
checksums_ = null;
onChanged();
} else {
checksums_ = null;
checksumsBuilder_ = null;
}
return this;
}
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.storage.v2.ObjectChecksums.Builder getChecksumsBuilder() {
onChanged();
return getChecksumsFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.storage.v2.ObjectChecksumsOrBuilder getChecksumsOrBuilder() {
if (checksumsBuilder_ != null) {
return checksumsBuilder_.getMessageOrBuilder();
} else {
return checksums_ == null
? com.google.storage.v2.ObjectChecksums.getDefaultInstance()
: checksums_;
}
}
/**
*
*
*
* Output only. Hashes for the data part of this object.
*
*
*
* .google.storage.v2.ObjectChecksums checksums = 16 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.storage.v2.ObjectChecksums,
com.google.storage.v2.ObjectChecksums.Builder,
com.google.storage.v2.ObjectChecksumsOrBuilder>
getChecksumsFieldBuilder() {
if (checksumsBuilder_ == null) {
checksumsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.storage.v2.ObjectChecksums,
com.google.storage.v2.ObjectChecksums.Builder,
com.google.storage.v2.ObjectChecksumsOrBuilder>(
getChecksums(), getParentForChildren(), isClean());
checksums_ = null;
}
return checksumsBuilder_;
}
private com.google.protobuf.Timestamp updateTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
updateTimeBuilder_;
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the updateTime field is set.
*/
public boolean hasUpdateTime() {
return updateTimeBuilder_ != null || updateTime_ != null;
}
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The updateTime.
*/
public com.google.protobuf.Timestamp getUpdateTime() {
if (updateTimeBuilder_ == null) {
return updateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: updateTime_;
} else {
return updateTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
if (updateTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
updateTime_ = value;
onChanged();
} else {
updateTimeBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (updateTimeBuilder_ == null) {
updateTime_ = builderForValue.build();
onChanged();
} else {
updateTimeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
if (updateTimeBuilder_ == null) {
if (updateTime_ != null) {
updateTime_ =
com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial();
} else {
updateTime_ = value;
}
onChanged();
} else {
updateTimeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearUpdateTime() {
if (updateTimeBuilder_ == null) {
updateTime_ = null;
onChanged();
} else {
updateTime_ = null;
updateTimeBuilder_ = null;
}
return this;
}
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
onChanged();
return getUpdateTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
if (updateTimeBuilder_ != null) {
return updateTimeBuilder_.getMessageOrBuilder();
} else {
return updateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: updateTime_;
}
}
/**
*
*
*
* Output only. The modification time of the object metadata.
* Set initially to object creation time and then updated whenever any
* metadata of the object changes. This includes changes made by a requester,
* such as modifying custom metadata, as well as changes made by Cloud Storage
* on behalf of a requester, such as changing the storage class based on an
* Object Lifecycle Configuration.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_time = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getUpdateTimeFieldBuilder() {
if (updateTimeBuilder_ == null) {
updateTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getUpdateTime(), getParentForChildren(), isClean());
updateTime_ = null;
}
return updateTimeBuilder_;
}
private java.lang.Object kmsKey_ = "";
/**
*
*
*
* Cloud KMS Key used to encrypt this object, if the object is encrypted by
* such a key.
*
*
* string kms_key = 18 [(.google.api.resource_reference) = { ... }
*
* @return The kmsKey.
*/
public java.lang.String getKmsKey() {
java.lang.Object ref = kmsKey_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
kmsKey_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Cloud KMS Key used to encrypt this object, if the object is encrypted by
* such a key.
*
*
* string kms_key = 18 [(.google.api.resource_reference) = { ... }
*
* @return The bytes for kmsKey.
*/
public com.google.protobuf.ByteString getKmsKeyBytes() {
java.lang.Object ref = kmsKey_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kmsKey_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Cloud KMS Key used to encrypt this object, if the object is encrypted by
* such a key.
*
*
* string kms_key = 18 [(.google.api.resource_reference) = { ... }
*
* @param value The kmsKey to set.
* @return This builder for chaining.
*/
public Builder setKmsKey(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
kmsKey_ = value;
onChanged();
return this;
}
/**
*
*
*
* Cloud KMS Key used to encrypt this object, if the object is encrypted by
* such a key.
*
*
* string kms_key = 18 [(.google.api.resource_reference) = { ... }
*
* @return This builder for chaining.
*/
public Builder clearKmsKey() {
kmsKey_ = getDefaultInstance().getKmsKey();
onChanged();
return this;
}
/**
*
*
*
* Cloud KMS Key used to encrypt this object, if the object is encrypted by
* such a key.
*
*
* string kms_key = 18 [(.google.api.resource_reference) = { ... }
*
* @param value The bytes for kmsKey to set.
* @return This builder for chaining.
*/
public Builder setKmsKeyBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
kmsKey_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp updateStorageClassTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
updateStorageClassTimeBuilder_;
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the updateStorageClassTime field is set.
*/
public boolean hasUpdateStorageClassTime() {
return updateStorageClassTimeBuilder_ != null || updateStorageClassTime_ != null;
}
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The updateStorageClassTime.
*/
public com.google.protobuf.Timestamp getUpdateStorageClassTime() {
if (updateStorageClassTimeBuilder_ == null) {
return updateStorageClassTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: updateStorageClassTime_;
} else {
return updateStorageClassTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setUpdateStorageClassTime(com.google.protobuf.Timestamp value) {
if (updateStorageClassTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
updateStorageClassTime_ = value;
onChanged();
} else {
updateStorageClassTimeBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setUpdateStorageClassTime(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (updateStorageClassTimeBuilder_ == null) {
updateStorageClassTime_ = builderForValue.build();
onChanged();
} else {
updateStorageClassTimeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeUpdateStorageClassTime(com.google.protobuf.Timestamp value) {
if (updateStorageClassTimeBuilder_ == null) {
if (updateStorageClassTime_ != null) {
updateStorageClassTime_ =
com.google.protobuf.Timestamp.newBuilder(updateStorageClassTime_)
.mergeFrom(value)
.buildPartial();
} else {
updateStorageClassTime_ = value;
}
onChanged();
} else {
updateStorageClassTimeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearUpdateStorageClassTime() {
if (updateStorageClassTimeBuilder_ == null) {
updateStorageClassTime_ = null;
onChanged();
} else {
updateStorageClassTime_ = null;
updateStorageClassTimeBuilder_ = null;
}
return this;
}
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getUpdateStorageClassTimeBuilder() {
onChanged();
return getUpdateStorageClassTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getUpdateStorageClassTimeOrBuilder() {
if (updateStorageClassTimeBuilder_ != null) {
return updateStorageClassTimeBuilder_.getMessageOrBuilder();
} else {
return updateStorageClassTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: updateStorageClassTime_;
}
}
/**
*
*
*
* Output only. The time at which the object's storage class was last changed. When the
* object is initially created, it will be set to time_created.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
*
* .google.protobuf.Timestamp update_storage_class_time = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getUpdateStorageClassTimeFieldBuilder() {
if (updateStorageClassTimeBuilder_ == null) {
updateStorageClassTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getUpdateStorageClassTime(), getParentForChildren(), isClean());
updateStorageClassTime_ = null;
}
return updateStorageClassTimeBuilder_;
}
private boolean temporaryHold_;
/**
*
*
*
* Whether an object is under temporary hold. While this flag is set to true,
* the object is protected against deletion and overwrites. A common use case
* of this flag is regulatory investigations where objects need to be retained
* while the investigation is ongoing. Note that unlike event-based hold,
* temporary hold does not impact retention expiration time of an object.
*
*
* bool temporary_hold = 20;
*
* @return The temporaryHold.
*/
@java.lang.Override
public boolean getTemporaryHold() {
return temporaryHold_;
}
/**
*
*
*
* Whether an object is under temporary hold. While this flag is set to true,
* the object is protected against deletion and overwrites. A common use case
* of this flag is regulatory investigations where objects need to be retained
* while the investigation is ongoing. Note that unlike event-based hold,
* temporary hold does not impact retention expiration time of an object.
*
*
* bool temporary_hold = 20;
*
* @param value The temporaryHold to set.
* @return This builder for chaining.
*/
public Builder setTemporaryHold(boolean value) {
temporaryHold_ = value;
onChanged();
return this;
}
/**
*
*
*
* Whether an object is under temporary hold. While this flag is set to true,
* the object is protected against deletion and overwrites. A common use case
* of this flag is regulatory investigations where objects need to be retained
* while the investigation is ongoing. Note that unlike event-based hold,
* temporary hold does not impact retention expiration time of an object.
*
*
* bool temporary_hold = 20;
*
* @return This builder for chaining.
*/
public Builder clearTemporaryHold() {
temporaryHold_ = false;
onChanged();
return this;
}
private com.google.protobuf.Timestamp retentionExpireTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
retentionExpireTimeBuilder_;
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*
* @return Whether the retentionExpireTime field is set.
*/
public boolean hasRetentionExpireTime() {
return retentionExpireTimeBuilder_ != null || retentionExpireTime_ != null;
}
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*
* @return The retentionExpireTime.
*/
public com.google.protobuf.Timestamp getRetentionExpireTime() {
if (retentionExpireTimeBuilder_ == null) {
return retentionExpireTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: retentionExpireTime_;
} else {
return retentionExpireTimeBuilder_.getMessage();
}
}
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*/
public Builder setRetentionExpireTime(com.google.protobuf.Timestamp value) {
if (retentionExpireTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
retentionExpireTime_ = value;
onChanged();
} else {
retentionExpireTimeBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*/
public Builder setRetentionExpireTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (retentionExpireTimeBuilder_ == null) {
retentionExpireTime_ = builderForValue.build();
onChanged();
} else {
retentionExpireTimeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*/
public Builder mergeRetentionExpireTime(com.google.protobuf.Timestamp value) {
if (retentionExpireTimeBuilder_ == null) {
if (retentionExpireTime_ != null) {
retentionExpireTime_ =
com.google.protobuf.Timestamp.newBuilder(retentionExpireTime_)
.mergeFrom(value)
.buildPartial();
} else {
retentionExpireTime_ = value;
}
onChanged();
} else {
retentionExpireTimeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*/
public Builder clearRetentionExpireTime() {
if (retentionExpireTimeBuilder_ == null) {
retentionExpireTime_ = null;
onChanged();
} else {
retentionExpireTime_ = null;
retentionExpireTimeBuilder_ = null;
}
return this;
}
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*/
public com.google.protobuf.Timestamp.Builder getRetentionExpireTimeBuilder() {
onChanged();
return getRetentionExpireTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*/
public com.google.protobuf.TimestampOrBuilder getRetentionExpireTimeOrBuilder() {
if (retentionExpireTimeBuilder_ != null) {
return retentionExpireTimeBuilder_.getMessageOrBuilder();
} else {
return retentionExpireTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: retentionExpireTime_;
}
}
/**
*
*
*
* A server-determined value that specifies the earliest time that the
* object's retention period expires.
* Note 1: This field is not provided for objects with an active event-based
* hold, since retention expiration is unknown until the hold is removed.
* Note 2: This value can be provided even when temporary hold is set (so that
* the user can reason about policy without having to first unset the
* temporary hold).
*
*
* .google.protobuf.Timestamp retention_expire_time = 21;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getRetentionExpireTimeFieldBuilder() {
if (retentionExpireTimeBuilder_ == null) {
retentionExpireTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getRetentionExpireTime(), getParentForChildren(), isClean());
retentionExpireTime_ = null;
}
return retentionExpireTimeBuilder_;
}
private com.google.protobuf.MapField metadata_;
private com.google.protobuf.MapField internalGetMetadata() {
if (metadata_ == null) {
return com.google.protobuf.MapField.emptyMapField(MetadataDefaultEntryHolder.defaultEntry);
}
return metadata_;
}
private com.google.protobuf.MapField
internalGetMutableMetadata() {
onChanged();
;
if (metadata_ == null) {
metadata_ =
com.google.protobuf.MapField.newMapField(MetadataDefaultEntryHolder.defaultEntry);
}
if (!metadata_.isMutable()) {
metadata_ = metadata_.copy();
}
return metadata_;
}
public int getMetadataCount() {
return internalGetMetadata().getMap().size();
}
/**
*
*
*
* User-provided metadata, in key/value pairs.
*
*
* map<string, string> metadata = 22;
*/
@java.lang.Override
public boolean containsMetadata(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
return internalGetMetadata().getMap().containsKey(key);
}
/** Use {@link #getMetadataMap()} instead. */
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetadata() {
return getMetadataMap();
}
/**
*
*
*
* User-provided metadata, in key/value pairs.
*
*
* map<string, string> metadata = 22;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
*
*
*
* User-provided metadata, in key/value pairs.
*
*
* map<string, string> metadata = 22;
*/
@java.lang.Override
public java.lang.String getMetadataOrDefault(
java.lang.String key, java.lang.String defaultValue) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetMetadata().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*
*
* User-provided metadata, in key/value pairs.
*
*
* map<string, string> metadata = 22;
*/
@java.lang.Override
public java.lang.String getMetadataOrThrow(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
java.util.Map map = internalGetMetadata().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearMetadata() {
internalGetMutableMetadata().getMutableMap().clear();
return this;
}
/**
*
*
*
* User-provided metadata, in key/value pairs.
*
*
* map<string, string> metadata = 22;
*/
public Builder removeMetadata(java.lang.String key) {
if (key == null) {
throw new NullPointerException("map key");
}
internalGetMutableMetadata().getMutableMap().remove(key);
return this;
}
/** Use alternate mutation accessors instead. */
@java.lang.Deprecated
public java.util.Map getMutableMetadata() {
return internalGetMutableMetadata().getMutableMap();
}
/**
*
*
*
* User-provided metadata, in key/value pairs.
*
*
* map<string, string> metadata = 22;
*/
public Builder putMetadata(java.lang.String key, java.lang.String value) {
if (key == null) {
throw new NullPointerException("map key");
}
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableMetadata().getMutableMap().put(key, value);
return this;
}
/**
*
*
*
* User-provided metadata, in key/value pairs.
*
*
* map<string, string> metadata = 22;
*/
public Builder putAllMetadata(java.util.Map values) {
internalGetMutableMetadata().getMutableMap().putAll(values);
return this;
}
private boolean eventBasedHold_;
/**
*
*
*
* Whether an object is under event-based hold.
* An event-based hold is a way to force the retention of an object until
* after some event occurs. Once the hold is released by explicitly setting
* this field to false, the object will become subject to any bucket-level
* retention policy, except that the retention duration will be calculated
* from the time the event based hold was lifted, rather than the time the
* object was created.
* In a WriteObject request, not setting this field implies that the value
* should be taken from the parent bucket's "default_event_based_hold" field.
* In a response, this field will always be set to true or false.
*
*
* optional bool event_based_hold = 23;
*
* @return Whether the eventBasedHold field is set.
*/
@java.lang.Override
public boolean hasEventBasedHold() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Whether an object is under event-based hold.
* An event-based hold is a way to force the retention of an object until
* after some event occurs. Once the hold is released by explicitly setting
* this field to false, the object will become subject to any bucket-level
* retention policy, except that the retention duration will be calculated
* from the time the event based hold was lifted, rather than the time the
* object was created.
* In a WriteObject request, not setting this field implies that the value
* should be taken from the parent bucket's "default_event_based_hold" field.
* In a response, this field will always be set to true or false.
*
*
* optional bool event_based_hold = 23;
*
* @return The eventBasedHold.
*/
@java.lang.Override
public boolean getEventBasedHold() {
return eventBasedHold_;
}
/**
*
*
*
* Whether an object is under event-based hold.
* An event-based hold is a way to force the retention of an object until
* after some event occurs. Once the hold is released by explicitly setting
* this field to false, the object will become subject to any bucket-level
* retention policy, except that the retention duration will be calculated
* from the time the event based hold was lifted, rather than the time the
* object was created.
* In a WriteObject request, not setting this field implies that the value
* should be taken from the parent bucket's "default_event_based_hold" field.
* In a response, this field will always be set to true or false.
*
*
* optional bool event_based_hold = 23;
*
* @param value The eventBasedHold to set.
* @return This builder for chaining.
*/
public Builder setEventBasedHold(boolean value) {
bitField0_ |= 0x00000004;
eventBasedHold_ = value;
onChanged();
return this;
}
/**
*
*
*
* Whether an object is under event-based hold.
* An event-based hold is a way to force the retention of an object until
* after some event occurs. Once the hold is released by explicitly setting
* this field to false, the object will become subject to any bucket-level
* retention policy, except that the retention duration will be calculated
* from the time the event based hold was lifted, rather than the time the
* object was created.
* In a WriteObject request, not setting this field implies that the value
* should be taken from the parent bucket's "default_event_based_hold" field.
* In a response, this field will always be set to true or false.
*
*
* optional bool event_based_hold = 23;
*
* @return This builder for chaining.
*/
public Builder clearEventBasedHold() {
bitField0_ = (bitField0_ & ~0x00000004);
eventBasedHold_ = false;
onChanged();
return this;
}
private com.google.storage.v2.Owner owner_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.storage.v2.Owner,
com.google.storage.v2.Owner.Builder,
com.google.storage.v2.OwnerOrBuilder>
ownerBuilder_;
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the owner field is set.
*/
public boolean hasOwner() {
return ownerBuilder_ != null || owner_ != null;
}
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The owner.
*/
public com.google.storage.v2.Owner getOwner() {
if (ownerBuilder_ == null) {
return owner_ == null ? com.google.storage.v2.Owner.getDefaultInstance() : owner_;
} else {
return ownerBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setOwner(com.google.storage.v2.Owner value) {
if (ownerBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
owner_ = value;
onChanged();
} else {
ownerBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setOwner(com.google.storage.v2.Owner.Builder builderForValue) {
if (ownerBuilder_ == null) {
owner_ = builderForValue.build();
onChanged();
} else {
ownerBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeOwner(com.google.storage.v2.Owner value) {
if (ownerBuilder_ == null) {
if (owner_ != null) {
owner_ = com.google.storage.v2.Owner.newBuilder(owner_).mergeFrom(value).buildPartial();
} else {
owner_ = value;
}
onChanged();
} else {
ownerBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearOwner() {
if (ownerBuilder_ == null) {
owner_ = null;
onChanged();
} else {
owner_ = null;
ownerBuilder_ = null;
}
return this;
}
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.storage.v2.Owner.Builder getOwnerBuilder() {
onChanged();
return getOwnerFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.storage.v2.OwnerOrBuilder getOwnerOrBuilder() {
if (ownerBuilder_ != null) {
return ownerBuilder_.getMessageOrBuilder();
} else {
return owner_ == null ? com.google.storage.v2.Owner.getDefaultInstance() : owner_;
}
}
/**
*
*
*
* Output only. The owner of the object. This will always be the uploader of the object.
* Attempting to set or update this field will result in a
* [FieldViolation][google.rpc.BadRequest.FieldViolation].
*
*
* .google.storage.v2.Owner owner = 24 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.storage.v2.Owner,
com.google.storage.v2.Owner.Builder,
com.google.storage.v2.OwnerOrBuilder>
getOwnerFieldBuilder() {
if (ownerBuilder_ == null) {
ownerBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.storage.v2.Owner,
com.google.storage.v2.Owner.Builder,
com.google.storage.v2.OwnerOrBuilder>(
getOwner(), getParentForChildren(), isClean());
owner_ = null;
}
return ownerBuilder_;
}
private com.google.storage.v2.CustomerEncryption customerEncryption_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.storage.v2.CustomerEncryption,
com.google.storage.v2.CustomerEncryption.Builder,
com.google.storage.v2.CustomerEncryptionOrBuilder>
customerEncryptionBuilder_;
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*
* @return Whether the customerEncryption field is set.
*/
public boolean hasCustomerEncryption() {
return customerEncryptionBuilder_ != null || customerEncryption_ != null;
}
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*
* @return The customerEncryption.
*/
public com.google.storage.v2.CustomerEncryption getCustomerEncryption() {
if (customerEncryptionBuilder_ == null) {
return customerEncryption_ == null
? com.google.storage.v2.CustomerEncryption.getDefaultInstance()
: customerEncryption_;
} else {
return customerEncryptionBuilder_.getMessage();
}
}
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*/
public Builder setCustomerEncryption(com.google.storage.v2.CustomerEncryption value) {
if (customerEncryptionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
customerEncryption_ = value;
onChanged();
} else {
customerEncryptionBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*/
public Builder setCustomerEncryption(
com.google.storage.v2.CustomerEncryption.Builder builderForValue) {
if (customerEncryptionBuilder_ == null) {
customerEncryption_ = builderForValue.build();
onChanged();
} else {
customerEncryptionBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*/
public Builder mergeCustomerEncryption(com.google.storage.v2.CustomerEncryption value) {
if (customerEncryptionBuilder_ == null) {
if (customerEncryption_ != null) {
customerEncryption_ =
com.google.storage.v2.CustomerEncryption.newBuilder(customerEncryption_)
.mergeFrom(value)
.buildPartial();
} else {
customerEncryption_ = value;
}
onChanged();
} else {
customerEncryptionBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*/
public Builder clearCustomerEncryption() {
if (customerEncryptionBuilder_ == null) {
customerEncryption_ = null;
onChanged();
} else {
customerEncryption_ = null;
customerEncryptionBuilder_ = null;
}
return this;
}
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*/
public com.google.storage.v2.CustomerEncryption.Builder getCustomerEncryptionBuilder() {
onChanged();
return getCustomerEncryptionFieldBuilder().getBuilder();
}
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*/
public com.google.storage.v2.CustomerEncryptionOrBuilder getCustomerEncryptionOrBuilder() {
if (customerEncryptionBuilder_ != null) {
return customerEncryptionBuilder_.getMessageOrBuilder();
} else {
return customerEncryption_ == null
? com.google.storage.v2.CustomerEncryption.getDefaultInstance()
: customerEncryption_;
}
}
/**
*
*
*
* Metadata of Customer-Supplied Encryption Key, if the object is encrypted by
* such a key.
*
*
* .google.storage.v2.CustomerEncryption customer_encryption = 25;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.storage.v2.CustomerEncryption,
com.google.storage.v2.CustomerEncryption.Builder,
com.google.storage.v2.CustomerEncryptionOrBuilder>
getCustomerEncryptionFieldBuilder() {
if (customerEncryptionBuilder_ == null) {
customerEncryptionBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.storage.v2.CustomerEncryption,
com.google.storage.v2.CustomerEncryption.Builder,
com.google.storage.v2.CustomerEncryptionOrBuilder>(
getCustomerEncryption(), getParentForChildren(), isClean());
customerEncryption_ = null;
}
return customerEncryptionBuilder_;
}
private com.google.protobuf.Timestamp customTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
customTimeBuilder_;
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*
* @return Whether the customTime field is set.
*/
public boolean hasCustomTime() {
return customTimeBuilder_ != null || customTime_ != null;
}
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*
* @return The customTime.
*/
public com.google.protobuf.Timestamp getCustomTime() {
if (customTimeBuilder_ == null) {
return customTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: customTime_;
} else {
return customTimeBuilder_.getMessage();
}
}
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*/
public Builder setCustomTime(com.google.protobuf.Timestamp value) {
if (customTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
customTime_ = value;
onChanged();
} else {
customTimeBuilder_.setMessage(value);
}
return this;
}
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*/
public Builder setCustomTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (customTimeBuilder_ == null) {
customTime_ = builderForValue.build();
onChanged();
} else {
customTimeBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*/
public Builder mergeCustomTime(com.google.protobuf.Timestamp value) {
if (customTimeBuilder_ == null) {
if (customTime_ != null) {
customTime_ =
com.google.protobuf.Timestamp.newBuilder(customTime_).mergeFrom(value).buildPartial();
} else {
customTime_ = value;
}
onChanged();
} else {
customTimeBuilder_.mergeFrom(value);
}
return this;
}
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*/
public Builder clearCustomTime() {
if (customTimeBuilder_ == null) {
customTime_ = null;
onChanged();
} else {
customTime_ = null;
customTimeBuilder_ = null;
}
return this;
}
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*/
public com.google.protobuf.Timestamp.Builder getCustomTimeBuilder() {
onChanged();
return getCustomTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*/
public com.google.protobuf.TimestampOrBuilder getCustomTimeOrBuilder() {
if (customTimeBuilder_ != null) {
return customTimeBuilder_.getMessageOrBuilder();
} else {
return customTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: customTime_;
}
}
/**
*
*
*
* A user-specified timestamp set on an object.
*
*
* .google.protobuf.Timestamp custom_time = 26;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getCustomTimeFieldBuilder() {
if (customTimeBuilder_ == null) {
customTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getCustomTime(), getParentForChildren(), isClean());
customTime_ = null;
}
return customTimeBuilder_;
}
@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:google.storage.v2.Object)
}
// @@protoc_insertion_point(class_scope:google.storage.v2.Object)
private static final com.google.storage.v2.Object DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.storage.v2.Object();
}
public static com.google.storage.v2.Object getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
© 2015 - 2025 Weber Informatics LLC | Privacy Policy