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

com.google.storage.v2.ComposeObjectRequest Maven / Gradle / Ivy

There is a newer version: 2.47.0
Show newest version
/*
 * Copyright 2024 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

// Protobuf Java Version: 3.25.2
package com.google.storage.v2;

/**
 *
 *
 * 
 * Request message for ComposeObject.
 * 
* * Protobuf type {@code google.storage.v2.ComposeObjectRequest} */ public final class ComposeObjectRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.storage.v2.ComposeObjectRequest) ComposeObjectRequestOrBuilder { private static final long serialVersionUID = 0L; // Use ComposeObjectRequest.newBuilder() to construct. private ComposeObjectRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ComposeObjectRequest() { sourceObjects_ = java.util.Collections.emptyList(); destinationPredefinedAcl_ = ""; kmsKey_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ComposeObjectRequest(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.storage.v2.ComposeObjectRequest.class, com.google.storage.v2.ComposeObjectRequest.Builder.class); } public interface SourceObjectOrBuilder extends // @@protoc_insertion_point(interface_extends:google.storage.v2.ComposeObjectRequest.SourceObject) com.google.protobuf.MessageOrBuilder { /** * * *
     * Required. The source object's name. All source objects must reside in the
     * same bucket.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The name. */ java.lang.String getName(); /** * * *
     * Required. The source object's name. All source objects must reside in the
     * same bucket.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** * * *
     * The generation of this object to use as the source.
     * 
* * int64 generation = 2; * * @return The generation. */ long getGeneration(); /** * * *
     * Conditions that must be met for this operation to execute.
     * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * * * @return Whether the objectPreconditions field is set. */ boolean hasObjectPreconditions(); /** * * *
     * Conditions that must be met for this operation to execute.
     * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * * * @return The objectPreconditions. */ com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions getObjectPreconditions(); /** * * *
     * Conditions that must be met for this operation to execute.
     * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * */ com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditionsOrBuilder getObjectPreconditionsOrBuilder(); } /** * * *
   * Description of a source object for a composition request.
   * 
* * Protobuf type {@code google.storage.v2.ComposeObjectRequest.SourceObject} */ public static final class SourceObject extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.storage.v2.ComposeObjectRequest.SourceObject) SourceObjectOrBuilder { private static final long serialVersionUID = 0L; // Use SourceObject.newBuilder() to construct. private SourceObject(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private SourceObject() { name_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new SourceObject(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_SourceObject_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_SourceObject_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.storage.v2.ComposeObjectRequest.SourceObject.class, com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder.class); } public interface ObjectPreconditionsOrBuilder extends // @@protoc_insertion_point(interface_extends:google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions) com.google.protobuf.MessageOrBuilder { /** * * *
       * Only perform the composition if the generation of the source object
       * that would be used matches this value.  If this value and a generation
       * are both specified, they must be the same value or the call will fail.
       * 
* * optional int64 if_generation_match = 1; * * @return Whether the ifGenerationMatch field is set. */ boolean hasIfGenerationMatch(); /** * * *
       * Only perform the composition if the generation of the source object
       * that would be used matches this value.  If this value and a generation
       * are both specified, they must be the same value or the call will fail.
       * 
* * optional int64 if_generation_match = 1; * * @return The ifGenerationMatch. */ long getIfGenerationMatch(); } /** * * *
     * Preconditions for a source object of a composition request.
     * 
* * Protobuf type {@code google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions} */ public static final class ObjectPreconditions extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions) ObjectPreconditionsOrBuilder { private static final long serialVersionUID = 0L; // Use ObjectPreconditions.newBuilder() to construct. private ObjectPreconditions(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ObjectPreconditions() {} @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new ObjectPreconditions(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_SourceObject_ObjectPreconditions_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_SourceObject_ObjectPreconditions_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions.class, com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions.Builder .class); } private int bitField0_; public static final int IF_GENERATION_MATCH_FIELD_NUMBER = 1; private long ifGenerationMatch_ = 0L; /** * * *
       * Only perform the composition if the generation of the source object
       * that would be used matches this value.  If this value and a generation
       * are both specified, they must be the same value or the call will fail.
       * 
* * optional int64 if_generation_match = 1; * * @return Whether the ifGenerationMatch field is set. */ @java.lang.Override public boolean hasIfGenerationMatch() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
       * Only perform the composition if the generation of the source object
       * that would be used matches this value.  If this value and a generation
       * are both specified, they must be the same value or the call will fail.
       * 
* * optional int64 if_generation_match = 1; * * @return The ifGenerationMatch. */ @java.lang.Override public long getIfGenerationMatch() { return ifGenerationMatch_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeInt64(1, ifGenerationMatch_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, ifGenerationMatch_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions)) { return super.equals(obj); } com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions other = (com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions) obj; if (hasIfGenerationMatch() != other.hasIfGenerationMatch()) return false; if (hasIfGenerationMatch()) { if (getIfGenerationMatch() != other.getIfGenerationMatch()) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasIfGenerationMatch()) { hash = (37 * hash) + IF_GENERATION_MATCH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIfGenerationMatch()); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions 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.ComposeObjectRequest.SourceObject.ObjectPreconditions parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions 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.ComposeObjectRequest.SourceObject.ObjectPreconditions parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions 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.ComposeObjectRequest.SourceObject.ObjectPreconditions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions 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.ComposeObjectRequest.SourceObject.ObjectPreconditions parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions 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.ComposeObjectRequest.SourceObject.ObjectPreconditions 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; } /** * * *
       * Preconditions for a source object of a composition request.
       * 
* * Protobuf type {@code * google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions) com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditionsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_SourceObject_ObjectPreconditions_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_SourceObject_ObjectPreconditions_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions.class, com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions .Builder.class); } // Construct using // com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; ifGenerationMatch_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_SourceObject_ObjectPreconditions_descriptor; } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions getDefaultInstanceForType() { return com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions .getDefaultInstance(); } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions build() { com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions buildPartial() { com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions result = new com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0( com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.ifGenerationMatch_ = ifGenerationMatch_; to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @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.ComposeObjectRequest.SourceObject.ObjectPreconditions) { return mergeFrom( (com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom( com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions other) { if (other == com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions .getDefaultInstance()) return this; if (other.hasIfGenerationMatch()) { setIfGenerationMatch(other.getIfGenerationMatch()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { ifGenerationMatch_ = input.readInt64(); bitField0_ |= 0x00000001; break; } // case 8 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private long ifGenerationMatch_; /** * * *
         * Only perform the composition if the generation of the source object
         * that would be used matches this value.  If this value and a generation
         * are both specified, they must be the same value or the call will fail.
         * 
* * optional int64 if_generation_match = 1; * * @return Whether the ifGenerationMatch field is set. */ @java.lang.Override public boolean hasIfGenerationMatch() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
         * Only perform the composition if the generation of the source object
         * that would be used matches this value.  If this value and a generation
         * are both specified, they must be the same value or the call will fail.
         * 
