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

com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride Maven / Gradle / Ivy

There is a newer version: 0.54.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/gkebackup/v1/restore.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.gkebackup.v1;

/**
 *
 *
 * 
 * Defines an override to apply a VolumeDataRestorePolicy for scoped resources.
 * 
* * Protobuf type {@code google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride} */ public final class VolumeDataRestorePolicyOverride extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride) VolumeDataRestorePolicyOverrideOrBuilder { private static final long serialVersionUID = 0L; // Use VolumeDataRestorePolicyOverride.newBuilder() to construct. private VolumeDataRestorePolicyOverride( com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private VolumeDataRestorePolicyOverride() { policy_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new VolumeDataRestorePolicyOverride(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gkebackup.v1.RestoreProto .internal_static_google_cloud_gkebackup_v1_VolumeDataRestorePolicyOverride_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.gkebackup.v1.RestoreProto .internal_static_google_cloud_gkebackup_v1_VolumeDataRestorePolicyOverride_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride.class, com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride.Builder.class); } private int scopeCase_ = 0; @SuppressWarnings("serial") private java.lang.Object scope_; public enum ScopeCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { SELECTED_PVCS(2), SCOPE_NOT_SET(0); private final int value; private ScopeCase(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 ScopeCase valueOf(int value) { return forNumber(value); } public static ScopeCase forNumber(int value) { switch (value) { case 2: return SELECTED_PVCS; case 0: return SCOPE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ScopeCase getScopeCase() { return ScopeCase.forNumber(scopeCase_); } public static final int POLICY_FIELD_NUMBER = 1; private int policy_ = 0; /** * * *
   * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
   * scope.
   * 
* * * .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for policy. */ @java.lang.Override public int getPolicyValue() { return policy_; } /** * * *
   * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
   * scope.
   * 
* * * .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The policy. */ @java.lang.Override public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy getPolicy() { com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy result = com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.forNumber(policy_); return result == null ? com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.UNRECOGNIZED : result; } public static final int SELECTED_PVCS_FIELD_NUMBER = 2; /** * * *
   * A list of PVCs to apply the policy override to.
   * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; * * @return Whether the selectedPvcs field is set. */ @java.lang.Override public boolean hasSelectedPvcs() { return scopeCase_ == 2; } /** * * *
   * A list of PVCs to apply the policy override to.
   * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; * * @return The selectedPvcs. */ @java.lang.Override public com.google.cloud.gkebackup.v1.NamespacedNames getSelectedPvcs() { if (scopeCase_ == 2) { return (com.google.cloud.gkebackup.v1.NamespacedNames) scope_; } return com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance(); } /** * * *
   * A list of PVCs to apply the policy override to.
   * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; */ @java.lang.Override public com.google.cloud.gkebackup.v1.NamespacedNamesOrBuilder getSelectedPvcsOrBuilder() { if (scopeCase_ == 2) { return (com.google.cloud.gkebackup.v1.NamespacedNames) scope_; } return com.google.cloud.gkebackup.v1.NamespacedNames.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 (policy_ != com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy .VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED .getNumber()) { output.writeEnum(1, policy_); } if (scopeCase_ == 2) { output.writeMessage(2, (com.google.cloud.gkebackup.v1.NamespacedNames) scope_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (policy_ != com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy .VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, policy_); } if (scopeCase_ == 2) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.cloud.gkebackup.v1.NamespacedNames) scope_); } 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.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride)) { return super.equals(obj); } com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride other = (com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride) obj; if (policy_ != other.policy_) return false; if (!getScopeCase().equals(other.getScopeCase())) return false; switch (scopeCase_) { case 2: if (!getSelectedPvcs().equals(other.getSelectedPvcs())) 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) + POLICY_FIELD_NUMBER; hash = (53 * hash) + policy_; switch (scopeCase_) { case 2: hash = (37 * hash) + SELECTED_PVCS_FIELD_NUMBER; hash = (53 * hash) + getSelectedPvcs().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride 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.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride 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.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride 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.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride 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.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride 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; } /** * * *
   * Defines an override to apply a VolumeDataRestorePolicy for scoped resources.
   * 
* * Protobuf type {@code google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride) com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverrideOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.gkebackup.v1.RestoreProto .internal_static_google_cloud_gkebackup_v1_VolumeDataRestorePolicyOverride_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.gkebackup.v1.RestoreProto .internal_static_google_cloud_gkebackup_v1_VolumeDataRestorePolicyOverride_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride.class, com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride.Builder.class); } // Construct using com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; policy_ = 0; if (selectedPvcsBuilder_ != null) { selectedPvcsBuilder_.clear(); } scopeCase_ = 0; scope_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.gkebackup.v1.RestoreProto .internal_static_google_cloud_gkebackup_v1_VolumeDataRestorePolicyOverride_descriptor; } @java.lang.Override public com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride getDefaultInstanceForType() { return com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride.getDefaultInstance(); } @java.lang.Override public com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride build() { com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride buildPartial() { com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride result = new com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0( com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.policy_ = policy_; } } private void buildPartialOneofs( com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride result) { result.scopeCase_ = scopeCase_; result.scope_ = this.scope_; if (scopeCase_ == 2 && selectedPvcsBuilder_ != null) { result.scope_ = selectedPvcsBuilder_.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.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride) { return mergeFrom((com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride other) { if (other == com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride.getDefaultInstance()) return this; if (other.policy_ != 0) { setPolicyValue(other.getPolicyValue()); } switch (other.getScopeCase()) { case SELECTED_PVCS: { mergeSelectedPvcs(other.getSelectedPvcs()); break; } case SCOPE_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: { policy_ = input.readEnum(); bitField0_ |= 0x00000001; break; } // case 8 case 18: { input.readMessage(getSelectedPvcsFieldBuilder().getBuilder(), extensionRegistry); scopeCase_ = 2; 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 scopeCase_ = 0; private java.lang.Object scope_; public ScopeCase getScopeCase() { return ScopeCase.forNumber(scopeCase_); } public Builder clearScope() { scopeCase_ = 0; scope_ = null; onChanged(); return this; } private int bitField0_; private int policy_ = 0; /** * * *
     * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
     * scope.
     * 
* * * .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for policy. */ @java.lang.Override public int getPolicyValue() { return policy_; } /** * * *
     * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
     * scope.
     * 
* * * .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The enum numeric value on the wire for policy to set. * @return This builder for chaining. */ public Builder setPolicyValue(int value) { policy_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * * *
     * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
     * scope.
     * 
* * * .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return The policy. */ @java.lang.Override public com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy getPolicy() { com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy result = com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.forNumber(policy_); return result == null ? com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy.UNRECOGNIZED : result; } /** * * *
     * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
     * scope.
     * 
* * * .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The policy to set. * @return This builder for chaining. */ public Builder setPolicy( com.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; policy_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Required. The VolumeDataRestorePolicy to apply when restoring volumes in
     * scope.
     * 
* * * .google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy policy = 1 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearPolicy() { bitField0_ = (bitField0_ & ~0x00000001); policy_ = 0; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.gkebackup.v1.NamespacedNames, com.google.cloud.gkebackup.v1.NamespacedNames.Builder, com.google.cloud.gkebackup.v1.NamespacedNamesOrBuilder> selectedPvcsBuilder_; /** * * *
     * A list of PVCs to apply the policy override to.
     * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; * * @return Whether the selectedPvcs field is set. */ @java.lang.Override public boolean hasSelectedPvcs() { return scopeCase_ == 2; } /** * * *
     * A list of PVCs to apply the policy override to.
     * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; * * @return The selectedPvcs. */ @java.lang.Override public com.google.cloud.gkebackup.v1.NamespacedNames getSelectedPvcs() { if (selectedPvcsBuilder_ == null) { if (scopeCase_ == 2) { return (com.google.cloud.gkebackup.v1.NamespacedNames) scope_; } return com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance(); } else { if (scopeCase_ == 2) { return selectedPvcsBuilder_.getMessage(); } return com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance(); } } /** * * *
     * A list of PVCs to apply the policy override to.
     * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; */ public Builder setSelectedPvcs(com.google.cloud.gkebackup.v1.NamespacedNames value) { if (selectedPvcsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } scope_ = value; onChanged(); } else { selectedPvcsBuilder_.setMessage(value); } scopeCase_ = 2; return this; } /** * * *
     * A list of PVCs to apply the policy override to.
     * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; */ public Builder setSelectedPvcs( com.google.cloud.gkebackup.v1.NamespacedNames.Builder builderForValue) { if (selectedPvcsBuilder_ == null) { scope_ = builderForValue.build(); onChanged(); } else { selectedPvcsBuilder_.setMessage(builderForValue.build()); } scopeCase_ = 2; return this; } /** * * *
     * A list of PVCs to apply the policy override to.
     * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; */ public Builder mergeSelectedPvcs(com.google.cloud.gkebackup.v1.NamespacedNames value) { if (selectedPvcsBuilder_ == null) { if (scopeCase_ == 2 && scope_ != com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance()) { scope_ = com.google.cloud.gkebackup.v1.NamespacedNames.newBuilder( (com.google.cloud.gkebackup.v1.NamespacedNames) scope_) .mergeFrom(value) .buildPartial(); } else { scope_ = value; } onChanged(); } else { if (scopeCase_ == 2) { selectedPvcsBuilder_.mergeFrom(value); } else { selectedPvcsBuilder_.setMessage(value); } } scopeCase_ = 2; return this; } /** * * *
     * A list of PVCs to apply the policy override to.
     * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; */ public Builder clearSelectedPvcs() { if (selectedPvcsBuilder_ == null) { if (scopeCase_ == 2) { scopeCase_ = 0; scope_ = null; onChanged(); } } else { if (scopeCase_ == 2) { scopeCase_ = 0; scope_ = null; } selectedPvcsBuilder_.clear(); } return this; } /** * * *
     * A list of PVCs to apply the policy override to.
     * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; */ public com.google.cloud.gkebackup.v1.NamespacedNames.Builder getSelectedPvcsBuilder() { return getSelectedPvcsFieldBuilder().getBuilder(); } /** * * *
     * A list of PVCs to apply the policy override to.
     * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; */ @java.lang.Override public com.google.cloud.gkebackup.v1.NamespacedNamesOrBuilder getSelectedPvcsOrBuilder() { if ((scopeCase_ == 2) && (selectedPvcsBuilder_ != null)) { return selectedPvcsBuilder_.getMessageOrBuilder(); } else { if (scopeCase_ == 2) { return (com.google.cloud.gkebackup.v1.NamespacedNames) scope_; } return com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance(); } } /** * * *
     * A list of PVCs to apply the policy override to.
     * 
* * .google.cloud.gkebackup.v1.NamespacedNames selected_pvcs = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.gkebackup.v1.NamespacedNames, com.google.cloud.gkebackup.v1.NamespacedNames.Builder, com.google.cloud.gkebackup.v1.NamespacedNamesOrBuilder> getSelectedPvcsFieldBuilder() { if (selectedPvcsBuilder_ == null) { if (!(scopeCase_ == 2)) { scope_ = com.google.cloud.gkebackup.v1.NamespacedNames.getDefaultInstance(); } selectedPvcsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.gkebackup.v1.NamespacedNames, com.google.cloud.gkebackup.v1.NamespacedNames.Builder, com.google.cloud.gkebackup.v1.NamespacedNamesOrBuilder>( (com.google.cloud.gkebackup.v1.NamespacedNames) scope_, getParentForChildren(), isClean()); scope_ = null; } scopeCase_ = 2; onChanged(); return selectedPvcsBuilder_; } @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.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride) } // @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride) private static final com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride(); } public static com.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public VolumeDataRestorePolicyOverride 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.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy