Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+ * PackageName parent = PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]");
+ * List names = new ArrayList<>();
+ * artifactRegistryClient.batchDeleteVersionsAsync(parent, names).get();
+ * }
+ * }
+ *
+ * @param parent The name of the repository holding all requested versions.
+ * @param names Required. The names of the versions to delete. A maximum of 10000 versions can be
+ * deleted in a batch.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+ * String parent =
+ * PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString();
+ * List names = new ArrayList<>();
+ * artifactRegistryClient.batchDeleteVersionsAsync(parent, names).get();
+ * }
+ * }
+ *
+ * @param parent The name of the repository holding all requested versions.
+ * @param names Required. The names of the versions to delete. A maximum of 10000 versions can be
+ * deleted in a batch.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+ * BatchDeleteVersionsRequest request =
+ * BatchDeleteVersionsRequest.newBuilder()
+ * .setParent(
+ * PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString())
+ * .addAllNames(new ArrayList())
+ * .setValidateOnly(true)
+ * .build();
+ * artifactRegistryClient.batchDeleteVersionsAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+ * BatchDeleteVersionsRequest request =
+ * BatchDeleteVersionsRequest.newBuilder()
+ * .setParent(
+ * PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString())
+ * .addAllNames(new ArrayList())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * artifactRegistryClient.batchDeleteVersionsOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (ArtifactRegistryClient artifactRegistryClient = ArtifactRegistryClient.create()) {
+ * BatchDeleteVersionsRequest request =
+ * BatchDeleteVersionsRequest.newBuilder()
+ * .setParent(
+ * PackageName.of("[PROJECT]", "[LOCATION]", "[REPOSITORY]", "[PACKAGE]").toString())
+ * .addAllNames(new ArrayList())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * artifactRegistryClient.batchDeleteVersionsCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallable+ * Deletes multiple versions across a repository. The returned operation will + * complete once the versions have been deleted. + *+ */ + default void batchDeleteVersions( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest request, + io.grpc.stub.StreamObserver
+ * Deletes multiple versions across a repository. The returned operation will + * complete once the versions have been deleted. + *+ */ + public void batchDeleteVersions( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest request, + io.grpc.stub.StreamObserver
+ * Deletes multiple versions across a repository. The returned operation will + * complete once the versions have been deleted. + *+ */ + public com.google.longrunning.Operation batchDeleteVersions( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchDeleteVersionsMethod(), getCallOptions(), request); + } + /** * * @@ -3697,6 +3792,21 @@ protected ArtifactRegistryFutureStub build( getChannel().newCall(getDeleteVersionMethod(), getCallOptions()), request); } + /** + * + * + *
+ * Deletes multiple versions across a repository. The returned operation will + * complete once the versions have been deleted. + *+ */ + public com.google.common.util.concurrent.ListenableFuture
+ * The request to delete multiple versions across a repository. + *+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} + */ +public final class BatchDeleteVersionsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) + BatchDeleteVersionsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchDeleteVersionsRequest.newBuilder() to construct. + private BatchDeleteVersionsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private BatchDeleteVersionsRequest() { + parent_ = ""; + names_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchDeleteVersionsRequest(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.VersionProto + .internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.VersionProto + .internal_static_google_devtools_artifactregistry_v1_BatchDeleteVersionsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.class, + com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object parent_ = ""; + /** + * + * + *
+ * The name of the repository holding all requested versions. + *+ * + *
string parent = 1 [(.google.api.resource_reference) = { ... }
+ *
+ * @return The parent.
+ */
+ @java.lang.Override
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the repository holding all requested versions. + *+ * + *
string parent = 1 [(.google.api.resource_reference) = { ... }
+ *
+ * @return The bytes for parent.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int NAMES_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.LazyStringArrayList names_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return A list containing the names.
+ */
+ public com.google.protobuf.ProtocolStringList getNamesList() {
+ return names_;
+ }
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The count of names.
+ */
+ public int getNamesCount() {
+ return names_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The names at the given index.
+ */
+ public java.lang.String getNames(int index) {
+ return names_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the names at the given index.
+ */
+ public com.google.protobuf.ByteString getNamesBytes(int index) {
+ return names_.getByteString(index);
+ }
+
+ public static final int VALIDATE_ONLY_FIELD_NUMBER = 3;
+ private boolean validateOnly_ = false;
+ /**
+ *
+ *
+ * + * If true, the request is performed without deleting data, following AIP-163. + *+ * + *
bool validate_only = 3;
+ *
+ * @return The validateOnly.
+ */
+ @java.lang.Override
+ public boolean getValidateOnly() {
+ return validateOnly_;
+ }
+
+ 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(parent_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_);
+ }
+ for (int i = 0; i < names_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, names_.getRaw(i));
+ }
+ if (validateOnly_ != false) {
+ output.writeBool(3, validateOnly_);
+ }
+ 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(parent_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < names_.size(); i++) {
+ dataSize += computeStringSizeNoTag(names_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getNamesList().size();
+ }
+ if (validateOnly_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_);
+ }
+ 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.devtools.artifactregistry.v1.BatchDeleteVersionsRequest)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest other =
+ (com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest) obj;
+
+ if (!getParent().equals(other.getParent())) return false;
+ if (!getNamesList().equals(other.getNamesList())) return false;
+ if (getValidateOnly() != other.getValidateOnly()) 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) + PARENT_FIELD_NUMBER;
+ hash = (53 * hash) + getParent().hashCode();
+ if (getNamesCount() > 0) {
+ hash = (37 * hash) + NAMES_FIELD_NUMBER;
+ hash = (53 * hash) + getNamesList().hashCode();
+ }
+ hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest 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.devtools.artifactregistry.v1.BatchDeleteVersionsRequest parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest 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.devtools.artifactregistry.v1.BatchDeleteVersionsRequest
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest
+ 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.devtools.artifactregistry.v1.BatchDeleteVersionsRequest parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest 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.devtools.artifactregistry.v1.BatchDeleteVersionsRequest 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;
+ }
+ /**
+ *
+ *
+ * + * The request to delete multiple versions across a repository. + *+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * The name of the repository holding all requested versions. + *+ * + *
string parent = 1 [(.google.api.resource_reference) = { ... }
+ *
+ * @return The parent.
+ */
+ public java.lang.String getParent() {
+ java.lang.Object ref = parent_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ parent_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the repository holding all requested versions. + *+ * + *
string parent = 1 [(.google.api.resource_reference) = { ... }
+ *
+ * @return The bytes for parent.
+ */
+ public com.google.protobuf.ByteString getParentBytes() {
+ java.lang.Object ref = parent_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ parent_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The name of the repository holding all requested versions. + *+ * + *
string parent = 1 [(.google.api.resource_reference) = { ... }
+ *
+ * @param value The parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParent(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ parent_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the repository holding all requested versions. + *+ * + *
string parent = 1 [(.google.api.resource_reference) = { ... }
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearParent() {
+ parent_ = getDefaultInstance().getParent();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The name of the repository holding all requested versions. + *+ * + *
string parent = 1 [(.google.api.resource_reference) = { ... }
+ *
+ * @param value The bytes for parent to set.
+ * @return This builder for chaining.
+ */
+ public Builder setParentBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ parent_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringArrayList names_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+
+ private void ensureNamesIsMutable() {
+ if (!names_.isModifiable()) {
+ names_ = new com.google.protobuf.LazyStringArrayList(names_);
+ }
+ bitField0_ |= 0x00000002;
+ }
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return A list containing the names.
+ */
+ public com.google.protobuf.ProtocolStringList getNamesList() {
+ names_.makeImmutable();
+ return names_;
+ }
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The count of names.
+ */
+ public int getNamesCount() {
+ return names_.size();
+ }
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The names at the given index.
+ */
+ public java.lang.String getNames(int index) {
+ return names_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the names at the given index.
+ */
+ public com.google.protobuf.ByteString getNamesBytes(int index) {
+ return names_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index to set the value at.
+ * @param value The names to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNames(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNamesIsMutable();
+ names_.set(index, value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The names to add.
+ * @return This builder for chaining.
+ */
+ public Builder addNames(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNamesIsMutable();
+ names_.add(value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param values The names to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllNames(java.lang.Iterable+ * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNames() {
+ names_ = com.google.protobuf.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ ;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes of the names to add.
+ * @return This builder for chaining.
+ */
+ public Builder addNamesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureNamesIsMutable();
+ names_.add(value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private boolean validateOnly_;
+ /**
+ *
+ *
+ * + * If true, the request is performed without deleting data, following AIP-163. + *+ * + *
bool validate_only = 3;
+ *
+ * @return The validateOnly.
+ */
+ @java.lang.Override
+ public boolean getValidateOnly() {
+ return validateOnly_;
+ }
+ /**
+ *
+ *
+ * + * If true, the request is performed without deleting data, following AIP-163. + *+ * + *
bool validate_only = 3;
+ *
+ * @param value The validateOnly to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValidateOnly(boolean value) {
+
+ validateOnly_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * If true, the request is performed without deleting data, following AIP-163. + *+ * + *
bool validate_only = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearValidateOnly() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ validateOnly_ = false;
+ 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.devtools.artifactregistry.v1.BatchDeleteVersionsRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest)
+ private static final com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.BatchDeleteVersionsRequest
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * The name of the repository holding all requested versions. + *+ * + *
string parent = 1 [(.google.api.resource_reference) = { ... }
+ *
+ * @return The parent.
+ */
+ java.lang.String getParent();
+ /**
+ *
+ *
+ * + * The name of the repository holding all requested versions. + *+ * + *
string parent = 1 [(.google.api.resource_reference) = { ... }
+ *
+ * @return The bytes for parent.
+ */
+ com.google.protobuf.ByteString getParentBytes();
+
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return A list containing the names.
+ */
+ java.util.List+ * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The count of names.
+ */
+ int getNamesCount();
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The names at the given index.
+ */
+ java.lang.String getNames(int index);
+ /**
+ *
+ *
+ * + * Required. The names of the versions to delete. + * A maximum of 10000 versions can be deleted in a batch. + *+ * + *
+ * repeated string names = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the names at the given index.
+ */
+ com.google.protobuf.ByteString getNamesBytes(int index);
+
+ /**
+ *
+ *
+ * + * If true, the request is performed without deleting data, following AIP-163. + *+ * + *
bool validate_only = 3;
+ *
+ * @return The validateOnly.
+ */
+ boolean getValidateOnly();
+}
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicy.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicy.java
new file mode 100644
index 000000000000..ba487d457d00
--- /dev/null
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicy.java
@@ -0,0 +1,1684 @@
+/*
+ * Copyright 2023 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/devtools/artifactregistry/v1/repository.proto
+
+package com.google.devtools.artifactregistry.v1;
+
+/**
+ *
+ *
+ * + * Artifact policy configuration for repository cleanup policies. + *+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicy} + */ +public final class CleanupPolicy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.CleanupPolicy) + CleanupPolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use CleanupPolicy.newBuilder() to construct. + private CleanupPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CleanupPolicy() { + id_ = ""; + action_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CleanupPolicy(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.CleanupPolicy.class, + com.google.devtools.artifactregistry.v1.CleanupPolicy.Builder.class); + } + + /** + * + * + *
+ * Action type for a cleanup policy. + *+ * + * Protobuf enum {@code google.devtools.artifactregistry.v1.CleanupPolicy.Action} + */ + public enum Action implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Action not specified. + *+ * + *
ACTION_UNSPECIFIED = 0;
+ */
+ ACTION_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Delete action. + *+ * + *
DELETE = 1;
+ */
+ DELETE(1),
+ /**
+ *
+ *
+ * + * Keep action. + *+ * + *
KEEP = 2;
+ */
+ KEEP(2),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Action not specified. + *+ * + *
ACTION_UNSPECIFIED = 0;
+ */
+ public static final int ACTION_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Delete action. + *+ * + *
DELETE = 1;
+ */
+ public static final int DELETE_VALUE = 1;
+ /**
+ *
+ *
+ * + * Keep action. + *+ * + *
KEEP = 2;
+ */
+ public static final int KEEP_VALUE = 2;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static Action valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static Action forNumber(int value) {
+ switch (value) {
+ case 0:
+ return ACTION_UNSPECIFIED;
+ case 1:
+ return DELETE;
+ case 2:
+ return KEEP;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ *
+ * @return Whether the condition field is set.
+ */
+ @java.lang.Override
+ public boolean hasCondition() {
+ return conditionTypeCase_ == 2;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ *
+ * @return The condition.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition getCondition() {
+ if (conditionTypeCase_ == 2) {
+ return (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_;
+ }
+ return com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder
+ getConditionOrBuilder() {
+ if (conditionTypeCase_ == 2) {
+ return (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_;
+ }
+ return com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance();
+ }
+
+ public static final int MOST_RECENT_VERSIONS_FIELD_NUMBER = 4;
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ *
+ * @return Whether the mostRecentVersions field is set.
+ */
+ @java.lang.Override
+ public boolean hasMostRecentVersions() {
+ return conditionTypeCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ *
+ * @return The mostRecentVersions.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ getMostRecentVersions() {
+ if (conditionTypeCase_ == 4) {
+ return (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions)
+ conditionType_;
+ }
+ return com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ .getDefaultInstance();
+ }
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder
+ getMostRecentVersionsOrBuilder() {
+ if (conditionTypeCase_ == 4) {
+ return (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions)
+ conditionType_;
+ }
+ return com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ .getDefaultInstance();
+ }
+
+ public static final int ID_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object id_ = "";
+ /**
+ *
+ *
+ * + * The user-provided ID of the cleanup policy. + *+ * + *
string id = 1;
+ *
+ * @return The id.
+ */
+ @java.lang.Override
+ public java.lang.String getId() {
+ java.lang.Object ref = id_;
+ 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();
+ id_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ * + * The user-provided ID of the cleanup policy. + *+ * + *
string id = 1;
+ *
+ * @return The bytes for id.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getIdBytes() {
+ java.lang.Object ref = id_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ id_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int ACTION_FIELD_NUMBER = 3;
+ private int action_ = 0;
+ /**
+ *
+ *
+ * + * Policy action. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;
+ *
+ * @return The enum numeric value on the wire for action.
+ */
+ @java.lang.Override
+ public int getActionValue() {
+ return action_;
+ }
+ /**
+ *
+ *
+ * + * Policy action. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;
+ *
+ * @return The action.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicy.Action getAction() {
+ com.google.devtools.artifactregistry.v1.CleanupPolicy.Action result =
+ com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.forNumber(action_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.UNRECOGNIZED
+ : result;
+ }
+
+ 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(id_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
+ }
+ if (conditionTypeCase_ == 2) {
+ output.writeMessage(
+ 2, (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_);
+ }
+ if (action_
+ != com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.ACTION_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(3, action_);
+ }
+ if (conditionTypeCase_ == 4) {
+ output.writeMessage(
+ 4,
+ (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) conditionType_);
+ }
+ 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(id_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
+ }
+ if (conditionTypeCase_ == 2) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 2, (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_);
+ }
+ if (action_
+ != com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.ACTION_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, action_);
+ }
+ if (conditionTypeCase_ == 4) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 4,
+ (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions)
+ conditionType_);
+ }
+ 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.devtools.artifactregistry.v1.CleanupPolicy)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.CleanupPolicy other =
+ (com.google.devtools.artifactregistry.v1.CleanupPolicy) obj;
+
+ if (!getId().equals(other.getId())) return false;
+ if (action_ != other.action_) return false;
+ if (!getConditionTypeCase().equals(other.getConditionTypeCase())) return false;
+ switch (conditionTypeCase_) {
+ case 2:
+ if (!getCondition().equals(other.getCondition())) return false;
+ break;
+ case 4:
+ if (!getMostRecentVersions().equals(other.getMostRecentVersions())) return false;
+ break;
+ case 0:
+ default:
+ }
+ 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) + ID_FIELD_NUMBER;
+ hash = (53 * hash) + getId().hashCode();
+ hash = (37 * hash) + ACTION_FIELD_NUMBER;
+ hash = (53 * hash) + action_;
+ switch (conditionTypeCase_) {
+ case 2:
+ hash = (37 * hash) + CONDITION_FIELD_NUMBER;
+ hash = (53 * hash) + getCondition().hashCode();
+ break;
+ case 4:
+ hash = (37 * hash) + MOST_RECENT_VERSIONS_FIELD_NUMBER;
+ hash = (53 * hash) + getMostRecentVersions().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicy parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicy parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicy parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicy 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.devtools.artifactregistry.v1.CleanupPolicy parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicy parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicy parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicy 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.devtools.artifactregistry.v1.CleanupPolicy parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicy 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.devtools.artifactregistry.v1.CleanupPolicy parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicy 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.devtools.artifactregistry.v1.CleanupPolicy 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;
+ }
+ /**
+ *
+ *
+ * + * Artifact policy configuration for repository cleanup policies. + *+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicy} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ *
+ * @return Whether the condition field is set.
+ */
+ @java.lang.Override
+ public boolean hasCondition() {
+ return conditionTypeCase_ == 2;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ *
+ * @return The condition.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition getCondition() {
+ if (conditionBuilder_ == null) {
+ if (conditionTypeCase_ == 2) {
+ return (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_;
+ }
+ return com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance();
+ } else {
+ if (conditionTypeCase_ == 2) {
+ return conditionBuilder_.getMessage();
+ }
+ return com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ */
+ public Builder setCondition(
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition value) {
+ if (conditionBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ conditionType_ = value;
+ onChanged();
+ } else {
+ conditionBuilder_.setMessage(value);
+ }
+ conditionTypeCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ */
+ public Builder setCondition(
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder builderForValue) {
+ if (conditionBuilder_ == null) {
+ conditionType_ = builderForValue.build();
+ onChanged();
+ } else {
+ conditionBuilder_.setMessage(builderForValue.build());
+ }
+ conditionTypeCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ */
+ public Builder mergeCondition(
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition value) {
+ if (conditionBuilder_ == null) {
+ if (conditionTypeCase_ == 2
+ && conditionType_
+ != com.google.devtools.artifactregistry.v1.CleanupPolicyCondition
+ .getDefaultInstance()) {
+ conditionType_ =
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.newBuilder(
+ (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition)
+ conditionType_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ conditionType_ = value;
+ }
+ onChanged();
+ } else {
+ if (conditionTypeCase_ == 2) {
+ conditionBuilder_.mergeFrom(value);
+ } else {
+ conditionBuilder_.setMessage(value);
+ }
+ }
+ conditionTypeCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ */
+ public Builder clearCondition() {
+ if (conditionBuilder_ == null) {
+ if (conditionTypeCase_ == 2) {
+ conditionTypeCase_ = 0;
+ conditionType_ = null;
+ onChanged();
+ }
+ } else {
+ if (conditionTypeCase_ == 2) {
+ conditionTypeCase_ = 0;
+ conditionType_ = null;
+ }
+ conditionBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ */
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder
+ getConditionBuilder() {
+ return getConditionFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder
+ getConditionOrBuilder() {
+ if ((conditionTypeCase_ == 2) && (conditionBuilder_ != null)) {
+ return conditionBuilder_.getMessageOrBuilder();
+ } else {
+ if (conditionTypeCase_ == 2) {
+ return (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_;
+ }
+ return com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition,
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder,
+ com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder>
+ getConditionFieldBuilder() {
+ if (conditionBuilder_ == null) {
+ if (!(conditionTypeCase_ == 2)) {
+ conditionType_ =
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.getDefaultInstance();
+ }
+ conditionBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition,
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder,
+ com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder>(
+ (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) conditionType_,
+ getParentForChildren(),
+ isClean());
+ conditionType_ = null;
+ }
+ conditionTypeCase_ = 2;
+ onChanged();
+ return conditionBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions,
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder,
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder>
+ mostRecentVersionsBuilder_;
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ *
+ * @return Whether the mostRecentVersions field is set.
+ */
+ @java.lang.Override
+ public boolean hasMostRecentVersions() {
+ return conditionTypeCase_ == 4;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ *
+ * @return The mostRecentVersions.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ getMostRecentVersions() {
+ if (mostRecentVersionsBuilder_ == null) {
+ if (conditionTypeCase_ == 4) {
+ return (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions)
+ conditionType_;
+ }
+ return com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ .getDefaultInstance();
+ } else {
+ if (conditionTypeCase_ == 4) {
+ return mostRecentVersionsBuilder_.getMessage();
+ }
+ return com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ */
+ public Builder setMostRecentVersions(
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions value) {
+ if (mostRecentVersionsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ conditionType_ = value;
+ onChanged();
+ } else {
+ mostRecentVersionsBuilder_.setMessage(value);
+ }
+ conditionTypeCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ */
+ public Builder setMostRecentVersions(
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder
+ builderForValue) {
+ if (mostRecentVersionsBuilder_ == null) {
+ conditionType_ = builderForValue.build();
+ onChanged();
+ } else {
+ mostRecentVersionsBuilder_.setMessage(builderForValue.build());
+ }
+ conditionTypeCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ */
+ public Builder mergeMostRecentVersions(
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions value) {
+ if (mostRecentVersionsBuilder_ == null) {
+ if (conditionTypeCase_ == 4
+ && conditionType_
+ != com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ .getDefaultInstance()) {
+ conditionType_ =
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.newBuilder(
+ (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions)
+ conditionType_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ conditionType_ = value;
+ }
+ onChanged();
+ } else {
+ if (conditionTypeCase_ == 4) {
+ mostRecentVersionsBuilder_.mergeFrom(value);
+ } else {
+ mostRecentVersionsBuilder_.setMessage(value);
+ }
+ }
+ conditionTypeCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ */
+ public Builder clearMostRecentVersions() {
+ if (mostRecentVersionsBuilder_ == null) {
+ if (conditionTypeCase_ == 4) {
+ conditionTypeCase_ = 0;
+ conditionType_ = null;
+ onChanged();
+ }
+ } else {
+ if (conditionTypeCase_ == 4) {
+ conditionTypeCase_ = 0;
+ conditionType_ = null;
+ }
+ mostRecentVersionsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder
+ getMostRecentVersionsBuilder() {
+ return getMostRecentVersionsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder
+ getMostRecentVersionsOrBuilder() {
+ if ((conditionTypeCase_ == 4) && (mostRecentVersionsBuilder_ != null)) {
+ return mostRecentVersionsBuilder_.getMessageOrBuilder();
+ } else {
+ if (conditionTypeCase_ == 4) {
+ return (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions)
+ conditionType_;
+ }
+ return com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions,
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder,
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder>
+ getMostRecentVersionsFieldBuilder() {
+ if (mostRecentVersionsBuilder_ == null) {
+ if (!(conditionTypeCase_ == 4)) {
+ conditionType_ =
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ .getDefaultInstance();
+ }
+ mostRecentVersionsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions,
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder,
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder>(
+ (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions)
+ conditionType_,
+ getParentForChildren(),
+ isClean());
+ conditionType_ = null;
+ }
+ conditionTypeCase_ = 4;
+ onChanged();
+ return mostRecentVersionsBuilder_;
+ }
+
+ private java.lang.Object id_ = "";
+ /**
+ *
+ *
+ * + * The user-provided ID of the cleanup policy. + *+ * + *
string id = 1;
+ *
+ * @return The id.
+ */
+ public java.lang.String getId() {
+ java.lang.Object ref = id_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ id_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The user-provided ID of the cleanup policy. + *+ * + *
string id = 1;
+ *
+ * @return The bytes for id.
+ */
+ public com.google.protobuf.ByteString getIdBytes() {
+ java.lang.Object ref = id_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ id_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ * + * The user-provided ID of the cleanup policy. + *+ * + *
string id = 1;
+ *
+ * @param value The id to set.
+ * @return This builder for chaining.
+ */
+ public Builder setId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ id_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The user-provided ID of the cleanup policy. + *+ * + *
string id = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearId() {
+ id_ = getDefaultInstance().getId();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * The user-provided ID of the cleanup policy. + *+ * + *
string id = 1;
+ *
+ * @param value The bytes for id to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ id_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ private int action_ = 0;
+ /**
+ *
+ *
+ * + * Policy action. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;
+ *
+ * @return The enum numeric value on the wire for action.
+ */
+ @java.lang.Override
+ public int getActionValue() {
+ return action_;
+ }
+ /**
+ *
+ *
+ * + * Policy action. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;
+ *
+ * @param value The enum numeric value on the wire for action to set.
+ * @return This builder for chaining.
+ */
+ public Builder setActionValue(int value) {
+ action_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Policy action. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;
+ *
+ * @return The action.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicy.Action getAction() {
+ com.google.devtools.artifactregistry.v1.CleanupPolicy.Action result =
+ com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.forNumber(action_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.CleanupPolicy.Action.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * Policy action. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;
+ *
+ * @param value The action to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAction(com.google.devtools.artifactregistry.v1.CleanupPolicy.Action value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000008;
+ action_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Policy action. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAction() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ action_ = 0;
+ 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.devtools.artifactregistry.v1.CleanupPolicy)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.CleanupPolicy)
+ private static final com.google.devtools.artifactregistry.v1.CleanupPolicy DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.CleanupPolicy();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicy getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy. + * If multiple entries are set, all must be satisfied for the condition to be + * satisfied. + *+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicyCondition} + */ +public final class CleanupPolicyCondition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.CleanupPolicyCondition) + CleanupPolicyConditionOrBuilder { + private static final long serialVersionUID = 0L; + // Use CleanupPolicyCondition.newBuilder() to construct. + private CleanupPolicyCondition(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CleanupPolicyCondition() { + tagState_ = 0; + tagPrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + versionNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + packageNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CleanupPolicyCondition(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyCondition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.class, + com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.Builder.class); + } + + /** + * + * + *
+ * Statuses applying to versions. + *+ * + * Protobuf enum {@code google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState} + */ + public enum TagState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Tag status not specified. + *+ * + *
TAG_STATE_UNSPECIFIED = 0;
+ */
+ TAG_STATE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Applies to tagged versions only. + *+ * + *
TAGGED = 1;
+ */
+ TAGGED(1),
+ /**
+ *
+ *
+ * + * Applies to untagged versions only. + *+ * + *
UNTAGGED = 2;
+ */
+ UNTAGGED(2),
+ /**
+ *
+ *
+ * + * Applies to all versions. + *+ * + *
ANY = 3;
+ */
+ ANY(3),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Tag status not specified. + *+ * + *
TAG_STATE_UNSPECIFIED = 0;
+ */
+ public static final int TAG_STATE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ * + * Applies to tagged versions only. + *+ * + *
TAGGED = 1;
+ */
+ public static final int TAGGED_VALUE = 1;
+ /**
+ *
+ *
+ * + * Applies to untagged versions only. + *+ * + *
UNTAGGED = 2;
+ */
+ public static final int UNTAGGED_VALUE = 2;
+ /**
+ *
+ *
+ * + * Applies to all versions. + *+ * + *
ANY = 3;
+ */
+ public static final int ANY_VALUE = 3;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static TagState valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static TagState forNumber(int value) {
+ switch (value) {
+ case 0:
+ return TAG_STATE_UNSPECIFIED;
+ case 1:
+ return TAGGED;
+ case 2:
+ return UNTAGGED;
+ case 3:
+ return ANY;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @return Whether the tagState field is set.
+ */
+ @java.lang.Override
+ public boolean hasTagState() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @return The enum numeric value on the wire for tagState.
+ */
+ @java.lang.Override
+ public int getTagStateValue() {
+ return tagState_;
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @return The tagState.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState getTagState() {
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState result =
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState.forNumber(
+ tagState_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int TAG_PREFIXES_FIELD_NUMBER = 3;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.LazyStringArrayList tagPrefixes_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @return A list containing the tagPrefixes.
+ */
+ public com.google.protobuf.ProtocolStringList getTagPrefixesList() {
+ return tagPrefixes_;
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @return The count of tagPrefixes.
+ */
+ public int getTagPrefixesCount() {
+ return tagPrefixes_.size();
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @param index The index of the element to return.
+ * @return The tagPrefixes at the given index.
+ */
+ public java.lang.String getTagPrefixes(int index) {
+ return tagPrefixes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the tagPrefixes at the given index.
+ */
+ public com.google.protobuf.ByteString getTagPrefixesBytes(int index) {
+ return tagPrefixes_.getByteString(index);
+ }
+
+ public static final int VERSION_NAME_PREFIXES_FIELD_NUMBER = 4;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.LazyStringArrayList versionNamePrefixes_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @return A list containing the versionNamePrefixes.
+ */
+ public com.google.protobuf.ProtocolStringList getVersionNamePrefixesList() {
+ return versionNamePrefixes_;
+ }
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @return The count of versionNamePrefixes.
+ */
+ public int getVersionNamePrefixesCount() {
+ return versionNamePrefixes_.size();
+ }
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @param index The index of the element to return.
+ * @return The versionNamePrefixes at the given index.
+ */
+ public java.lang.String getVersionNamePrefixes(int index) {
+ return versionNamePrefixes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the versionNamePrefixes at the given index.
+ */
+ public com.google.protobuf.ByteString getVersionNamePrefixesBytes(int index) {
+ return versionNamePrefixes_.getByteString(index);
+ }
+
+ public static final int PACKAGE_NAME_PREFIXES_FIELD_NUMBER = 5;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.LazyStringArrayList packageNamePrefixes_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @return A list containing the packageNamePrefixes.
+ */
+ public com.google.protobuf.ProtocolStringList getPackageNamePrefixesList() {
+ return packageNamePrefixes_;
+ }
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @return The count of packageNamePrefixes.
+ */
+ public int getPackageNamePrefixesCount() {
+ return packageNamePrefixes_.size();
+ }
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @param index The index of the element to return.
+ * @return The packageNamePrefixes at the given index.
+ */
+ public java.lang.String getPackageNamePrefixes(int index) {
+ return packageNamePrefixes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the packageNamePrefixes at the given index.
+ */
+ public com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index) {
+ return packageNamePrefixes_.getByteString(index);
+ }
+
+ public static final int OLDER_THAN_FIELD_NUMBER = 6;
+ private com.google.protobuf.Duration olderThan_;
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ *
+ * @return Whether the olderThan field is set.
+ */
+ @java.lang.Override
+ public boolean hasOlderThan() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ *
+ * @return The olderThan.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Duration getOlderThan() {
+ return olderThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : olderThan_;
+ }
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ */
+ @java.lang.Override
+ public com.google.protobuf.DurationOrBuilder getOlderThanOrBuilder() {
+ return olderThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : olderThan_;
+ }
+
+ public static final int NEWER_THAN_FIELD_NUMBER = 7;
+ private com.google.protobuf.Duration newerThan_;
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ *
+ * @return Whether the newerThan field is set.
+ */
+ @java.lang.Override
+ public boolean hasNewerThan() {
+ return ((bitField0_ & 0x00000004) != 0);
+ }
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ *
+ * @return The newerThan.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Duration getNewerThan() {
+ return newerThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : newerThan_;
+ }
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ */
+ @java.lang.Override
+ public com.google.protobuf.DurationOrBuilder getNewerThanOrBuilder() {
+ return newerThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : newerThan_;
+ }
+
+ 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.writeEnum(2, tagState_);
+ }
+ for (int i = 0; i < tagPrefixes_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, tagPrefixes_.getRaw(i));
+ }
+ for (int i = 0; i < versionNamePrefixes_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, versionNamePrefixes_.getRaw(i));
+ }
+ for (int i = 0; i < packageNamePrefixes_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, packageNamePrefixes_.getRaw(i));
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ output.writeMessage(6, getOlderThan());
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ output.writeMessage(7, getNewerThan());
+ }
+ 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.computeEnumSize(2, tagState_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < tagPrefixes_.size(); i++) {
+ dataSize += computeStringSizeNoTag(tagPrefixes_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getTagPrefixesList().size();
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < versionNamePrefixes_.size(); i++) {
+ dataSize += computeStringSizeNoTag(versionNamePrefixes_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getVersionNamePrefixesList().size();
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < packageNamePrefixes_.size(); i++) {
+ dataSize += computeStringSizeNoTag(packageNamePrefixes_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getPackageNamePrefixesList().size();
+ }
+ if (((bitField0_ & 0x00000002) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getOlderThan());
+ }
+ if (((bitField0_ & 0x00000004) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getNewerThan());
+ }
+ 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.devtools.artifactregistry.v1.CleanupPolicyCondition)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition other =
+ (com.google.devtools.artifactregistry.v1.CleanupPolicyCondition) obj;
+
+ if (hasTagState() != other.hasTagState()) return false;
+ if (hasTagState()) {
+ if (tagState_ != other.tagState_) return false;
+ }
+ if (!getTagPrefixesList().equals(other.getTagPrefixesList())) return false;
+ if (!getVersionNamePrefixesList().equals(other.getVersionNamePrefixesList())) return false;
+ if (!getPackageNamePrefixesList().equals(other.getPackageNamePrefixesList())) return false;
+ if (hasOlderThan() != other.hasOlderThan()) return false;
+ if (hasOlderThan()) {
+ if (!getOlderThan().equals(other.getOlderThan())) return false;
+ }
+ if (hasNewerThan() != other.hasNewerThan()) return false;
+ if (hasNewerThan()) {
+ if (!getNewerThan().equals(other.getNewerThan())) 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 (hasTagState()) {
+ hash = (37 * hash) + TAG_STATE_FIELD_NUMBER;
+ hash = (53 * hash) + tagState_;
+ }
+ if (getTagPrefixesCount() > 0) {
+ hash = (37 * hash) + TAG_PREFIXES_FIELD_NUMBER;
+ hash = (53 * hash) + getTagPrefixesList().hashCode();
+ }
+ if (getVersionNamePrefixesCount() > 0) {
+ hash = (37 * hash) + VERSION_NAME_PREFIXES_FIELD_NUMBER;
+ hash = (53 * hash) + getVersionNamePrefixesList().hashCode();
+ }
+ if (getPackageNamePrefixesCount() > 0) {
+ hash = (37 * hash) + PACKAGE_NAME_PREFIXES_FIELD_NUMBER;
+ hash = (53 * hash) + getPackageNamePrefixesList().hashCode();
+ }
+ if (hasOlderThan()) {
+ hash = (37 * hash) + OLDER_THAN_FIELD_NUMBER;
+ hash = (53 * hash) + getOlderThan().hashCode();
+ }
+ if (hasNewerThan()) {
+ hash = (37 * hash) + NEWER_THAN_FIELD_NUMBER;
+ hash = (53 * hash) + getNewerThan().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition 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.devtools.artifactregistry.v1.CleanupPolicyCondition parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition 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.devtools.artifactregistry.v1.CleanupPolicyCondition parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition 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.devtools.artifactregistry.v1.CleanupPolicyCondition parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition 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.devtools.artifactregistry.v1.CleanupPolicyCondition 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;
+ }
+ /**
+ *
+ *
+ * + * CleanupPolicyCondition is a set of conditions attached to a CleanupPolicy. + * If multiple entries are set, all must be satisfied for the condition to be + * satisfied. + *+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicyCondition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @return Whether the tagState field is set.
+ */
+ @java.lang.Override
+ public boolean hasTagState() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @return The enum numeric value on the wire for tagState.
+ */
+ @java.lang.Override
+ public int getTagStateValue() {
+ return tagState_;
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @param value The enum numeric value on the wire for tagState to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTagStateValue(int value) {
+ tagState_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @return The tagState.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState getTagState() {
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState result =
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState.forNumber(
+ tagState_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @param value The tagState to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTagState(
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ tagState_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTagState() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ tagState_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringArrayList tagPrefixes_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+
+ private void ensureTagPrefixesIsMutable() {
+ if (!tagPrefixes_.isModifiable()) {
+ tagPrefixes_ = new com.google.protobuf.LazyStringArrayList(tagPrefixes_);
+ }
+ bitField0_ |= 0x00000002;
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @return A list containing the tagPrefixes.
+ */
+ public com.google.protobuf.ProtocolStringList getTagPrefixesList() {
+ tagPrefixes_.makeImmutable();
+ return tagPrefixes_;
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @return The count of tagPrefixes.
+ */
+ public int getTagPrefixesCount() {
+ return tagPrefixes_.size();
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @param index The index of the element to return.
+ * @return The tagPrefixes at the given index.
+ */
+ public java.lang.String getTagPrefixes(int index) {
+ return tagPrefixes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the tagPrefixes at the given index.
+ */
+ public com.google.protobuf.ByteString getTagPrefixesBytes(int index) {
+ return tagPrefixes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @param index The index to set the value at.
+ * @param value The tagPrefixes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTagPrefixes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTagPrefixesIsMutable();
+ tagPrefixes_.set(index, value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @param value The tagPrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addTagPrefixes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTagPrefixesIsMutable();
+ tagPrefixes_.add(value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @param values The tagPrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllTagPrefixes(java.lang.Iterable+ * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTagPrefixes() {
+ tagPrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ ;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @param value The bytes of the tagPrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addTagPrefixesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureTagPrefixesIsMutable();
+ tagPrefixes_.add(value);
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringArrayList versionNamePrefixes_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+
+ private void ensureVersionNamePrefixesIsMutable() {
+ if (!versionNamePrefixes_.isModifiable()) {
+ versionNamePrefixes_ = new com.google.protobuf.LazyStringArrayList(versionNamePrefixes_);
+ }
+ bitField0_ |= 0x00000004;
+ }
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @return A list containing the versionNamePrefixes.
+ */
+ public com.google.protobuf.ProtocolStringList getVersionNamePrefixesList() {
+ versionNamePrefixes_.makeImmutable();
+ return versionNamePrefixes_;
+ }
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @return The count of versionNamePrefixes.
+ */
+ public int getVersionNamePrefixesCount() {
+ return versionNamePrefixes_.size();
+ }
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @param index The index of the element to return.
+ * @return The versionNamePrefixes at the given index.
+ */
+ public java.lang.String getVersionNamePrefixes(int index) {
+ return versionNamePrefixes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the versionNamePrefixes at the given index.
+ */
+ public com.google.protobuf.ByteString getVersionNamePrefixesBytes(int index) {
+ return versionNamePrefixes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @param index The index to set the value at.
+ * @param value The versionNamePrefixes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setVersionNamePrefixes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureVersionNamePrefixesIsMutable();
+ versionNamePrefixes_.set(index, value);
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @param value The versionNamePrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addVersionNamePrefixes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureVersionNamePrefixesIsMutable();
+ versionNamePrefixes_.add(value);
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @param values The versionNamePrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllVersionNamePrefixes(java.lang.Iterable+ * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearVersionNamePrefixes() {
+ versionNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ ;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @param value The bytes of the versionNamePrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addVersionNamePrefixesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensureVersionNamePrefixesIsMutable();
+ versionNamePrefixes_.add(value);
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringArrayList packageNamePrefixes_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+
+ private void ensurePackageNamePrefixesIsMutable() {
+ if (!packageNamePrefixes_.isModifiable()) {
+ packageNamePrefixes_ = new com.google.protobuf.LazyStringArrayList(packageNamePrefixes_);
+ }
+ bitField0_ |= 0x00000008;
+ }
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @return A list containing the packageNamePrefixes.
+ */
+ public com.google.protobuf.ProtocolStringList getPackageNamePrefixesList() {
+ packageNamePrefixes_.makeImmutable();
+ return packageNamePrefixes_;
+ }
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @return The count of packageNamePrefixes.
+ */
+ public int getPackageNamePrefixesCount() {
+ return packageNamePrefixes_.size();
+ }
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @param index The index of the element to return.
+ * @return The packageNamePrefixes at the given index.
+ */
+ public java.lang.String getPackageNamePrefixes(int index) {
+ return packageNamePrefixes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the packageNamePrefixes at the given index.
+ */
+ public com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index) {
+ return packageNamePrefixes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @param index The index to set the value at.
+ * @param value The packageNamePrefixes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPackageNamePrefixes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePackageNamePrefixesIsMutable();
+ packageNamePrefixes_.set(index, value);
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @param value The packageNamePrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPackageNamePrefixes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePackageNamePrefixesIsMutable();
+ packageNamePrefixes_.add(value);
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @param values The packageNamePrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllPackageNamePrefixes(java.lang.Iterable+ * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPackageNamePrefixes() {
+ packageNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ ;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @param value The bytes of the packageNamePrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPackageNamePrefixesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensurePackageNamePrefixesIsMutable();
+ packageNamePrefixes_.add(value);
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Duration olderThan_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ olderThanBuilder_;
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ *
+ * @return Whether the olderThan field is set.
+ */
+ public boolean hasOlderThan() {
+ return ((bitField0_ & 0x00000010) != 0);
+ }
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ *
+ * @return The olderThan.
+ */
+ public com.google.protobuf.Duration getOlderThan() {
+ if (olderThanBuilder_ == null) {
+ return olderThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : olderThan_;
+ } else {
+ return olderThanBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ */
+ public Builder setOlderThan(com.google.protobuf.Duration value) {
+ if (olderThanBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ olderThan_ = value;
+ } else {
+ olderThanBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ */
+ public Builder setOlderThan(com.google.protobuf.Duration.Builder builderForValue) {
+ if (olderThanBuilder_ == null) {
+ olderThan_ = builderForValue.build();
+ } else {
+ olderThanBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ */
+ public Builder mergeOlderThan(com.google.protobuf.Duration value) {
+ if (olderThanBuilder_ == null) {
+ if (((bitField0_ & 0x00000010) != 0)
+ && olderThan_ != null
+ && olderThan_ != com.google.protobuf.Duration.getDefaultInstance()) {
+ getOlderThanBuilder().mergeFrom(value);
+ } else {
+ olderThan_ = value;
+ }
+ } else {
+ olderThanBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ */
+ public Builder clearOlderThan() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ olderThan_ = null;
+ if (olderThanBuilder_ != null) {
+ olderThanBuilder_.dispose();
+ olderThanBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ */
+ public com.google.protobuf.Duration.Builder getOlderThanBuilder() {
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return getOlderThanFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ */
+ public com.google.protobuf.DurationOrBuilder getOlderThanOrBuilder() {
+ if (olderThanBuilder_ != null) {
+ return olderThanBuilder_.getMessageOrBuilder();
+ } else {
+ return olderThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : olderThan_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ getOlderThanFieldBuilder() {
+ if (olderThanBuilder_ == null) {
+ olderThanBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>(
+ getOlderThan(), getParentForChildren(), isClean());
+ olderThan_ = null;
+ }
+ return olderThanBuilder_;
+ }
+
+ private com.google.protobuf.Duration newerThan_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ newerThanBuilder_;
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ *
+ * @return Whether the newerThan field is set.
+ */
+ public boolean hasNewerThan() {
+ return ((bitField0_ & 0x00000020) != 0);
+ }
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ *
+ * @return The newerThan.
+ */
+ public com.google.protobuf.Duration getNewerThan() {
+ if (newerThanBuilder_ == null) {
+ return newerThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : newerThan_;
+ } else {
+ return newerThanBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ */
+ public Builder setNewerThan(com.google.protobuf.Duration value) {
+ if (newerThanBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ newerThan_ = value;
+ } else {
+ newerThanBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ */
+ public Builder setNewerThan(com.google.protobuf.Duration.Builder builderForValue) {
+ if (newerThanBuilder_ == null) {
+ newerThan_ = builderForValue.build();
+ } else {
+ newerThanBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ */
+ public Builder mergeNewerThan(com.google.protobuf.Duration value) {
+ if (newerThanBuilder_ == null) {
+ if (((bitField0_ & 0x00000020) != 0)
+ && newerThan_ != null
+ && newerThan_ != com.google.protobuf.Duration.getDefaultInstance()) {
+ getNewerThanBuilder().mergeFrom(value);
+ } else {
+ newerThan_ = value;
+ }
+ } else {
+ newerThanBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ */
+ public Builder clearNewerThan() {
+ bitField0_ = (bitField0_ & ~0x00000020);
+ newerThan_ = null;
+ if (newerThanBuilder_ != null) {
+ newerThanBuilder_.dispose();
+ newerThanBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ */
+ public com.google.protobuf.Duration.Builder getNewerThanBuilder() {
+ bitField0_ |= 0x00000020;
+ onChanged();
+ return getNewerThanFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ */
+ public com.google.protobuf.DurationOrBuilder getNewerThanOrBuilder() {
+ if (newerThanBuilder_ != null) {
+ return newerThanBuilder_.getMessageOrBuilder();
+ } else {
+ return newerThan_ == null ? com.google.protobuf.Duration.getDefaultInstance() : newerThan_;
+ }
+ }
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>
+ getNewerThanFieldBuilder() {
+ if (newerThanBuilder_ == null) {
+ newerThanBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Duration,
+ com.google.protobuf.Duration.Builder,
+ com.google.protobuf.DurationOrBuilder>(
+ getNewerThan(), getParentForChildren(), isClean());
+ newerThan_ = null;
+ }
+ return newerThanBuilder_;
+ }
+
+ @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.devtools.artifactregistry.v1.CleanupPolicyCondition)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.CleanupPolicyCondition)
+ private static final com.google.devtools.artifactregistry.v1.CleanupPolicyCondition
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.CleanupPolicyCondition();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyCondition
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @return Whether the tagState field is set.
+ */
+ boolean hasTagState();
+ /**
+ *
+ *
+ * + * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @return The enum numeric value on the wire for tagState.
+ */
+ int getTagStateValue();
+ /**
+ *
+ *
+ * + * Match versions by tag status. + *+ * + *
+ * optional .google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState tag_state = 2;
+ *
+ *
+ * @return The tagState.
+ */
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition.TagState getTagState();
+
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @return A list containing the tagPrefixes.
+ */
+ java.util.List+ * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @return The count of tagPrefixes.
+ */
+ int getTagPrefixesCount();
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @param index The index of the element to return.
+ * @return The tagPrefixes at the given index.
+ */
+ java.lang.String getTagPrefixes(int index);
+ /**
+ *
+ *
+ * + * Match versions by tag prefix. Applied on any prefix match. + *+ * + *
repeated string tag_prefixes = 3;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the tagPrefixes at the given index.
+ */
+ com.google.protobuf.ByteString getTagPrefixesBytes(int index);
+
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @return A list containing the versionNamePrefixes.
+ */
+ java.util.List+ * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @return The count of versionNamePrefixes.
+ */
+ int getVersionNamePrefixesCount();
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @param index The index of the element to return.
+ * @return The versionNamePrefixes at the given index.
+ */
+ java.lang.String getVersionNamePrefixes(int index);
+ /**
+ *
+ *
+ * + * Match versions by version name prefix. Applied on any prefix match. + *+ * + *
repeated string version_name_prefixes = 4;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the versionNamePrefixes at the given index.
+ */
+ com.google.protobuf.ByteString getVersionNamePrefixesBytes(int index);
+
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @return A list containing the packageNamePrefixes.
+ */
+ java.util.List+ * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @return The count of packageNamePrefixes.
+ */
+ int getPackageNamePrefixesCount();
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @param index The index of the element to return.
+ * @return The packageNamePrefixes at the given index.
+ */
+ java.lang.String getPackageNamePrefixes(int index);
+ /**
+ *
+ *
+ * + * Match versions by package prefix. Applied on any prefix match. + *+ * + *
repeated string package_name_prefixes = 5;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the packageNamePrefixes at the given index.
+ */
+ com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index);
+
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ *
+ * @return Whether the olderThan field is set.
+ */
+ boolean hasOlderThan();
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ *
+ * @return The olderThan.
+ */
+ com.google.protobuf.Duration getOlderThan();
+ /**
+ *
+ *
+ * + * Match versions older than a duration. + *+ * + *
optional .google.protobuf.Duration older_than = 6;
+ */
+ com.google.protobuf.DurationOrBuilder getOlderThanOrBuilder();
+
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ *
+ * @return Whether the newerThan field is set.
+ */
+ boolean hasNewerThan();
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ *
+ * @return The newerThan.
+ */
+ com.google.protobuf.Duration getNewerThan();
+ /**
+ *
+ *
+ * + * Match versions newer than a duration. + *+ * + *
optional .google.protobuf.Duration newer_than = 7;
+ */
+ com.google.protobuf.DurationOrBuilder getNewerThanOrBuilder();
+}
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyMostRecentVersions.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyMostRecentVersions.java
new file mode 100644
index 000000000000..4bdded7687f5
--- /dev/null
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyMostRecentVersions.java
@@ -0,0 +1,870 @@
+/*
+ * Copyright 2023 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/devtools/artifactregistry/v1/repository.proto
+
+package com.google.devtools.artifactregistry.v1;
+
+/**
+ *
+ *
+ * + * CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy + * for retaining a minimum number of versions. + *+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} + */ +public final class CleanupPolicyMostRecentVersions extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) + CleanupPolicyMostRecentVersionsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CleanupPolicyMostRecentVersions.newBuilder() to construct. + private CleanupPolicyMostRecentVersions( + com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private CleanupPolicyMostRecentVersions() { + packageNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CleanupPolicyMostRecentVersions(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.devtools.artifactregistry.v1.RepositoryProto + .internal_static_google_devtools_artifactregistry_v1_CleanupPolicyMostRecentVersions_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.class, + com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions.Builder.class); + } + + private int bitField0_; + public static final int PACKAGE_NAME_PREFIXES_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList packageNamePrefixes_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * + * + *
+ * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @return A list containing the packageNamePrefixes.
+ */
+ public com.google.protobuf.ProtocolStringList getPackageNamePrefixesList() {
+ return packageNamePrefixes_;
+ }
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @return The count of packageNamePrefixes.
+ */
+ public int getPackageNamePrefixesCount() {
+ return packageNamePrefixes_.size();
+ }
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The packageNamePrefixes at the given index.
+ */
+ public java.lang.String getPackageNamePrefixes(int index) {
+ return packageNamePrefixes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the packageNamePrefixes at the given index.
+ */
+ public com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index) {
+ return packageNamePrefixes_.getByteString(index);
+ }
+
+ public static final int KEEP_COUNT_FIELD_NUMBER = 2;
+ private int keepCount_ = 0;
+ /**
+ *
+ *
+ * + * Minimum number of versions to keep. + *+ * + *
optional int32 keep_count = 2;
+ *
+ * @return Whether the keepCount field is set.
+ */
+ @java.lang.Override
+ public boolean hasKeepCount() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+ /**
+ *
+ *
+ * + * Minimum number of versions to keep. + *+ * + *
optional int32 keep_count = 2;
+ *
+ * @return The keepCount.
+ */
+ @java.lang.Override
+ public int getKeepCount() {
+ return keepCount_;
+ }
+
+ 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 {
+ for (int i = 0; i < packageNamePrefixes_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, packageNamePrefixes_.getRaw(i));
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeInt32(2, keepCount_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ {
+ int dataSize = 0;
+ for (int i = 0; i < packageNamePrefixes_.size(); i++) {
+ dataSize += computeStringSizeNoTag(packageNamePrefixes_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getPackageNamePrefixesList().size();
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, keepCount_);
+ }
+ 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.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions other =
+ (com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions) obj;
+
+ if (!getPackageNamePrefixesList().equals(other.getPackageNamePrefixesList())) return false;
+ if (hasKeepCount() != other.hasKeepCount()) return false;
+ if (hasKeepCount()) {
+ if (getKeepCount() != other.getKeepCount()) 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 (getPackageNamePrefixesCount() > 0) {
+ hash = (37 * hash) + PACKAGE_NAME_PREFIXES_FIELD_NUMBER;
+ hash = (53 * hash) + getPackageNamePrefixesList().hashCode();
+ }
+ if (hasKeepCount()) {
+ hash = (37 * hash) + KEEP_COUNT_FIELD_NUMBER;
+ hash = (53 * hash) + getKeepCount();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions 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.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions 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.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ 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.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions 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.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions 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;
+ }
+ /**
+ *
+ *
+ * + * CleanupPolicyMostRecentVersions is an alternate condition of a CleanupPolicy + * for retaining a minimum number of versions. + *+ * + * Protobuf type {@code google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @return A list containing the packageNamePrefixes.
+ */
+ public com.google.protobuf.ProtocolStringList getPackageNamePrefixesList() {
+ packageNamePrefixes_.makeImmutable();
+ return packageNamePrefixes_;
+ }
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @return The count of packageNamePrefixes.
+ */
+ public int getPackageNamePrefixesCount() {
+ return packageNamePrefixes_.size();
+ }
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The packageNamePrefixes at the given index.
+ */
+ public java.lang.String getPackageNamePrefixes(int index) {
+ return packageNamePrefixes_.get(index);
+ }
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the packageNamePrefixes at the given index.
+ */
+ public com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index) {
+ return packageNamePrefixes_.getByteString(index);
+ }
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @param index The index to set the value at.
+ * @param value The packageNamePrefixes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPackageNamePrefixes(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePackageNamePrefixesIsMutable();
+ packageNamePrefixes_.set(index, value);
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @param value The packageNamePrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPackageNamePrefixes(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePackageNamePrefixesIsMutable();
+ packageNamePrefixes_.add(value);
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @param values The packageNamePrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllPackageNamePrefixes(java.lang.Iterable+ * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPackageNamePrefixes() {
+ packageNamePrefixes_ = com.google.protobuf.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ ;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @param value The bytes of the packageNamePrefixes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPackageNamePrefixesBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensurePackageNamePrefixesIsMutable();
+ packageNamePrefixes_.add(value);
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private int keepCount_;
+ /**
+ *
+ *
+ * + * Minimum number of versions to keep. + *+ * + *
optional int32 keep_count = 2;
+ *
+ * @return Whether the keepCount field is set.
+ */
+ @java.lang.Override
+ public boolean hasKeepCount() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+ /**
+ *
+ *
+ * + * Minimum number of versions to keep. + *+ * + *
optional int32 keep_count = 2;
+ *
+ * @return The keepCount.
+ */
+ @java.lang.Override
+ public int getKeepCount() {
+ return keepCount_;
+ }
+ /**
+ *
+ *
+ * + * Minimum number of versions to keep. + *+ * + *
optional int32 keep_count = 2;
+ *
+ * @param value The keepCount to set.
+ * @return This builder for chaining.
+ */
+ public Builder setKeepCount(int value) {
+
+ keepCount_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ * + * Minimum number of versions to keep. + *+ * + *
optional int32 keep_count = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearKeepCount() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ keepCount_ = 0;
+ 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.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions)
+ private static final com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @return A list containing the packageNamePrefixes.
+ */
+ java.util.List+ * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @return The count of packageNamePrefixes.
+ */
+ int getPackageNamePrefixesCount();
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @param index The index of the element to return.
+ * @return The packageNamePrefixes at the given index.
+ */
+ java.lang.String getPackageNamePrefixes(int index);
+ /**
+ *
+ *
+ * + * List of package name prefixes that will apply this rule. + *+ * + *
repeated string package_name_prefixes = 1;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the packageNamePrefixes at the given index.
+ */
+ com.google.protobuf.ByteString getPackageNamePrefixesBytes(int index);
+
+ /**
+ *
+ *
+ * + * Minimum number of versions to keep. + *+ * + *
optional int32 keep_count = 2;
+ *
+ * @return Whether the keepCount field is set.
+ */
+ boolean hasKeepCount();
+ /**
+ *
+ *
+ * + * Minimum number of versions to keep. + *+ * + *
optional int32 keep_count = 2;
+ *
+ * @return The keepCount.
+ */
+ int getKeepCount();
+}
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyOrBuilder.java
new file mode 100644
index 000000000000..6eb580781c56
--- /dev/null
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CleanupPolicyOrBuilder.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright 2023 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/devtools/artifactregistry/v1/repository.proto
+
+package com.google.devtools.artifactregistry.v1;
+
+public interface CleanupPolicyOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.CleanupPolicy)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ *
+ * @return Whether the condition field is set.
+ */
+ boolean hasCondition();
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ *
+ * @return The condition.
+ */
+ com.google.devtools.artifactregistry.v1.CleanupPolicyCondition getCondition();
+ /**
+ *
+ *
+ * + * Policy condition for matching versions. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicyCondition condition = 2;
+ */
+ com.google.devtools.artifactregistry.v1.CleanupPolicyConditionOrBuilder getConditionOrBuilder();
+
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ *
+ * @return Whether the mostRecentVersions field is set.
+ */
+ boolean hasMostRecentVersions();
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ *
+ * @return The mostRecentVersions.
+ */
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions getMostRecentVersions();
+ /**
+ *
+ *
+ * + * Policy condition for retaining a minimum number of versions. May only be + * specified with a Keep action. + *+ * + *
+ * .google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersions most_recent_versions = 4;
+ *
+ */
+ com.google.devtools.artifactregistry.v1.CleanupPolicyMostRecentVersionsOrBuilder
+ getMostRecentVersionsOrBuilder();
+
+ /**
+ *
+ *
+ * + * The user-provided ID of the cleanup policy. + *+ * + *
string id = 1;
+ *
+ * @return The id.
+ */
+ java.lang.String getId();
+ /**
+ *
+ *
+ * + * The user-provided ID of the cleanup policy. + *+ * + *
string id = 1;
+ *
+ * @return The bytes for id.
+ */
+ com.google.protobuf.ByteString getIdBytes();
+
+ /**
+ *
+ *
+ * + * Policy action. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;
+ *
+ * @return The enum numeric value on the wire for action.
+ */
+ int getActionValue();
+ /**
+ *
+ *
+ * + * Policy action. + *+ * + *
.google.devtools.artifactregistry.v1.CleanupPolicy.Action action = 3;
+ *
+ * @return The action.
+ */
+ com.google.devtools.artifactregistry.v1.CleanupPolicy.Action getAction();
+
+ com.google.devtools.artifactregistry.v1.CleanupPolicy.ConditionTypeCase getConditionTypeCase();
+}
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequest.java
index 97755be02f7d..46c14f46ca83 100644
--- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequest.java
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequest.java
@@ -128,7 +128,7 @@ public com.google.protobuf.ByteString getParentBytes() {
*
*
*
- * The repository id to use for this repository.
+ * Required. The repository id to use for this repository.
*
*
* string repository_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -151,7 +151,7 @@ public java.lang.String getRepositoryId() {
*
*
*
- * The repository id to use for this repository.
+ * Required. The repository id to use for this repository.
*
*
* string repository_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -177,7 +177,7 @@ public com.google.protobuf.ByteString getRepositoryIdBytes() {
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -194,7 +194,7 @@ public boolean hasRepository() {
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -213,7 +213,7 @@ public com.google.devtools.artifactregistry.v1.Repository getRepository() {
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -755,7 +755,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) {
*
*
*
- * The repository id to use for this repository.
+ * Required. The repository id to use for this repository.
*
*
* string repository_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -777,7 +777,7 @@ public java.lang.String getRepositoryId() {
*
*
*
- * The repository id to use for this repository.
+ * Required. The repository id to use for this repository.
*
*
* string repository_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -799,7 +799,7 @@ public com.google.protobuf.ByteString getRepositoryIdBytes() {
*
*
*
- * The repository id to use for this repository.
+ * Required. The repository id to use for this repository.
*
*
* string repository_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -820,7 +820,7 @@ public Builder setRepositoryId(java.lang.String value) {
*
*
*
- * The repository id to use for this repository.
+ * Required. The repository id to use for this repository.
*
*
* string repository_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -837,7 +837,7 @@ public Builder clearRepositoryId() {
*
*
*
- * The repository id to use for this repository.
+ * Required. The repository id to use for this repository.
*
*
* string repository_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -866,7 +866,7 @@ public Builder setRepositoryIdBytes(com.google.protobuf.ByteString value) {
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -882,7 +882,7 @@ public boolean hasRepository() {
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -904,7 +904,7 @@ public com.google.devtools.artifactregistry.v1.Repository getRepository() {
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -928,7 +928,7 @@ public Builder setRepository(com.google.devtools.artifactregistry.v1.Repository
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -950,7 +950,7 @@ public Builder setRepository(
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -978,7 +978,7 @@ public Builder mergeRepository(com.google.devtools.artifactregistry.v1.Repositor
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -999,7 +999,7 @@ public Builder clearRepository() {
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -1015,7 +1015,7 @@ public com.google.devtools.artifactregistry.v1.Repository.Builder getRepositoryB
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -1035,7 +1035,7 @@ public com.google.devtools.artifactregistry.v1.RepositoryOrBuilder getRepository
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequestOrBuilder.java
index 6d0b6ae27065..c3f401223d15 100644
--- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequestOrBuilder.java
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/CreateRepositoryRequestOrBuilder.java
@@ -58,7 +58,7 @@ public interface CreateRepositoryRequestOrBuilder
*
*
*
- * The repository id to use for this repository.
+ * Required. The repository id to use for this repository.
*
*
* string repository_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -70,7 +70,7 @@ public interface CreateRepositoryRequestOrBuilder
*
*
*
- * The repository id to use for this repository.
+ * Required. The repository id to use for this repository.
*
*
* string repository_id = 2 [(.google.api.field_behavior) = REQUIRED];
@@ -83,7 +83,7 @@ public interface CreateRepositoryRequestOrBuilder
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -97,7 +97,7 @@ public interface CreateRepositoryRequestOrBuilder
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
@@ -111,7 +111,7 @@ public interface CreateRepositoryRequestOrBuilder
*
*
*
- * The repository to be created.
+ * Required. The repository to be created.
*
*
*
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequest.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequest.java
index 43eb78a0bcfb..0684e5de9314 100644
--- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequest.java
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequest.java
@@ -72,7 +72,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
*
- * The name of the parent resource whose tags will be listed.
+ * The name of the parent package whose tags will be listed.
+ * For example:
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
*
*
* string parent = 1;
@@ -95,7 +97,9 @@ public java.lang.String getParent() {
*
*
*
- * The name of the parent resource whose tags will be listed.
+ * The name of the parent package whose tags will be listed.
+ * For example:
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
*
*
* string parent = 1;
@@ -669,7 +673,9 @@ public Builder mergeFrom(
*
*
*
- * The name of the parent resource whose tags will be listed.
+ * The name of the parent package whose tags will be listed.
+ * For example:
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
*
*
* string parent = 1;
@@ -691,7 +697,9 @@ public java.lang.String getParent() {
*
*
*
- * The name of the parent resource whose tags will be listed.
+ * The name of the parent package whose tags will be listed.
+ * For example:
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
*
*
* string parent = 1;
@@ -713,7 +721,9 @@ public com.google.protobuf.ByteString getParentBytes() {
*
*
*
- * The name of the parent resource whose tags will be listed.
+ * The name of the parent package whose tags will be listed.
+ * For example:
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
*
*
* string parent = 1;
@@ -734,7 +744,9 @@ public Builder setParent(java.lang.String value) {
*
*
*
- * The name of the parent resource whose tags will be listed.
+ * The name of the parent package whose tags will be listed.
+ * For example:
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
*
*
* string parent = 1;
@@ -751,7 +763,9 @@ public Builder clearParent() {
*
*
*
- * The name of the parent resource whose tags will be listed.
+ * The name of the parent package whose tags will be listed.
+ * For example:
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
*
*
* string parent = 1;
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequestOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequestOrBuilder.java
index a34b4abf1b61..fe61bc6da517 100644
--- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequestOrBuilder.java
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/ListTagsRequestOrBuilder.java
@@ -27,7 +27,9 @@ public interface ListTagsRequestOrBuilder
*
*
*
- * The name of the parent resource whose tags will be listed.
+ * The name of the parent package whose tags will be listed.
+ * For example:
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
*
*
* string parent = 1;
@@ -39,7 +41,9 @@ public interface ListTagsRequestOrBuilder
*
*
*
- * The name of the parent resource whose tags will be listed.
+ * The name of the parent package whose tags will be listed.
+ * For example:
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
*
*
* string parent = 1;
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Package.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Package.java
index 0a4d7410c771..5374133544bf 100644
--- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Package.java
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Package.java
@@ -72,7 +72,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
*
*
* The name of the package, for example:
- * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
* If the package ID part contains slashes, the slashes are escaped.
*
*
@@ -97,7 +97,7 @@ public java.lang.String getName() {
*
*
* The name of the package, for example:
- * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
* If the package ID part contains slashes, the slashes are escaped.
*
*
@@ -698,7 +698,7 @@ public Builder mergeFrom(
*
*
* The name of the package, for example:
- * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
* If the package ID part contains slashes, the slashes are escaped.
*
*
@@ -722,7 +722,7 @@ public java.lang.String getName() {
*
*
* The name of the package, for example:
- * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
* If the package ID part contains slashes, the slashes are escaped.
*
*
@@ -746,7 +746,7 @@ public com.google.protobuf.ByteString getNameBytes() {
*
*
* The name of the package, for example:
- * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
* If the package ID part contains slashes, the slashes are escaped.
*
*
@@ -769,7 +769,7 @@ public Builder setName(java.lang.String value) {
*
*
* The name of the package, for example:
- * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
* If the package ID part contains slashes, the slashes are escaped.
*
*
@@ -788,7 +788,7 @@ public Builder clearName() {
*
*
* The name of the package, for example:
- * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
* If the package ID part contains slashes, the slashes are escaped.
*
*
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageOrBuilder.java
index 4615cb278b26..c2e2f2094811 100644
--- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageOrBuilder.java
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/PackageOrBuilder.java
@@ -28,7 +28,7 @@ public interface PackageOrBuilder
*
*
* The name of the package, for example:
- * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
* If the package ID part contains slashes, the slashes are escaped.
*
*
@@ -42,7 +42,7 @@ public interface PackageOrBuilder
*
*
* The name of the package, for example:
- * "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1".
+ * `projects/p1/locations/us-central1/repositories/repo1/packages/pkg1`.
* If the package ID part contains slashes, the slashes are escaped.
*
*
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfig.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfig.java
new file mode 100644
index 000000000000..70cf8342386d
--- /dev/null
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfig.java
@@ -0,0 +1,13225 @@
+/*
+ * Copyright 2023 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/devtools/artifactregistry/v1/repository.proto
+
+package com.google.devtools.artifactregistry.v1;
+
+/**
+ *
+ *
+ *
+ * Remote repository configuration.
+ *
+ *
+ * Protobuf type {@code google.devtools.artifactregistry.v1.RemoteRepositoryConfig}
+ */
+public final class RemoteRepositoryConfig extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig)
+ RemoteRepositoryConfigOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use RemoteRepositoryConfig.newBuilder() to construct.
+ private RemoteRepositoryConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private RemoteRepositoryConfig() {
+ description_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new RemoteRepositoryConfig();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.Builder.class);
+ }
+
+ public interface UpstreamCredentialsOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ *
+ * @return Whether the usernamePasswordCredentials field is set.
+ */
+ boolean hasUsernamePasswordCredentials();
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ *
+ * @return The usernamePasswordCredentials.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ getUsernamePasswordCredentials();
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentialsOrBuilder
+ getUsernamePasswordCredentialsOrBuilder();
+
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .CredentialsCase
+ getCredentialsCase();
+ }
+ /**
+ *
+ *
+ *
+ * The credentials to access the remote repository.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials}
+ */
+ public static final class UpstreamCredentials extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials)
+ UpstreamCredentialsOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use UpstreamCredentials.newBuilder() to construct.
+ private UpstreamCredentials(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private UpstreamCredentials() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new UpstreamCredentials();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .Builder.class);
+ }
+
+ public interface UsernamePasswordCredentialsOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * The username to access the remote repository.
+ *
+ *
+ * string username = 1;
+ *
+ * @return The username.
+ */
+ java.lang.String getUsername();
+ /**
+ *
+ *
+ *
+ * The username to access the remote repository.
+ *
+ *
+ * string username = 1;
+ *
+ * @return The bytes for username.
+ */
+ com.google.protobuf.ByteString getUsernameBytes();
+
+ /**
+ *
+ *
+ *
+ * The Secret Manager key version that holds the password to access the
+ * remote repository. Must be in the format of
+ * `projects/{project}/secrets/{secret}/versions/{version}`.
+ *
+ *
+ * string password_secret_version = 2 [(.google.api.resource_reference) = { ... }
+ *
+ * @return The passwordSecretVersion.
+ */
+ java.lang.String getPasswordSecretVersion();
+ /**
+ *
+ *
+ *
+ * The Secret Manager key version that holds the password to access the
+ * remote repository. Must be in the format of
+ * `projects/{project}/secrets/{secret}/versions/{version}`.
+ *
+ *
+ * string password_secret_version = 2 [(.google.api.resource_reference) = { ... }
+ *
+ * @return The bytes for passwordSecretVersion.
+ */
+ com.google.protobuf.ByteString getPasswordSecretVersionBytes();
+ }
+ /**
+ *
+ *
+ *
+ * Username and password credentials.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials}
+ */
+ public static final class UsernamePasswordCredentials
+ extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials)
+ UsernamePasswordCredentialsOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use UsernamePasswordCredentials.newBuilder() to construct.
+ private UsernamePasswordCredentials(
+ com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private UsernamePasswordCredentials() {
+ username_ = "";
+ passwordSecretVersion_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new UsernamePasswordCredentials();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.Builder.class);
+ }
+
+ public static final int USERNAME_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object username_ = "";
+ /**
+ *
+ *
+ *
+ * The username to access the remote repository.
+ *
+ *
+ * string username = 1;
+ *
+ * @return The username.
+ */
+ @java.lang.Override
+ public java.lang.String getUsername() {
+ java.lang.Object ref = username_;
+ 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();
+ username_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The username to access the remote repository.
+ *
+ *
+ * string username = 1;
+ *
+ * @return The bytes for username.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getUsernameBytes() {
+ java.lang.Object ref = username_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ username_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PASSWORD_SECRET_VERSION_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object passwordSecretVersion_ = "";
+ /**
+ *
+ *
+ *
+ * The Secret Manager key version that holds the password to access the
+ * remote repository. Must be in the format of
+ * `projects/{project}/secrets/{secret}/versions/{version}`.
+ *
+ *
+ * string password_secret_version = 2 [(.google.api.resource_reference) = { ... }
+ *
+ * @return The passwordSecretVersion.
+ */
+ @java.lang.Override
+ public java.lang.String getPasswordSecretVersion() {
+ java.lang.Object ref = passwordSecretVersion_;
+ 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();
+ passwordSecretVersion_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The Secret Manager key version that holds the password to access the
+ * remote repository. Must be in the format of
+ * `projects/{project}/secrets/{secret}/versions/{version}`.
+ *
+ *
+ * string password_secret_version = 2 [(.google.api.resource_reference) = { ... }
+ *
+ * @return The bytes for passwordSecretVersion.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getPasswordSecretVersionBytes() {
+ java.lang.Object ref = passwordSecretVersion_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ passwordSecretVersion_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(username_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(passwordSecretVersion_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, passwordSecretVersion_);
+ }
+ 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(username_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(passwordSecretVersion_)) {
+ size +=
+ com.google.protobuf.GeneratedMessageV3.computeStringSize(2, passwordSecretVersion_);
+ }
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ other =
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials)
+ obj;
+
+ if (!getUsername().equals(other.getUsername())) return false;
+ if (!getPasswordSecretVersion().equals(other.getPasswordSecretVersion())) 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) + USERNAME_FIELD_NUMBER;
+ hash = (53 * hash) + getUsername().hashCode();
+ hash = (37 * hash) + PASSWORD_SECRET_VERSION_FIELD_NUMBER;
+ hash = (53 * hash) + getPasswordSecretVersion().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ 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;
+ }
+ /**
+ *
+ *
+ *
+ * Username and password credentials.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials)
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentialsOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.Builder.class);
+ }
+
+ // Construct using
+ // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ username_ = "";
+ passwordSecretVersion_ = "";
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_UsernamePasswordCredentials_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ getDefaultInstanceForType() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ build() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ buildPartial() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ result =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.username_ = username_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.passwordSecretVersion_ = passwordSecretVersion_;
+ }
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials) {
+ return mergeFrom(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials)
+ other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ other) {
+ if (other
+ == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.getDefaultInstance()) return this;
+ if (!other.getUsername().isEmpty()) {
+ username_ = other.username_;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ if (!other.getPasswordSecretVersion().isEmpty()) {
+ passwordSecretVersion_ = other.passwordSecretVersion_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ 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:
+ {
+ username_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ case 18:
+ {
+ passwordSecretVersion_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ 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 username_ = "";
+ /**
+ *
+ *
+ *
+ * The username to access the remote repository.
+ *
+ *
+ * string username = 1;
+ *
+ * @return The username.
+ */
+ public java.lang.String getUsername() {
+ java.lang.Object ref = username_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ username_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The username to access the remote repository.
+ *
+ *
+ * string username = 1;
+ *
+ * @return The bytes for username.
+ */
+ public com.google.protobuf.ByteString getUsernameBytes() {
+ java.lang.Object ref = username_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ username_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The username to access the remote repository.
+ *
+ *
+ * string username = 1;
+ *
+ * @param value The username to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUsername(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ username_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The username to access the remote repository.
+ *
+ *
+ * string username = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearUsername() {
+ username_ = getDefaultInstance().getUsername();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The username to access the remote repository.
+ *
+ *
+ * string username = 1;
+ *
+ * @param value The bytes for username to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUsernameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ username_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object passwordSecretVersion_ = "";
+ /**
+ *
+ *
+ *
+ * The Secret Manager key version that holds the password to access the
+ * remote repository. Must be in the format of
+ * `projects/{project}/secrets/{secret}/versions/{version}`.
+ *
+ *
+ * string password_secret_version = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The passwordSecretVersion.
+ */
+ public java.lang.String getPasswordSecretVersion() {
+ java.lang.Object ref = passwordSecretVersion_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ passwordSecretVersion_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The Secret Manager key version that holds the password to access the
+ * remote repository. Must be in the format of
+ * `projects/{project}/secrets/{secret}/versions/{version}`.
+ *
+ *
+ * string password_secret_version = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return The bytes for passwordSecretVersion.
+ */
+ public com.google.protobuf.ByteString getPasswordSecretVersionBytes() {
+ java.lang.Object ref = passwordSecretVersion_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ passwordSecretVersion_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The Secret Manager key version that holds the password to access the
+ * remote repository. Must be in the format of
+ * `projects/{project}/secrets/{secret}/versions/{version}`.
+ *
+ *
+ * string password_secret_version = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The passwordSecretVersion to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPasswordSecretVersion(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ passwordSecretVersion_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The Secret Manager key version that holds the password to access the
+ * remote repository. Must be in the format of
+ * `projects/{project}/secrets/{secret}/versions/{version}`.
+ *
+ *
+ * string password_secret_version = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPasswordSecretVersion() {
+ passwordSecretVersion_ = getDefaultInstance().getPasswordSecretVersion();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The Secret Manager key version that holds the password to access the
+ * remote repository. Must be in the format of
+ * `projects/{project}/secrets/{secret}/versions/{version}`.
+ *
+ *
+ * string password_secret_version = 2 [(.google.api.resource_reference) = { ... }
+ *
+ *
+ * @param value The bytes for passwordSecretVersion to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPasswordSecretVersionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ passwordSecretVersion_ = value;
+ bitField0_ |= 0x00000002;
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials)
+ private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public UsernamePasswordCredentials 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ private int credentialsCase_ = 0;
+
+ @SuppressWarnings("serial")
+ private java.lang.Object credentials_;
+
+ public enum CredentialsCase
+ implements
+ com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ USERNAME_PASSWORD_CREDENTIALS(1),
+ CREDENTIALS_NOT_SET(0);
+ private final int value;
+
+ private CredentialsCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static CredentialsCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static CredentialsCase forNumber(int value) {
+ switch (value) {
+ case 1:
+ return USERNAME_PASSWORD_CREDENTIALS;
+ case 0:
+ return CREDENTIALS_NOT_SET;
+ default:
+ return null;
+ }
+ }
+
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public CredentialsCase getCredentialsCase() {
+ return CredentialsCase.forNumber(credentialsCase_);
+ }
+
+ public static final int USERNAME_PASSWORD_CREDENTIALS_FIELD_NUMBER = 1;
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ *
+ * @return Whether the usernamePasswordCredentials field is set.
+ */
+ @java.lang.Override
+ public boolean hasUsernamePasswordCredentials() {
+ return credentialsCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ *
+ * @return The usernamePasswordCredentials.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ getUsernamePasswordCredentials() {
+ if (credentialsCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials)
+ credentials_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentialsOrBuilder
+ getUsernamePasswordCredentialsOrBuilder() {
+ if (credentialsCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials)
+ credentials_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.getDefaultInstance();
+ }
+
+ 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 (credentialsCase_ == 1) {
+ output.writeMessage(
+ 1,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials)
+ credentials_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (credentialsCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials)
+ credentials_);
+ }
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials other =
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials) obj;
+
+ if (!getCredentialsCase().equals(other.getCredentialsCase())) return false;
+ switch (credentialsCase_) {
+ case 1:
+ if (!getUsernamePasswordCredentials().equals(other.getUsernamePasswordCredentials()))
+ return false;
+ break;
+ case 0:
+ default:
+ }
+ 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();
+ switch (credentialsCase_) {
+ case 1:
+ hash = (37 * hash) + USERNAME_PASSWORD_CREDENTIALS_FIELD_NUMBER;
+ hash = (53 * hash) + getUsernamePasswordCredentials().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ 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;
+ }
+ /**
+ *
+ *
+ *
+ * The credentials to access the remote repository.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials)
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentialsOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .Builder.class);
+ }
+
+ // Construct using
+ // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ if (usernamePasswordCredentialsBuilder_ != null) {
+ usernamePasswordCredentialsBuilder_.clear();
+ }
+ credentialsCase_ = 0;
+ credentials_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_UpstreamCredentials_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ getDefaultInstanceForType() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ build() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials result =
+ buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ buildPartial() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials result =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials(
+ this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ buildPartialOneofs(result);
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ result) {
+ int from_bitField0_ = bitField0_;
+ }
+
+ private void buildPartialOneofs(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ result) {
+ result.credentialsCase_ = credentialsCase_;
+ result.credentials_ = this.credentials_;
+ if (credentialsCase_ == 1 && usernamePasswordCredentialsBuilder_ != null) {
+ result.credentials_ = usernamePasswordCredentialsBuilder_.build();
+ }
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials) {
+ return mergeFrom(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials)
+ other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ other) {
+ if (other
+ == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .getDefaultInstance()) return this;
+ switch (other.getCredentialsCase()) {
+ case USERNAME_PASSWORD_CREDENTIALS:
+ {
+ mergeUsernamePasswordCredentials(other.getUsernamePasswordCredentials());
+ break;
+ }
+ case CREDENTIALS_NOT_SET:
+ {
+ break;
+ }
+ }
+ 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(
+ getUsernamePasswordCredentialsFieldBuilder().getBuilder(), extensionRegistry);
+ credentialsCase_ = 1;
+ break;
+ } // case 10
+ 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 credentialsCase_ = 0;
+ private java.lang.Object credentials_;
+
+ public CredentialsCase getCredentialsCase() {
+ return CredentialsCase.forNumber(credentialsCase_);
+ }
+
+ public Builder clearCredentials() {
+ credentialsCase_ = 0;
+ credentials_ = null;
+ onChanged();
+ return this;
+ }
+
+ private int bitField0_;
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentialsOrBuilder>
+ usernamePasswordCredentialsBuilder_;
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ *
+ * @return Whether the usernamePasswordCredentials field is set.
+ */
+ @java.lang.Override
+ public boolean hasUsernamePasswordCredentials() {
+ return credentialsCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ *
+ * @return The usernamePasswordCredentials.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ getUsernamePasswordCredentials() {
+ if (usernamePasswordCredentialsBuilder_ == null) {
+ if (credentialsCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials)
+ credentials_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.getDefaultInstance();
+ } else {
+ if (credentialsCase_ == 1) {
+ return usernamePasswordCredentialsBuilder_.getMessage();
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ */
+ public Builder setUsernamePasswordCredentials(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ value) {
+ if (usernamePasswordCredentialsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ credentials_ = value;
+ onChanged();
+ } else {
+ usernamePasswordCredentialsBuilder_.setMessage(value);
+ }
+ credentialsCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ */
+ public Builder setUsernamePasswordCredentials(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.Builder
+ builderForValue) {
+ if (usernamePasswordCredentialsBuilder_ == null) {
+ credentials_ = builderForValue.build();
+ onChanged();
+ } else {
+ usernamePasswordCredentialsBuilder_.setMessage(builderForValue.build());
+ }
+ credentialsCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ */
+ public Builder mergeUsernamePasswordCredentials(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials
+ value) {
+ if (usernamePasswordCredentialsBuilder_ == null) {
+ if (credentialsCase_ == 1
+ && credentials_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials.getDefaultInstance()) {
+ credentials_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.newBuilder(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials)
+ credentials_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ credentials_ = value;
+ }
+ onChanged();
+ } else {
+ if (credentialsCase_ == 1) {
+ usernamePasswordCredentialsBuilder_.mergeFrom(value);
+ } else {
+ usernamePasswordCredentialsBuilder_.setMessage(value);
+ }
+ }
+ credentialsCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ */
+ public Builder clearUsernamePasswordCredentials() {
+ if (usernamePasswordCredentialsBuilder_ == null) {
+ if (credentialsCase_ == 1) {
+ credentialsCase_ = 0;
+ credentials_ = null;
+ onChanged();
+ }
+ } else {
+ if (credentialsCase_ == 1) {
+ credentialsCase_ = 0;
+ credentials_ = null;
+ }
+ usernamePasswordCredentialsBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.Builder
+ getUsernamePasswordCredentialsBuilder() {
+ return getUsernamePasswordCredentialsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentialsOrBuilder
+ getUsernamePasswordCredentialsOrBuilder() {
+ if ((credentialsCase_ == 1) && (usernamePasswordCredentialsBuilder_ != null)) {
+ return usernamePasswordCredentialsBuilder_.getMessageOrBuilder();
+ } else {
+ if (credentialsCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials)
+ credentials_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Use username and password to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials username_password_credentials = 1;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentialsOrBuilder>
+ getUsernamePasswordCredentialsFieldBuilder() {
+ if (usernamePasswordCredentialsBuilder_ == null) {
+ if (!(credentialsCase_ == 1)) {
+ credentials_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.getDefaultInstance();
+ }
+ usernamePasswordCredentialsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentials.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .UsernamePasswordCredentialsOrBuilder>(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.UsernamePasswordCredentials)
+ credentials_,
+ getParentForChildren(),
+ isClean());
+ credentials_ = null;
+ }
+ credentialsCase_ = 1;
+ onChanged();
+ return usernamePasswordCredentialsBuilder_;
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials)
+ private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public UpstreamCredentials 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface DockerRepositoryOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ boolean hasPublicRepository();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ int getPublicRepositoryValue();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository
+ getPublicRepository();
+
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.UpstreamCase
+ getUpstreamCase();
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for a Docker remote repository.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository}
+ */
+ public static final class DockerRepository extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ DockerRepositoryOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use DockerRepository.newBuilder() to construct.
+ private DockerRepository(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private DockerRepository() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new DockerRepository();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .Builder.class);
+ }
+
+ /**
+ *
+ *
+ *
+ * Predefined list of publicly available Docker repositories like Docker
+ * Hub.
+ *
+ *
+ * Protobuf enum {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository}
+ */
+ public enum PublicRepository implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Unspecified repository.
+ *
+ *
+ * PUBLIC_REPOSITORY_UNSPECIFIED = 0;
+ */
+ PUBLIC_REPOSITORY_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * Docker Hub.
+ *
+ *
+ * DOCKER_HUB = 1;
+ */
+ DOCKER_HUB(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Unspecified repository.
+ *
+ *
+ * PUBLIC_REPOSITORY_UNSPECIFIED = 0;
+ */
+ public static final int PUBLIC_REPOSITORY_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * Docker Hub.
+ *
+ *
+ * DOCKER_HUB = 1;
+ */
+ public static final int DOCKER_HUB_VALUE = 1;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static PublicRepository valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static PublicRepository forNumber(int value) {
+ switch (value) {
+ case 0:
+ return PUBLIC_REPOSITORY_UNSPECIFIED;
+ case 1:
+ return DOCKER_HUB;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ private static final com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public PublicRepository findValueByNumber(int number) {
+ return PublicRepository.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalStateException(
+ "Can't get the descriptor of an unrecognized enum value.");
+ }
+ return getDescriptor().getValues().get(ordinal());
+ }
+
+ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+ return getDescriptor();
+ }
+
+ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .getDescriptor()
+ .getEnumTypes()
+ .get(0);
+ }
+
+ private static final PublicRepository[] VALUES = values();
+
+ public static PublicRepository valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private PublicRepository(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository)
+ }
+
+ private int upstreamCase_ = 0;
+
+ @SuppressWarnings("serial")
+ private java.lang.Object upstream_;
+
+ public enum UpstreamCase
+ implements
+ com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ PUBLIC_REPOSITORY(1),
+ UPSTREAM_NOT_SET(0);
+ private final int value;
+
+ private UpstreamCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static UpstreamCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static UpstreamCase forNumber(int value) {
+ switch (value) {
+ case 1:
+ return PUBLIC_REPOSITORY;
+ case 0:
+ return UPSTREAM_NOT_SET;
+ default:
+ return null;
+ }
+ }
+
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1;
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ public int getPublicRepositoryValue() {
+ if (upstreamCase_ == 1) {
+ return (java.lang.Integer) upstream_;
+ }
+ return 0;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (upstreamCase_ == 1) {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .PublicRepository
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .PublicRepository.forNumber((java.lang.Integer) upstream_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .PublicRepository.UNRECOGNIZED
+ : result;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED;
+ }
+
+ 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 (upstreamCase_ == 1) {
+ output.writeEnum(1, ((java.lang.Integer) upstream_));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (upstreamCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeEnumSize(
+ 1, ((java.lang.Integer) upstream_));
+ }
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository other =
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) obj;
+
+ if (!getUpstreamCase().equals(other.getUpstreamCase())) return false;
+ switch (upstreamCase_) {
+ case 1:
+ if (getPublicRepositoryValue() != other.getPublicRepositoryValue()) return false;
+ break;
+ case 0:
+ default:
+ }
+ 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();
+ switch (upstreamCase_) {
+ case 1:
+ hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getPublicRepositoryValue();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository 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;
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for a Docker remote repository.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .Builder.class);
+ }
+
+ // Construct using
+ // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ upstreamCase_ = 0;
+ upstream_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_DockerRepository_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ getDefaultInstanceForType() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ build() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository result =
+ buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ buildPartial() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository result =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository(
+ this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ buildPartialOneofs(result);
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository result) {
+ int from_bitField0_ = bitField0_;
+ }
+
+ private void buildPartialOneofs(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository result) {
+ result.upstreamCase_ = upstreamCase_;
+ result.upstream_ = this.upstream_;
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository) {
+ return mergeFrom(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository other) {
+ if (other
+ == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .getDefaultInstance()) return this;
+ switch (other.getUpstreamCase()) {
+ case PUBLIC_REPOSITORY:
+ {
+ setPublicRepositoryValue(other.getPublicRepositoryValue());
+ break;
+ }
+ case UPSTREAM_NOT_SET:
+ {
+ break;
+ }
+ }
+ 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:
+ {
+ int rawValue = input.readEnum();
+ upstreamCase_ = 1;
+ upstream_ = rawValue;
+ 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 upstreamCase_ = 0;
+ private java.lang.Object upstream_;
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public Builder clearUpstream() {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ return this;
+ }
+
+ private int bitField0_;
+
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ @java.lang.Override
+ public int getPublicRepositoryValue() {
+ if (upstreamCase_ == 1) {
+ return ((java.lang.Integer) upstream_).intValue();
+ }
+ return 0;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @param value The enum numeric value on the wire for publicRepository to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPublicRepositoryValue(int value) {
+ upstreamCase_ = 1;
+ upstream_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (upstreamCase_ == 1) {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .PublicRepository
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .PublicRepository.forNumber((java.lang.Integer) upstream_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .PublicRepository.UNRECOGNIZED
+ : result;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @param value The publicRepository to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPublicRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .PublicRepository
+ value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ upstreamCase_ = 1;
+ upstream_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Docker repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPublicRepository() {
+ if (upstreamCase_ == 1) {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .DockerRepository
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public DockerRepository 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface MavenRepositoryOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ boolean hasPublicRepository();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ int getPublicRepositoryValue();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository
+ getPublicRepository();
+
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.UpstreamCase
+ getUpstreamCase();
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for a Maven remote repository.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository}
+ */
+ public static final class MavenRepository extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ MavenRepositoryOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use MavenRepository.newBuilder() to construct.
+ private MavenRepository(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private MavenRepository() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new MavenRepository();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.Builder
+ .class);
+ }
+
+ /**
+ *
+ *
+ *
+ * Predefined list of publicly available Maven repositories like Maven
+ * Central.
+ *
+ *
+ * Protobuf enum {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository}
+ */
+ public enum PublicRepository implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Unspecified repository.
+ *
+ *
+ * PUBLIC_REPOSITORY_UNSPECIFIED = 0;
+ */
+ PUBLIC_REPOSITORY_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * Maven Central.
+ *
+ *
+ * MAVEN_CENTRAL = 1;
+ */
+ MAVEN_CENTRAL(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Unspecified repository.
+ *
+ *
+ * PUBLIC_REPOSITORY_UNSPECIFIED = 0;
+ */
+ public static final int PUBLIC_REPOSITORY_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * Maven Central.
+ *
+ *
+ * MAVEN_CENTRAL = 1;
+ */
+ public static final int MAVEN_CENTRAL_VALUE = 1;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static PublicRepository valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static PublicRepository forNumber(int value) {
+ switch (value) {
+ case 0:
+ return PUBLIC_REPOSITORY_UNSPECIFIED;
+ case 1:
+ return MAVEN_CENTRAL;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ private static final com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public PublicRepository findValueByNumber(int number) {
+ return PublicRepository.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalStateException(
+ "Can't get the descriptor of an unrecognized enum value.");
+ }
+ return getDescriptor().getValues().get(ordinal());
+ }
+
+ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+ return getDescriptor();
+ }
+
+ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .getDescriptor()
+ .getEnumTypes()
+ .get(0);
+ }
+
+ private static final PublicRepository[] VALUES = values();
+
+ public static PublicRepository valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private PublicRepository(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository)
+ }
+
+ private int upstreamCase_ = 0;
+
+ @SuppressWarnings("serial")
+ private java.lang.Object upstream_;
+
+ public enum UpstreamCase
+ implements
+ com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ PUBLIC_REPOSITORY(1),
+ UPSTREAM_NOT_SET(0);
+ private final int value;
+
+ private UpstreamCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static UpstreamCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static UpstreamCase forNumber(int value) {
+ switch (value) {
+ case 1:
+ return PUBLIC_REPOSITORY;
+ case 0:
+ return UPSTREAM_NOT_SET;
+ default:
+ return null;
+ }
+ }
+
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1;
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ public int getPublicRepositoryValue() {
+ if (upstreamCase_ == 1) {
+ return (java.lang.Integer) upstream_;
+ }
+ return 0;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (upstreamCase_ == 1) {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .PublicRepository
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .PublicRepository.forNumber((java.lang.Integer) upstream_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .PublicRepository.UNRECOGNIZED
+ : result;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED;
+ }
+
+ 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 (upstreamCase_ == 1) {
+ output.writeEnum(1, ((java.lang.Integer) upstream_));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (upstreamCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeEnumSize(
+ 1, ((java.lang.Integer) upstream_));
+ }
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository other =
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) obj;
+
+ if (!getUpstreamCase().equals(other.getUpstreamCase())) return false;
+ switch (upstreamCase_) {
+ case 1:
+ if (getPublicRepositoryValue() != other.getPublicRepositoryValue()) return false;
+ break;
+ case 0:
+ default:
+ }
+ 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();
+ switch (upstreamCase_) {
+ case 1:
+ hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getPublicRepositoryValue();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository 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;
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for a Maven remote repository.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .Builder.class);
+ }
+
+ // Construct using
+ // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ upstreamCase_ = 0;
+ upstream_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_MavenRepository_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ getDefaultInstanceForType() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ build() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository result =
+ buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ buildPartial() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository result =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository(
+ this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ buildPartialOneofs(result);
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository result) {
+ int from_bitField0_ = bitField0_;
+ }
+
+ private void buildPartialOneofs(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository result) {
+ result.upstreamCase_ = upstreamCase_;
+ result.upstream_ = this.upstream_;
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository) {
+ return mergeFrom(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository other) {
+ if (other
+ == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .getDefaultInstance()) return this;
+ switch (other.getUpstreamCase()) {
+ case PUBLIC_REPOSITORY:
+ {
+ setPublicRepositoryValue(other.getPublicRepositoryValue());
+ break;
+ }
+ case UPSTREAM_NOT_SET:
+ {
+ break;
+ }
+ }
+ 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:
+ {
+ int rawValue = input.readEnum();
+ upstreamCase_ = 1;
+ upstream_ = rawValue;
+ 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 upstreamCase_ = 0;
+ private java.lang.Object upstream_;
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public Builder clearUpstream() {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ return this;
+ }
+
+ private int bitField0_;
+
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ @java.lang.Override
+ public int getPublicRepositoryValue() {
+ if (upstreamCase_ == 1) {
+ return ((java.lang.Integer) upstream_).intValue();
+ }
+ return 0;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @param value The enum numeric value on the wire for publicRepository to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPublicRepositoryValue(int value) {
+ upstreamCase_ = 1;
+ upstream_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (upstreamCase_ == 1) {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .PublicRepository
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .PublicRepository.forNumber((java.lang.Integer) upstream_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .PublicRepository.UNRECOGNIZED
+ : result;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @param value The publicRepository to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPublicRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .PublicRepository
+ value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ upstreamCase_ = 1;
+ upstream_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Maven repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPublicRepository() {
+ if (upstreamCase_ == 1) {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .MavenRepository
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public MavenRepository 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface NpmRepositoryOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ boolean hasPublicRepository();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ int getPublicRepositoryValue();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository
+ getPublicRepository();
+
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.UpstreamCase
+ getUpstreamCase();
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for a Npm remote repository.
+ *
+ *
+ * Protobuf type {@code google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository}
+ */
+ public static final class NpmRepository extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ NpmRepositoryOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use NpmRepository.newBuilder() to construct.
+ private NpmRepository(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private NpmRepository() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new NpmRepository();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder
+ .class);
+ }
+
+ /**
+ *
+ *
+ *
+ * Predefined list of publicly available NPM repositories like npmjs.
+ *
+ *
+ * Protobuf enum {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository}
+ */
+ public enum PublicRepository implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Unspecified repository.
+ *
+ *
+ * PUBLIC_REPOSITORY_UNSPECIFIED = 0;
+ */
+ PUBLIC_REPOSITORY_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * npmjs.
+ *
+ *
+ * NPMJS = 1;
+ */
+ NPMJS(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Unspecified repository.
+ *
+ *
+ * PUBLIC_REPOSITORY_UNSPECIFIED = 0;
+ */
+ public static final int PUBLIC_REPOSITORY_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * npmjs.
+ *
+ *
+ * NPMJS = 1;
+ */
+ public static final int NPMJS_VALUE = 1;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static PublicRepository valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static PublicRepository forNumber(int value) {
+ switch (value) {
+ case 0:
+ return PUBLIC_REPOSITORY_UNSPECIFIED;
+ case 1:
+ return NPMJS;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ private static final com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public PublicRepository findValueByNumber(int number) {
+ return PublicRepository.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalStateException(
+ "Can't get the descriptor of an unrecognized enum value.");
+ }
+ return getDescriptor().getValues().get(ordinal());
+ }
+
+ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+ return getDescriptor();
+ }
+
+ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .getDescriptor()
+ .getEnumTypes()
+ .get(0);
+ }
+
+ private static final PublicRepository[] VALUES = values();
+
+ public static PublicRepository valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private PublicRepository(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository)
+ }
+
+ private int upstreamCase_ = 0;
+
+ @SuppressWarnings("serial")
+ private java.lang.Object upstream_;
+
+ public enum UpstreamCase
+ implements
+ com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ PUBLIC_REPOSITORY(1),
+ UPSTREAM_NOT_SET(0);
+ private final int value;
+
+ private UpstreamCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static UpstreamCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static UpstreamCase forNumber(int value) {
+ switch (value) {
+ case 1:
+ return PUBLIC_REPOSITORY;
+ case 0:
+ return UPSTREAM_NOT_SET;
+ default:
+ return null;
+ }
+ }
+
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1;
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ public int getPublicRepositoryValue() {
+ if (upstreamCase_ == 1) {
+ return (java.lang.Integer) upstream_;
+ }
+ return 0;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (upstreamCase_ == 1) {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .PublicRepository
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .PublicRepository.forNumber((java.lang.Integer) upstream_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .PublicRepository.UNRECOGNIZED
+ : result;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED;
+ }
+
+ 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 (upstreamCase_ == 1) {
+ output.writeEnum(1, ((java.lang.Integer) upstream_));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (upstreamCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeEnumSize(
+ 1, ((java.lang.Integer) upstream_));
+ }
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository other =
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) obj;
+
+ if (!getUpstreamCase().equals(other.getUpstreamCase())) return false;
+ switch (upstreamCase_) {
+ case 1:
+ if (getPublicRepositoryValue() != other.getPublicRepositoryValue()) return false;
+ break;
+ case 0:
+ default:
+ }
+ 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();
+ switch (upstreamCase_) {
+ case 1:
+ hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getPublicRepositoryValue();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository 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;
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for a Npm remote repository.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder
+ .class);
+ }
+
+ // Construct using
+ // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ upstreamCase_ = 0;
+ upstream_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_NpmRepository_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ getDefaultInstanceForType() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository build() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository result =
+ buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ buildPartial() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository result =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ buildPartialOneofs(result);
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository result) {
+ int from_bitField0_ = bitField0_;
+ }
+
+ private void buildPartialOneofs(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository result) {
+ result.upstreamCase_ = upstreamCase_;
+ result.upstream_ = this.upstream_;
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) {
+ return mergeFrom(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository other) {
+ if (other
+ == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .getDefaultInstance()) return this;
+ switch (other.getUpstreamCase()) {
+ case PUBLIC_REPOSITORY:
+ {
+ setPublicRepositoryValue(other.getPublicRepositoryValue());
+ break;
+ }
+ case UPSTREAM_NOT_SET:
+ {
+ break;
+ }
+ }
+ 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:
+ {
+ int rawValue = input.readEnum();
+ upstreamCase_ = 1;
+ upstream_ = rawValue;
+ 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 upstreamCase_ = 0;
+ private java.lang.Object upstream_;
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public Builder clearUpstream() {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ return this;
+ }
+
+ private int bitField0_;
+
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ @java.lang.Override
+ public int getPublicRepositoryValue() {
+ if (upstreamCase_ == 1) {
+ return ((java.lang.Integer) upstream_).intValue();
+ }
+ return 0;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @param value The enum numeric value on the wire for publicRepository to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPublicRepositoryValue(int value) {
+ upstreamCase_ = 1;
+ upstream_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (upstreamCase_ == 1) {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .PublicRepository
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .PublicRepository.forNumber((java.lang.Integer) upstream_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .PublicRepository.UNRECOGNIZED
+ : result;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @param value The publicRepository to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPublicRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .PublicRepository
+ value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ upstreamCase_ = 1;
+ upstream_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Npm repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPublicRepository() {
+ if (upstreamCase_ == 1) {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .NpmRepository
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public NpmRepository 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface PythonRepositoryOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ boolean hasPublicRepository();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ int getPublicRepositoryValue();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository
+ getPublicRepository();
+
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.UpstreamCase
+ getUpstreamCase();
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for a Python remote repository.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository}
+ */
+ public static final class PythonRepository extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ PythonRepositoryOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use PythonRepository.newBuilder() to construct.
+ private PythonRepository(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private PythonRepository() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new PythonRepository();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .Builder.class);
+ }
+
+ /**
+ *
+ *
+ *
+ * Predefined list of publicly available Python repositories like PyPI.org.
+ *
+ *
+ * Protobuf enum {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository}
+ */
+ public enum PublicRepository implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Unspecified repository.
+ *
+ *
+ * PUBLIC_REPOSITORY_UNSPECIFIED = 0;
+ */
+ PUBLIC_REPOSITORY_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * PyPI.
+ *
+ *
+ * PYPI = 1;
+ */
+ PYPI(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Unspecified repository.
+ *
+ *
+ * PUBLIC_REPOSITORY_UNSPECIFIED = 0;
+ */
+ public static final int PUBLIC_REPOSITORY_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * PyPI.
+ *
+ *
+ * PYPI = 1;
+ */
+ public static final int PYPI_VALUE = 1;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static PublicRepository valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static PublicRepository forNumber(int value) {
+ switch (value) {
+ case 0:
+ return PUBLIC_REPOSITORY_UNSPECIFIED;
+ case 1:
+ return PYPI;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ private static final com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public PublicRepository findValueByNumber(int number) {
+ return PublicRepository.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalStateException(
+ "Can't get the descriptor of an unrecognized enum value.");
+ }
+ return getDescriptor().getValues().get(ordinal());
+ }
+
+ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+ return getDescriptor();
+ }
+
+ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .getDescriptor()
+ .getEnumTypes()
+ .get(0);
+ }
+
+ private static final PublicRepository[] VALUES = values();
+
+ public static PublicRepository valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private PublicRepository(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository)
+ }
+
+ private int upstreamCase_ = 0;
+
+ @SuppressWarnings("serial")
+ private java.lang.Object upstream_;
+
+ public enum UpstreamCase
+ implements
+ com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ PUBLIC_REPOSITORY(1),
+ UPSTREAM_NOT_SET(0);
+ private final int value;
+
+ private UpstreamCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static UpstreamCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static UpstreamCase forNumber(int value) {
+ switch (value) {
+ case 1:
+ return PUBLIC_REPOSITORY;
+ case 0:
+ return UPSTREAM_NOT_SET;
+ default:
+ return null;
+ }
+ }
+
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1;
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ public int getPublicRepositoryValue() {
+ if (upstreamCase_ == 1) {
+ return (java.lang.Integer) upstream_;
+ }
+ return 0;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (upstreamCase_ == 1) {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .PublicRepository
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .PublicRepository.forNumber((java.lang.Integer) upstream_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .PublicRepository.UNRECOGNIZED
+ : result;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED;
+ }
+
+ 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 (upstreamCase_ == 1) {
+ output.writeEnum(1, ((java.lang.Integer) upstream_));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (upstreamCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeEnumSize(
+ 1, ((java.lang.Integer) upstream_));
+ }
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository other =
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) obj;
+
+ if (!getUpstreamCase().equals(other.getUpstreamCase())) return false;
+ switch (upstreamCase_) {
+ case 1:
+ if (getPublicRepositoryValue() != other.getPublicRepositoryValue()) return false;
+ break;
+ case 0:
+ default:
+ }
+ 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();
+ switch (upstreamCase_) {
+ case 1:
+ hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getPublicRepositoryValue();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository 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;
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for a Python remote repository.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .Builder.class);
+ }
+
+ // Construct using
+ // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ upstreamCase_ = 0;
+ upstream_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_PythonRepository_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ getDefaultInstanceForType() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ build() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository result =
+ buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ buildPartial() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository result =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository(
+ this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ buildPartialOneofs(result);
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository result) {
+ int from_bitField0_ = bitField0_;
+ }
+
+ private void buildPartialOneofs(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository result) {
+ result.upstreamCase_ = upstreamCase_;
+ result.upstream_ = this.upstream_;
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository) {
+ return mergeFrom(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository other) {
+ if (other
+ == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .getDefaultInstance()) return this;
+ switch (other.getUpstreamCase()) {
+ case PUBLIC_REPOSITORY:
+ {
+ setPublicRepositoryValue(other.getPublicRepositoryValue());
+ break;
+ }
+ case UPSTREAM_NOT_SET:
+ {
+ break;
+ }
+ }
+ 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:
+ {
+ int rawValue = input.readEnum();
+ upstreamCase_ = 1;
+ upstream_ = rawValue;
+ 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 upstreamCase_ = 0;
+ private java.lang.Object upstream_;
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public Builder clearUpstream() {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ return this;
+ }
+
+ private int bitField0_;
+
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for publicRepository.
+ */
+ @java.lang.Override
+ public int getPublicRepositoryValue() {
+ if (upstreamCase_ == 1) {
+ return ((java.lang.Integer) upstream_).intValue();
+ }
+ return 0;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @param value The enum numeric value on the wire for publicRepository to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPublicRepositoryValue(int value) {
+ upstreamCase_ = 1;
+ upstream_ = value;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (upstreamCase_ == 1) {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .PublicRepository
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .PublicRepository.forNumber((java.lang.Integer) upstream_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .PublicRepository.UNRECOGNIZED
+ : result;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .PublicRepository.PUBLIC_REPOSITORY_UNSPECIFIED;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @param value The publicRepository to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPublicRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .PublicRepository
+ value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ upstreamCase_ = 1;
+ upstream_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Python repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPublicRepository() {
+ if (upstreamCase_ == 1) {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .PythonRepository
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public PythonRepository 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface AptRepositoryOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ boolean hasPublicRepository();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository
+ getPublicRepository();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepositoryOrBuilder
+ getPublicRepositoryOrBuilder();
+
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.UpstreamCase
+ getUpstreamCase();
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for an Apt remote repository.
+ *
+ *
+ * Protobuf type {@code google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository}
+ */
+ public static final class AptRepository extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ AptRepositoryOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use AptRepository.newBuilder() to construct.
+ private AptRepository(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private AptRepository() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new AptRepository();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder
+ .class);
+ }
+
+ public interface PublicRepositoryOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * A common public repository base for Apt.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for repositoryBase.
+ */
+ int getRepositoryBaseValue();
+ /**
+ *
+ *
+ *
+ * A common public repository base for Apt.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The repositoryBase.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository
+ .RepositoryBase
+ getRepositoryBase();
+
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The repositoryPath.
+ */
+ java.lang.String getRepositoryPath();
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The bytes for repositoryPath.
+ */
+ com.google.protobuf.ByteString getRepositoryPathBytes();
+ }
+ /**
+ *
+ *
+ *
+ * Publicly available Apt repositories constructed from a common repository
+ * base and a custom repository path.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository}
+ */
+ public static final class PublicRepository extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository)
+ PublicRepositoryOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use PublicRepository.newBuilder() to construct.
+ private PublicRepository(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private PublicRepository() {
+ repositoryBase_ = 0;
+ repositoryPath_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new PublicRepository();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.Builder.class);
+ }
+
+ /**
+ *
+ *
+ *
+ * Predefined list of publicly available repository bases for Apt.
+ *
+ *
+ * Protobuf enum {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase}
+ */
+ public enum RepositoryBase implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Unspecified repository base.
+ *
+ *
+ * REPOSITORY_BASE_UNSPECIFIED = 0;
+ */
+ REPOSITORY_BASE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * Debian.
+ *
+ *
+ * DEBIAN = 1;
+ */
+ DEBIAN(1),
+ /**
+ *
+ *
+ *
+ * Ubuntu LTS/Pro.
+ *
+ *
+ * UBUNTU = 2;
+ */
+ UBUNTU(2),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Unspecified repository base.
+ *
+ *
+ * REPOSITORY_BASE_UNSPECIFIED = 0;
+ */
+ public static final int REPOSITORY_BASE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * Debian.
+ *
+ *
+ * DEBIAN = 1;
+ */
+ public static final int DEBIAN_VALUE = 1;
+ /**
+ *
+ *
+ *
+ * Ubuntu LTS/Pro.
+ *
+ *
+ * UBUNTU = 2;
+ */
+ public static final int UBUNTU_VALUE = 2;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static RepositoryBase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static RepositoryBase forNumber(int value) {
+ switch (value) {
+ case 0:
+ return REPOSITORY_BASE_UNSPECIFIED;
+ case 1:
+ return DEBIAN;
+ case 2:
+ return UBUNTU;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ private static final com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public RepositoryBase findValueByNumber(int number) {
+ return RepositoryBase.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalStateException(
+ "Can't get the descriptor of an unrecognized enum value.");
+ }
+ return getDescriptor().getValues().get(ordinal());
+ }
+
+ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+ return getDescriptor();
+ }
+
+ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.getDescriptor()
+ .getEnumTypes()
+ .get(0);
+ }
+
+ private static final RepositoryBase[] VALUES = values();
+
+ public static RepositoryBase valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private RepositoryBase(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase)
+ }
+
+ public static final int REPOSITORY_BASE_FIELD_NUMBER = 1;
+ private int repositoryBase_ = 0;
+ /**
+ *
+ *
+ *
+ * A common public repository base for Apt.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for repositoryBase.
+ */
+ @java.lang.Override
+ public int getRepositoryBaseValue() {
+ return repositoryBase_;
+ }
+ /**
+ *
+ *
+ *
+ * A common public repository base for Apt.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The repositoryBase.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.RepositoryBase
+ getRepositoryBase() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.RepositoryBase
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.RepositoryBase.forNumber(repositoryBase_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.RepositoryBase.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int REPOSITORY_PATH_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object repositoryPath_ = "";
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The repositoryPath.
+ */
+ @java.lang.Override
+ public java.lang.String getRepositoryPath() {
+ java.lang.Object ref = repositoryPath_;
+ 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();
+ repositoryPath_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The bytes for repositoryPath.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getRepositoryPathBytes() {
+ java.lang.Object ref = repositoryPath_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ repositoryPath_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (repositoryBase_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.RepositoryBase.REPOSITORY_BASE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(1, repositoryBase_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repositoryPath_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, repositoryPath_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (repositoryBase_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.RepositoryBase.REPOSITORY_BASE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, repositoryBase_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repositoryPath_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, repositoryPath_);
+ }
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ other =
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository)
+ obj;
+
+ if (repositoryBase_ != other.repositoryBase_) return false;
+ if (!getRepositoryPath().equals(other.getRepositoryPath())) 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) + REPOSITORY_BASE_FIELD_NUMBER;
+ hash = (53 * hash) + repositoryBase_;
+ hash = (37 * hash) + REPOSITORY_PATH_FIELD_NUMBER;
+ hash = (53 * hash) + getRepositoryPath().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ 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;
+ }
+ /**
+ *
+ *
+ *
+ * Publicly available Apt repositories constructed from a common repository
+ * base and a custom repository path.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository)
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepositoryOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.Builder.class);
+ }
+
+ // Construct using
+ // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ repositoryBase_ = 0;
+ repositoryPath_ = "";
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_PublicRepository_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ getDefaultInstanceForType() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ build() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ buildPartial() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ result =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.repositoryBase_ = repositoryBase_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.repositoryPath_ = repositoryPath_;
+ }
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository) {
+ return mergeFrom(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository)
+ other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ other) {
+ if (other
+ == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.getDefaultInstance()) return this;
+ if (other.repositoryBase_ != 0) {
+ setRepositoryBaseValue(other.getRepositoryBaseValue());
+ }
+ if (!other.getRepositoryPath().isEmpty()) {
+ repositoryPath_ = other.repositoryPath_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ 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:
+ {
+ repositoryBase_ = input.readEnum();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 18:
+ {
+ repositoryPath_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ 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 int repositoryBase_ = 0;
+ /**
+ *
+ *
+ *
+ * A common public repository base for Apt.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for repositoryBase.
+ */
+ @java.lang.Override
+ public int getRepositoryBaseValue() {
+ return repositoryBase_;
+ }
+ /**
+ *
+ *
+ *
+ * A common public repository base for Apt.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @param value The enum numeric value on the wire for repositoryBase to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRepositoryBaseValue(int value) {
+ repositoryBase_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A common public repository base for Apt.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The repositoryBase.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.RepositoryBase
+ getRepositoryBase() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.RepositoryBase
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.RepositoryBase.forNumber(repositoryBase_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.RepositoryBase.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ *
+ * A common public repository base for Apt.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @param value The repositoryBase to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRepositoryBase(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.RepositoryBase
+ value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ repositoryBase_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A common public repository base for Apt.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRepositoryBase() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ repositoryBase_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object repositoryPath_ = "";
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The repositoryPath.
+ */
+ public java.lang.String getRepositoryPath() {
+ java.lang.Object ref = repositoryPath_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ repositoryPath_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The bytes for repositoryPath.
+ */
+ public com.google.protobuf.ByteString getRepositoryPathBytes() {
+ java.lang.Object ref = repositoryPath_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ repositoryPath_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @param value The repositoryPath to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRepositoryPath(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ repositoryPath_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRepositoryPath() {
+ repositoryPath_ = getDefaultInstance().getRepositoryPath();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @param value The bytes for repositoryPath to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRepositoryPathBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ repositoryPath_ = value;
+ bitField0_ |= 0x00000002;
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository)
+ private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .AptRepository.PublicRepository
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public PublicRepository 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ private int upstreamCase_ = 0;
+
+ @SuppressWarnings("serial")
+ private java.lang.Object upstream_;
+
+ public enum UpstreamCase
+ implements
+ com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ PUBLIC_REPOSITORY(1),
+ UPSTREAM_NOT_SET(0);
+ private final int value;
+
+ private UpstreamCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static UpstreamCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static UpstreamCase forNumber(int value) {
+ switch (value) {
+ case 1:
+ return PUBLIC_REPOSITORY;
+ case 0:
+ return UPSTREAM_NOT_SET;
+ default:
+ return null;
+ }
+ }
+
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1;
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (upstreamCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository)
+ upstream_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepositoryOrBuilder
+ getPublicRepositoryOrBuilder() {
+ if (upstreamCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository)
+ upstream_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.getDefaultInstance();
+ }
+
+ 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 (upstreamCase_ == 1) {
+ output.writeMessage(
+ 1,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository)
+ upstream_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (upstreamCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository)
+ upstream_);
+ }
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository other =
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) obj;
+
+ if (!getUpstreamCase().equals(other.getUpstreamCase())) return false;
+ switch (upstreamCase_) {
+ case 1:
+ if (!getPublicRepository().equals(other.getPublicRepository())) return false;
+ break;
+ case 0:
+ default:
+ }
+ 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();
+ switch (upstreamCase_) {
+ case 1:
+ hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getPublicRepository().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository 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;
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for an Apt remote repository.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder
+ .class);
+ }
+
+ // Construct using
+ // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ if (publicRepositoryBuilder_ != null) {
+ publicRepositoryBuilder_.clear();
+ }
+ upstreamCase_ = 0;
+ upstream_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_AptRepository_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ getDefaultInstanceForType() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository build() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository result =
+ buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ buildPartial() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository result =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ buildPartialOneofs(result);
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository result) {
+ int from_bitField0_ = bitField0_;
+ }
+
+ private void buildPartialOneofs(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository result) {
+ result.upstreamCase_ = upstreamCase_;
+ result.upstream_ = this.upstream_;
+ if (upstreamCase_ == 1 && publicRepositoryBuilder_ != null) {
+ result.upstream_ = publicRepositoryBuilder_.build();
+ }
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) {
+ return mergeFrom(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository other) {
+ if (other
+ == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .getDefaultInstance()) return this;
+ switch (other.getUpstreamCase()) {
+ case PUBLIC_REPOSITORY:
+ {
+ mergePublicRepository(other.getPublicRepository());
+ break;
+ }
+ case UPSTREAM_NOT_SET:
+ {
+ break;
+ }
+ }
+ 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(
+ getPublicRepositoryFieldBuilder().getBuilder(), extensionRegistry);
+ upstreamCase_ = 1;
+ break;
+ } // case 10
+ 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 upstreamCase_ = 0;
+ private java.lang.Object upstream_;
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public Builder clearUpstream() {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ return this;
+ }
+
+ private int bitField0_;
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepositoryOrBuilder>
+ publicRepositoryBuilder_;
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (publicRepositoryBuilder_ == null) {
+ if (upstreamCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository)
+ upstream_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.getDefaultInstance();
+ } else {
+ if (upstreamCase_ == 1) {
+ return publicRepositoryBuilder_.getMessage();
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ */
+ public Builder setPublicRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ value) {
+ if (publicRepositoryBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ upstream_ = value;
+ onChanged();
+ } else {
+ publicRepositoryBuilder_.setMessage(value);
+ }
+ upstreamCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ */
+ public Builder setPublicRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.Builder
+ builderForValue) {
+ if (publicRepositoryBuilder_ == null) {
+ upstream_ = builderForValue.build();
+ onChanged();
+ } else {
+ publicRepositoryBuilder_.setMessage(builderForValue.build());
+ }
+ upstreamCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ */
+ public Builder mergePublicRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository
+ value) {
+ if (publicRepositoryBuilder_ == null) {
+ if (upstreamCase_ == 1
+ && upstream_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.getDefaultInstance()) {
+ upstream_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.newBuilder(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .AptRepository.PublicRepository)
+ upstream_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ upstream_ = value;
+ }
+ onChanged();
+ } else {
+ if (upstreamCase_ == 1) {
+ publicRepositoryBuilder_.mergeFrom(value);
+ } else {
+ publicRepositoryBuilder_.setMessage(value);
+ }
+ }
+ upstreamCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ */
+ public Builder clearPublicRepository() {
+ if (publicRepositoryBuilder_ == null) {
+ if (upstreamCase_ == 1) {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ }
+ } else {
+ if (upstreamCase_ == 1) {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ }
+ publicRepositoryBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.Builder
+ getPublicRepositoryBuilder() {
+ return getPublicRepositoryFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepositoryOrBuilder
+ getPublicRepositoryOrBuilder() {
+ if ((upstreamCase_ == 1) && (publicRepositoryBuilder_ != null)) {
+ return publicRepositoryBuilder_.getMessageOrBuilder();
+ } else {
+ if (upstreamCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository)
+ upstream_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Apt repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.PublicRepository public_repository = 1;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepositoryOrBuilder>
+ getPublicRepositoryFieldBuilder() {
+ if (publicRepositoryBuilder_ == null) {
+ if (!(upstreamCase_ == 1)) {
+ upstream_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.getDefaultInstance();
+ }
+ publicRepositoryBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepositoryOrBuilder>(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .PublicRepository)
+ upstream_,
+ getParentForChildren(),
+ isClean());
+ upstream_ = null;
+ }
+ upstreamCase_ = 1;
+ onChanged();
+ return publicRepositoryBuilder_;
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .AptRepository
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public AptRepository 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ public interface YumRepositoryOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ boolean hasPublicRepository();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository
+ getPublicRepository();
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepositoryOrBuilder
+ getPublicRepositoryOrBuilder();
+
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.UpstreamCase
+ getUpstreamCase();
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for a Yum remote repository.
+ *
+ *
+ * Protobuf type {@code google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository}
+ */
+ public static final class YumRepository extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ YumRepositoryOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use YumRepository.newBuilder() to construct.
+ private YumRepository(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private YumRepository() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new YumRepository();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder
+ .class);
+ }
+
+ public interface PublicRepositoryOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * A common public repository base for Yum.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for repositoryBase.
+ */
+ int getRepositoryBaseValue();
+ /**
+ *
+ *
+ *
+ * A common public repository base for Yum.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The repositoryBase.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository
+ .RepositoryBase
+ getRepositoryBase();
+
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The repositoryPath.
+ */
+ java.lang.String getRepositoryPath();
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The bytes for repositoryPath.
+ */
+ com.google.protobuf.ByteString getRepositoryPathBytes();
+ }
+ /**
+ *
+ *
+ *
+ * Publicly available Yum repositories constructed from a common repository
+ * base and a custom repository path.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository}
+ */
+ public static final class PublicRepository extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository)
+ PublicRepositoryOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use PublicRepository.newBuilder() to construct.
+ private PublicRepository(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private PublicRepository() {
+ repositoryBase_ = 0;
+ repositoryPath_ = "";
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new PublicRepository();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.Builder.class);
+ }
+
+ /**
+ *
+ *
+ *
+ * Predefined list of publicly available repository bases for Yum.
+ *
+ *
+ * Protobuf enum {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase}
+ */
+ public enum RepositoryBase implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Unspecified repository base.
+ *
+ *
+ * REPOSITORY_BASE_UNSPECIFIED = 0;
+ */
+ REPOSITORY_BASE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * CentOS.
+ *
+ *
+ * CENTOS = 1;
+ */
+ CENTOS(1),
+ /**
+ *
+ *
+ *
+ * CentOS Debug.
+ *
+ *
+ * CENTOS_DEBUG = 2;
+ */
+ CENTOS_DEBUG(2),
+ /**
+ *
+ *
+ *
+ * CentOS Vault.
+ *
+ *
+ * CENTOS_VAULT = 3;
+ */
+ CENTOS_VAULT(3),
+ /**
+ *
+ *
+ *
+ * CentOS Stream.
+ *
+ *
+ * CENTOS_STREAM = 4;
+ */
+ CENTOS_STREAM(4),
+ /**
+ *
+ *
+ *
+ * Rocky.
+ *
+ *
+ * ROCKY = 5;
+ */
+ ROCKY(5),
+ /**
+ *
+ *
+ *
+ * Fedora Extra Packages for Enterprise Linux (EPEL).
+ *
+ *
+ * EPEL = 6;
+ */
+ EPEL(6),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Unspecified repository base.
+ *
+ *
+ * REPOSITORY_BASE_UNSPECIFIED = 0;
+ */
+ public static final int REPOSITORY_BASE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * CentOS.
+ *
+ *
+ * CENTOS = 1;
+ */
+ public static final int CENTOS_VALUE = 1;
+ /**
+ *
+ *
+ *
+ * CentOS Debug.
+ *
+ *
+ * CENTOS_DEBUG = 2;
+ */
+ public static final int CENTOS_DEBUG_VALUE = 2;
+ /**
+ *
+ *
+ *
+ * CentOS Vault.
+ *
+ *
+ * CENTOS_VAULT = 3;
+ */
+ public static final int CENTOS_VAULT_VALUE = 3;
+ /**
+ *
+ *
+ *
+ * CentOS Stream.
+ *
+ *
+ * CENTOS_STREAM = 4;
+ */
+ public static final int CENTOS_STREAM_VALUE = 4;
+ /**
+ *
+ *
+ *
+ * Rocky.
+ *
+ *
+ * ROCKY = 5;
+ */
+ public static final int ROCKY_VALUE = 5;
+ /**
+ *
+ *
+ *
+ * Fedora Extra Packages for Enterprise Linux (EPEL).
+ *
+ *
+ * EPEL = 6;
+ */
+ public static final int EPEL_VALUE = 6;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static RepositoryBase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static RepositoryBase forNumber(int value) {
+ switch (value) {
+ case 0:
+ return REPOSITORY_BASE_UNSPECIFIED;
+ case 1:
+ return CENTOS;
+ case 2:
+ return CENTOS_DEBUG;
+ case 3:
+ return CENTOS_VAULT;
+ case 4:
+ return CENTOS_STREAM;
+ case 5:
+ return ROCKY;
+ case 6:
+ return EPEL;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ private static final com.google.protobuf.Internal.EnumLiteMap
+ internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public RepositoryBase findValueByNumber(int number) {
+ return RepositoryBase.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalStateException(
+ "Can't get the descriptor of an unrecognized enum value.");
+ }
+ return getDescriptor().getValues().get(ordinal());
+ }
+
+ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+ return getDescriptor();
+ }
+
+ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.getDescriptor()
+ .getEnumTypes()
+ .get(0);
+ }
+
+ private static final RepositoryBase[] VALUES = values();
+
+ public static RepositoryBase valueOf(
+ com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException(
+ "EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private RepositoryBase(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase)
+ }
+
+ public static final int REPOSITORY_BASE_FIELD_NUMBER = 1;
+ private int repositoryBase_ = 0;
+ /**
+ *
+ *
+ *
+ * A common public repository base for Yum.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for repositoryBase.
+ */
+ @java.lang.Override
+ public int getRepositoryBaseValue() {
+ return repositoryBase_;
+ }
+ /**
+ *
+ *
+ *
+ * A common public repository base for Yum.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The repositoryBase.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.RepositoryBase
+ getRepositoryBase() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.RepositoryBase
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.RepositoryBase.forNumber(repositoryBase_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.RepositoryBase.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int REPOSITORY_PATH_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object repositoryPath_ = "";
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The repositoryPath.
+ */
+ @java.lang.Override
+ public java.lang.String getRepositoryPath() {
+ java.lang.Object ref = repositoryPath_;
+ 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();
+ repositoryPath_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The bytes for repositoryPath.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getRepositoryPathBytes() {
+ java.lang.Object ref = repositoryPath_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ repositoryPath_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (repositoryBase_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.RepositoryBase.REPOSITORY_BASE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(1, repositoryBase_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repositoryPath_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, repositoryPath_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (repositoryBase_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.RepositoryBase.REPOSITORY_BASE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, repositoryBase_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(repositoryPath_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, repositoryPath_);
+ }
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ other =
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository)
+ obj;
+
+ if (repositoryBase_ != other.repositoryBase_) return false;
+ if (!getRepositoryPath().equals(other.getRepositoryPath())) 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) + REPOSITORY_BASE_FIELD_NUMBER;
+ hash = (53 * hash) + repositoryBase_;
+ hash = (37 * hash) + REPOSITORY_PATH_FIELD_NUMBER;
+ hash = (53 * hash) + getRepositoryPath().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ 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;
+ }
+ /**
+ *
+ *
+ *
+ * Publicly available Yum repositories constructed from a common repository
+ * base and a custom repository path.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository)
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepositoryOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.Builder.class);
+ }
+
+ // Construct using
+ // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ repositoryBase_ = 0;
+ repositoryPath_ = "";
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_PublicRepository_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ getDefaultInstanceForType() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ build() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ buildPartial() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ result =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.repositoryBase_ = repositoryBase_;
+ }
+ if (((from_bitField0_ & 0x00000002) != 0)) {
+ result.repositoryPath_ = repositoryPath_;
+ }
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository) {
+ return mergeFrom(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository)
+ other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ other) {
+ if (other
+ == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.getDefaultInstance()) return this;
+ if (other.repositoryBase_ != 0) {
+ setRepositoryBaseValue(other.getRepositoryBaseValue());
+ }
+ if (!other.getRepositoryPath().isEmpty()) {
+ repositoryPath_ = other.repositoryPath_;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ 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:
+ {
+ repositoryBase_ = input.readEnum();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 8
+ case 18:
+ {
+ repositoryPath_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 18
+ 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 int repositoryBase_ = 0;
+ /**
+ *
+ *
+ *
+ * A common public repository base for Yum.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The enum numeric value on the wire for repositoryBase.
+ */
+ @java.lang.Override
+ public int getRepositoryBaseValue() {
+ return repositoryBase_;
+ }
+ /**
+ *
+ *
+ *
+ * A common public repository base for Yum.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @param value The enum numeric value on the wire for repositoryBase to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRepositoryBaseValue(int value) {
+ repositoryBase_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A common public repository base for Yum.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return The repositoryBase.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.RepositoryBase
+ getRepositoryBase() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.RepositoryBase
+ result =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.RepositoryBase.forNumber(repositoryBase_);
+ return result == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.RepositoryBase.UNRECOGNIZED
+ : result;
+ }
+ /**
+ *
+ *
+ *
+ * A common public repository base for Yum.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @param value The repositoryBase to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRepositoryBase(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.RepositoryBase
+ value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ repositoryBase_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A common public repository base for Yum.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository.RepositoryBase repository_base = 1;
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRepositoryBase() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ repositoryBase_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object repositoryPath_ = "";
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The repositoryPath.
+ */
+ public java.lang.String getRepositoryPath() {
+ java.lang.Object ref = repositoryPath_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ repositoryPath_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return The bytes for repositoryPath.
+ */
+ public com.google.protobuf.ByteString getRepositoryPathBytes() {
+ java.lang.Object ref = repositoryPath_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ repositoryPath_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @param value The repositoryPath to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRepositoryPath(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ repositoryPath_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRepositoryPath() {
+ repositoryPath_ = getDefaultInstance().getRepositoryPath();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * A custom field to define a path to a specific repository from the base.
+ *
+ *
+ * string repository_path = 2;
+ *
+ * @param value The bytes for repositoryPath to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRepositoryPathBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ repositoryPath_ = value;
+ bitField0_ |= 0x00000002;
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository)
+ private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .YumRepository.PublicRepository
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public PublicRepository 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ private int upstreamCase_ = 0;
+
+ @SuppressWarnings("serial")
+ private java.lang.Object upstream_;
+
+ public enum UpstreamCase
+ implements
+ com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ PUBLIC_REPOSITORY(1),
+ UPSTREAM_NOT_SET(0);
+ private final int value;
+
+ private UpstreamCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static UpstreamCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static UpstreamCase forNumber(int value) {
+ switch (value) {
+ case 1:
+ return PUBLIC_REPOSITORY;
+ case 0:
+ return UPSTREAM_NOT_SET;
+ default:
+ return null;
+ }
+ }
+
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public static final int PUBLIC_REPOSITORY_FIELD_NUMBER = 1;
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (upstreamCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository)
+ upstream_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepositoryOrBuilder
+ getPublicRepositoryOrBuilder() {
+ if (upstreamCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository)
+ upstream_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.getDefaultInstance();
+ }
+
+ 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 (upstreamCase_ == 1) {
+ output.writeMessage(
+ 1,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository)
+ upstream_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (upstreamCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository)
+ upstream_);
+ }
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository other =
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) obj;
+
+ if (!getUpstreamCase().equals(other.getUpstreamCase())) return false;
+ switch (upstreamCase_) {
+ case 1:
+ if (!getPublicRepository().equals(other.getPublicRepository())) return false;
+ break;
+ case 0:
+ default:
+ }
+ 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();
+ switch (upstreamCase_) {
+ case 1:
+ hash = (37 * hash) + PUBLIC_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getPublicRepository().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository 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;
+ }
+ /**
+ *
+ *
+ *
+ * Configuration for a Yum remote repository.
+ *
+ *
+ * Protobuf type {@code
+ * google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder
+ .class);
+ }
+
+ // Construct using
+ // com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ if (publicRepositoryBuilder_ != null) {
+ publicRepositoryBuilder_.clear();
+ }
+ upstreamCase_ = 0;
+ upstream_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_YumRepository_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ getDefaultInstanceForType() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository build() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository result =
+ buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ buildPartial() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository result =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ buildPartialOneofs(result);
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository result) {
+ int from_bitField0_ = bitField0_;
+ }
+
+ private void buildPartialOneofs(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository result) {
+ result.upstreamCase_ = upstreamCase_;
+ result.upstream_ = this.upstream_;
+ if (upstreamCase_ == 1 && publicRepositoryBuilder_ != null) {
+ result.upstream_ = publicRepositoryBuilder_.build();
+ }
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) {
+ return mergeFrom(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository other) {
+ if (other
+ == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .getDefaultInstance()) return this;
+ switch (other.getUpstreamCase()) {
+ case PUBLIC_REPOSITORY:
+ {
+ mergePublicRepository(other.getPublicRepository());
+ break;
+ }
+ case UPSTREAM_NOT_SET:
+ {
+ break;
+ }
+ }
+ 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(
+ getPublicRepositoryFieldBuilder().getBuilder(), extensionRegistry);
+ upstreamCase_ = 1;
+ break;
+ } // case 10
+ 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 upstreamCase_ = 0;
+ private java.lang.Object upstream_;
+
+ public UpstreamCase getUpstreamCase() {
+ return UpstreamCase.forNumber(upstreamCase_);
+ }
+
+ public Builder clearUpstream() {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ return this;
+ }
+
+ private int bitField0_;
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepositoryOrBuilder>
+ publicRepositoryBuilder_;
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return Whether the publicRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasPublicRepository() {
+ return upstreamCase_ == 1;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ *
+ * @return The publicRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ getPublicRepository() {
+ if (publicRepositoryBuilder_ == null) {
+ if (upstreamCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository)
+ upstream_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.getDefaultInstance();
+ } else {
+ if (upstreamCase_ == 1) {
+ return publicRepositoryBuilder_.getMessage();
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ */
+ public Builder setPublicRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ value) {
+ if (publicRepositoryBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ upstream_ = value;
+ onChanged();
+ } else {
+ publicRepositoryBuilder_.setMessage(value);
+ }
+ upstreamCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ */
+ public Builder setPublicRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.Builder
+ builderForValue) {
+ if (publicRepositoryBuilder_ == null) {
+ upstream_ = builderForValue.build();
+ onChanged();
+ } else {
+ publicRepositoryBuilder_.setMessage(builderForValue.build());
+ }
+ upstreamCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ */
+ public Builder mergePublicRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository
+ value) {
+ if (publicRepositoryBuilder_ == null) {
+ if (upstreamCase_ == 1
+ && upstream_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.getDefaultInstance()) {
+ upstream_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.newBuilder(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .YumRepository.PublicRepository)
+ upstream_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ upstream_ = value;
+ }
+ onChanged();
+ } else {
+ if (upstreamCase_ == 1) {
+ publicRepositoryBuilder_.mergeFrom(value);
+ } else {
+ publicRepositoryBuilder_.setMessage(value);
+ }
+ }
+ upstreamCase_ = 1;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ */
+ public Builder clearPublicRepository() {
+ if (publicRepositoryBuilder_ == null) {
+ if (upstreamCase_ == 1) {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ onChanged();
+ }
+ } else {
+ if (upstreamCase_ == 1) {
+ upstreamCase_ = 0;
+ upstream_ = null;
+ }
+ publicRepositoryBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.Builder
+ getPublicRepositoryBuilder() {
+ return getPublicRepositoryFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepositoryOrBuilder
+ getPublicRepositoryOrBuilder() {
+ if ((upstreamCase_ == 1) && (publicRepositoryBuilder_ != null)) {
+ return publicRepositoryBuilder_.getMessageOrBuilder();
+ } else {
+ if (upstreamCase_ == 1) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository)
+ upstream_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * One of the publicly available Yum repositories supported by Artifact
+ * Registry.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.PublicRepository public_repository = 1;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepositoryOrBuilder>
+ getPublicRepositoryFieldBuilder() {
+ if (publicRepositoryBuilder_ == null) {
+ if (!(upstreamCase_ == 1)) {
+ upstream_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.getDefaultInstance();
+ }
+ publicRepositoryBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepositoryOrBuilder>(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .PublicRepository)
+ upstream_,
+ getParentForChildren(),
+ isClean());
+ upstream_ = null;
+ }
+ upstreamCase_ = 1;
+ onChanged();
+ return publicRepositoryBuilder_;
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .YumRepository
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public YumRepository 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.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+ }
+
+ private int remoteSourceCase_ = 0;
+
+ @SuppressWarnings("serial")
+ private java.lang.Object remoteSource_;
+
+ public enum RemoteSourceCase
+ implements
+ com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
+ DOCKER_REPOSITORY(2),
+ MAVEN_REPOSITORY(3),
+ NPM_REPOSITORY(4),
+ PYTHON_REPOSITORY(5),
+ APT_REPOSITORY(6),
+ YUM_REPOSITORY(7),
+ REMOTESOURCE_NOT_SET(0);
+ private final int value;
+
+ private RemoteSourceCase(int value) {
+ this.value = value;
+ }
+ /**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static RemoteSourceCase valueOf(int value) {
+ return forNumber(value);
+ }
+
+ public static RemoteSourceCase forNumber(int value) {
+ switch (value) {
+ case 2:
+ return DOCKER_REPOSITORY;
+ case 3:
+ return MAVEN_REPOSITORY;
+ case 4:
+ return NPM_REPOSITORY;
+ case 5:
+ return PYTHON_REPOSITORY;
+ case 6:
+ return APT_REPOSITORY;
+ case 7:
+ return YUM_REPOSITORY;
+ case 0:
+ return REMOTESOURCE_NOT_SET;
+ default:
+ return null;
+ }
+ }
+
+ public int getNumber() {
+ return this.value;
+ }
+ };
+
+ public RemoteSourceCase getRemoteSourceCase() {
+ return RemoteSourceCase.forNumber(remoteSourceCase_);
+ }
+
+ public static final int DOCKER_REPOSITORY_FIELD_NUMBER = 2;
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ *
+ * @return Whether the dockerRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasDockerRepository() {
+ return remoteSourceCase_ == 2;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ *
+ * @return The dockerRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ getDockerRepository() {
+ if (remoteSourceCase_ == 2) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryOrBuilder
+ getDockerRepositoryOrBuilder() {
+ if (remoteSourceCase_ == 2) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .getDefaultInstance();
+ }
+
+ public static final int MAVEN_REPOSITORY_FIELD_NUMBER = 3;
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ *
+ * @return Whether the mavenRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasMavenRepository() {
+ return remoteSourceCase_ == 3;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ *
+ * @return The mavenRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ getMavenRepository() {
+ if (remoteSourceCase_ == 3) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder
+ getMavenRepositoryOrBuilder() {
+ if (remoteSourceCase_ == 3) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .getDefaultInstance();
+ }
+
+ public static final int NPM_REPOSITORY_FIELD_NUMBER = 4;
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ *
+ * @return Whether the npmRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasNpmRepository() {
+ return remoteSourceCase_ == 4;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ *
+ * @return The npmRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ getNpmRepository() {
+ if (remoteSourceCase_ == 4) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder
+ getNpmRepositoryOrBuilder() {
+ if (remoteSourceCase_ == 4) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .getDefaultInstance();
+ }
+
+ public static final int PYTHON_REPOSITORY_FIELD_NUMBER = 5;
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ *
+ * @return Whether the pythonRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasPythonRepository() {
+ return remoteSourceCase_ == 5;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ *
+ * @return The pythonRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ getPythonRepository() {
+ if (remoteSourceCase_ == 5) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryOrBuilder
+ getPythonRepositoryOrBuilder() {
+ if (remoteSourceCase_ == 5) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .getDefaultInstance();
+ }
+
+ public static final int APT_REPOSITORY_FIELD_NUMBER = 6;
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ *
+ * @return Whether the aptRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasAptRepository() {
+ return remoteSourceCase_ == 6;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ *
+ * @return The aptRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ getAptRepository() {
+ if (remoteSourceCase_ == 6) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder
+ getAptRepositoryOrBuilder() {
+ if (remoteSourceCase_ == 6) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .getDefaultInstance();
+ }
+
+ public static final int YUM_REPOSITORY_FIELD_NUMBER = 7;
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ *
+ * @return Whether the yumRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasYumRepository() {
+ return remoteSourceCase_ == 7;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ *
+ * @return The yumRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ getYumRepository() {
+ if (remoteSourceCase_ == 7) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .getDefaultInstance();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder
+ getYumRepositoryOrBuilder() {
+ if (remoteSourceCase_ == 7) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .getDefaultInstance();
+ }
+
+ public static final int DESCRIPTION_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object description_ = "";
+ /**
+ *
+ *
+ *
+ * The description of the remote source.
+ *
+ *
+ * string description = 1;
+ *
+ * @return The description.
+ */
+ @java.lang.Override
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ 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();
+ description_ = s;
+ return s;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The description of the remote source.
+ *
+ *
+ * string description = 1;
+ *
+ * @return The bytes for description.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int UPSTREAM_CREDENTIALS_FIELD_NUMBER = 9;
+ private com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ upstreamCredentials_;
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the upstreamCredentials field is set.
+ */
+ @java.lang.Override
+ public boolean hasUpstreamCredentials() {
+ return upstreamCredentials_ != null;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The upstreamCredentials.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ getUpstreamCredentials() {
+ return upstreamCredentials_ == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .getDefaultInstance()
+ : upstreamCredentials_;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentialsOrBuilder
+ getUpstreamCredentialsOrBuilder() {
+ return upstreamCredentials_ == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .getDefaultInstance()
+ : upstreamCredentials_;
+ }
+
+ 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(description_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_);
+ }
+ if (remoteSourceCase_ == 2) {
+ output.writeMessage(
+ 2,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ remoteSource_);
+ }
+ if (remoteSourceCase_ == 3) {
+ output.writeMessage(
+ 3,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ remoteSource_);
+ }
+ if (remoteSourceCase_ == 4) {
+ output.writeMessage(
+ 4,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ remoteSource_);
+ }
+ if (remoteSourceCase_ == 5) {
+ output.writeMessage(
+ 5,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ remoteSource_);
+ }
+ if (remoteSourceCase_ == 6) {
+ output.writeMessage(
+ 6,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ remoteSource_);
+ }
+ if (remoteSourceCase_ == 7) {
+ output.writeMessage(
+ 7,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ remoteSource_);
+ }
+ if (upstreamCredentials_ != null) {
+ output.writeMessage(9, getUpstreamCredentials());
+ }
+ 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(description_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_);
+ }
+ if (remoteSourceCase_ == 2) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 2,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ remoteSource_);
+ }
+ if (remoteSourceCase_ == 3) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 3,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ remoteSource_);
+ }
+ if (remoteSourceCase_ == 4) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 4,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ remoteSource_);
+ }
+ if (remoteSourceCase_ == 5) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 5,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ remoteSource_);
+ }
+ if (remoteSourceCase_ == 6) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 6,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ remoteSource_);
+ }
+ if (remoteSourceCase_ == 7) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 7,
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ remoteSource_);
+ }
+ if (upstreamCredentials_ != null) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getUpstreamCredentials());
+ }
+ 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.devtools.artifactregistry.v1.RemoteRepositoryConfig)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig other =
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) obj;
+
+ if (!getDescription().equals(other.getDescription())) return false;
+ if (hasUpstreamCredentials() != other.hasUpstreamCredentials()) return false;
+ if (hasUpstreamCredentials()) {
+ if (!getUpstreamCredentials().equals(other.getUpstreamCredentials())) return false;
+ }
+ if (!getRemoteSourceCase().equals(other.getRemoteSourceCase())) return false;
+ switch (remoteSourceCase_) {
+ case 2:
+ if (!getDockerRepository().equals(other.getDockerRepository())) return false;
+ break;
+ case 3:
+ if (!getMavenRepository().equals(other.getMavenRepository())) return false;
+ break;
+ case 4:
+ if (!getNpmRepository().equals(other.getNpmRepository())) return false;
+ break;
+ case 5:
+ if (!getPythonRepository().equals(other.getPythonRepository())) return false;
+ break;
+ case 6:
+ if (!getAptRepository().equals(other.getAptRepository())) return false;
+ break;
+ case 7:
+ if (!getYumRepository().equals(other.getYumRepository())) return false;
+ break;
+ case 0:
+ default:
+ }
+ 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) + DESCRIPTION_FIELD_NUMBER;
+ hash = (53 * hash) + getDescription().hashCode();
+ if (hasUpstreamCredentials()) {
+ hash = (37 * hash) + UPSTREAM_CREDENTIALS_FIELD_NUMBER;
+ hash = (53 * hash) + getUpstreamCredentials().hashCode();
+ }
+ switch (remoteSourceCase_) {
+ case 2:
+ hash = (37 * hash) + DOCKER_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getDockerRepository().hashCode();
+ break;
+ case 3:
+ hash = (37 * hash) + MAVEN_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getMavenRepository().hashCode();
+ break;
+ case 4:
+ hash = (37 * hash) + NPM_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getNpmRepository().hashCode();
+ break;
+ case 5:
+ hash = (37 * hash) + PYTHON_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getPythonRepository().hashCode();
+ break;
+ case 6:
+ hash = (37 * hash) + APT_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getAptRepository().hashCode();
+ break;
+ case 7:
+ hash = (37 * hash) + YUM_REPOSITORY_FIELD_NUMBER;
+ hash = (53 * hash) + getYumRepository().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig 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.devtools.artifactregistry.v1.RemoteRepositoryConfig parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig 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.devtools.artifactregistry.v1.RemoteRepositoryConfig parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig 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.devtools.artifactregistry.v1.RemoteRepositoryConfig parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig 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.devtools.artifactregistry.v1.RemoteRepositoryConfig 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;
+ }
+ /**
+ *
+ *
+ *
+ * Remote repository configuration.
+ *
+ *
+ * Protobuf type {@code google.devtools.artifactregistry.v1.RemoteRepositoryConfig}
+ */
+ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ implements
+ // @@protoc_insertion_point(builder_implements:google.devtools.artifactregistry.v1.RemoteRepositoryConfig)
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfigOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor;
+ }
+
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.class,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.Builder.class);
+ }
+
+ // Construct using com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.newBuilder()
+ private Builder() {}
+
+ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ super(parent);
+ }
+
+ @java.lang.Override
+ public Builder clear() {
+ super.clear();
+ bitField0_ = 0;
+ if (dockerRepositoryBuilder_ != null) {
+ dockerRepositoryBuilder_.clear();
+ }
+ if (mavenRepositoryBuilder_ != null) {
+ mavenRepositoryBuilder_.clear();
+ }
+ if (npmRepositoryBuilder_ != null) {
+ npmRepositoryBuilder_.clear();
+ }
+ if (pythonRepositoryBuilder_ != null) {
+ pythonRepositoryBuilder_.clear();
+ }
+ if (aptRepositoryBuilder_ != null) {
+ aptRepositoryBuilder_.clear();
+ }
+ if (yumRepositoryBuilder_ != null) {
+ yumRepositoryBuilder_.clear();
+ }
+ description_ = "";
+ upstreamCredentials_ = null;
+ if (upstreamCredentialsBuilder_ != null) {
+ upstreamCredentialsBuilder_.dispose();
+ upstreamCredentialsBuilder_ = null;
+ }
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ return this;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_RemoteRepositoryConfig_descriptor;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ getDefaultInstanceForType() {
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.getDefaultInstance();
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig build() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig buildPartial() {
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig result =
+ new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig(this);
+ if (bitField0_ != 0) {
+ buildPartial0(result);
+ }
+ buildPartialOneofs(result);
+ onBuilt();
+ return result;
+ }
+
+ private void buildPartial0(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig result) {
+ int from_bitField0_ = bitField0_;
+ if (((from_bitField0_ & 0x00000040) != 0)) {
+ result.description_ = description_;
+ }
+ if (((from_bitField0_ & 0x00000080) != 0)) {
+ result.upstreamCredentials_ =
+ upstreamCredentialsBuilder_ == null
+ ? upstreamCredentials_
+ : upstreamCredentialsBuilder_.build();
+ }
+ }
+
+ private void buildPartialOneofs(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig result) {
+ result.remoteSourceCase_ = remoteSourceCase_;
+ result.remoteSource_ = this.remoteSource_;
+ if (remoteSourceCase_ == 2 && dockerRepositoryBuilder_ != null) {
+ result.remoteSource_ = dockerRepositoryBuilder_.build();
+ }
+ if (remoteSourceCase_ == 3 && mavenRepositoryBuilder_ != null) {
+ result.remoteSource_ = mavenRepositoryBuilder_.build();
+ }
+ if (remoteSourceCase_ == 4 && npmRepositoryBuilder_ != null) {
+ result.remoteSource_ = npmRepositoryBuilder_.build();
+ }
+ if (remoteSourceCase_ == 5 && pythonRepositoryBuilder_ != null) {
+ result.remoteSource_ = pythonRepositoryBuilder_.build();
+ }
+ if (remoteSourceCase_ == 6 && aptRepositoryBuilder_ != null) {
+ result.remoteSource_ = aptRepositoryBuilder_.build();
+ }
+ if (remoteSourceCase_ == 7 && yumRepositoryBuilder_ != null) {
+ result.remoteSource_ = yumRepositoryBuilder_.build();
+ }
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig) {
+ return mergeFrom((com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig) other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig other) {
+ if (other
+ == com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.getDefaultInstance())
+ return this;
+ if (!other.getDescription().isEmpty()) {
+ description_ = other.description_;
+ bitField0_ |= 0x00000040;
+ onChanged();
+ }
+ if (other.hasUpstreamCredentials()) {
+ mergeUpstreamCredentials(other.getUpstreamCredentials());
+ }
+ switch (other.getRemoteSourceCase()) {
+ case DOCKER_REPOSITORY:
+ {
+ mergeDockerRepository(other.getDockerRepository());
+ break;
+ }
+ case MAVEN_REPOSITORY:
+ {
+ mergeMavenRepository(other.getMavenRepository());
+ break;
+ }
+ case NPM_REPOSITORY:
+ {
+ mergeNpmRepository(other.getNpmRepository());
+ break;
+ }
+ case PYTHON_REPOSITORY:
+ {
+ mergePythonRepository(other.getPythonRepository());
+ break;
+ }
+ case APT_REPOSITORY:
+ {
+ mergeAptRepository(other.getAptRepository());
+ break;
+ }
+ case YUM_REPOSITORY:
+ {
+ mergeYumRepository(other.getYumRepository());
+ break;
+ }
+ case REMOTESOURCE_NOT_SET:
+ {
+ break;
+ }
+ }
+ 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:
+ {
+ description_ = input.readStringRequireUtf8();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 10
+ case 18:
+ {
+ input.readMessage(
+ getDockerRepositoryFieldBuilder().getBuilder(), extensionRegistry);
+ remoteSourceCase_ = 2;
+ break;
+ } // case 18
+ case 26:
+ {
+ input.readMessage(getMavenRepositoryFieldBuilder().getBuilder(), extensionRegistry);
+ remoteSourceCase_ = 3;
+ break;
+ } // case 26
+ case 34:
+ {
+ input.readMessage(getNpmRepositoryFieldBuilder().getBuilder(), extensionRegistry);
+ remoteSourceCase_ = 4;
+ break;
+ } // case 34
+ case 42:
+ {
+ input.readMessage(
+ getPythonRepositoryFieldBuilder().getBuilder(), extensionRegistry);
+ remoteSourceCase_ = 5;
+ break;
+ } // case 42
+ case 50:
+ {
+ input.readMessage(getAptRepositoryFieldBuilder().getBuilder(), extensionRegistry);
+ remoteSourceCase_ = 6;
+ break;
+ } // case 50
+ case 58:
+ {
+ input.readMessage(getYumRepositoryFieldBuilder().getBuilder(), extensionRegistry);
+ remoteSourceCase_ = 7;
+ break;
+ } // case 58
+ case 74:
+ {
+ input.readMessage(
+ getUpstreamCredentialsFieldBuilder().getBuilder(), extensionRegistry);
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 74
+ 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 remoteSourceCase_ = 0;
+ private java.lang.Object remoteSource_;
+
+ public RemoteSourceCase getRemoteSourceCase() {
+ return RemoteSourceCase.forNumber(remoteSourceCase_);
+ }
+
+ public Builder clearRemoteSource() {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ onChanged();
+ return this;
+ }
+
+ private int bitField0_;
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .DockerRepositoryOrBuilder>
+ dockerRepositoryBuilder_;
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ *
+ * @return Whether the dockerRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasDockerRepository() {
+ return remoteSourceCase_ == 2;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ *
+ * @return The dockerRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ getDockerRepository() {
+ if (dockerRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 2) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .getDefaultInstance();
+ } else {
+ if (remoteSourceCase_ == 2) {
+ return dockerRepositoryBuilder_.getMessage();
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ */
+ public Builder setDockerRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository value) {
+ if (dockerRepositoryBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ remoteSource_ = value;
+ onChanged();
+ } else {
+ dockerRepositoryBuilder_.setMessage(value);
+ }
+ remoteSourceCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ */
+ public Builder setDockerRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.Builder
+ builderForValue) {
+ if (dockerRepositoryBuilder_ == null) {
+ remoteSource_ = builderForValue.build();
+ onChanged();
+ } else {
+ dockerRepositoryBuilder_.setMessage(builderForValue.build());
+ }
+ remoteSourceCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ */
+ public Builder mergeDockerRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository value) {
+ if (dockerRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 2
+ && remoteSource_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .getDefaultInstance()) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .newBuilder(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .DockerRepository)
+ remoteSource_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ remoteSource_ = value;
+ }
+ onChanged();
+ } else {
+ if (remoteSourceCase_ == 2) {
+ dockerRepositoryBuilder_.mergeFrom(value);
+ } else {
+ dockerRepositoryBuilder_.setMessage(value);
+ }
+ }
+ remoteSourceCase_ = 2;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ */
+ public Builder clearDockerRepository() {
+ if (dockerRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 2) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ onChanged();
+ }
+ } else {
+ if (remoteSourceCase_ == 2) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ }
+ dockerRepositoryBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.Builder
+ getDockerRepositoryBuilder() {
+ return getDockerRepositoryFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryOrBuilder
+ getDockerRepositoryOrBuilder() {
+ if ((remoteSourceCase_ == 2) && (dockerRepositoryBuilder_ != null)) {
+ return dockerRepositoryBuilder_.getMessageOrBuilder();
+ } else {
+ if (remoteSourceCase_ == 2) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .DockerRepositoryOrBuilder>
+ getDockerRepositoryFieldBuilder() {
+ if (dockerRepositoryBuilder_ == null) {
+ if (!(remoteSourceCase_ == 2)) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .getDefaultInstance();
+ }
+ dockerRepositoryBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ .Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .DockerRepositoryOrBuilder>(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository)
+ remoteSource_,
+ getParentForChildren(),
+ isClean());
+ remoteSource_ = null;
+ }
+ remoteSourceCase_ = 2;
+ onChanged();
+ return dockerRepositoryBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder>
+ mavenRepositoryBuilder_;
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ *
+ * @return Whether the mavenRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasMavenRepository() {
+ return remoteSourceCase_ == 3;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ *
+ * @return The mavenRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ getMavenRepository() {
+ if (mavenRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 3) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .getDefaultInstance();
+ } else {
+ if (remoteSourceCase_ == 3) {
+ return mavenRepositoryBuilder_.getMessage();
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ */
+ public Builder setMavenRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository value) {
+ if (mavenRepositoryBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ remoteSource_ = value;
+ onChanged();
+ } else {
+ mavenRepositoryBuilder_.setMessage(value);
+ }
+ remoteSourceCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ */
+ public Builder setMavenRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.Builder
+ builderForValue) {
+ if (mavenRepositoryBuilder_ == null) {
+ remoteSource_ = builderForValue.build();
+ onChanged();
+ } else {
+ mavenRepositoryBuilder_.setMessage(builderForValue.build());
+ }
+ remoteSourceCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ */
+ public Builder mergeMavenRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository value) {
+ if (mavenRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 3
+ && remoteSource_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .getDefaultInstance()) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .newBuilder(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .MavenRepository)
+ remoteSource_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ remoteSource_ = value;
+ }
+ onChanged();
+ } else {
+ if (remoteSourceCase_ == 3) {
+ mavenRepositoryBuilder_.mergeFrom(value);
+ } else {
+ mavenRepositoryBuilder_.setMessage(value);
+ }
+ }
+ remoteSourceCase_ = 3;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ */
+ public Builder clearMavenRepository() {
+ if (mavenRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 3) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ onChanged();
+ }
+ } else {
+ if (remoteSourceCase_ == 3) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ }
+ mavenRepositoryBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.Builder
+ getMavenRepositoryBuilder() {
+ return getMavenRepositoryFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder
+ getMavenRepositoryOrBuilder() {
+ if ((remoteSourceCase_ == 3) && (mavenRepositoryBuilder_ != null)) {
+ return mavenRepositoryBuilder_.getMessageOrBuilder();
+ } else {
+ if (remoteSourceCase_ == 3) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder>
+ getMavenRepositoryFieldBuilder() {
+ if (mavenRepositoryBuilder_ == null) {
+ if (!(remoteSourceCase_ == 3)) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .getDefaultInstance();
+ }
+ mavenRepositoryBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ .Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .MavenRepositoryOrBuilder>(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository)
+ remoteSource_,
+ getParentForChildren(),
+ isClean());
+ remoteSource_ = null;
+ }
+ remoteSourceCase_ = 3;
+ onChanged();
+ return mavenRepositoryBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder>
+ npmRepositoryBuilder_;
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ *
+ * @return Whether the npmRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasNpmRepository() {
+ return remoteSourceCase_ == 4;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ *
+ * @return The npmRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ getNpmRepository() {
+ if (npmRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 4) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .getDefaultInstance();
+ } else {
+ if (remoteSourceCase_ == 4) {
+ return npmRepositoryBuilder_.getMessage();
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ */
+ public Builder setNpmRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository value) {
+ if (npmRepositoryBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ remoteSource_ = value;
+ onChanged();
+ } else {
+ npmRepositoryBuilder_.setMessage(value);
+ }
+ remoteSourceCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ */
+ public Builder setNpmRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder
+ builderForValue) {
+ if (npmRepositoryBuilder_ == null) {
+ remoteSource_ = builderForValue.build();
+ onChanged();
+ } else {
+ npmRepositoryBuilder_.setMessage(builderForValue.build());
+ }
+ remoteSourceCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ */
+ public Builder mergeNpmRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository value) {
+ if (npmRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 4
+ && remoteSource_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .getDefaultInstance()) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .newBuilder(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ remoteSource_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ remoteSource_ = value;
+ }
+ onChanged();
+ } else {
+ if (remoteSourceCase_ == 4) {
+ npmRepositoryBuilder_.mergeFrom(value);
+ } else {
+ npmRepositoryBuilder_.setMessage(value);
+ }
+ }
+ remoteSourceCase_ = 4;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ */
+ public Builder clearNpmRepository() {
+ if (npmRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 4) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ onChanged();
+ }
+ } else {
+ if (remoteSourceCase_ == 4) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ }
+ npmRepositoryBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder
+ getNpmRepositoryBuilder() {
+ return getNpmRepositoryFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder
+ getNpmRepositoryOrBuilder() {
+ if ((remoteSourceCase_ == 4) && (npmRepositoryBuilder_ != null)) {
+ return npmRepositoryBuilder_.getMessageOrBuilder();
+ } else {
+ if (remoteSourceCase_ == 4) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder>
+ getNpmRepositoryFieldBuilder() {
+ if (npmRepositoryBuilder_ == null) {
+ if (!(remoteSourceCase_ == 4)) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .getDefaultInstance();
+ }
+ npmRepositoryBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository
+ .Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .NpmRepositoryOrBuilder>(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository)
+ remoteSource_,
+ getParentForChildren(),
+ isClean());
+ remoteSource_ = null;
+ }
+ remoteSourceCase_ = 4;
+ onChanged();
+ return npmRepositoryBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .PythonRepositoryOrBuilder>
+ pythonRepositoryBuilder_;
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ *
+ * @return Whether the pythonRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasPythonRepository() {
+ return remoteSourceCase_ == 5;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ *
+ * @return The pythonRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ getPythonRepository() {
+ if (pythonRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 5) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .getDefaultInstance();
+ } else {
+ if (remoteSourceCase_ == 5) {
+ return pythonRepositoryBuilder_.getMessage();
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ */
+ public Builder setPythonRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository value) {
+ if (pythonRepositoryBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ remoteSource_ = value;
+ onChanged();
+ } else {
+ pythonRepositoryBuilder_.setMessage(value);
+ }
+ remoteSourceCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ */
+ public Builder setPythonRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.Builder
+ builderForValue) {
+ if (pythonRepositoryBuilder_ == null) {
+ remoteSource_ = builderForValue.build();
+ onChanged();
+ } else {
+ pythonRepositoryBuilder_.setMessage(builderForValue.build());
+ }
+ remoteSourceCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ */
+ public Builder mergePythonRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository value) {
+ if (pythonRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 5
+ && remoteSource_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .getDefaultInstance()) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .newBuilder(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .PythonRepository)
+ remoteSource_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ remoteSource_ = value;
+ }
+ onChanged();
+ } else {
+ if (remoteSourceCase_ == 5) {
+ pythonRepositoryBuilder_.mergeFrom(value);
+ } else {
+ pythonRepositoryBuilder_.setMessage(value);
+ }
+ }
+ remoteSourceCase_ = 5;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ */
+ public Builder clearPythonRepository() {
+ if (pythonRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 5) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ onChanged();
+ }
+ } else {
+ if (remoteSourceCase_ == 5) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ }
+ pythonRepositoryBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.Builder
+ getPythonRepositoryBuilder() {
+ return getPythonRepositoryFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryOrBuilder
+ getPythonRepositoryOrBuilder() {
+ if ((remoteSourceCase_ == 5) && (pythonRepositoryBuilder_ != null)) {
+ return pythonRepositoryBuilder_.getMessageOrBuilder();
+ } else {
+ if (remoteSourceCase_ == 5) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .PythonRepositoryOrBuilder>
+ getPythonRepositoryFieldBuilder() {
+ if (pythonRepositoryBuilder_ == null) {
+ if (!(remoteSourceCase_ == 5)) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .getDefaultInstance();
+ }
+ pythonRepositoryBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ .Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .PythonRepositoryOrBuilder>(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository)
+ remoteSource_,
+ getParentForChildren(),
+ isClean());
+ remoteSource_ = null;
+ }
+ remoteSourceCase_ = 5;
+ onChanged();
+ return pythonRepositoryBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder>
+ aptRepositoryBuilder_;
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ *
+ * @return Whether the aptRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasAptRepository() {
+ return remoteSourceCase_ == 6;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ *
+ * @return The aptRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ getAptRepository() {
+ if (aptRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 6) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .getDefaultInstance();
+ } else {
+ if (remoteSourceCase_ == 6) {
+ return aptRepositoryBuilder_.getMessage();
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ */
+ public Builder setAptRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository value) {
+ if (aptRepositoryBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ remoteSource_ = value;
+ onChanged();
+ } else {
+ aptRepositoryBuilder_.setMessage(value);
+ }
+ remoteSourceCase_ = 6;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ */
+ public Builder setAptRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder
+ builderForValue) {
+ if (aptRepositoryBuilder_ == null) {
+ remoteSource_ = builderForValue.build();
+ onChanged();
+ } else {
+ aptRepositoryBuilder_.setMessage(builderForValue.build());
+ }
+ remoteSourceCase_ = 6;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ */
+ public Builder mergeAptRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository value) {
+ if (aptRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 6
+ && remoteSource_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .getDefaultInstance()) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .newBuilder(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ remoteSource_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ remoteSource_ = value;
+ }
+ onChanged();
+ } else {
+ if (remoteSourceCase_ == 6) {
+ aptRepositoryBuilder_.mergeFrom(value);
+ } else {
+ aptRepositoryBuilder_.setMessage(value);
+ }
+ }
+ remoteSourceCase_ = 6;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ */
+ public Builder clearAptRepository() {
+ if (aptRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 6) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ onChanged();
+ }
+ } else {
+ if (remoteSourceCase_ == 6) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ }
+ aptRepositoryBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder
+ getAptRepositoryBuilder() {
+ return getAptRepositoryFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder
+ getAptRepositoryOrBuilder() {
+ if ((remoteSourceCase_ == 6) && (aptRepositoryBuilder_ != null)) {
+ return aptRepositoryBuilder_.getMessageOrBuilder();
+ } else {
+ if (remoteSourceCase_ == 6) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder>
+ getAptRepositoryFieldBuilder() {
+ if (aptRepositoryBuilder_ == null) {
+ if (!(remoteSourceCase_ == 6)) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .getDefaultInstance();
+ }
+ aptRepositoryBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository
+ .Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .AptRepositoryOrBuilder>(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository)
+ remoteSource_,
+ getParentForChildren(),
+ isClean());
+ remoteSource_ = null;
+ }
+ remoteSourceCase_ = 6;
+ onChanged();
+ return aptRepositoryBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder>
+ yumRepositoryBuilder_;
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ *
+ * @return Whether the yumRepository field is set.
+ */
+ @java.lang.Override
+ public boolean hasYumRepository() {
+ return remoteSourceCase_ == 7;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ *
+ * @return The yumRepository.
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ getYumRepository() {
+ if (yumRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 7) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .getDefaultInstance();
+ } else {
+ if (remoteSourceCase_ == 7) {
+ return yumRepositoryBuilder_.getMessage();
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ */
+ public Builder setYumRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository value) {
+ if (yumRepositoryBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ remoteSource_ = value;
+ onChanged();
+ } else {
+ yumRepositoryBuilder_.setMessage(value);
+ }
+ remoteSourceCase_ = 7;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ */
+ public Builder setYumRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder
+ builderForValue) {
+ if (yumRepositoryBuilder_ == null) {
+ remoteSource_ = builderForValue.build();
+ onChanged();
+ } else {
+ yumRepositoryBuilder_.setMessage(builderForValue.build());
+ }
+ remoteSourceCase_ = 7;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ */
+ public Builder mergeYumRepository(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository value) {
+ if (yumRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 7
+ && remoteSource_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .getDefaultInstance()) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .newBuilder(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ remoteSource_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ remoteSource_ = value;
+ }
+ onChanged();
+ } else {
+ if (remoteSourceCase_ == 7) {
+ yumRepositoryBuilder_.mergeFrom(value);
+ } else {
+ yumRepositoryBuilder_.setMessage(value);
+ }
+ }
+ remoteSourceCase_ = 7;
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ */
+ public Builder clearYumRepository() {
+ if (yumRepositoryBuilder_ == null) {
+ if (remoteSourceCase_ == 7) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ onChanged();
+ }
+ } else {
+ if (remoteSourceCase_ == 7) {
+ remoteSourceCase_ = 0;
+ remoteSource_ = null;
+ }
+ yumRepositoryBuilder_.clear();
+ }
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder
+ getYumRepositoryBuilder() {
+ return getYumRepositoryFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ */
+ @java.lang.Override
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder
+ getYumRepositoryOrBuilder() {
+ if ((remoteSourceCase_ == 7) && (yumRepositoryBuilder_ != null)) {
+ return yumRepositoryBuilder_.getMessageOrBuilder();
+ } else {
+ if (remoteSourceCase_ == 7) {
+ return (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ remoteSource_;
+ }
+ return com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .getDefaultInstance();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository.Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder>
+ getYumRepositoryFieldBuilder() {
+ if (yumRepositoryBuilder_ == null) {
+ if (!(remoteSourceCase_ == 7)) {
+ remoteSource_ =
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .getDefaultInstance();
+ }
+ yumRepositoryBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository
+ .Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .YumRepositoryOrBuilder>(
+ (com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository)
+ remoteSource_,
+ getParentForChildren(),
+ isClean());
+ remoteSource_ = null;
+ }
+ remoteSourceCase_ = 7;
+ onChanged();
+ return yumRepositoryBuilder_;
+ }
+
+ private java.lang.Object description_ = "";
+ /**
+ *
+ *
+ *
+ * The description of the remote source.
+ *
+ *
+ * string description = 1;
+ *
+ * @return The description.
+ */
+ public java.lang.String getDescription() {
+ java.lang.Object ref = description_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ description_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The description of the remote source.
+ *
+ *
+ * string description = 1;
+ *
+ * @return The bytes for description.
+ */
+ public com.google.protobuf.ByteString getDescriptionBytes() {
+ java.lang.Object ref = description_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ description_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * The description of the remote source.
+ *
+ *
+ * string description = 1;
+ *
+ * @param value The description to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDescription(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ description_ = value;
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The description of the remote source.
+ *
+ *
+ * string description = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDescription() {
+ description_ = getDefaultInstance().getDescription();
+ bitField0_ = (bitField0_ & ~0x00000040);
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * The description of the remote source.
+ *
+ *
+ * string description = 1;
+ *
+ * @param value The bytes for description to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ description_ = value;
+ bitField0_ |= 0x00000040;
+ onChanged();
+ return this;
+ }
+
+ private com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ upstreamCredentials_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentialsOrBuilder>
+ upstreamCredentialsBuilder_;
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the upstreamCredentials field is set.
+ */
+ public boolean hasUpstreamCredentials() {
+ return ((bitField0_ & 0x00000080) != 0);
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The upstreamCredentials.
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ getUpstreamCredentials() {
+ if (upstreamCredentialsBuilder_ == null) {
+ return upstreamCredentials_ == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .getDefaultInstance()
+ : upstreamCredentials_;
+ } else {
+ return upstreamCredentialsBuilder_.getMessage();
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setUpstreamCredentials(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials value) {
+ if (upstreamCredentialsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ upstreamCredentials_ = value;
+ } else {
+ upstreamCredentialsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder setUpstreamCredentials(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.Builder
+ builderForValue) {
+ if (upstreamCredentialsBuilder_ == null) {
+ upstreamCredentials_ = builderForValue.build();
+ } else {
+ upstreamCredentialsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder mergeUpstreamCredentials(
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials value) {
+ if (upstreamCredentialsBuilder_ == null) {
+ if (((bitField0_ & 0x00000080) != 0)
+ && upstreamCredentials_ != null
+ && upstreamCredentials_
+ != com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentials.getDefaultInstance()) {
+ getUpstreamCredentialsBuilder().mergeFrom(value);
+ } else {
+ upstreamCredentials_ = value;
+ }
+ } else {
+ upstreamCredentialsBuilder_.mergeFrom(value);
+ }
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public Builder clearUpstreamCredentials() {
+ bitField0_ = (bitField0_ & ~0x00000080);
+ upstreamCredentials_ = null;
+ if (upstreamCredentialsBuilder_ != null) {
+ upstreamCredentialsBuilder_.dispose();
+ upstreamCredentialsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .Builder
+ getUpstreamCredentialsBuilder() {
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return getUpstreamCredentialsFieldBuilder().getBuilder();
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ public com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentialsOrBuilder
+ getUpstreamCredentialsOrBuilder() {
+ if (upstreamCredentialsBuilder_ != null) {
+ return upstreamCredentialsBuilder_.getMessageOrBuilder();
+ } else {
+ return upstreamCredentials_ == null
+ ? com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .getDefaultInstance()
+ : upstreamCredentials_;
+ }
+ }
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentialsOrBuilder>
+ getUpstreamCredentialsFieldBuilder() {
+ if (upstreamCredentialsBuilder_ == null) {
+ upstreamCredentialsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ .Builder,
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ .UpstreamCredentialsOrBuilder>(
+ getUpstreamCredentials(), getParentForChildren(), isClean());
+ upstreamCredentials_ = null;
+ }
+ return upstreamCredentialsBuilder_;
+ }
+
+ @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.devtools.artifactregistry.v1.RemoteRepositoryConfig)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.devtools.artifactregistry.v1.RemoteRepositoryConfig)
+ private static final com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig();
+ }
+
+ public static com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser PARSER =
+ new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
+ public RemoteRepositoryConfig 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.devtools.artifactregistry.v1.RemoteRepositoryConfig
+ getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+}
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfigOrBuilder.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfigOrBuilder.java
new file mode 100644
index 000000000000..c084f40ef42a
--- /dev/null
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/RemoteRepositoryConfigOrBuilder.java
@@ -0,0 +1,351 @@
+/*
+ * Copyright 2023 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/devtools/artifactregistry/v1/repository.proto
+
+package com.google.devtools.artifactregistry.v1;
+
+public interface RemoteRepositoryConfigOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.RemoteRepositoryConfig)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ *
+ * @return Whether the dockerRepository field is set.
+ */
+ boolean hasDockerRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ *
+ * @return The dockerRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository
+ getDockerRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for a Docker remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepository docker_repository = 2;
+ *
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.DockerRepositoryOrBuilder
+ getDockerRepositoryOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ *
+ * @return Whether the mavenRepository field is set.
+ */
+ boolean hasMavenRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ *
+ * @return The mavenRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository
+ getMavenRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for a Maven remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepository maven_repository = 3;
+ *
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.MavenRepositoryOrBuilder
+ getMavenRepositoryOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ *
+ * @return Whether the npmRepository field is set.
+ */
+ boolean hasNpmRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ *
+ * @return The npmRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository getNpmRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for an Npm remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepository npm_repository = 4;
+ *
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.NpmRepositoryOrBuilder
+ getNpmRepositoryOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ *
+ * @return Whether the pythonRepository field is set.
+ */
+ boolean hasPythonRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ *
+ * @return The pythonRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository
+ getPythonRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for a Python remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepository python_repository = 5;
+ *
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.PythonRepositoryOrBuilder
+ getPythonRepositoryOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ *
+ * @return Whether the aptRepository field is set.
+ */
+ boolean hasAptRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ *
+ * @return The aptRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository getAptRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for an Apt remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepository apt_repository = 6;
+ *
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.AptRepositoryOrBuilder
+ getAptRepositoryOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ *
+ * @return Whether the yumRepository field is set.
+ */
+ boolean hasYumRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ *
+ * @return The yumRepository.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository getYumRepository();
+ /**
+ *
+ *
+ *
+ * Specific settings for a Yum remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepository yum_repository = 7;
+ *
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.YumRepositoryOrBuilder
+ getYumRepositoryOrBuilder();
+
+ /**
+ *
+ *
+ *
+ * The description of the remote source.
+ *
+ *
+ * string description = 1;
+ *
+ * @return The description.
+ */
+ java.lang.String getDescription();
+ /**
+ *
+ *
+ *
+ * The description of the remote source.
+ *
+ *
+ * string description = 1;
+ *
+ * @return The bytes for description.
+ */
+ com.google.protobuf.ByteString getDescriptionBytes();
+
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return Whether the upstreamCredentials field is set.
+ */
+ boolean hasUpstreamCredentials();
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ *
+ * @return The upstreamCredentials.
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials
+ getUpstreamCredentials();
+ /**
+ *
+ *
+ *
+ * Optional. The credentials used to access the remote repository.
+ *
+ *
+ *
+ * .google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials upstream_credentials = 9 [(.google.api.field_behavior) = OPTIONAL];
+ *
+ */
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentialsOrBuilder
+ getUpstreamCredentialsOrBuilder();
+
+ com.google.devtools.artifactregistry.v1.RemoteRepositoryConfig.RemoteSourceCase
+ getRemoteSourceCase();
+}
diff --git a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Repository.java b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Repository.java
index 8846072fa6d5..7a5c8bf3d7c6 100644
--- a/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Repository.java
+++ b/java-artifact-registry/proto-google-cloud-artifact-registry-v1/src/main/java/com/google/devtools/artifactregistry/v1/Repository.java
@@ -42,6 +42,7 @@ private Repository() {
format_ = 0;
description_ = "";
kmsKeyName_ = "";
+ mode_ = 0;
}
@java.lang.Override
@@ -61,6 +62,8 @@ protected com.google.protobuf.MapField internalGetMapField(int number) {
switch (number) {
case 4:
return internalGetLabels();
+ case 12:
+ return internalGetCleanupPolicies();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
@@ -156,6 +159,26 @@ public enum Format implements com.google.protobuf.ProtocolMessageEnum {
* PYTHON = 8;
*/
PYTHON(8),
+ /**
+ *
+ *
+ *
+ * Kubeflow Pipelines package format.
+ *
+ *
+ * KFP = 9;
+ */
+ KFP(9),
+ /**
+ *
+ *
+ *
+ * Go package format.
+ *
+ *
+ * GO = 10;
+ */
+ GO(10),
UNRECOGNIZED(-1),
;
@@ -229,6 +252,26 @@ public enum Format implements com.google.protobuf.ProtocolMessageEnum {
* PYTHON = 8;
*/
public static final int PYTHON_VALUE = 8;
+ /**
+ *
+ *
+ *
+ * Kubeflow Pipelines package format.
+ *
+ *
+ * KFP = 9;
+ */
+ public static final int KFP_VALUE = 9;
+ /**
+ *
+ *
+ *
+ * Go package format.
+ *
+ *
+ * GO = 10;
+ */
+ public static final int GO_VALUE = 10;
public final int getNumber() {
if (this == UNRECOGNIZED) {
@@ -268,6 +311,10 @@ public static Format forNumber(int value) {
return YUM;
case 8:
return PYTHON;
+ case 9:
+ return KFP;
+ case 10:
+ return GO;
default:
return null;
}
@@ -323,6 +370,188 @@ private Format(int value) {
// @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.Repository.Format)
}
+ /**
+ *
+ *
+ *
+ * The mode configures the repository to serve artifacts from different
+ * sources.
+ *
+ *
+ * Protobuf enum {@code google.devtools.artifactregistry.v1.Repository.Mode}
+ */
+ public enum Mode implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ *
+ * Unspecified mode.
+ *
+ *
+ * MODE_UNSPECIFIED = 0;
+ */
+ MODE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ *
+ * A standard repository storing artifacts.
+ *
+ *
+ * STANDARD_REPOSITORY = 1;
+ */
+ STANDARD_REPOSITORY(1),
+ /**
+ *
+ *
+ *
+ * A virtual repository to serve artifacts from one or more sources.
+ *
+ *
+ * VIRTUAL_REPOSITORY = 2;
+ */
+ VIRTUAL_REPOSITORY(2),
+ /**
+ *
+ *
+ *
+ * A remote repository to serve artifacts from a remote source.
+ *
+ *
+ * REMOTE_REPOSITORY = 3;
+ */
+ REMOTE_REPOSITORY(3),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Unspecified mode.
+ *
+ *
+ * MODE_UNSPECIFIED = 0;
+ */
+ public static final int MODE_UNSPECIFIED_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * A standard repository storing artifacts.
+ *
+ *
+ * STANDARD_REPOSITORY = 1;
+ */
+ public static final int STANDARD_REPOSITORY_VALUE = 1;
+ /**
+ *
+ *
+ *
+ * A virtual repository to serve artifacts from one or more sources.
+ *
+ *
+ * VIRTUAL_REPOSITORY = 2;
+ */
+ public static final int VIRTUAL_REPOSITORY_VALUE = 2;
+ /**
+ *
+ *
+ *
+ * A remote repository to serve artifacts from a remote source.
+ *
+ *
+ * REMOTE_REPOSITORY = 3;
+ */
+ public static final int REMOTE_REPOSITORY_VALUE = 3;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static Mode valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static Mode forNumber(int value) {
+ switch (value) {
+ case 0:
+ return MODE_UNSPECIFIED;
+ case 1:
+ return STANDARD_REPOSITORY;
+ case 2:
+ return VIRTUAL_REPOSITORY;
+ case 3:
+ return REMOTE_REPOSITORY;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
+ return internalValueMap;
+ }
+
+ private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
+ new com.google.protobuf.Internal.EnumLiteMap() {
+ public Mode findValueByNumber(int number) {
+ return Mode.forNumber(number);
+ }
+ };
+
+ public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalStateException(
+ "Can't get the descriptor of an unrecognized enum value.");
+ }
+ return getDescriptor().getValues().get(ordinal());
+ }
+
+ public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
+ return getDescriptor();
+ }
+
+ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.Repository.getDescriptor()
+ .getEnumTypes()
+ .get(1);
+ }
+
+ private static final Mode[] VALUES = values();
+
+ public static Mode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+ if (desc.getType() != getDescriptor()) {
+ throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
+ }
+ if (desc.getIndex() == -1) {
+ return UNRECOGNIZED;
+ }
+ return VALUES[desc.getIndex()];
+ }
+
+ private final int value;
+
+ private Mode(int value) {
+ this.value = value;
+ }
+
+ // @@protoc_insertion_point(enum_scope:google.devtools.artifactregistry.v1.Repository.Mode)
+ }
+
public interface MavenRepositoryConfigOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig)
@@ -1275,1439 +1504,4002 @@ public com.google.protobuf.Parser getParserForType() {
}
}
- private int formatConfigCase_ = 0;
-
- @SuppressWarnings("serial")
- private java.lang.Object formatConfig_;
-
- public enum FormatConfigCase
- implements
- com.google.protobuf.Internal.EnumLite,
- com.google.protobuf.AbstractMessage.InternalOneOfEnum {
- MAVEN_CONFIG(9),
- FORMATCONFIG_NOT_SET(0);
- private final int value;
+ public interface DockerRepositoryConfigOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig)
+ com.google.protobuf.MessageOrBuilder {
- private FormatConfigCase(int value) {
- this.value = value;
- }
/**
- * @param value The number of the enum to look for.
- * @return The enum associated with the given number.
- * @deprecated Use {@link #forNumber(int)} instead.
+ *
+ *
+ *
+ * The repository which enabled this flag prevents all tags from being
+ * modified, moved or deleted. This does not prevent tags from being
+ * created.
+ *
+ *
+ * bool immutable_tags = 1;
+ *
+ * @return The immutableTags.
*/
- @java.lang.Deprecated
- public static FormatConfigCase valueOf(int value) {
- return forNumber(value);
- }
-
- public static FormatConfigCase forNumber(int value) {
- switch (value) {
- case 9:
- return MAVEN_CONFIG;
- case 0:
- return FORMATCONFIG_NOT_SET;
- default:
- return null;
- }
- }
-
- public int getNumber() {
- return this.value;
- }
- };
-
- public FormatConfigCase getFormatConfigCase() {
- return FormatConfigCase.forNumber(formatConfigCase_);
- }
-
- public static final int MAVEN_CONFIG_FIELD_NUMBER = 9;
- /**
- *
- *
- *
- * Maven repository config contains repository level configuration
- * for the repositories of maven type.
- *
- *
- * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9;
- *
- *
- * @return Whether the mavenConfig field is set.
- */
- @java.lang.Override
- public boolean hasMavenConfig() {
- return formatConfigCase_ == 9;
+ boolean getImmutableTags();
}
/**
*
*
*
- * Maven repository config contains repository level configuration
- * for the repositories of maven type.
+ * DockerRepositoryConfig is docker related repository details.
+ * Provides additional configuration details for repositories of the docker
+ * format type.
*
*
- * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9;
- *
- *
- * @return The mavenConfig.
+ * Protobuf type {@code google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig}
*/
- @java.lang.Override
- public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig getMavenConfig() {
- if (formatConfigCase_ == 9) {
- return (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig)
- formatConfig_;
+ public static final class DockerRepositoryConfig extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig)
+ DockerRepositoryConfigOrBuilder {
+ private static final long serialVersionUID = 0L;
+ // Use DockerRepositoryConfig.newBuilder() to construct.
+ private DockerRepositoryConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
}
- return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig
- .getDefaultInstance();
- }
- /**
- *
- *
- *
- * Maven repository config contains repository level configuration
- * for the repositories of maven type.
- *
- *
- * .google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig maven_config = 9;
- *
- */
- @java.lang.Override
- public com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfigOrBuilder
- getMavenConfigOrBuilder() {
- if (formatConfigCase_ == 9) {
- return (com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig)
- formatConfig_;
+
+ private DockerRepositoryConfig() {}
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
+ return new DockerRepositoryConfig();
}
- return com.google.devtools.artifactregistry.v1.Repository.MavenRepositoryConfig
- .getDefaultInstance();
- }
- public static final int NAME_FIELD_NUMBER = 1;
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_descriptor;
+ }
- @SuppressWarnings("serial")
- private volatile java.lang.Object name_ = "";
- /**
- *
- *
- *
- * The name of the repository, for example:
- * "projects/p1/locations/us-central1/repositories/repo1".
- *
- *
- * string name = 1;
- *
- * @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;
+ @java.lang.Override
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return com.google.devtools.artifactregistry.v1.RepositoryProto
+ .internal_static_google_devtools_artifactregistry_v1_Repository_DockerRepositoryConfig_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.class,
+ com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig.Builder
+ .class);
}
- }
- /**
- *
- *
- *
- * The name of the repository, for example:
- * "projects/p1/locations/us-central1/repositories/repo1".
- *
- *
- * string name = 1;
- *
- * @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 IMMUTABLE_TAGS_FIELD_NUMBER = 1;
+ private boolean immutableTags_ = false;
+ /**
+ *
+ *
+ *
+ * The repository which enabled this flag prevents all tags from being
+ * modified, moved or deleted. This does not prevent tags from being
+ * created.
+ *
+ *
+ * bool immutable_tags = 1;
+ *
+ * @return The immutableTags.
+ */
+ @java.lang.Override
+ public boolean getImmutableTags() {
+ return immutableTags_;
}
- }
- public static final int FORMAT_FIELD_NUMBER = 2;
- private int format_ = 0;
- /**
- *
- *
- *
- * The format of packages that are stored in the repository.
- *
- *
- * .google.devtools.artifactregistry.v1.Repository.Format format = 2;
- *
- * @return The enum numeric value on the wire for format.
- */
- @java.lang.Override
- public int getFormatValue() {
- return format_;
- }
- /**
- *
- *
- *
- * The format of packages that are stored in the repository.
- *
- *
- * .google.devtools.artifactregistry.v1.Repository.Format format = 2;
- *
- * @return The format.
- */
- @java.lang.Override
- public com.google.devtools.artifactregistry.v1.Repository.Format getFormat() {
- com.google.devtools.artifactregistry.v1.Repository.Format result =
- com.google.devtools.artifactregistry.v1.Repository.Format.forNumber(format_);
- return result == null
- ? com.google.devtools.artifactregistry.v1.Repository.Format.UNRECOGNIZED
- : result;
- }
+ private byte memoizedIsInitialized = -1;
- public static final int DESCRIPTION_FIELD_NUMBER = 3;
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
- @SuppressWarnings("serial")
- private volatile java.lang.Object description_ = "";
- /**
- *
- *
- *
- * The user-provided description of the repository.
- *
- *
- * string description = 3;
- *
- * @return The description.
- */
- @java.lang.Override
- public java.lang.String getDescription() {
- java.lang.Object ref = description_;
- 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();
- description_ = s;
- return s;
+ memoizedIsInitialized = 1;
+ return true;
}
- }
- /**
- *
- *
- *
- * The user-provided description of the repository.
- *
- *
- * string description = 3;
- *
- * @return The bytes for description.
- */
- @java.lang.Override
- public com.google.protobuf.ByteString getDescriptionBytes() {
- java.lang.Object ref = description_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
- description_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (immutableTags_ != false) {
+ output.writeBool(1, immutableTags_);
+ }
+ getUnknownFields().writeTo(output);
}
- }
- public static final int LABELS_FIELD_NUMBER = 4;
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
- private static final class LabelsDefaultEntryHolder {
- static final com.google.protobuf.MapEntry defaultEntry =
- com.google.protobuf.MapEntry.newDefaultInstance(
- com.google.devtools.artifactregistry.v1.RepositoryProto
- .internal_static_google_devtools_artifactregistry_v1_Repository_LabelsEntry_descriptor,
- com.google.protobuf.WireFormat.FieldType.STRING,
- "",
- com.google.protobuf.WireFormat.FieldType.STRING,
- "");
- }
+ size = 0;
+ if (immutableTags_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, immutableTags_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
- @SuppressWarnings("serial")
- private com.google.protobuf.MapField labels_;
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj
+ instanceof com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig)) {
+ return super.equals(obj);
+ }
+ com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig other =
+ (com.google.devtools.artifactregistry.v1.Repository.DockerRepositoryConfig) obj;
- private com.google.protobuf.MapField internalGetLabels() {
- if (labels_ == null) {
- return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
+ if (getImmutableTags() != other.getImmutableTags()) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
}
- return labels_;
- }
- public int getLabelsCount() {
- return internalGetLabels().getMap().size();
- }
- /**
- *
- *
- *
- * Labels with user-defined metadata.
- * This field may contain up to 64 entries. Label keys and values may be no
- * longer than 63 characters. Label keys must begin with a lowercase letter
- * and may only contain lowercase letters, numeric characters, underscores,
- * and dashes.
- *
- *
- * map<string, string> labels = 4;
- */
- @java.lang.Override
- public boolean containsLabels(java.lang.String key) {
- if (key == null) {
- throw new NullPointerException("map key");
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + IMMUTABLE_TAGS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getImmutableTags());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
}
- return internalGetLabels().getMap().containsKey(key);
- }
- /** Use {@link #getLabelsMap()} instead. */
- @java.lang.Override
- @java.lang.Deprecated
- public java.util.Map getLabels() {
- return getLabelsMap();
- }
- /**
- *
- *
- *
- * Labels with user-defined metadata.
- * This field may contain up to 64 entries. Label keys and values may be no
- * longer than 63 characters. Label keys must begin with a lowercase letter
- * and may only contain lowercase letters, numeric characters, underscores,
- * and dashes.
- *
- *
- * map<string, string> labels = 4;
- */
- @java.lang.Override
- public java.util.Map getLabelsMap() {
- return internalGetLabels().getMap();
- }
- /**
- *
- *
- *