* * optional int64 if_generation_match = 1; * * @return The ifGenerationMatch. */ @java.lang.Override public long getIfGenerationMatch() { return ifGenerationMatch_; } /** * * *
         * Only perform the composition if the generation of the source object
         * that would be used matches this value.  If this value and a generation
         * are both specified, they must be the same value or the call will fail.
         * 
* * optional int64 if_generation_match = 1; * * @param value The ifGenerationMatch to set. * @return This builder for chaining. */ public Builder setIfGenerationMatch(long value) { ifGenerationMatch_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
         * Only perform the composition if the generation of the source object
         * that would be used matches this value.  If this value and a generation
         * are both specified, they must be the same value or the call will fail.
         * 
* * optional int64 if_generation_match = 1; * * @return This builder for chaining. */ public Builder clearIfGenerationMatch() { bitField0_ = (bitField0_ & ~0x00000001); ifGenerationMatch_ = 0L; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions) } // @@protoc_insertion_point(class_scope:google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions) private static final com.google.storage.v2.ComposeObjectRequest.SourceObject .ObjectPreconditions DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions(); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ObjectPreconditions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
     * Required. The source object's name. All source objects must reside in the
     * same bucket.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } } /** * * *
     * Required. The source object's name. All source objects must reside in the
     * same bucket.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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 GENERATION_FIELD_NUMBER = 2; private long generation_ = 0L; /** * * *
     * The generation of this object to use as the source.
     * 
* * int64 generation = 2; * * @return The generation. */ @java.lang.Override public long getGeneration() { return generation_; } public static final int OBJECT_PRECONDITIONS_FIELD_NUMBER = 3; private com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions objectPreconditions_; /** * * *
     * Conditions that must be met for this operation to execute.
     * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * * * @return Whether the objectPreconditions field is set. */ @java.lang.Override public boolean hasObjectPreconditions() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * Conditions that must be met for this operation to execute.
     * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * * * @return The objectPreconditions. */ @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions getObjectPreconditions() { return objectPreconditions_ == null ? com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions .getDefaultInstance() : objectPreconditions_; } /** * * *
     * Conditions that must be met for this operation to execute.
     * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * */ @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditionsOrBuilder getObjectPreconditionsOrBuilder() { return objectPreconditions_ == null ? com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions .getDefaultInstance() : objectPreconditions_; } 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 (generation_ != 0L) { output.writeInt64(2, generation_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getObjectPreconditions()); } getUnknownFields().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 (generation_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, generation_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getObjectPreconditions()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.storage.v2.ComposeObjectRequest.SourceObject)) { return super.equals(obj); } com.google.storage.v2.ComposeObjectRequest.SourceObject other = (com.google.storage.v2.ComposeObjectRequest.SourceObject) obj; if (!getName().equals(other.getName())) return false; if (getGeneration() != other.getGeneration()) return false; if (hasObjectPreconditions() != other.hasObjectPreconditions()) return false; if (hasObjectPreconditions()) { if (!getObjectPreconditions().equals(other.getObjectPreconditions())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + GENERATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getGeneration()); if (hasObjectPreconditions()) { hash = (37 * hash) + OBJECT_PRECONDITIONS_FIELD_NUMBER; hash = (53 * hash) + getObjectPreconditions().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.storage.v2.ComposeObjectRequest.SourceObject parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject 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.ComposeObjectRequest.SourceObject parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject 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.ComposeObjectRequest.SourceObject parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject 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.ComposeObjectRequest.SourceObject parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject 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.ComposeObjectRequest.SourceObject parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject 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.ComposeObjectRequest.SourceObject 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; } /** * * *
     * Description of a source object for a composition request.
     * 
* * Protobuf type {@code google.storage.v2.ComposeObjectRequest.SourceObject} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.storage.v2.ComposeObjectRequest.SourceObject) com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_SourceObject_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_SourceObject_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.storage.v2.ComposeObjectRequest.SourceObject.class, com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder.class); } // Construct using com.google.storage.v2.ComposeObjectRequest.SourceObject.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getObjectPreconditionsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; generation_ = 0L; objectPreconditions_ = null; if (objectPreconditionsBuilder_ != null) { objectPreconditionsBuilder_.dispose(); objectPreconditionsBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_SourceObject_descriptor; } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject getDefaultInstanceForType() { return com.google.storage.v2.ComposeObjectRequest.SourceObject.getDefaultInstance(); } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject build() { com.google.storage.v2.ComposeObjectRequest.SourceObject result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject buildPartial() { com.google.storage.v2.ComposeObjectRequest.SourceObject result = new com.google.storage.v2.ComposeObjectRequest.SourceObject(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.google.storage.v2.ComposeObjectRequest.SourceObject result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.generation_ = generation_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.objectPreconditions_ = objectPreconditionsBuilder_ == null ? objectPreconditions_ : objectPreconditionsBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } @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.ComposeObjectRequest.SourceObject) { return mergeFrom((com.google.storage.v2.ComposeObjectRequest.SourceObject) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.storage.v2.ComposeObjectRequest.SourceObject other) { if (other == com.google.storage.v2.ComposeObjectRequest.SourceObject.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (other.getGeneration() != 0L) { setGeneration(other.getGeneration()); } if (other.hasObjectPreconditions()) { mergeObjectPreconditions(other.getObjectPreconditions()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { name_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { generation_ = input.readInt64(); bitField0_ |= 0x00000002; break; } // case 16 case 26: { input.readMessage( getObjectPreconditionsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object name_ = ""; /** * * *
       * Required. The source object's name. All source objects must reside in the
       * same bucket.
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } } /** * * *
       * Required. The source object's name. All source objects must reside in the
       * same bucket.
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } } /** * * *
       * Required. The source object's name. All source objects must reside in the
       * same bucket.
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @param value The name to set. * @return This builder for chaining. */ public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
       * Required. The source object's name. All source objects must reside in the
       * same bucket.
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
       * Required. The source object's name. All source objects must reside in the
       * same bucket.
       * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; bitField0_ |= 0x00000001; onChanged(); return this; } private long generation_; /** * * *
       * The generation of this object to use as the source.
       * 
* * int64 generation = 2; * * @return The generation. */ @java.lang.Override public long getGeneration() { return generation_; } /** * * *
       * The generation of this object to use as the source.
       * 
* * int64 generation = 2; * * @param value The generation to set. * @return This builder for chaining. */ public Builder setGeneration(long value) { generation_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
       * The generation of this object to use as the source.
       * 
* * int64 generation = 2; * * @return This builder for chaining. */ public Builder clearGeneration() { bitField0_ = (bitField0_ & ~0x00000002); generation_ = 0L; onChanged(); return this; } private com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions objectPreconditions_; private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions, com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions.Builder, com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditionsOrBuilder> objectPreconditionsBuilder_; /** * * *
       * Conditions that must be met for this operation to execute.
       * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * * * @return Whether the objectPreconditions field is set. */ public boolean hasObjectPreconditions() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
       * Conditions that must be met for this operation to execute.
       * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * * * @return The objectPreconditions. */ public com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions getObjectPreconditions() { if (objectPreconditionsBuilder_ == null) { return objectPreconditions_ == null ? com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions .getDefaultInstance() : objectPreconditions_; } else { return objectPreconditionsBuilder_.getMessage(); } } /** * * *
       * Conditions that must be met for this operation to execute.
       * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * */ public Builder setObjectPreconditions( com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions value) { if (objectPreconditionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } objectPreconditions_ = value; } else { objectPreconditionsBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * Conditions that must be met for this operation to execute.
       * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * */ public Builder setObjectPreconditions( com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions.Builder builderForValue) { if (objectPreconditionsBuilder_ == null) { objectPreconditions_ = builderForValue.build(); } else { objectPreconditionsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
       * Conditions that must be met for this operation to execute.
       * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * */ public Builder mergeObjectPreconditions( com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions value) { if (objectPreconditionsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && objectPreconditions_ != null && objectPreconditions_ != com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions .getDefaultInstance()) { getObjectPreconditionsBuilder().mergeFrom(value); } else { objectPreconditions_ = value; } } else { objectPreconditionsBuilder_.mergeFrom(value); } if (objectPreconditions_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** * * *
       * Conditions that must be met for this operation to execute.
       * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * */ public Builder clearObjectPreconditions() { bitField0_ = (bitField0_ & ~0x00000004); objectPreconditions_ = null; if (objectPreconditionsBuilder_ != null) { objectPreconditionsBuilder_.dispose(); objectPreconditionsBuilder_ = null; } onChanged(); return this; } /** * * *
       * Conditions that must be met for this operation to execute.
       * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions.Builder getObjectPreconditionsBuilder() { bitField0_ |= 0x00000004; onChanged(); return getObjectPreconditionsFieldBuilder().getBuilder(); } /** * * *
       * Conditions that must be met for this operation to execute.
       * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditionsOrBuilder getObjectPreconditionsOrBuilder() { if (objectPreconditionsBuilder_ != null) { return objectPreconditionsBuilder_.getMessageOrBuilder(); } else { return objectPreconditions_ == null ? com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions .getDefaultInstance() : objectPreconditions_; } } /** * * *
       * Conditions that must be met for this operation to execute.
       * 
* * * .google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions object_preconditions = 3; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions, com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions.Builder, com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditionsOrBuilder> getObjectPreconditionsFieldBuilder() { if (objectPreconditionsBuilder_ == null) { objectPreconditionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions, com.google.storage.v2.ComposeObjectRequest.SourceObject.ObjectPreconditions .Builder, com.google.storage.v2.ComposeObjectRequest.SourceObject .ObjectPreconditionsOrBuilder>( getObjectPreconditions(), getParentForChildren(), isClean()); objectPreconditions_ = null; } return objectPreconditionsBuilder_; } @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.ComposeObjectRequest.SourceObject) } // @@protoc_insertion_point(class_scope:google.storage.v2.ComposeObjectRequest.SourceObject) private static final com.google.storage.v2.ComposeObjectRequest.SourceObject DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.storage.v2.ComposeObjectRequest.SourceObject(); } public static com.google.storage.v2.ComposeObjectRequest.SourceObject getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public SourceObject parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException() .setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private int bitField0_; public static final int DESTINATION_FIELD_NUMBER = 1; private com.google.storage.v2.Object destination_; /** * * *
   * Required. Properties of the resulting object.
   * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the destination field is set. */ @java.lang.Override public boolean hasDestination() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * Required. Properties of the resulting object.
   * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The destination. */ @java.lang.Override public com.google.storage.v2.Object getDestination() { return destination_ == null ? com.google.storage.v2.Object.getDefaultInstance() : destination_; } /** * * *
   * Required. Properties of the resulting object.
   * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.storage.v2.ObjectOrBuilder getDestinationOrBuilder() { return destination_ == null ? com.google.storage.v2.Object.getDefaultInstance() : destination_; } public static final int SOURCE_OBJECTS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List sourceObjects_; /** * * *
   * The list of source objects that will be concatenated into a single object.
   * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; */ @java.lang.Override public java.util.List getSourceObjectsList() { return sourceObjects_; } /** * * *
   * The list of source objects that will be concatenated into a single object.
   * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; */ @java.lang.Override public java.util.List getSourceObjectsOrBuilderList() { return sourceObjects_; } /** * * *
   * The list of source objects that will be concatenated into a single object.
   * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; */ @java.lang.Override public int getSourceObjectsCount() { return sourceObjects_.size(); } /** * * *
   * The list of source objects that will be concatenated into a single object.
   * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; */ @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObject getSourceObjects(int index) { return sourceObjects_.get(index); } /** * * *
   * The list of source objects that will be concatenated into a single object.
   * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; */ @java.lang.Override public com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObjectsOrBuilder( int index) { return sourceObjects_.get(index); } public static final int DESTINATION_PREDEFINED_ACL_FIELD_NUMBER = 9; @SuppressWarnings("serial") private volatile java.lang.Object destinationPredefinedAcl_ = ""; /** * * *
   * Apply a predefined set of access controls to the destination object.
   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
   * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
   * 
* * string destination_predefined_acl = 9; * * @return The destinationPredefinedAcl. */ @java.lang.Override public java.lang.String getDestinationPredefinedAcl() { java.lang.Object ref = destinationPredefinedAcl_; 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(); destinationPredefinedAcl_ = s; return s; } } /** * * *
   * Apply a predefined set of access controls to the destination object.
   * Valid values are "authenticatedRead", "bucketOwnerFullControl",
   * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
   * 
* * string destination_predefined_acl = 9; * * @return The bytes for destinationPredefinedAcl. */ @java.lang.Override public com.google.protobuf.ByteString getDestinationPredefinedAclBytes() { java.lang.Object ref = destinationPredefinedAcl_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); destinationPredefinedAcl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int IF_GENERATION_MATCH_FIELD_NUMBER = 4; private long ifGenerationMatch_ = 0L; /** * * *
   * Makes the operation conditional on whether the object's current generation
   * matches the given value. Setting to 0 makes the operation succeed only if
   * there are no live versions of the object.
   * 
* * optional int64 if_generation_match = 4; * * @return Whether the ifGenerationMatch field is set. */ @java.lang.Override public boolean hasIfGenerationMatch() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Makes the operation conditional on whether the object's current generation
   * matches the given value. Setting to 0 makes the operation succeed only if
   * there are no live versions of the object.
   * 
* * optional int64 if_generation_match = 4; * * @return The ifGenerationMatch. */ @java.lang.Override public long getIfGenerationMatch() { return ifGenerationMatch_; } public static final int IF_METAGENERATION_MATCH_FIELD_NUMBER = 5; private long ifMetagenerationMatch_ = 0L; /** * * *
   * Makes the operation conditional on whether the object's current
   * metageneration matches the given value.
   * 
* * optional int64 if_metageneration_match = 5; * * @return Whether the ifMetagenerationMatch field is set. */ @java.lang.Override public boolean hasIfMetagenerationMatch() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * Makes the operation conditional on whether the object's current
   * metageneration matches the given value.
   * 
* * optional int64 if_metageneration_match = 5; * * @return The ifMetagenerationMatch. */ @java.lang.Override public long getIfMetagenerationMatch() { return ifMetagenerationMatch_; } public static final int KMS_KEY_FIELD_NUMBER = 6; @SuppressWarnings("serial") private volatile java.lang.Object kmsKey_ = ""; /** * * *
   * Resource name of the Cloud KMS key, of the form
   * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
   * that will be used to encrypt the object. Overrides the object
   * metadata's `kms_key_name` value, if any.
   * 
* * string kms_key = 6 [(.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; } } /** * * *
   * Resource name of the Cloud KMS key, of the form
   * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
   * that will be used to encrypt the object. Overrides the object
   * metadata's `kms_key_name` value, if any.
   * 
* * string kms_key = 6 [(.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 COMMON_OBJECT_REQUEST_PARAMS_FIELD_NUMBER = 7; private com.google.storage.v2.CommonObjectRequestParams commonObjectRequestParams_; /** * * *
   * A set of parameters common to Storage API requests concerning an object.
   * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; * * @return Whether the commonObjectRequestParams field is set. */ @java.lang.Override public boolean hasCommonObjectRequestParams() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
   * A set of parameters common to Storage API requests concerning an object.
   * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; * * @return The commonObjectRequestParams. */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestParams() { return commonObjectRequestParams_ == null ? com.google.storage.v2.CommonObjectRequestParams.getDefaultInstance() : commonObjectRequestParams_; } /** * * *
   * A set of parameters common to Storage API requests concerning an object.
   * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; */ @java.lang.Override public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { return commonObjectRequestParams_ == null ? com.google.storage.v2.CommonObjectRequestParams.getDefaultInstance() : commonObjectRequestParams_; } public static final int OBJECT_CHECKSUMS_FIELD_NUMBER = 10; private com.google.storage.v2.ObjectChecksums objectChecksums_; /** * * *
   * The checksums of the complete object. This will be validated against the
   * combined checksums of the component objects.
   * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; * * @return Whether the objectChecksums field is set. */ @java.lang.Override public boolean hasObjectChecksums() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
   * The checksums of the complete object. This will be validated against the
   * combined checksums of the component objects.
   * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; * * @return The objectChecksums. */ @java.lang.Override public com.google.storage.v2.ObjectChecksums getObjectChecksums() { return objectChecksums_ == null ? com.google.storage.v2.ObjectChecksums.getDefaultInstance() : objectChecksums_; } /** * * *
   * The checksums of the complete object. This will be validated against the
   * combined checksums of the component objects.
   * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; */ @java.lang.Override public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { return objectChecksums_ == null ? com.google.storage.v2.ObjectChecksums.getDefaultInstance() : objectChecksums_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getDestination()); } for (int i = 0; i < sourceObjects_.size(); i++) { output.writeMessage(2, sourceObjects_.get(i)); } if (((bitField0_ & 0x00000002) != 0)) { output.writeInt64(4, ifGenerationMatch_); } if (((bitField0_ & 0x00000004) != 0)) { output.writeInt64(5, ifMetagenerationMatch_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, kmsKey_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(7, getCommonObjectRequestParams()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPredefinedAcl_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, destinationPredefinedAcl_); } if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(10, getObjectChecksums()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDestination()); } for (int i = 0; i < sourceObjects_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, sourceObjects_.get(i)); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, ifGenerationMatch_); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(5, ifMetagenerationMatch_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(kmsKey_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, kmsKey_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 7, getCommonObjectRequestParams()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPredefinedAcl_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, destinationPredefinedAcl_); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, getObjectChecksums()); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.storage.v2.ComposeObjectRequest)) { return super.equals(obj); } com.google.storage.v2.ComposeObjectRequest other = (com.google.storage.v2.ComposeObjectRequest) obj; if (hasDestination() != other.hasDestination()) return false; if (hasDestination()) { if (!getDestination().equals(other.getDestination())) return false; } if (!getSourceObjectsList().equals(other.getSourceObjectsList())) return false; if (!getDestinationPredefinedAcl().equals(other.getDestinationPredefinedAcl())) return false; if (hasIfGenerationMatch() != other.hasIfGenerationMatch()) return false; if (hasIfGenerationMatch()) { if (getIfGenerationMatch() != other.getIfGenerationMatch()) return false; } if (hasIfMetagenerationMatch() != other.hasIfMetagenerationMatch()) return false; if (hasIfMetagenerationMatch()) { if (getIfMetagenerationMatch() != other.getIfMetagenerationMatch()) return false; } if (!getKmsKey().equals(other.getKmsKey())) return false; if (hasCommonObjectRequestParams() != other.hasCommonObjectRequestParams()) return false; if (hasCommonObjectRequestParams()) { if (!getCommonObjectRequestParams().equals(other.getCommonObjectRequestParams())) return false; } if (hasObjectChecksums() != other.hasObjectChecksums()) return false; if (hasObjectChecksums()) { if (!getObjectChecksums().equals(other.getObjectChecksums())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasDestination()) { hash = (37 * hash) + DESTINATION_FIELD_NUMBER; hash = (53 * hash) + getDestination().hashCode(); } if (getSourceObjectsCount() > 0) { hash = (37 * hash) + SOURCE_OBJECTS_FIELD_NUMBER; hash = (53 * hash) + getSourceObjectsList().hashCode(); } hash = (37 * hash) + DESTINATION_PREDEFINED_ACL_FIELD_NUMBER; hash = (53 * hash) + getDestinationPredefinedAcl().hashCode(); if (hasIfGenerationMatch()) { hash = (37 * hash) + IF_GENERATION_MATCH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIfGenerationMatch()); } if (hasIfMetagenerationMatch()) { hash = (37 * hash) + IF_METAGENERATION_MATCH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getIfMetagenerationMatch()); } hash = (37 * hash) + KMS_KEY_FIELD_NUMBER; hash = (53 * hash) + getKmsKey().hashCode(); if (hasCommonObjectRequestParams()) { hash = (37 * hash) + COMMON_OBJECT_REQUEST_PARAMS_FIELD_NUMBER; hash = (53 * hash) + getCommonObjectRequestParams().hashCode(); } if (hasObjectChecksums()) { hash = (37 * hash) + OBJECT_CHECKSUMS_FIELD_NUMBER; hash = (53 * hash) + getObjectChecksums().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.storage.v2.ComposeObjectRequest parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.storage.v2.ComposeObjectRequest 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.ComposeObjectRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.storage.v2.ComposeObjectRequest 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.ComposeObjectRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.storage.v2.ComposeObjectRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.storage.v2.ComposeObjectRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.storage.v2.ComposeObjectRequest 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.ComposeObjectRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.storage.v2.ComposeObjectRequest 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.ComposeObjectRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.storage.v2.ComposeObjectRequest 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.ComposeObjectRequest 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; } /** * * *
   * Request message for ComposeObject.
   * 
* * Protobuf type {@code google.storage.v2.ComposeObjectRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.storage.v2.ComposeObjectRequest) com.google.storage.v2.ComposeObjectRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.storage.v2.ComposeObjectRequest.class, com.google.storage.v2.ComposeObjectRequest.Builder.class); } // Construct using com.google.storage.v2.ComposeObjectRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getDestinationFieldBuilder(); getSourceObjectsFieldBuilder(); getCommonObjectRequestParamsFieldBuilder(); getObjectChecksumsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; destination_ = null; if (destinationBuilder_ != null) { destinationBuilder_.dispose(); destinationBuilder_ = null; } if (sourceObjectsBuilder_ == null) { sourceObjects_ = java.util.Collections.emptyList(); } else { sourceObjects_ = null; sourceObjectsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); destinationPredefinedAcl_ = ""; ifGenerationMatch_ = 0L; ifMetagenerationMatch_ = 0L; kmsKey_ = ""; commonObjectRequestParams_ = null; if (commonObjectRequestParamsBuilder_ != null) { commonObjectRequestParamsBuilder_.dispose(); commonObjectRequestParamsBuilder_ = null; } objectChecksums_ = null; if (objectChecksumsBuilder_ != null) { objectChecksumsBuilder_.dispose(); objectChecksumsBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.storage.v2.StorageProto .internal_static_google_storage_v2_ComposeObjectRequest_descriptor; } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest getDefaultInstanceForType() { return com.google.storage.v2.ComposeObjectRequest.getDefaultInstance(); } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest build() { com.google.storage.v2.ComposeObjectRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest buildPartial() { com.google.storage.v2.ComposeObjectRequest result = new com.google.storage.v2.ComposeObjectRequest(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.storage.v2.ComposeObjectRequest result) { if (sourceObjectsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { sourceObjects_ = java.util.Collections.unmodifiableList(sourceObjects_); bitField0_ = (bitField0_ & ~0x00000002); } result.sourceObjects_ = sourceObjects_; } else { result.sourceObjects_ = sourceObjectsBuilder_.build(); } } private void buildPartial0(com.google.storage.v2.ComposeObjectRequest result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { result.destination_ = destinationBuilder_ == null ? destination_ : destinationBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000004) != 0)) { result.destinationPredefinedAcl_ = destinationPredefinedAcl_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.ifGenerationMatch_ = ifGenerationMatch_; to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000010) != 0)) { result.ifMetagenerationMatch_ = ifMetagenerationMatch_; to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000020) != 0)) { result.kmsKey_ = kmsKey_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.commonObjectRequestParams_ = commonObjectRequestParamsBuilder_ == null ? commonObjectRequestParams_ : commonObjectRequestParamsBuilder_.build(); to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000080) != 0)) { result.objectChecksums_ = objectChecksumsBuilder_ == null ? objectChecksums_ : objectChecksumsBuilder_.build(); to_bitField0_ |= 0x00000010; } result.bitField0_ |= to_bitField0_; } @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.ComposeObjectRequest) { return mergeFrom((com.google.storage.v2.ComposeObjectRequest) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.storage.v2.ComposeObjectRequest other) { if (other == com.google.storage.v2.ComposeObjectRequest.getDefaultInstance()) return this; if (other.hasDestination()) { mergeDestination(other.getDestination()); } if (sourceObjectsBuilder_ == null) { if (!other.sourceObjects_.isEmpty()) { if (sourceObjects_.isEmpty()) { sourceObjects_ = other.sourceObjects_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureSourceObjectsIsMutable(); sourceObjects_.addAll(other.sourceObjects_); } onChanged(); } } else { if (!other.sourceObjects_.isEmpty()) { if (sourceObjectsBuilder_.isEmpty()) { sourceObjectsBuilder_.dispose(); sourceObjectsBuilder_ = null; sourceObjects_ = other.sourceObjects_; bitField0_ = (bitField0_ & ~0x00000002); sourceObjectsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getSourceObjectsFieldBuilder() : null; } else { sourceObjectsBuilder_.addAllMessages(other.sourceObjects_); } } } if (!other.getDestinationPredefinedAcl().isEmpty()) { destinationPredefinedAcl_ = other.destinationPredefinedAcl_; bitField0_ |= 0x00000004; onChanged(); } if (other.hasIfGenerationMatch()) { setIfGenerationMatch(other.getIfGenerationMatch()); } if (other.hasIfMetagenerationMatch()) { setIfMetagenerationMatch(other.getIfMetagenerationMatch()); } if (!other.getKmsKey().isEmpty()) { kmsKey_ = other.kmsKey_; bitField0_ |= 0x00000020; onChanged(); } if (other.hasCommonObjectRequestParams()) { mergeCommonObjectRequestParams(other.getCommonObjectRequestParams()); } if (other.hasObjectChecksums()) { mergeObjectChecksums(other.getObjectChecksums()); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { input.readMessage(getDestinationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000001; break; } // case 10 case 18: { com.google.storage.v2.ComposeObjectRequest.SourceObject m = input.readMessage( com.google.storage.v2.ComposeObjectRequest.SourceObject.parser(), extensionRegistry); if (sourceObjectsBuilder_ == null) { ensureSourceObjectsIsMutable(); sourceObjects_.add(m); } else { sourceObjectsBuilder_.addMessage(m); } break; } // case 18 case 32: { ifGenerationMatch_ = input.readInt64(); bitField0_ |= 0x00000008; break; } // case 32 case 40: { ifMetagenerationMatch_ = input.readInt64(); bitField0_ |= 0x00000010; break; } // case 40 case 50: { kmsKey_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 50 case 58: { input.readMessage( getCommonObjectRequestParamsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 58 case 74: { destinationPredefinedAcl_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000004; break; } // case 74 case 82: { input.readMessage(getObjectChecksumsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case 82 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private com.google.storage.v2.Object destination_; private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Object, com.google.storage.v2.Object.Builder, com.google.storage.v2.ObjectOrBuilder> destinationBuilder_; /** * * *
     * Required. Properties of the resulting object.
     * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the destination field is set. */ public boolean hasDestination() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
     * Required. Properties of the resulting object.
     * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The destination. */ public com.google.storage.v2.Object getDestination() { if (destinationBuilder_ == null) { return destination_ == null ? com.google.storage.v2.Object.getDefaultInstance() : destination_; } else { return destinationBuilder_.getMessage(); } } /** * * *
     * Required. Properties of the resulting object.
     * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setDestination(com.google.storage.v2.Object value) { if (destinationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } destination_ = value; } else { destinationBuilder_.setMessage(value); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. Properties of the resulting object.
     * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setDestination(com.google.storage.v2.Object.Builder builderForValue) { if (destinationBuilder_ == null) { destination_ = builderForValue.build(); } else { destinationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. Properties of the resulting object.
     * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder mergeDestination(com.google.storage.v2.Object value) { if (destinationBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0) && destination_ != null && destination_ != com.google.storage.v2.Object.getDefaultInstance()) { getDestinationBuilder().mergeFrom(value); } else { destination_ = value; } } else { destinationBuilder_.mergeFrom(value); } if (destination_ != null) { bitField0_ |= 0x00000001; onChanged(); } return this; } /** * * *
     * Required. Properties of the resulting object.
     * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder clearDestination() { bitField0_ = (bitField0_ & ~0x00000001); destination_ = null; if (destinationBuilder_ != null) { destinationBuilder_.dispose(); destinationBuilder_ = null; } onChanged(); return this; } /** * * *
     * Required. Properties of the resulting object.
     * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.storage.v2.Object.Builder getDestinationBuilder() { bitField0_ |= 0x00000001; onChanged(); return getDestinationFieldBuilder().getBuilder(); } /** * * *
     * Required. Properties of the resulting object.
     * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.storage.v2.ObjectOrBuilder getDestinationOrBuilder() { if (destinationBuilder_ != null) { return destinationBuilder_.getMessageOrBuilder(); } else { return destination_ == null ? com.google.storage.v2.Object.getDefaultInstance() : destination_; } } /** * * *
     * Required. Properties of the resulting object.
     * 
* * .google.storage.v2.Object destination = 1 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Object, com.google.storage.v2.Object.Builder, com.google.storage.v2.ObjectOrBuilder> getDestinationFieldBuilder() { if (destinationBuilder_ == null) { destinationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.Object, com.google.storage.v2.Object.Builder, com.google.storage.v2.ObjectOrBuilder>( getDestination(), getParentForChildren(), isClean()); destination_ = null; } return destinationBuilder_; } private java.util.List sourceObjects_ = java.util.Collections.emptyList(); private void ensureSourceObjectsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { sourceObjects_ = new java.util.ArrayList( sourceObjects_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.storage.v2.ComposeObjectRequest.SourceObject, com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder, com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder> sourceObjectsBuilder_; /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public java.util.List getSourceObjectsList() { if (sourceObjectsBuilder_ == null) { return java.util.Collections.unmodifiableList(sourceObjects_); } else { return sourceObjectsBuilder_.getMessageList(); } } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public int getSourceObjectsCount() { if (sourceObjectsBuilder_ == null) { return sourceObjects_.size(); } else { return sourceObjectsBuilder_.getCount(); } } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject getSourceObjects(int index) { if (sourceObjectsBuilder_ == null) { return sourceObjects_.get(index); } else { return sourceObjectsBuilder_.getMessage(index); } } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public Builder setSourceObjects( int index, com.google.storage.v2.ComposeObjectRequest.SourceObject value) { if (sourceObjectsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSourceObjectsIsMutable(); sourceObjects_.set(index, value); onChanged(); } else { sourceObjectsBuilder_.setMessage(index, value); } return this; } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public Builder setSourceObjects( int index, com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder builderForValue) { if (sourceObjectsBuilder_ == null) { ensureSourceObjectsIsMutable(); sourceObjects_.set(index, builderForValue.build()); onChanged(); } else { sourceObjectsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public Builder addSourceObjects(com.google.storage.v2.ComposeObjectRequest.SourceObject value) { if (sourceObjectsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSourceObjectsIsMutable(); sourceObjects_.add(value); onChanged(); } else { sourceObjectsBuilder_.addMessage(value); } return this; } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public Builder addSourceObjects( int index, com.google.storage.v2.ComposeObjectRequest.SourceObject value) { if (sourceObjectsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureSourceObjectsIsMutable(); sourceObjects_.add(index, value); onChanged(); } else { sourceObjectsBuilder_.addMessage(index, value); } return this; } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public Builder addSourceObjects( com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder builderForValue) { if (sourceObjectsBuilder_ == null) { ensureSourceObjectsIsMutable(); sourceObjects_.add(builderForValue.build()); onChanged(); } else { sourceObjectsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public Builder addSourceObjects( int index, com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder builderForValue) { if (sourceObjectsBuilder_ == null) { ensureSourceObjectsIsMutable(); sourceObjects_.add(index, builderForValue.build()); onChanged(); } else { sourceObjectsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public Builder addAllSourceObjects( java.lang.Iterable values) { if (sourceObjectsBuilder_ == null) { ensureSourceObjectsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sourceObjects_); onChanged(); } else { sourceObjectsBuilder_.addAllMessages(values); } return this; } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public Builder clearSourceObjects() { if (sourceObjectsBuilder_ == null) { sourceObjects_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { sourceObjectsBuilder_.clear(); } return this; } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public Builder removeSourceObjects(int index) { if (sourceObjectsBuilder_ == null) { ensureSourceObjectsIsMutable(); sourceObjects_.remove(index); onChanged(); } else { sourceObjectsBuilder_.remove(index); } return this; } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder getSourceObjectsBuilder( int index) { return getSourceObjectsFieldBuilder().getBuilder(index); } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder getSourceObjectsOrBuilder(int index) { if (sourceObjectsBuilder_ == null) { return sourceObjects_.get(index); } else { return sourceObjectsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public java.util.List< ? extends com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder> getSourceObjectsOrBuilderList() { if (sourceObjectsBuilder_ != null) { return sourceObjectsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(sourceObjects_); } } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder addSourceObjectsBuilder() { return getSourceObjectsFieldBuilder() .addBuilder(com.google.storage.v2.ComposeObjectRequest.SourceObject.getDefaultInstance()); } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder addSourceObjectsBuilder( int index) { return getSourceObjectsFieldBuilder() .addBuilder( index, com.google.storage.v2.ComposeObjectRequest.SourceObject.getDefaultInstance()); } /** * * *
     * The list of source objects that will be concatenated into a single object.
     * 
* * repeated .google.storage.v2.ComposeObjectRequest.SourceObject source_objects = 2; * */ public java.util.List getSourceObjectsBuilderList() { return getSourceObjectsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.storage.v2.ComposeObjectRequest.SourceObject, com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder, com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder> getSourceObjectsFieldBuilder() { if (sourceObjectsBuilder_ == null) { sourceObjectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.storage.v2.ComposeObjectRequest.SourceObject, com.google.storage.v2.ComposeObjectRequest.SourceObject.Builder, com.google.storage.v2.ComposeObjectRequest.SourceObjectOrBuilder>( sourceObjects_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); sourceObjects_ = null; } return sourceObjectsBuilder_; } private java.lang.Object destinationPredefinedAcl_ = ""; /** * * *
     * Apply a predefined set of access controls to the destination object.
     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
     * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
     * 
* * string destination_predefined_acl = 9; * * @return The destinationPredefinedAcl. */ public java.lang.String getDestinationPredefinedAcl() { java.lang.Object ref = destinationPredefinedAcl_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); destinationPredefinedAcl_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Apply a predefined set of access controls to the destination object.
     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
     * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
     * 
* * string destination_predefined_acl = 9; * * @return The bytes for destinationPredefinedAcl. */ public com.google.protobuf.ByteString getDestinationPredefinedAclBytes() { java.lang.Object ref = destinationPredefinedAcl_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); destinationPredefinedAcl_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Apply a predefined set of access controls to the destination object.
     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
     * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
     * 
* * string destination_predefined_acl = 9; * * @param value The destinationPredefinedAcl to set. * @return This builder for chaining. */ public Builder setDestinationPredefinedAcl(java.lang.String value) { if (value == null) { throw new NullPointerException(); } destinationPredefinedAcl_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Apply a predefined set of access controls to the destination object.
     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
     * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
     * 
* * string destination_predefined_acl = 9; * * @return This builder for chaining. */ public Builder clearDestinationPredefinedAcl() { destinationPredefinedAcl_ = getDefaultInstance().getDestinationPredefinedAcl(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } /** * * *
     * Apply a predefined set of access controls to the destination object.
     * Valid values are "authenticatedRead", "bucketOwnerFullControl",
     * "bucketOwnerRead", "private", "projectPrivate", or "publicRead".
     * 
* * string destination_predefined_acl = 9; * * @param value The bytes for destinationPredefinedAcl to set. * @return This builder for chaining. */ public Builder setDestinationPredefinedAclBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); destinationPredefinedAcl_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } private long ifGenerationMatch_; /** * * *
     * Makes the operation conditional on whether the object's current generation
     * matches the given value. Setting to 0 makes the operation succeed only if
     * there are no live versions of the object.
     * 
* * optional int64 if_generation_match = 4; * * @return Whether the ifGenerationMatch field is set. */ @java.lang.Override public boolean hasIfGenerationMatch() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Makes the operation conditional on whether the object's current generation
     * matches the given value. Setting to 0 makes the operation succeed only if
     * there are no live versions of the object.
     * 
* * optional int64 if_generation_match = 4; * * @return The ifGenerationMatch. */ @java.lang.Override public long getIfGenerationMatch() { return ifGenerationMatch_; } /** * * *
     * Makes the operation conditional on whether the object's current generation
     * matches the given value. Setting to 0 makes the operation succeed only if
     * there are no live versions of the object.
     * 
* * optional int64 if_generation_match = 4; * * @param value The ifGenerationMatch to set. * @return This builder for chaining. */ public Builder setIfGenerationMatch(long value) { ifGenerationMatch_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Makes the operation conditional on whether the object's current generation
     * matches the given value. Setting to 0 makes the operation succeed only if
     * there are no live versions of the object.
     * 
* * optional int64 if_generation_match = 4; * * @return This builder for chaining. */ public Builder clearIfGenerationMatch() { bitField0_ = (bitField0_ & ~0x00000008); ifGenerationMatch_ = 0L; onChanged(); return this; } private long ifMetagenerationMatch_; /** * * *
     * Makes the operation conditional on whether the object's current
     * metageneration matches the given value.
     * 
* * optional int64 if_metageneration_match = 5; * * @return Whether the ifMetagenerationMatch field is set. */ @java.lang.Override public boolean hasIfMetagenerationMatch() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
     * Makes the operation conditional on whether the object's current
     * metageneration matches the given value.
     * 
* * optional int64 if_metageneration_match = 5; * * @return The ifMetagenerationMatch. */ @java.lang.Override public long getIfMetagenerationMatch() { return ifMetagenerationMatch_; } /** * * *
     * Makes the operation conditional on whether the object's current
     * metageneration matches the given value.
     * 
* * optional int64 if_metageneration_match = 5; * * @param value The ifMetagenerationMatch to set. * @return This builder for chaining. */ public Builder setIfMetagenerationMatch(long value) { ifMetagenerationMatch_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Makes the operation conditional on whether the object's current
     * metageneration matches the given value.
     * 
* * optional int64 if_metageneration_match = 5; * * @return This builder for chaining. */ public Builder clearIfMetagenerationMatch() { bitField0_ = (bitField0_ & ~0x00000010); ifMetagenerationMatch_ = 0L; onChanged(); return this; } private java.lang.Object kmsKey_ = ""; /** * * *
     * Resource name of the Cloud KMS key, of the form
     * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
     * that will be used to encrypt the object. Overrides the object
     * metadata's `kms_key_name` value, if any.
     * 
* * string kms_key = 6 [(.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; } } /** * * *
     * Resource name of the Cloud KMS key, of the form
     * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
     * that will be used to encrypt the object. Overrides the object
     * metadata's `kms_key_name` value, if any.
     * 
* * string kms_key = 6 [(.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; } } /** * * *
     * Resource name of the Cloud KMS key, of the form
     * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
     * that will be used to encrypt the object. Overrides the object
     * metadata's `kms_key_name` value, if any.
     * 
* * string kms_key = 6 [(.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; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Resource name of the Cloud KMS key, of the form
     * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
     * that will be used to encrypt the object. Overrides the object
     * metadata's `kms_key_name` value, if any.
     * 
* * string kms_key = 6 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ public Builder clearKmsKey() { kmsKey_ = getDefaultInstance().getKmsKey(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * * *
     * Resource name of the Cloud KMS key, of the form
     * `projects/my-project/locations/my-location/keyRings/my-kr/cryptoKeys/my-key`,
     * that will be used to encrypt the object. Overrides the object
     * metadata's `kms_key_name` value, if any.
     * 
* * string kms_key = 6 [(.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; bitField0_ |= 0x00000020; onChanged(); return this; } private com.google.storage.v2.CommonObjectRequestParams commonObjectRequestParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, com.google.storage.v2.CommonObjectRequestParams.Builder, com.google.storage.v2.CommonObjectRequestParamsOrBuilder> commonObjectRequestParamsBuilder_; /** * * *
     * A set of parameters common to Storage API requests concerning an object.
     * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; * * @return Whether the commonObjectRequestParams field is set. */ public boolean hasCommonObjectRequestParams() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
     * A set of parameters common to Storage API requests concerning an object.
     * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; * * @return The commonObjectRequestParams. */ public com.google.storage.v2.CommonObjectRequestParams getCommonObjectRequestParams() { if (commonObjectRequestParamsBuilder_ == null) { return commonObjectRequestParams_ == null ? com.google.storage.v2.CommonObjectRequestParams.getDefaultInstance() : commonObjectRequestParams_; } else { return commonObjectRequestParamsBuilder_.getMessage(); } } /** * * *
     * A set of parameters common to Storage API requests concerning an object.
     * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { if (commonObjectRequestParamsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } commonObjectRequestParams_ = value; } else { commonObjectRequestParamsBuilder_.setMessage(value); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * A set of parameters common to Storage API requests concerning an object.
     * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; */ public Builder setCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams.Builder builderForValue) { if (commonObjectRequestParamsBuilder_ == null) { commonObjectRequestParams_ = builderForValue.build(); } else { commonObjectRequestParamsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * A set of parameters common to Storage API requests concerning an object.
     * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; */ public Builder mergeCommonObjectRequestParams( com.google.storage.v2.CommonObjectRequestParams value) { if (commonObjectRequestParamsBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0) && commonObjectRequestParams_ != null && commonObjectRequestParams_ != com.google.storage.v2.CommonObjectRequestParams.getDefaultInstance()) { getCommonObjectRequestParamsBuilder().mergeFrom(value); } else { commonObjectRequestParams_ = value; } } else { commonObjectRequestParamsBuilder_.mergeFrom(value); } if (commonObjectRequestParams_ != null) { bitField0_ |= 0x00000040; onChanged(); } return this; } /** * * *
     * A set of parameters common to Storage API requests concerning an object.
     * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; */ public Builder clearCommonObjectRequestParams() { bitField0_ = (bitField0_ & ~0x00000040); commonObjectRequestParams_ = null; if (commonObjectRequestParamsBuilder_ != null) { commonObjectRequestParamsBuilder_.dispose(); commonObjectRequestParamsBuilder_ = null; } onChanged(); return this; } /** * * *
     * A set of parameters common to Storage API requests concerning an object.
     * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; */ public com.google.storage.v2.CommonObjectRequestParams.Builder getCommonObjectRequestParamsBuilder() { bitField0_ |= 0x00000040; onChanged(); return getCommonObjectRequestParamsFieldBuilder().getBuilder(); } /** * * *
     * A set of parameters common to Storage API requests concerning an object.
     * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; */ public com.google.storage.v2.CommonObjectRequestParamsOrBuilder getCommonObjectRequestParamsOrBuilder() { if (commonObjectRequestParamsBuilder_ != null) { return commonObjectRequestParamsBuilder_.getMessageOrBuilder(); } else { return commonObjectRequestParams_ == null ? com.google.storage.v2.CommonObjectRequestParams.getDefaultInstance() : commonObjectRequestParams_; } } /** * * *
     * A set of parameters common to Storage API requests concerning an object.
     * 
* * .google.storage.v2.CommonObjectRequestParams common_object_request_params = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, com.google.storage.v2.CommonObjectRequestParams.Builder, com.google.storage.v2.CommonObjectRequestParamsOrBuilder> getCommonObjectRequestParamsFieldBuilder() { if (commonObjectRequestParamsBuilder_ == null) { commonObjectRequestParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.CommonObjectRequestParams, com.google.storage.v2.CommonObjectRequestParams.Builder, com.google.storage.v2.CommonObjectRequestParamsOrBuilder>( getCommonObjectRequestParams(), getParentForChildren(), isClean()); commonObjectRequestParams_ = null; } return commonObjectRequestParamsBuilder_; } private com.google.storage.v2.ObjectChecksums objectChecksums_; private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ObjectChecksums, com.google.storage.v2.ObjectChecksums.Builder, com.google.storage.v2.ObjectChecksumsOrBuilder> objectChecksumsBuilder_; /** * * *
     * The checksums of the complete object. This will be validated against the
     * combined checksums of the component objects.
     * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; * * @return Whether the objectChecksums field is set. */ public boolean hasObjectChecksums() { return ((bitField0_ & 0x00000080) != 0); } /** * * *
     * The checksums of the complete object. This will be validated against the
     * combined checksums of the component objects.
     * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; * * @return The objectChecksums. */ public com.google.storage.v2.ObjectChecksums getObjectChecksums() { if (objectChecksumsBuilder_ == null) { return objectChecksums_ == null ? com.google.storage.v2.ObjectChecksums.getDefaultInstance() : objectChecksums_; } else { return objectChecksumsBuilder_.getMessage(); } } /** * * *
     * The checksums of the complete object. This will be validated against the
     * combined checksums of the component objects.
     * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; */ public Builder setObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } objectChecksums_ = value; } else { objectChecksumsBuilder_.setMessage(value); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * The checksums of the complete object. This will be validated against the
     * combined checksums of the component objects.
     * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; */ public Builder setObjectChecksums( com.google.storage.v2.ObjectChecksums.Builder builderForValue) { if (objectChecksumsBuilder_ == null) { objectChecksums_ = builderForValue.build(); } else { objectChecksumsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * The checksums of the complete object. This will be validated against the
     * combined checksums of the component objects.
     * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; */ public Builder mergeObjectChecksums(com.google.storage.v2.ObjectChecksums value) { if (objectChecksumsBuilder_ == null) { if (((bitField0_ & 0x00000080) != 0) && objectChecksums_ != null && objectChecksums_ != com.google.storage.v2.ObjectChecksums.getDefaultInstance()) { getObjectChecksumsBuilder().mergeFrom(value); } else { objectChecksums_ = value; } } else { objectChecksumsBuilder_.mergeFrom(value); } if (objectChecksums_ != null) { bitField0_ |= 0x00000080; onChanged(); } return this; } /** * * *
     * The checksums of the complete object. This will be validated against the
     * combined checksums of the component objects.
     * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; */ public Builder clearObjectChecksums() { bitField0_ = (bitField0_ & ~0x00000080); objectChecksums_ = null; if (objectChecksumsBuilder_ != null) { objectChecksumsBuilder_.dispose(); objectChecksumsBuilder_ = null; } onChanged(); return this; } /** * * *
     * The checksums of the complete object. This will be validated against the
     * combined checksums of the component objects.
     * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; */ public com.google.storage.v2.ObjectChecksums.Builder getObjectChecksumsBuilder() { bitField0_ |= 0x00000080; onChanged(); return getObjectChecksumsFieldBuilder().getBuilder(); } /** * * *
     * The checksums of the complete object. This will be validated against the
     * combined checksums of the component objects.
     * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; */ public com.google.storage.v2.ObjectChecksumsOrBuilder getObjectChecksumsOrBuilder() { if (objectChecksumsBuilder_ != null) { return objectChecksumsBuilder_.getMessageOrBuilder(); } else { return objectChecksums_ == null ? com.google.storage.v2.ObjectChecksums.getDefaultInstance() : objectChecksums_; } } /** * * *
     * The checksums of the complete object. This will be validated against the
     * combined checksums of the component objects.
     * 
* * .google.storage.v2.ObjectChecksums object_checksums = 10; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ObjectChecksums, com.google.storage.v2.ObjectChecksums.Builder, com.google.storage.v2.ObjectChecksumsOrBuilder> getObjectChecksumsFieldBuilder() { if (objectChecksumsBuilder_ == null) { objectChecksumsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.storage.v2.ObjectChecksums, com.google.storage.v2.ObjectChecksums.Builder, com.google.storage.v2.ObjectChecksumsOrBuilder>( getObjectChecksums(), getParentForChildren(), isClean()); objectChecksums_ = null; } return objectChecksumsBuilder_; } @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.ComposeObjectRequest) } // @@protoc_insertion_point(class_scope:google.storage.v2.ComposeObjectRequest) private static final com.google.storage.v2.ComposeObjectRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.storage.v2.ComposeObjectRequest(); } public static com.google.storage.v2.ComposeObjectRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ComposeObjectRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.storage.v2.ComposeObjectRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy