com.google.cloud.backupdr.v1.RuleConfigInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-backupdr-v1 Show documentation
Show all versions of proto-google-cloud-backupdr-v1 Show documentation
Proto library for google-cloud-backupdr
/*
* 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/backupdr/v1/backupplanassociation.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.backupdr.v1;
/**
*
*
*
* Message for rules config info.
*
*
* Protobuf type {@code google.cloud.backupdr.v1.RuleConfigInfo}
*/
public final class RuleConfigInfo extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.backupdr.v1.RuleConfigInfo)
RuleConfigInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use RuleConfigInfo.newBuilder() to construct.
private RuleConfigInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RuleConfigInfo() {
ruleId_ = "";
lastBackupState_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new RuleConfigInfo();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.backupdr.v1.BackupPlanAssociationProto
.internal_static_google_cloud_backupdr_v1_RuleConfigInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.backupdr.v1.BackupPlanAssociationProto
.internal_static_google_cloud_backupdr_v1_RuleConfigInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.backupdr.v1.RuleConfigInfo.class,
com.google.cloud.backupdr.v1.RuleConfigInfo.Builder.class);
}
/**
*
*
*
* Enum for LastBackupState
*
*
* Protobuf enum {@code google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState}
*/
public enum LastBackupState implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* State not set.
*
*
* LAST_BACKUP_STATE_UNSPECIFIED = 0;
*/
LAST_BACKUP_STATE_UNSPECIFIED(0),
/**
*
*
*
* The first backup is pending.
*
*
* FIRST_BACKUP_PENDING = 1;
*/
FIRST_BACKUP_PENDING(1),
/**
*
*
*
* The most recent backup could not be run/failed because of the lack of
* permissions.
*
*
* PERMISSION_DENIED = 2;
*/
PERMISSION_DENIED(2),
/**
*
*
*
* The last backup operation succeeded.
*
*
* SUCCEEDED = 3;
*/
SUCCEEDED(3),
/**
*
*
*
* The last backup operation failed.
*
*
* FAILED = 4;
*/
FAILED(4),
UNRECOGNIZED(-1),
;
/**
*
*
*
* State not set.
*
*
* LAST_BACKUP_STATE_UNSPECIFIED = 0;
*/
public static final int LAST_BACKUP_STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The first backup is pending.
*
*
* FIRST_BACKUP_PENDING = 1;
*/
public static final int FIRST_BACKUP_PENDING_VALUE = 1;
/**
*
*
*
* The most recent backup could not be run/failed because of the lack of
* permissions.
*
*
* PERMISSION_DENIED = 2;
*/
public static final int PERMISSION_DENIED_VALUE = 2;
/**
*
*
*
* The last backup operation succeeded.
*
*
* SUCCEEDED = 3;
*/
public static final int SUCCEEDED_VALUE = 3;
/**
*
*
*
* The last backup operation failed.
*
*
* FAILED = 4;
*/
public static final int FAILED_VALUE = 4;
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 LastBackupState 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 LastBackupState forNumber(int value) {
switch (value) {
case 0:
return LAST_BACKUP_STATE_UNSPECIFIED;
case 1:
return FIRST_BACKUP_PENDING;
case 2:
return PERMISSION_DENIED;
case 3:
return SUCCEEDED;
case 4:
return FAILED;
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 LastBackupState findValueByNumber(int number) {
return LastBackupState.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.backupdr.v1.RuleConfigInfo.getDescriptor().getEnumTypes().get(0);
}
private static final LastBackupState[] VALUES = values();
public static LastBackupState 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 LastBackupState(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState)
}
private int bitField0_;
public static final int RULE_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object ruleId_ = "";
/**
*
*
*
* Output only. Output Only.
*
* Backup Rule id fetched from backup plan.
*
*
* string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The ruleId.
*/
@java.lang.Override
public java.lang.String getRuleId() {
java.lang.Object ref = ruleId_;
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();
ruleId_ = s;
return s;
}
}
/**
*
*
*
* Output only. Output Only.
*
* Backup Rule id fetched from backup plan.
*
*
* string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for ruleId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRuleIdBytes() {
java.lang.Object ref = ruleId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
ruleId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LAST_BACKUP_STATE_FIELD_NUMBER = 3;
private int lastBackupState_ = 0;
/**
*
*
*
* Output only. The last backup state for rule.
*
*
*
* .google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for lastBackupState.
*/
@java.lang.Override
public int getLastBackupStateValue() {
return lastBackupState_;
}
/**
*
*
*
* Output only. The last backup state for rule.
*
*
*
* .google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The lastBackupState.
*/
@java.lang.Override
public com.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState getLastBackupState() {
com.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState result =
com.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState.forNumber(lastBackupState_);
return result == null
? com.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState.UNRECOGNIZED
: result;
}
public static final int LAST_BACKUP_ERROR_FIELD_NUMBER = 4;
private com.google.rpc.Status lastBackupError_;
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the lastBackupError field is set.
*/
@java.lang.Override
public boolean hasLastBackupError() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The lastBackupError.
*/
@java.lang.Override
public com.google.rpc.Status getLastBackupError() {
return lastBackupError_ == null ? com.google.rpc.Status.getDefaultInstance() : lastBackupError_;
}
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.rpc.StatusOrBuilder getLastBackupErrorOrBuilder() {
return lastBackupError_ == null ? com.google.rpc.Status.getDefaultInstance() : lastBackupError_;
}
public static final int LAST_SUCCESSFUL_BACKUP_CONSISTENCY_TIME_FIELD_NUMBER = 5;
private com.google.protobuf.Timestamp lastSuccessfulBackupConsistencyTime_;
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the lastSuccessfulBackupConsistencyTime field is set.
*/
@java.lang.Override
public boolean hasLastSuccessfulBackupConsistencyTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The lastSuccessfulBackupConsistencyTime.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getLastSuccessfulBackupConsistencyTime() {
return lastSuccessfulBackupConsistencyTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: lastSuccessfulBackupConsistencyTime_;
}
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getLastSuccessfulBackupConsistencyTimeOrBuilder() {
return lastSuccessfulBackupConsistencyTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: lastSuccessfulBackupConsistencyTime_;
}
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(ruleId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ruleId_);
}
if (lastBackupState_
!= com.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState.LAST_BACKUP_STATE_UNSPECIFIED
.getNumber()) {
output.writeEnum(3, lastBackupState_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getLastBackupError());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(5, getLastSuccessfulBackupConsistencyTime());
}
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(ruleId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, ruleId_);
}
if (lastBackupState_
!= com.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState.LAST_BACKUP_STATE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, lastBackupState_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getLastBackupError());
}
if (((bitField0_ & 0x00000002) != 0)) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
5, getLastSuccessfulBackupConsistencyTime());
}
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.backupdr.v1.RuleConfigInfo)) {
return super.equals(obj);
}
com.google.cloud.backupdr.v1.RuleConfigInfo other =
(com.google.cloud.backupdr.v1.RuleConfigInfo) obj;
if (!getRuleId().equals(other.getRuleId())) return false;
if (lastBackupState_ != other.lastBackupState_) return false;
if (hasLastBackupError() != other.hasLastBackupError()) return false;
if (hasLastBackupError()) {
if (!getLastBackupError().equals(other.getLastBackupError())) return false;
}
if (hasLastSuccessfulBackupConsistencyTime() != other.hasLastSuccessfulBackupConsistencyTime())
return false;
if (hasLastSuccessfulBackupConsistencyTime()) {
if (!getLastSuccessfulBackupConsistencyTime()
.equals(other.getLastSuccessfulBackupConsistencyTime())) 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) + RULE_ID_FIELD_NUMBER;
hash = (53 * hash) + getRuleId().hashCode();
hash = (37 * hash) + LAST_BACKUP_STATE_FIELD_NUMBER;
hash = (53 * hash) + lastBackupState_;
if (hasLastBackupError()) {
hash = (37 * hash) + LAST_BACKUP_ERROR_FIELD_NUMBER;
hash = (53 * hash) + getLastBackupError().hashCode();
}
if (hasLastSuccessfulBackupConsistencyTime()) {
hash = (37 * hash) + LAST_SUCCESSFUL_BACKUP_CONSISTENCY_TIME_FIELD_NUMBER;
hash = (53 * hash) + getLastSuccessfulBackupConsistencyTime().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.backupdr.v1.RuleConfigInfo parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.backupdr.v1.RuleConfigInfo 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.backupdr.v1.RuleConfigInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.backupdr.v1.RuleConfigInfo 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.backupdr.v1.RuleConfigInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.backupdr.v1.RuleConfigInfo parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.backupdr.v1.RuleConfigInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.backupdr.v1.RuleConfigInfo 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.backupdr.v1.RuleConfigInfo parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.backupdr.v1.RuleConfigInfo 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.backupdr.v1.RuleConfigInfo parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.backupdr.v1.RuleConfigInfo 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.backupdr.v1.RuleConfigInfo 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;
}
/**
*
*
*
* Message for rules config info.
*
*
* Protobuf type {@code google.cloud.backupdr.v1.RuleConfigInfo}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.backupdr.v1.RuleConfigInfo)
com.google.cloud.backupdr.v1.RuleConfigInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.backupdr.v1.BackupPlanAssociationProto
.internal_static_google_cloud_backupdr_v1_RuleConfigInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.backupdr.v1.BackupPlanAssociationProto
.internal_static_google_cloud_backupdr_v1_RuleConfigInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.backupdr.v1.RuleConfigInfo.class,
com.google.cloud.backupdr.v1.RuleConfigInfo.Builder.class);
}
// Construct using com.google.cloud.backupdr.v1.RuleConfigInfo.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getLastBackupErrorFieldBuilder();
getLastSuccessfulBackupConsistencyTimeFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
ruleId_ = "";
lastBackupState_ = 0;
lastBackupError_ = null;
if (lastBackupErrorBuilder_ != null) {
lastBackupErrorBuilder_.dispose();
lastBackupErrorBuilder_ = null;
}
lastSuccessfulBackupConsistencyTime_ = null;
if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) {
lastSuccessfulBackupConsistencyTimeBuilder_.dispose();
lastSuccessfulBackupConsistencyTimeBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.backupdr.v1.BackupPlanAssociationProto
.internal_static_google_cloud_backupdr_v1_RuleConfigInfo_descriptor;
}
@java.lang.Override
public com.google.cloud.backupdr.v1.RuleConfigInfo getDefaultInstanceForType() {
return com.google.cloud.backupdr.v1.RuleConfigInfo.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.backupdr.v1.RuleConfigInfo build() {
com.google.cloud.backupdr.v1.RuleConfigInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.backupdr.v1.RuleConfigInfo buildPartial() {
com.google.cloud.backupdr.v1.RuleConfigInfo result =
new com.google.cloud.backupdr.v1.RuleConfigInfo(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.backupdr.v1.RuleConfigInfo result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.ruleId_ = ruleId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.lastBackupState_ = lastBackupState_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.lastBackupError_ =
lastBackupErrorBuilder_ == null ? lastBackupError_ : lastBackupErrorBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.lastSuccessfulBackupConsistencyTime_ =
lastSuccessfulBackupConsistencyTimeBuilder_ == null
? lastSuccessfulBackupConsistencyTime_
: lastSuccessfulBackupConsistencyTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
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.backupdr.v1.RuleConfigInfo) {
return mergeFrom((com.google.cloud.backupdr.v1.RuleConfigInfo) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.backupdr.v1.RuleConfigInfo other) {
if (other == com.google.cloud.backupdr.v1.RuleConfigInfo.getDefaultInstance()) return this;
if (!other.getRuleId().isEmpty()) {
ruleId_ = other.ruleId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.lastBackupState_ != 0) {
setLastBackupStateValue(other.getLastBackupStateValue());
}
if (other.hasLastBackupError()) {
mergeLastBackupError(other.getLastBackupError());
}
if (other.hasLastSuccessfulBackupConsistencyTime()) {
mergeLastSuccessfulBackupConsistencyTime(other.getLastSuccessfulBackupConsistencyTime());
}
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:
{
ruleId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 24:
{
lastBackupState_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 24
case 34:
{
input.readMessage(getLastBackupErrorFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 34
case 42:
{
input.readMessage(
getLastSuccessfulBackupConsistencyTimeFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 42
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 ruleId_ = "";
/**
*
*
*
* Output only. Output Only.
*
* Backup Rule id fetched from backup plan.
*
*
* string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The ruleId.
*/
public java.lang.String getRuleId() {
java.lang.Object ref = ruleId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ruleId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Output only. Output Only.
*
* Backup Rule id fetched from backup plan.
*
*
* string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for ruleId.
*/
public com.google.protobuf.ByteString getRuleIdBytes() {
java.lang.Object ref = ruleId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
ruleId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Output only. Output Only.
*
* Backup Rule id fetched from backup plan.
*
*
* string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The ruleId to set.
* @return This builder for chaining.
*/
public Builder setRuleId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ruleId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. Output Only.
*
* Backup Rule id fetched from backup plan.
*
*
* string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return This builder for chaining.
*/
public Builder clearRuleId() {
ruleId_ = getDefaultInstance().getRuleId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Output only. Output Only.
*
* Backup Rule id fetched from backup plan.
*
*
* string rule_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for ruleId to set.
* @return This builder for chaining.
*/
public Builder setRuleIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ruleId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int lastBackupState_ = 0;
/**
*
*
*
* Output only. The last backup state for rule.
*
*
*
* .google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for lastBackupState.
*/
@java.lang.Override
public int getLastBackupStateValue() {
return lastBackupState_;
}
/**
*
*
*
* Output only. The last backup state for rule.
*
*
*
* .google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for lastBackupState to set.
* @return This builder for chaining.
*/
public Builder setLastBackupStateValue(int value) {
lastBackupState_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. The last backup state for rule.
*
*
*
* .google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The lastBackupState.
*/
@java.lang.Override
public com.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState getLastBackupState() {
com.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState result =
com.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState.forNumber(lastBackupState_);
return result == null
? com.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. The last backup state for rule.
*
*
*
* .google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The lastBackupState to set.
* @return This builder for chaining.
*/
public Builder setLastBackupState(
com.google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
lastBackupState_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. The last backup state for rule.
*
*
*
* .google.cloud.backupdr.v1.RuleConfigInfo.LastBackupState last_backup_state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearLastBackupState() {
bitField0_ = (bitField0_ & ~0x00000002);
lastBackupState_ = 0;
onChanged();
return this;
}
private com.google.rpc.Status lastBackupError_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
lastBackupErrorBuilder_;
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the lastBackupError field is set.
*/
public boolean hasLastBackupError() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The lastBackupError.
*/
public com.google.rpc.Status getLastBackupError() {
if (lastBackupErrorBuilder_ == null) {
return lastBackupError_ == null
? com.google.rpc.Status.getDefaultInstance()
: lastBackupError_;
} else {
return lastBackupErrorBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setLastBackupError(com.google.rpc.Status value) {
if (lastBackupErrorBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lastBackupError_ = value;
} else {
lastBackupErrorBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setLastBackupError(com.google.rpc.Status.Builder builderForValue) {
if (lastBackupErrorBuilder_ == null) {
lastBackupError_ = builderForValue.build();
} else {
lastBackupErrorBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeLastBackupError(com.google.rpc.Status value) {
if (lastBackupErrorBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& lastBackupError_ != null
&& lastBackupError_ != com.google.rpc.Status.getDefaultInstance()) {
getLastBackupErrorBuilder().mergeFrom(value);
} else {
lastBackupError_ = value;
}
} else {
lastBackupErrorBuilder_.mergeFrom(value);
}
if (lastBackupError_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearLastBackupError() {
bitField0_ = (bitField0_ & ~0x00000004);
lastBackupError_ = null;
if (lastBackupErrorBuilder_ != null) {
lastBackupErrorBuilder_.dispose();
lastBackupErrorBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.rpc.Status.Builder getLastBackupErrorBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getLastBackupErrorFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.rpc.StatusOrBuilder getLastBackupErrorOrBuilder() {
if (lastBackupErrorBuilder_ != null) {
return lastBackupErrorBuilder_.getMessageOrBuilder();
} else {
return lastBackupError_ == null
? com.google.rpc.Status.getDefaultInstance()
: lastBackupError_;
}
}
/**
*
*
*
* Output only. Output Only.
*
* google.rpc.Status object to store the last backup error.
*
*
* .google.rpc.Status last_backup_error = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>
getLastBackupErrorFieldBuilder() {
if (lastBackupErrorBuilder_ == null) {
lastBackupErrorBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.rpc.Status,
com.google.rpc.Status.Builder,
com.google.rpc.StatusOrBuilder>(
getLastBackupError(), getParentForChildren(), isClean());
lastBackupError_ = null;
}
return lastBackupErrorBuilder_;
}
private com.google.protobuf.Timestamp lastSuccessfulBackupConsistencyTime_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
lastSuccessfulBackupConsistencyTimeBuilder_;
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the lastSuccessfulBackupConsistencyTime field is set.
*/
public boolean hasLastSuccessfulBackupConsistencyTime() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The lastSuccessfulBackupConsistencyTime.
*/
public com.google.protobuf.Timestamp getLastSuccessfulBackupConsistencyTime() {
if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) {
return lastSuccessfulBackupConsistencyTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: lastSuccessfulBackupConsistencyTime_;
} else {
return lastSuccessfulBackupConsistencyTimeBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setLastSuccessfulBackupConsistencyTime(com.google.protobuf.Timestamp value) {
if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
lastSuccessfulBackupConsistencyTime_ = value;
} else {
lastSuccessfulBackupConsistencyTimeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder setLastSuccessfulBackupConsistencyTime(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) {
lastSuccessfulBackupConsistencyTime_ = builderForValue.build();
} else {
lastSuccessfulBackupConsistencyTimeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder mergeLastSuccessfulBackupConsistencyTime(com.google.protobuf.Timestamp value) {
if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& lastSuccessfulBackupConsistencyTime_ != null
&& lastSuccessfulBackupConsistencyTime_
!= com.google.protobuf.Timestamp.getDefaultInstance()) {
getLastSuccessfulBackupConsistencyTimeBuilder().mergeFrom(value);
} else {
lastSuccessfulBackupConsistencyTime_ = value;
}
} else {
lastSuccessfulBackupConsistencyTimeBuilder_.mergeFrom(value);
}
if (lastSuccessfulBackupConsistencyTime_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public Builder clearLastSuccessfulBackupConsistencyTime() {
bitField0_ = (bitField0_ & ~0x00000008);
lastSuccessfulBackupConsistencyTime_ = null;
if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) {
lastSuccessfulBackupConsistencyTimeBuilder_.dispose();
lastSuccessfulBackupConsistencyTimeBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.Timestamp.Builder getLastSuccessfulBackupConsistencyTimeBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getLastSuccessfulBackupConsistencyTimeFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
public com.google.protobuf.TimestampOrBuilder
getLastSuccessfulBackupConsistencyTimeOrBuilder() {
if (lastSuccessfulBackupConsistencyTimeBuilder_ != null) {
return lastSuccessfulBackupConsistencyTimeBuilder_.getMessageOrBuilder();
} else {
return lastSuccessfulBackupConsistencyTime_ == null
? com.google.protobuf.Timestamp.getDefaultInstance()
: lastSuccessfulBackupConsistencyTime_;
}
}
/**
*
*
*
* Output only. The point in time when the last successful backup was captured
* from the source.
*
*
*
* .google.protobuf.Timestamp last_successful_backup_consistency_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>
getLastSuccessfulBackupConsistencyTimeFieldBuilder() {
if (lastSuccessfulBackupConsistencyTimeBuilder_ == null) {
lastSuccessfulBackupConsistencyTimeBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder,
com.google.protobuf.TimestampOrBuilder>(
getLastSuccessfulBackupConsistencyTime(), getParentForChildren(), isClean());
lastSuccessfulBackupConsistencyTime_ = null;
}
return lastSuccessfulBackupConsistencyTimeBuilder_;
}
@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.backupdr.v1.RuleConfigInfo)
}
// @@protoc_insertion_point(class_scope:google.cloud.backupdr.v1.RuleConfigInfo)
private static final com.google.cloud.backupdr.v1.RuleConfigInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.backupdr.v1.RuleConfigInfo();
}
public static com.google.cloud.backupdr.v1.RuleConfigInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RuleConfigInfo 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.backupdr.v1.RuleConfigInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}