com.google.cloud.gkebackup.v1.VolumeRestore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-gke-backup-v1 Show documentation
Show all versions of proto-google-cloud-gke-backup-v1 Show documentation
Proto library for google-cloud-gke-backup
/*
* 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/volume.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.gkebackup.v1;
/**
*
*
*
* Represents the operation of restoring a volume from a VolumeBackup.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.VolumeRestore}
*/
public final class VolumeRestore extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.gkebackup.v1.VolumeRestore)
VolumeRestoreOrBuilder {
private static final long serialVersionUID = 0L;
// Use VolumeRestore.newBuilder() to construct.
private VolumeRestore(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private VolumeRestore() {
name_ = "";
uid_ = "";
volumeBackup_ = "";
volumeHandle_ = "";
volumeType_ = 0;
state_ = 0;
stateMessage_ = "";
etag_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new VolumeRestore();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.VolumeProto
.internal_static_google_cloud_gkebackup_v1_VolumeRestore_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.VolumeProto
.internal_static_google_cloud_gkebackup_v1_VolumeRestore_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.VolumeRestore.class,
com.google.cloud.gkebackup.v1.VolumeRestore.Builder.class);
}
/**
*
*
*
* Supported volume types.
*
*
* Protobuf enum {@code google.cloud.gkebackup.v1.VolumeRestore.VolumeType}
*/
public enum VolumeType implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* Default
*
*
* VOLUME_TYPE_UNSPECIFIED = 0;
*/
VOLUME_TYPE_UNSPECIFIED(0),
/**
*
*
*
* Compute Engine Persistent Disk volume
*
*
* GCE_PERSISTENT_DISK = 1;
*/
GCE_PERSISTENT_DISK(1),
UNRECOGNIZED(-1),
;
/**
*
*
*
* Default
*
*
* VOLUME_TYPE_UNSPECIFIED = 0;
*/
public static final int VOLUME_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Compute Engine Persistent Disk volume
*
*
* GCE_PERSISTENT_DISK = 1;
*/
public static final int GCE_PERSISTENT_DISK_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 VolumeType 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 VolumeType forNumber(int value) {
switch (value) {
case 0:
return VOLUME_TYPE_UNSPECIFIED;
case 1:
return GCE_PERSISTENT_DISK;
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 VolumeType findValueByNumber(int number) {
return VolumeType.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.cloud.gkebackup.v1.VolumeRestore.getDescriptor().getEnumTypes().get(0);
}
private static final VolumeType[] VALUES = values();
public static VolumeType 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 VolumeType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.gkebackup.v1.VolumeRestore.VolumeType)
}
/**
*
*
*
* The current state of a VolumeRestore
*
*
* Protobuf enum {@code google.cloud.gkebackup.v1.VolumeRestore.State}
*/
public enum State implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* This is an illegal state and should not be encountered.
*
*
* STATE_UNSPECIFIED = 0;
*/
STATE_UNSPECIFIED(0),
/**
*
*
*
* A volume for the restore was identified and restore process is about to
* start.
*
*
* CREATING = 1;
*/
CREATING(1),
/**
*
*
*
* The volume is currently being restored.
*
*
* RESTORING = 2;
*/
RESTORING(2),
/**
*
*
*
* The volume has been successfully restored.
*
*
* SUCCEEDED = 3;
*/
SUCCEEDED(3),
/**
*
*
*
* The volume restoration process failed.
*
*
* FAILED = 4;
*/
FAILED(4),
/**
*
*
*
* This VolumeRestore resource is in the process of being deleted.
*
*
* DELETING = 5;
*/
DELETING(5),
UNRECOGNIZED(-1),
;
/**
*
*
*
* This is an illegal state and should not be encountered.
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* A volume for the restore was identified and restore process is about to
* start.
*
*
* CREATING = 1;
*/
public static final int CREATING_VALUE = 1;
/**
*
*
*
* The volume is currently being restored.
*
*
* RESTORING = 2;
*/
public static final int RESTORING_VALUE = 2;
/**
*
*
*
* The volume has been successfully restored.
*
*
* SUCCEEDED = 3;
*/
public static final int SUCCEEDED_VALUE = 3;
/**
*
*
*
* The volume restoration process failed.
*
*
* FAILED = 4;
*/
public static final int FAILED_VALUE = 4;
/**
*
*
*
* This VolumeRestore resource is in the process of being deleted.
*
*
* DELETING = 5;
*/
public static final int DELETING_VALUE = 5;
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 State 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 State forNumber(int value) {
switch (value) {
case 0:
return STATE_UNSPECIFIED;
case 1:
return CREATING;
case 2:
return RESTORING;
case 3:
return SUCCEEDED;
case 4:
return FAILED;
case 5:
return DELETING;
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 State findValueByNumber(int number) {
return State.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.cloud.gkebackup.v1.VolumeRestore.getDescriptor().getEnumTypes().get(1);
}
private static final State[] VALUES = values();
public static State 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 State(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.gkebackup.v1.VolumeRestore.State)
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Output only. Full name of the VolumeRestore resource.
* Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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;
}
}
/**
*
*
*
* Output only. Full name of the VolumeRestore resource.
* Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @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 UID_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object uid_ = "";
/**
*
*
*
* Output only. Server generated global unique identifier of
* [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
*
*
* string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The uid.
*/
@java.lang.Override
public java.lang.String getUid() {
java.lang.Object ref = uid_;
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();
uid_ = s;
return s;
}
}
/**
*
*
*
* Output only. Server generated global unique identifier of
* [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
*
*
* string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for uid.
*/
@java.lang.Override
public com.google.protobuf.ByteString getUidBytes() {
java.lang.Object ref = uid_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
uid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATE_TIME_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp createTime_;
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the createTime field is set.
*/
@java.lang.Override
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The createTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreateTime() {
return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_;
}
public static final int UPDATE_TIME_FIELD_NUMBER = 4;
private com.google.protobuf.Timestamp updateTime_;
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the updateTime field is set.
*/
@java.lang.Override
public boolean hasUpdateTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The updateTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getUpdateTime() {
return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_;
}
public static final int VOLUME_BACKUP_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object volumeBackup_ = "";
/**
*
*
*
* Output only. The full name of the VolumeBackup from which the volume will
* be restored. Format:
* `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
*
*
* string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The volumeBackup.
*/
@java.lang.Override
public java.lang.String getVolumeBackup() {
java.lang.Object ref = volumeBackup_;
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();
volumeBackup_ = s;
return s;
}
}
/**
*
*
*
* Output only. The full name of the VolumeBackup from which the volume will
* be restored. Format:
* `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
*
*
* string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for volumeBackup.
*/
@java.lang.Override
public com.google.protobuf.ByteString getVolumeBackupBytes() {
java.lang.Object ref = volumeBackup_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
volumeBackup_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TARGET_PVC_FIELD_NUMBER = 6;
private com.google.cloud.gkebackup.v1.NamespacedName targetPvc_;
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the targetPvc field is set.
*/
@java.lang.Override
public boolean hasTargetPvc() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The targetPvc.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.NamespacedName getTargetPvc() {
return targetPvc_ == null
? com.google.cloud.gkebackup.v1.NamespacedName.getDefaultInstance()
: targetPvc_;
}
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.NamespacedNameOrBuilder getTargetPvcOrBuilder() {
return targetPvc_ == null
? com.google.cloud.gkebackup.v1.NamespacedName.getDefaultInstance()
: targetPvc_;
}
public static final int VOLUME_HANDLE_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private volatile java.lang.Object volumeHandle_ = "";
/**
*
*
*
* Output only. A storage system-specific opaque handler to the underlying
* volume created for the target PVC from the volume backup.
*
*
* string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The volumeHandle.
*/
@java.lang.Override
public java.lang.String getVolumeHandle() {
java.lang.Object ref = volumeHandle_;
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();
volumeHandle_ = s;
return s;
}
}
/**
*
*
*
* Output only. A storage system-specific opaque handler to the underlying
* volume created for the target PVC from the volume backup.
*
*
* string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for volumeHandle.
*/
@java.lang.Override
public com.google.protobuf.ByteString getVolumeHandleBytes() {
java.lang.Object ref = volumeHandle_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
volumeHandle_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VOLUME_TYPE_FIELD_NUMBER = 8;
private int volumeType_ = 0;
/**
*
*
*
* Output only. The type of volume provisioned
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for volumeType.
*/
@java.lang.Override
public int getVolumeTypeValue() {
return volumeType_;
}
/**
*
*
*
* Output only. The type of volume provisioned
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The volumeType.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.VolumeRestore.VolumeType getVolumeType() {
com.google.cloud.gkebackup.v1.VolumeRestore.VolumeType result =
com.google.cloud.gkebackup.v1.VolumeRestore.VolumeType.forNumber(volumeType_);
return result == null
? com.google.cloud.gkebackup.v1.VolumeRestore.VolumeType.UNRECOGNIZED
: result;
}
public static final int COMPLETE_TIME_FIELD_NUMBER = 9;
private com.google.protobuf.Timestamp completeTime_;
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the completeTime field is set.
*/
@java.lang.Override
public boolean hasCompleteTime() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The completeTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCompleteTime() {
return completeTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: completeTime_;
}
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder() {
return completeTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: completeTime_;
}
public static final int STATE_FIELD_NUMBER = 10;
private int state_ = 0;
/**
*
*
*
* Output only. The current state of this VolumeRestore.
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. The current state of this VolumeRestore.
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.VolumeRestore.State getState() {
com.google.cloud.gkebackup.v1.VolumeRestore.State result =
com.google.cloud.gkebackup.v1.VolumeRestore.State.forNumber(state_);
return result == null ? com.google.cloud.gkebackup.v1.VolumeRestore.State.UNRECOGNIZED : result;
}
public static final int STATE_MESSAGE_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private volatile java.lang.Object stateMessage_ = "";
/**
*
*
*
* Output only. A human readable message explaining why the VolumeRestore is
* in its current state.
*
*
* string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The stateMessage.
*/
@java.lang.Override
public java.lang.String getStateMessage() {
java.lang.Object ref = stateMessage_;
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();
stateMessage_ = s;
return s;
}
}
/**
*
*
*
* Output only. A human readable message explaining why the VolumeRestore is
* in its current state.
*
*
* string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for stateMessage.
*/
@java.lang.Override
public com.google.protobuf.ByteString getStateMessageBytes() {
java.lang.Object ref = stateMessage_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
stateMessage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ETAG_FIELD_NUMBER = 12;
@SuppressWarnings("serial")
private volatile java.lang.Object etag_ = "";
/**
*
*
*
* Output only. `etag` is used for optimistic concurrency control as a way to
* help prevent simultaneous updates of a volume restore from overwriting each
* other. It is strongly suggested that systems make use of the `etag` in the
* read-modify-write cycle to perform volume restore updates in order to avoid
* race conditions.
*
*
* string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The etag.
*/
@java.lang.Override
public java.lang.String getEtag() {
java.lang.Object ref = etag_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
etag_ = s;
return s;
}
}
/**
*
*
*
* Output only. `etag` is used for optimistic concurrency control as a way to
* help prevent simultaneous updates of a volume restore from overwriting each
* other. It is strongly suggested that systems make use of the `etag` in the
* read-modify-write cycle to perform volume restore updates in order to avoid
* race conditions.
*
*
* string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for etag.
*/
@java.lang.Override
public com.google.protobuf.ByteString getEtagBytes() {
java.lang.Object ref = etag_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
etag_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, uid_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(3, getCreateTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(4, getUpdateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volumeBackup_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, volumeBackup_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(6, getTargetPvc());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volumeHandle_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, volumeHandle_);
}
if (volumeType_
!= com.google.cloud.gkebackup.v1.VolumeRestore.VolumeType.VOLUME_TYPE_UNSPECIFIED
.getNumber()) {
output.writeEnum(8, volumeType_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(9, getCompleteTime());
}
if (state_ != com.google.cloud.gkebackup.v1.VolumeRestore.State.STATE_UNSPECIFIED.getNumber()) {
output.writeEnum(10, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, stateMessage_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, etag_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(uid_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, uid_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCreateTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volumeBackup_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, volumeBackup_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getTargetPvc());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(volumeHandle_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, volumeHandle_);
}
if (volumeType_
!= com.google.cloud.gkebackup.v1.VolumeRestore.VolumeType.VOLUME_TYPE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, volumeType_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getCompleteTime());
}
if (state_ != com.google.cloud.gkebackup.v1.VolumeRestore.State.STATE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, state_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stateMessage_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, stateMessage_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, etag_);
}
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.VolumeRestore)) {
return super.equals(obj);
}
com.google.cloud.gkebackup.v1.VolumeRestore other =
(com.google.cloud.gkebackup.v1.VolumeRestore) obj;
if (!getName().equals(other.getName())) return false;
if (!getUid().equals(other.getUid())) return false;
if (hasCreateTime() != other.hasCreateTime()) return false;
if (hasCreateTime()) {
if (!getCreateTime().equals(other.getCreateTime())) return false;
}
if (hasUpdateTime() != other.hasUpdateTime()) return false;
if (hasUpdateTime()) {
if (!getUpdateTime().equals(other.getUpdateTime())) return false;
}
if (!getVolumeBackup().equals(other.getVolumeBackup())) return false;
if (hasTargetPvc() != other.hasTargetPvc()) return false;
if (hasTargetPvc()) {
if (!getTargetPvc().equals(other.getTargetPvc())) return false;
}
if (!getVolumeHandle().equals(other.getVolumeHandle())) return false;
if (volumeType_ != other.volumeType_) return false;
if (hasCompleteTime() != other.hasCompleteTime()) return false;
if (hasCompleteTime()) {
if (!getCompleteTime().equals(other.getCompleteTime())) return false;
}
if (state_ != other.state_) return false;
if (!getStateMessage().equals(other.getStateMessage())) return false;
if (!getEtag().equals(other.getEtag())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + UID_FIELD_NUMBER;
hash = (53 * hash) + getUid().hashCode();
if (hasCreateTime()) {
hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCreateTime().hashCode();
}
if (hasUpdateTime()) {
hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getUpdateTime().hashCode();
}
hash = (37 * hash) + VOLUME_BACKUP_FIELD_NUMBER;
hash = (53 * hash) + getVolumeBackup().hashCode();
if (hasTargetPvc()) {
hash = (37 * hash) + TARGET_PVC_FIELD_NUMBER;
hash = (53 * hash) + getTargetPvc().hashCode();
}
hash = (37 * hash) + VOLUME_HANDLE_FIELD_NUMBER;
hash = (53 * hash) + getVolumeHandle().hashCode();
hash = (37 * hash) + VOLUME_TYPE_FIELD_NUMBER;
hash = (53 * hash) + volumeType_;
if (hasCompleteTime()) {
hash = (37 * hash) + COMPLETE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCompleteTime().hashCode();
}
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
hash = (37 * hash) + STATE_MESSAGE_FIELD_NUMBER;
hash = (53 * hash) + getStateMessage().hashCode();
hash = (37 * hash) + ETAG_FIELD_NUMBER;
hash = (53 * hash) + getEtag().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.gkebackup.v1.VolumeRestore parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.VolumeRestore 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.VolumeRestore parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.VolumeRestore 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.VolumeRestore parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.gkebackup.v1.VolumeRestore 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.VolumeRestore parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.VolumeRestore 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.VolumeRestore parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.gkebackup.v1.VolumeRestore 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.VolumeRestore 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.VolumeRestore 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.VolumeRestore 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;
}
/**
*
*
*
* Represents the operation of restoring a volume from a VolumeBackup.
*
*
* Protobuf type {@code google.cloud.gkebackup.v1.VolumeRestore}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.gkebackup.v1.VolumeRestore)
com.google.cloud.gkebackup.v1.VolumeRestoreOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.gkebackup.v1.VolumeProto
.internal_static_google_cloud_gkebackup_v1_VolumeRestore_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.gkebackup.v1.VolumeProto
.internal_static_google_cloud_gkebackup_v1_VolumeRestore_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.gkebackup.v1.VolumeRestore.class,
com.google.cloud.gkebackup.v1.VolumeRestore.Builder.class);
}
// Construct using com.google.cloud.gkebackup.v1.VolumeRestore.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getCreateTimeFieldBuilder();
getUpdateTimeFieldBuilder();
getTargetPvcFieldBuilder();
getCompleteTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
uid_ = "";
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
volumeBackup_ = "";
targetPvc_ = null;
if (targetPvcBuilder_ != null) {
targetPvcBuilder_.dispose();
targetPvcBuilder_ = null;
}
volumeHandle_ = "";
volumeType_ = 0;
completeTime_ = null;
if (completeTimeBuilder_ != null) {
completeTimeBuilder_.dispose();
completeTimeBuilder_ = null;
}
state_ = 0;
stateMessage_ = "";
etag_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.gkebackup.v1.VolumeProto
.internal_static_google_cloud_gkebackup_v1_VolumeRestore_descriptor;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.VolumeRestore getDefaultInstanceForType() {
return com.google.cloud.gkebackup.v1.VolumeRestore.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.VolumeRestore build() {
com.google.cloud.gkebackup.v1.VolumeRestore result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.gkebackup.v1.VolumeRestore buildPartial() {
com.google.cloud.gkebackup.v1.VolumeRestore result =
new com.google.cloud.gkebackup.v1.VolumeRestore(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.gkebackup.v1.VolumeRestore result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.uid_ = uid_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.volumeBackup_ = volumeBackup_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.targetPvc_ = targetPvcBuilder_ == null ? targetPvc_ : targetPvcBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.volumeHandle_ = volumeHandle_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.volumeType_ = volumeType_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.completeTime_ =
completeTimeBuilder_ == null ? completeTime_ : completeTimeBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.stateMessage_ = stateMessage_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.etag_ = etag_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.gkebackup.v1.VolumeRestore) {
return mergeFrom((com.google.cloud.gkebackup.v1.VolumeRestore) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.gkebackup.v1.VolumeRestore other) {
if (other == com.google.cloud.gkebackup.v1.VolumeRestore.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getUid().isEmpty()) {
uid_ = other.uid_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasCreateTime()) {
mergeCreateTime(other.getCreateTime());
}
if (other.hasUpdateTime()) {
mergeUpdateTime(other.getUpdateTime());
}
if (!other.getVolumeBackup().isEmpty()) {
volumeBackup_ = other.volumeBackup_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasTargetPvc()) {
mergeTargetPvc(other.getTargetPvc());
}
if (!other.getVolumeHandle().isEmpty()) {
volumeHandle_ = other.volumeHandle_;
bitField0_ |= 0x00000040;
onChanged();
}
if (other.volumeType_ != 0) {
setVolumeTypeValue(other.getVolumeTypeValue());
}
if (other.hasCompleteTime()) {
mergeCompleteTime(other.getCompleteTime());
}
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (!other.getStateMessage().isEmpty()) {
stateMessage_ = other.stateMessage_;
bitField0_ |= 0x00000400;
onChanged();
}
if (!other.getEtag().isEmpty()) {
etag_ = other.etag_;
bitField0_ |= 0x00000800;
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:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
uid_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
case 34:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
volumeBackup_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
input.readMessage(getTargetPvcFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 58:
{
volumeHandle_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 58
case 64:
{
volumeType_ = input.readEnum();
bitField0_ |= 0x00000080;
break;
} // case 64
case 74:
{
input.readMessage(getCompleteTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 74
case 80:
{
state_ = input.readEnum();
bitField0_ |= 0x00000200;
break;
} // case 80
case 90:
{
stateMessage_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000400;
break;
} // case 90
case 98:
{
etag_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000800;
break;
} // case 98
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* Output only. Full name of the VolumeRestore resource.
* Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. Full name of the VolumeRestore resource.
* Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. Full name of the VolumeRestore resource.
* Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. Full name of the VolumeRestore resource.
* Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Output only. Full name of the VolumeRestore resource.
* Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*`
*
*
* string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object uid_ = "";
/**
*
*
*
* Output only. Server generated global unique identifier of
* [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
*
*
* string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The uid.
*/
public java.lang.String getUid() {
java.lang.Object ref = uid_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
uid_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. Server generated global unique identifier of
* [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
*
*
* string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for uid.
*/
public com.google.protobuf.ByteString getUidBytes() {
java.lang.Object ref = uid_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
uid_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. Server generated global unique identifier of
* [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
*
*
* string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The uid to set.
* @return This builder for chaining.
*/
public Builder setUid(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
uid_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. Server generated global unique identifier of
* [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
*
*
* string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearUid() {
uid_ = getDefaultInstance().getUid();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Output only. Server generated global unique identifier of
* [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format.
*
*
* string uid = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for uid to set.
* @return This builder for chaining.
*/
public Builder setUidBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
uid_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
createTimeBuilder_;
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the createTime field is set.
*/
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The createTime.
*/
public com.google.protobuf.Timestamp getCreateTime() {
if (createTimeBuilder_ == null) {
return createTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: createTime_;
} else {
return createTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setCreateTime(com.google.protobuf.Timestamp value) {
if (createTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createTime_ = value;
} else {
createTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (createTimeBuilder_ == null) {
createTime_ = builderForValue.build();
} else {
createTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeCreateTime(com.google.protobuf.Timestamp value) {
if (createTimeBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& createTime_ != null
&& createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCreateTimeBuilder().mergeFrom(value);
} else {
createTime_ = value;
}
} else {
createTimeBuilder_.mergeFrom(value);
}
if (createTime_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearCreateTime() {
bitField0_ = (bitField0_ & ~0x00000004);
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getCreateTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() {
if (createTimeBuilder_ != null) {
return createTimeBuilder_.getMessageOrBuilder();
} else {
return createTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: createTime_;
}
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was
* created.
*
*
*
* .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getCreateTimeFieldBuilder() {
if (createTimeBuilder_ == null) {
createTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getCreateTime(), getParentForChildren(), isClean());
createTime_ = null;
}
return createTimeBuilder_;
}
private com.google.protobuf.Timestamp updateTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
updateTimeBuilder_;
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the updateTime field is set.
*/
public boolean hasUpdateTime() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The updateTime.
*/
public com.google.protobuf.Timestamp getUpdateTime() {
if (updateTimeBuilder_ == null) {
return updateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: updateTime_;
} else {
return updateTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setUpdateTime(com.google.protobuf.Timestamp value) {
if (updateTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
updateTime_ = value;
} else {
updateTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (updateTimeBuilder_ == null) {
updateTime_ = builderForValue.build();
} else {
updateTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) {
if (updateTimeBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& updateTime_ != null
&& updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getUpdateTimeBuilder().mergeFrom(value);
} else {
updateTime_ = value;
}
} else {
updateTimeBuilder_.mergeFrom(value);
}
if (updateTime_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearUpdateTime() {
bitField0_ = (bitField0_ & ~0x00000008);
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getUpdateTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() {
if (updateTimeBuilder_ != null) {
return updateTimeBuilder_.getMessageOrBuilder();
} else {
return updateTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: updateTime_;
}
}
/**
*
*
*
* Output only. The timestamp when this VolumeRestore resource was last
* updated.
*
*
*
* .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getUpdateTimeFieldBuilder() {
if (updateTimeBuilder_ == null) {
updateTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getUpdateTime(), getParentForChildren(), isClean());
updateTime_ = null;
}
return updateTimeBuilder_;
}
private java.lang.Object volumeBackup_ = "";
/**
*
*
*
* Output only. The full name of the VolumeBackup from which the volume will
* be restored. Format:
* `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
*
*
* string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The volumeBackup.
*/
public java.lang.String getVolumeBackup() {
java.lang.Object ref = volumeBackup_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
volumeBackup_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. The full name of the VolumeBackup from which the volume will
* be restored. Format:
* `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
*
*
* string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for volumeBackup.
*/
public com.google.protobuf.ByteString getVolumeBackupBytes() {
java.lang.Object ref = volumeBackup_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
volumeBackup_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. The full name of the VolumeBackup from which the volume will
* be restored. Format:
* `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
*
*
* string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The volumeBackup to set.
* @return This builder for chaining.
*/
public Builder setVolumeBackup(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
volumeBackup_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Output only. The full name of the VolumeBackup from which the volume will
* be restored. Format:
* `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
*
*
* string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearVolumeBackup() {
volumeBackup_ = getDefaultInstance().getVolumeBackup();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Output only. The full name of the VolumeBackup from which the volume will
* be restored. Format:
* `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`.
*
*
* string volume_backup = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for volumeBackup to set.
* @return This builder for chaining.
*/
public Builder setVolumeBackupBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
volumeBackup_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private com.google.cloud.gkebackup.v1.NamespacedName targetPvc_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.NamespacedName,
com.google.cloud.gkebackup.v1.NamespacedName.Builder,
com.google.cloud.gkebackup.v1.NamespacedNameOrBuilder>
targetPvcBuilder_;
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the targetPvc field is set.
*/
public boolean hasTargetPvc() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The targetPvc.
*/
public com.google.cloud.gkebackup.v1.NamespacedName getTargetPvc() {
if (targetPvcBuilder_ == null) {
return targetPvc_ == null
? com.google.cloud.gkebackup.v1.NamespacedName.getDefaultInstance()
: targetPvc_;
} else {
return targetPvcBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setTargetPvc(com.google.cloud.gkebackup.v1.NamespacedName value) {
if (targetPvcBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
targetPvc_ = value;
} else {
targetPvcBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setTargetPvc(
com.google.cloud.gkebackup.v1.NamespacedName.Builder builderForValue) {
if (targetPvcBuilder_ == null) {
targetPvc_ = builderForValue.build();
} else {
targetPvcBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeTargetPvc(com.google.cloud.gkebackup.v1.NamespacedName value) {
if (targetPvcBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& targetPvc_ != null
&& targetPvc_ != com.google.cloud.gkebackup.v1.NamespacedName.getDefaultInstance()) {
getTargetPvcBuilder().mergeFrom(value);
} else {
targetPvc_ = value;
}
} else {
targetPvcBuilder_.mergeFrom(value);
}
if (targetPvc_ != null) {
bitField0_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearTargetPvc() {
bitField0_ = (bitField0_ & ~0x00000020);
targetPvc_ = null;
if (targetPvcBuilder_ != null) {
targetPvcBuilder_.dispose();
targetPvcBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.gkebackup.v1.NamespacedName.Builder getTargetPvcBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getTargetPvcFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.cloud.gkebackup.v1.NamespacedNameOrBuilder getTargetPvcOrBuilder() {
if (targetPvcBuilder_ != null) {
return targetPvcBuilder_.getMessageOrBuilder();
} else {
return targetPvc_ == null
? com.google.cloud.gkebackup.v1.NamespacedName.getDefaultInstance()
: targetPvc_;
}
}
/**
*
*
*
* Output only. The reference to the target Kubernetes PVC to be restored.
*
*
*
* .google.cloud.gkebackup.v1.NamespacedName target_pvc = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.NamespacedName,
com.google.cloud.gkebackup.v1.NamespacedName.Builder,
com.google.cloud.gkebackup.v1.NamespacedNameOrBuilder>
getTargetPvcFieldBuilder() {
if (targetPvcBuilder_ == null) {
targetPvcBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.gkebackup.v1.NamespacedName,
com.google.cloud.gkebackup.v1.NamespacedName.Builder,
com.google.cloud.gkebackup.v1.NamespacedNameOrBuilder>(
getTargetPvc(), getParentForChildren(), isClean());
targetPvc_ = null;
}
return targetPvcBuilder_;
}
private java.lang.Object volumeHandle_ = "";
/**
*
*
*
* Output only. A storage system-specific opaque handler to the underlying
* volume created for the target PVC from the volume backup.
*
*
* string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The volumeHandle.
*/
public java.lang.String getVolumeHandle() {
java.lang.Object ref = volumeHandle_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
volumeHandle_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. A storage system-specific opaque handler to the underlying
* volume created for the target PVC from the volume backup.
*
*
* string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for volumeHandle.
*/
public com.google.protobuf.ByteString getVolumeHandleBytes() {
java.lang.Object ref = volumeHandle_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
volumeHandle_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. A storage system-specific opaque handler to the underlying
* volume created for the target PVC from the volume backup.
*
*
* string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The volumeHandle to set.
* @return This builder for chaining.
*/
public Builder setVolumeHandle(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
volumeHandle_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Output only. A storage system-specific opaque handler to the underlying
* volume created for the target PVC from the volume backup.
*
*
* string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearVolumeHandle() {
volumeHandle_ = getDefaultInstance().getVolumeHandle();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
*
*
* Output only. A storage system-specific opaque handler to the underlying
* volume created for the target PVC from the volume backup.
*
*
* string volume_handle = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for volumeHandle to set.
* @return This builder for chaining.
*/
public Builder setVolumeHandleBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
volumeHandle_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private int volumeType_ = 0;
/**
*
*
*
* Output only. The type of volume provisioned
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for volumeType.
*/
@java.lang.Override
public int getVolumeTypeValue() {
return volumeType_;
}
/**
*
*
*
* Output only. The type of volume provisioned
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for volumeType to set.
* @return This builder for chaining.
*/
public Builder setVolumeTypeValue(int value) {
volumeType_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Output only. The type of volume provisioned
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The volumeType.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.VolumeRestore.VolumeType getVolumeType() {
com.google.cloud.gkebackup.v1.VolumeRestore.VolumeType result =
com.google.cloud.gkebackup.v1.VolumeRestore.VolumeType.forNumber(volumeType_);
return result == null
? com.google.cloud.gkebackup.v1.VolumeRestore.VolumeType.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. The type of volume provisioned
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The volumeType to set.
* @return This builder for chaining.
*/
public Builder setVolumeType(com.google.cloud.gkebackup.v1.VolumeRestore.VolumeType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000080;
volumeType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. The type of volume provisioned
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.VolumeType volume_type = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearVolumeType() {
bitField0_ = (bitField0_ & ~0x00000080);
volumeType_ = 0;
onChanged();
return this;
}
private com.google.protobuf.Timestamp completeTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
completeTimeBuilder_;
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the completeTime field is set.
*/
public boolean hasCompleteTime() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The completeTime.
*/
public com.google.protobuf.Timestamp getCompleteTime() {
if (completeTimeBuilder_ == null) {
return completeTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: completeTime_;
} else {
return completeTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setCompleteTime(com.google.protobuf.Timestamp value) {
if (completeTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
completeTime_ = value;
} else {
completeTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setCompleteTime(com.google.protobuf.Timestamp.Builder builderForValue) {
if (completeTimeBuilder_ == null) {
completeTime_ = builderForValue.build();
} else {
completeTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeCompleteTime(com.google.protobuf.Timestamp value) {
if (completeTimeBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0)
&& completeTime_ != null
&& completeTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
getCompleteTimeBuilder().mergeFrom(value);
} else {
completeTime_ = value;
}
} else {
completeTimeBuilder_.mergeFrom(value);
}
if (completeTime_ != null) {
bitField0_ |= 0x00000100;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearCompleteTime() {
bitField0_ = (bitField0_ & ~0x00000100);
completeTime_ = null;
if (completeTimeBuilder_ != null) {
completeTimeBuilder_.dispose();
completeTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getCompleteTimeBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getCompleteTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder getCompleteTimeOrBuilder() {
if (completeTimeBuilder_ != null) {
return completeTimeBuilder_.getMessageOrBuilder();
} else {
return completeTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: completeTime_;
}
}
/**
*
*
*
* Output only. The timestamp when the associated underlying volume
* restoration completed.
*
*
*
* .google.protobuf.Timestamp complete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getCompleteTimeFieldBuilder() {
if (completeTimeBuilder_ == null) {
completeTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getCompleteTime(), getParentForChildren(), isClean());
completeTime_ = null;
}
return completeTimeBuilder_;
}
private int state_ = 0;
/**
*
*
*
* Output only. The current state of this VolumeRestore.
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. The current state of this VolumeRestore.
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Output only. The current state of this VolumeRestore.
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.gkebackup.v1.VolumeRestore.State getState() {
com.google.cloud.gkebackup.v1.VolumeRestore.State result =
com.google.cloud.gkebackup.v1.VolumeRestore.State.forNumber(state_);
return result == null
? com.google.cloud.gkebackup.v1.VolumeRestore.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. The current state of this VolumeRestore.
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.gkebackup.v1.VolumeRestore.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000200;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. The current state of this VolumeRestore.
*
*
*
* .google.cloud.gkebackup.v1.VolumeRestore.State state = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearState() {
bitField0_ = (bitField0_ & ~0x00000200);
state_ = 0;
onChanged();
return this;
}
private java.lang.Object stateMessage_ = "";
/**
*
*
*
* Output only. A human readable message explaining why the VolumeRestore is
* in its current state.
*
*
* string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The stateMessage.
*/
public java.lang.String getStateMessage() {
java.lang.Object ref = stateMessage_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
stateMessage_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. A human readable message explaining why the VolumeRestore is
* in its current state.
*
*
* string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for stateMessage.
*/
public com.google.protobuf.ByteString getStateMessageBytes() {
java.lang.Object ref = stateMessage_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
stateMessage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. A human readable message explaining why the VolumeRestore is
* in its current state.
*
*
* string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The stateMessage to set.
* @return This builder for chaining.
*/
public Builder setStateMessage(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
stateMessage_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* Output only. A human readable message explaining why the VolumeRestore is
* in its current state.
*
*
* string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearStateMessage() {
stateMessage_ = getDefaultInstance().getStateMessage();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
/**
*
*
*
* Output only. A human readable message explaining why the VolumeRestore is
* in its current state.
*
*
* string state_message = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for stateMessage to set.
* @return This builder for chaining.
*/
public Builder setStateMessageBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
stateMessage_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
private java.lang.Object etag_ = "";
/**
*
*
*
* Output only. `etag` is used for optimistic concurrency control as a way to
* help prevent simultaneous updates of a volume restore from overwriting each
* other. It is strongly suggested that systems make use of the `etag` in the
* read-modify-write cycle to perform volume restore updates in order to avoid
* race conditions.
*
*
* string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The etag.
*/
public java.lang.String getEtag() {
java.lang.Object ref = etag_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
etag_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. `etag` is used for optimistic concurrency control as a way to
* help prevent simultaneous updates of a volume restore from overwriting each
* other. It is strongly suggested that systems make use of the `etag` in the
* read-modify-write cycle to perform volume restore updates in order to avoid
* race conditions.
*
*
* string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for etag.
*/
public com.google.protobuf.ByteString getEtagBytes() {
java.lang.Object ref = etag_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
etag_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. `etag` is used for optimistic concurrency control as a way to
* help prevent simultaneous updates of a volume restore from overwriting each
* other. It is strongly suggested that systems make use of the `etag` in the
* read-modify-write cycle to perform volume restore updates in order to avoid
* race conditions.
*
*
* string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The etag to set.
* @return This builder for chaining.
*/
public Builder setEtag(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
etag_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* Output only. `etag` is used for optimistic concurrency control as a way to
* help prevent simultaneous updates of a volume restore from overwriting each
* other. It is strongly suggested that systems make use of the `etag` in the
* read-modify-write cycle to perform volume restore updates in order to avoid
* race conditions.
*
*
* string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearEtag() {
etag_ = getDefaultInstance().getEtag();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
return this;
}
/**
*
*
*
* Output only. `etag` is used for optimistic concurrency control as a way to
* help prevent simultaneous updates of a volume restore from overwriting each
* other. It is strongly suggested that systems make use of the `etag` in the
* read-modify-write cycle to perform volume restore updates in order to avoid
* race conditions.
*
*
* string etag = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for etag to set.
* @return This builder for chaining.
*/
public Builder setEtagBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
etag_ = value;
bitField0_ |= 0x00000800;
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.cloud.gkebackup.v1.VolumeRestore)
}
// @@protoc_insertion_point(class_scope:google.cloud.gkebackup.v1.VolumeRestore)
private static final com.google.cloud.gkebackup.v1.VolumeRestore DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.gkebackup.v1.VolumeRestore();
}
public static com.google.cloud.gkebackup.v1.VolumeRestore getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public VolumeRestore 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.VolumeRestore getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy