Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* 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/netapp/v1/replication.proto
// Protobuf Java Version: 3.25.4
package com.google.cloud.netapp.v1;
/**
*
*
*
* Replication is a nested resource under Volume, that describes a
* cross-region replication relationship between 2 volumes in different
* regions.
*
*
* Protobuf type {@code google.cloud.netapp.v1.Replication}
*/
public final class Replication extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.netapp.v1.Replication)
ReplicationOrBuilder {
private static final long serialVersionUID = 0L;
// Use Replication.newBuilder() to construct.
private Replication(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Replication() {
name_ = "";
state_ = 0;
stateDetails_ = "";
role_ = 0;
replicationSchedule_ = 0;
mirrorState_ = 0;
destinationVolume_ = "";
description_ = "";
sourceVolume_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Replication();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.netapp.v1.ReplicationProto
.internal_static_google_cloud_netapp_v1_Replication_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 12:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.netapp.v1.ReplicationProto
.internal_static_google_cloud_netapp_v1_Replication_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.netapp.v1.Replication.class,
com.google.cloud.netapp.v1.Replication.Builder.class);
}
/**
*
*
*
* The replication states
* New enum values may be added in future to indicate possible new states.
*
*
* Protobuf enum {@code google.cloud.netapp.v1.Replication.State}
*/
public enum State implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Replication is creating.
*
*
* CREATING = 1;
*/
public static final int CREATING_VALUE = 1;
/**
*
*
*
* Replication is ready.
*
*
* READY = 2;
*/
public static final int READY_VALUE = 2;
/**
*
*
*
* Replication is updating.
*
*
* UPDATING = 3;
*/
public static final int UPDATING_VALUE = 3;
/**
*
*
*
* Replication is deleting.
*
*
* DELETING = 5;
*/
public static final int DELETING_VALUE = 5;
/**
*
*
*
* Replication is in error state.
*
*
* ERROR = 6;
*/
public static final int ERROR_VALUE = 6;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static 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 READY;
case 3:
return UPDATING;
case 5:
return DELETING;
case 6:
return ERROR;
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.netapp.v1.Replication.getDescriptor().getEnumTypes().get(0);
}
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.netapp.v1.Replication.State)
}
/**
*
*
*
* New enum values may be added in future to support different replication
* topology.
*
*
* REPLICATION_ROLE_UNSPECIFIED = 0;
*/
public static final int REPLICATION_ROLE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Indicates Source volume.
*
*
* SOURCE = 1;
*/
public static final int SOURCE_VALUE = 1;
/**
*
*
*
* Indicates Destination volume.
*
*
* DESTINATION = 2;
*/
public static final int DESTINATION_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ReplicationRole 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 ReplicationRole forNumber(int value) {
switch (value) {
case 0:
return REPLICATION_ROLE_UNSPECIFIED;
case 1:
return SOURCE;
case 2:
return DESTINATION;
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 ReplicationRole findValueByNumber(int number) {
return ReplicationRole.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.netapp.v1.Replication.getDescriptor().getEnumTypes().get(1);
}
private static final ReplicationRole[] VALUES = values();
public static ReplicationRole 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 ReplicationRole(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.netapp.v1.Replication.ReplicationRole)
}
/**
*
*
*
* Schedule for Replication.
* New enum values may be added in future to support different frequency of
* replication.
*
*
* REPLICATION_SCHEDULE_UNSPECIFIED = 0;
*/
public static final int REPLICATION_SCHEDULE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Replication happens once every 10 minutes.
*
*
* EVERY_10_MINUTES = 1;
*/
public static final int EVERY_10_MINUTES_VALUE = 1;
/**
*
*
*
* Replication happens once every hour.
*
*
* HOURLY = 2;
*/
public static final int HOURLY_VALUE = 2;
/**
*
*
*
* Replication happens once every day.
*
*
* DAILY = 3;
*/
public static final int DAILY_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ReplicationSchedule 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 ReplicationSchedule forNumber(int value) {
switch (value) {
case 0:
return REPLICATION_SCHEDULE_UNSPECIFIED;
case 1:
return EVERY_10_MINUTES;
case 2:
return HOURLY;
case 3:
return DAILY;
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 ReplicationSchedule findValueByNumber(int number) {
return ReplicationSchedule.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.netapp.v1.Replication.getDescriptor().getEnumTypes().get(2);
}
private static final ReplicationSchedule[] VALUES = values();
public static ReplicationSchedule 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 ReplicationSchedule(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.netapp.v1.Replication.ReplicationSchedule)
}
/**
*
*
*
* Mirroring states.
* No new value is expected to be added in future.
*
*
* MIRROR_STATE_UNSPECIFIED = 0;
*/
public static final int MIRROR_STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Destination volume is being prepared.
*
*
* PREPARING = 1;
*/
public static final int PREPARING_VALUE = 1;
/**
*
*
*
* Destination volume has been initialized and is ready to receive
* replication transfers.
*
*
* MIRRORED = 2;
*/
public static final int MIRRORED_VALUE = 2;
/**
*
*
*
* Destination volume is not receiving replication transfers.
*
*
* STOPPED = 3;
*/
public static final int STOPPED_VALUE = 3;
/**
*
*
*
* Incremental replication is in progress.
*
*
* TRANSFERRING = 4;
*/
public static final int TRANSFERRING_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 MirrorState 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 MirrorState forNumber(int value) {
switch (value) {
case 0:
return MIRROR_STATE_UNSPECIFIED;
case 1:
return PREPARING;
case 2:
return MIRRORED;
case 3:
return STOPPED;
case 4:
return TRANSFERRING;
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 MirrorState findValueByNumber(int number) {
return MirrorState.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.netapp.v1.Replication.getDescriptor().getEnumTypes().get(3);
}
private static final MirrorState[] VALUES = values();
public static MirrorState 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 MirrorState(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.netapp.v1.Replication.MirrorState)
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Identifier. The resource name of the Replication.
* Format:
* `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
*
* Identifier. The resource name of the Replication.
* Format:
* `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @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 STATE_FIELD_NUMBER = 2;
private int state_ = 0;
/**
*
*
*
* Output only. State of the replication.
*
*
*
* .google.cloud.netapp.v1.Replication.State state = 2 [(.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. State of the replication.
*
*
*
* .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.netapp.v1.Replication.State getState() {
com.google.cloud.netapp.v1.Replication.State result =
com.google.cloud.netapp.v1.Replication.State.forNumber(state_);
return result == null ? com.google.cloud.netapp.v1.Replication.State.UNRECOGNIZED : result;
}
public static final int STATE_DETAILS_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object stateDetails_ = "";
/**
*
*
*
* Output only. State details of the replication.
*
* Output only. State details of the replication.
*
*
* string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for stateDetails.
*/
@java.lang.Override
public com.google.protobuf.ByteString getStateDetailsBytes() {
java.lang.Object ref = stateDetails_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
stateDetails_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ROLE_FIELD_NUMBER = 4;
private int role_ = 0;
/**
*
*
*
* Output only. Indicates whether this points to source or destination.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for role.
*/
@java.lang.Override
public int getRoleValue() {
return role_;
}
/**
*
*
*
* Output only. Indicates whether this points to source or destination.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The role.
*/
@java.lang.Override
public com.google.cloud.netapp.v1.Replication.ReplicationRole getRole() {
com.google.cloud.netapp.v1.Replication.ReplicationRole result =
com.google.cloud.netapp.v1.Replication.ReplicationRole.forNumber(role_);
return result == null
? com.google.cloud.netapp.v1.Replication.ReplicationRole.UNRECOGNIZED
: result;
}
public static final int REPLICATION_SCHEDULE_FIELD_NUMBER = 5;
private int replicationSchedule_ = 0;
/**
*
*
*
* Required. Indicates the schedule for replication.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for replicationSchedule.
*/
@java.lang.Override
public int getReplicationScheduleValue() {
return replicationSchedule_;
}
/**
*
*
*
* Required. Indicates the schedule for replication.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The replicationSchedule.
*/
@java.lang.Override
public com.google.cloud.netapp.v1.Replication.ReplicationSchedule getReplicationSchedule() {
com.google.cloud.netapp.v1.Replication.ReplicationSchedule result =
com.google.cloud.netapp.v1.Replication.ReplicationSchedule.forNumber(replicationSchedule_);
return result == null
? com.google.cloud.netapp.v1.Replication.ReplicationSchedule.UNRECOGNIZED
: result;
}
public static final int MIRROR_STATE_FIELD_NUMBER = 6;
private int mirrorState_ = 0;
/**
*
*
*
* Output only. Indicates the state of mirroring.
*
*
*
* .google.cloud.netapp.v1.Replication.MirrorState mirror_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for mirrorState.
*/
@java.lang.Override
public int getMirrorStateValue() {
return mirrorState_;
}
/**
*
*
*
* Output only. Indicates the state of mirroring.
*
*
*
* .google.cloud.netapp.v1.Replication.MirrorState mirror_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The mirrorState.
*/
@java.lang.Override
public com.google.cloud.netapp.v1.Replication.MirrorState getMirrorState() {
com.google.cloud.netapp.v1.Replication.MirrorState result =
com.google.cloud.netapp.v1.Replication.MirrorState.forNumber(mirrorState_);
return result == null
? com.google.cloud.netapp.v1.Replication.MirrorState.UNRECOGNIZED
: result;
}
public static final int HEALTHY_FIELD_NUMBER = 8;
private boolean healthy_ = false;
/**
*
*
*
* Output only. Condition of the relationship. Can be one of the following:
* - true: The replication relationship is healthy. It has not missed the most
* recent scheduled transfer.
* - false: The replication relationship is not healthy. It has missed the
* most recent scheduled transfer.
*
*
* optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return Whether the healthy field is set.
*/
@java.lang.Override
public boolean hasHealthy() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Output only. Condition of the relationship. Can be one of the following:
* - true: The replication relationship is healthy. It has not missed the most
* recent scheduled transfer.
* - false: The replication relationship is not healthy. It has missed the
* most recent scheduled transfer.
*
*
* optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The healthy.
*/
@java.lang.Override
public boolean getHealthy() {
return healthy_;
}
public static final int CREATE_TIME_FIELD_NUMBER = 9;
private com.google.protobuf.Timestamp createTime_;
/**
*
*
*
* Output only. Replication create time.
*
*
* .google.protobuf.Timestamp create_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return Whether the createTime field is set.
*/
@java.lang.Override
public boolean hasCreateTime() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Replication is a nested resource under Volume, that describes a
* cross-region replication relationship between 2 volumes in different
* regions.
*
*
* Protobuf type {@code google.cloud.netapp.v1.Replication}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.netapp.v1.Replication)
com.google.cloud.netapp.v1.ReplicationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.netapp.v1.ReplicationProto
.internal_static_google_cloud_netapp_v1_Replication_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 12:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 12:
return internalGetMutableLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.netapp.v1.ReplicationProto
.internal_static_google_cloud_netapp_v1_Replication_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.netapp.v1.Replication.class,
com.google.cloud.netapp.v1.Replication.Builder.class);
}
// Construct using com.google.cloud.netapp.v1.Replication.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();
getTransferStatsFieldBuilder();
getDestinationVolumeParametersFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
state_ = 0;
stateDetails_ = "";
role_ = 0;
replicationSchedule_ = 0;
mirrorState_ = 0;
healthy_ = false;
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
destinationVolume_ = "";
transferStats_ = null;
if (transferStatsBuilder_ != null) {
transferStatsBuilder_.dispose();
transferStatsBuilder_ = null;
}
internalGetMutableLabels().clear();
description_ = "";
destinationVolumeParameters_ = null;
if (destinationVolumeParametersBuilder_ != null) {
destinationVolumeParametersBuilder_.dispose();
destinationVolumeParametersBuilder_ = null;
}
sourceVolume_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.netapp.v1.ReplicationProto
.internal_static_google_cloud_netapp_v1_Replication_descriptor;
}
@java.lang.Override
public com.google.cloud.netapp.v1.Replication getDefaultInstanceForType() {
return com.google.cloud.netapp.v1.Replication.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.netapp.v1.Replication build() {
com.google.cloud.netapp.v1.Replication result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.netapp.v1.Replication buildPartial() {
com.google.cloud.netapp.v1.Replication result =
new com.google.cloud.netapp.v1.Replication(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.netapp.v1.Replication result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.stateDetails_ = stateDetails_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.role_ = role_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.replicationSchedule_ = replicationSchedule_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.mirrorState_ = mirrorState_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000040) != 0)) {
result.healthy_ = healthy_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.destinationVolume_ = destinationVolume_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.transferStats_ =
transferStatsBuilder_ == null ? transferStats_ : transferStatsBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.description_ = description_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.destinationVolumeParameters_ =
destinationVolumeParametersBuilder_ == null
? destinationVolumeParameters_
: destinationVolumeParametersBuilder_.build();
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.sourceVolume_ = sourceVolume_;
}
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.netapp.v1.Replication) {
return mergeFrom((com.google.cloud.netapp.v1.Replication) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.netapp.v1.Replication other) {
if (other == com.google.cloud.netapp.v1.Replication.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (!other.getStateDetails().isEmpty()) {
stateDetails_ = other.stateDetails_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.role_ != 0) {
setRoleValue(other.getRoleValue());
}
if (other.replicationSchedule_ != 0) {
setReplicationScheduleValue(other.getReplicationScheduleValue());
}
if (other.mirrorState_ != 0) {
setMirrorStateValue(other.getMirrorStateValue());
}
if (other.hasHealthy()) {
setHealthy(other.getHealthy());
}
if (other.hasCreateTime()) {
mergeCreateTime(other.getCreateTime());
}
if (!other.getDestinationVolume().isEmpty()) {
destinationVolume_ = other.destinationVolume_;
bitField0_ |= 0x00000100;
onChanged();
}
if (other.hasTransferStats()) {
mergeTransferStats(other.getTransferStats());
}
internalGetMutableLabels().mergeFrom(other.internalGetLabels());
bitField0_ |= 0x00000400;
if (other.hasDescription()) {
description_ = other.description_;
bitField0_ |= 0x00000800;
onChanged();
}
if (other.hasDestinationVolumeParameters()) {
mergeDestinationVolumeParameters(other.getDestinationVolumeParameters());
}
if (!other.getSourceVolume().isEmpty()) {
sourceVolume_ = other.sourceVolume_;
bitField0_ |= 0x00002000;
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 16:
{
state_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26:
{
stateDetails_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 32:
{
role_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40:
{
replicationSchedule_ = input.readEnum();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48:
{
mirrorState_ = input.readEnum();
bitField0_ |= 0x00000020;
break;
} // case 48
case 64:
{
healthy_ = input.readBool();
bitField0_ |= 0x00000040;
break;
} // case 64
case 74:
{
input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 74
case 82:
{
destinationVolume_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 82
case 90:
{
input.readMessage(getTransferStatsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000200;
break;
} // case 90
case 98:
{
com.google.protobuf.MapEntry labels__ =
input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableLabels()
.getMutableMap()
.put(labels__.getKey(), labels__.getValue());
bitField0_ |= 0x00000400;
break;
} // case 98
case 106:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000800;
break;
} // case 106
case 114:
{
input.readMessage(
getDestinationVolumeParametersFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00001000;
break;
} // case 114
case 122:
{
sourceVolume_ = input.readStringRequireUtf8();
bitField0_ |= 0x00002000;
break;
} // case 122
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_ = "";
/**
*
*
*
* Identifier. The resource name of the Replication.
* Format:
* `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
*
* Identifier. The resource name of the Replication.
* Format:
* `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @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;
}
}
/**
*
*
*
* Identifier. The resource name of the Replication.
* Format:
* `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @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;
}
/**
*
*
*
* Identifier. The resource name of the Replication.
* Format:
* `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Identifier. The resource name of the Replication.
* Format:
* `projects/{project_id}/locations/{location}/volumes/{volume_id}/replications/{replication_id}`.
*
*
* string name = 1 [(.google.api.field_behavior) = IDENTIFIER];
*
* @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 int state_ = 0;
/**
*
*
*
* Output only. State of the replication.
*
*
*
* .google.cloud.netapp.v1.Replication.State state = 2 [(.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. State of the replication.
*
*
*
* .google.cloud.netapp.v1.Replication.State state = 2 [(.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_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. State of the replication.
*
*
*
* .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.netapp.v1.Replication.State getState() {
com.google.cloud.netapp.v1.Replication.State result =
com.google.cloud.netapp.v1.Replication.State.forNumber(state_);
return result == null ? com.google.cloud.netapp.v1.Replication.State.UNRECOGNIZED : result;
}
/**
*
*
*
* Output only. State of the replication.
*
*
*
* .google.cloud.netapp.v1.Replication.State state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.netapp.v1.Replication.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. State details of the replication.
*
*
* string state_details = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for stateDetails to set.
* @return This builder for chaining.
*/
public Builder setStateDetailsBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
stateDetails_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private int role_ = 0;
/**
*
*
*
* Output only. Indicates whether this points to source or destination.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for role.
*/
@java.lang.Override
public int getRoleValue() {
return role_;
}
/**
*
*
*
* Output only. Indicates whether this points to source or destination.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for role to set.
* @return This builder for chaining.
*/
public Builder setRoleValue(int value) {
role_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. Indicates whether this points to source or destination.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The role.
*/
@java.lang.Override
public com.google.cloud.netapp.v1.Replication.ReplicationRole getRole() {
com.google.cloud.netapp.v1.Replication.ReplicationRole result =
com.google.cloud.netapp.v1.Replication.ReplicationRole.forNumber(role_);
return result == null
? com.google.cloud.netapp.v1.Replication.ReplicationRole.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. Indicates whether this points to source or destination.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The role to set.
* @return This builder for chaining.
*/
public Builder setRole(com.google.cloud.netapp.v1.Replication.ReplicationRole value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
role_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Output only. Indicates whether this points to source or destination.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationRole role = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return This builder for chaining.
*/
public Builder clearRole() {
bitField0_ = (bitField0_ & ~0x00000008);
role_ = 0;
onChanged();
return this;
}
private int replicationSchedule_ = 0;
/**
*
*
*
* Required. Indicates the schedule for replication.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The enum numeric value on the wire for replicationSchedule.
*/
@java.lang.Override
public int getReplicationScheduleValue() {
return replicationSchedule_;
}
/**
*
*
*
* Required. Indicates the schedule for replication.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The enum numeric value on the wire for replicationSchedule to set.
* @return This builder for chaining.
*/
public Builder setReplicationScheduleValue(int value) {
replicationSchedule_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Required. Indicates the schedule for replication.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @return The replicationSchedule.
*/
@java.lang.Override
public com.google.cloud.netapp.v1.Replication.ReplicationSchedule getReplicationSchedule() {
com.google.cloud.netapp.v1.Replication.ReplicationSchedule result =
com.google.cloud.netapp.v1.Replication.ReplicationSchedule.forNumber(
replicationSchedule_);
return result == null
? com.google.cloud.netapp.v1.Replication.ReplicationSchedule.UNRECOGNIZED
: result;
}
/**
*
*
*
* Required. Indicates the schedule for replication.
*
*
*
* .google.cloud.netapp.v1.Replication.ReplicationSchedule replication_schedule = 5 [(.google.api.field_behavior) = REQUIRED];
*
*
* @param value The replicationSchedule to set.
* @return This builder for chaining.
*/
public Builder setReplicationSchedule(
com.google.cloud.netapp.v1.Replication.ReplicationSchedule value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
replicationSchedule_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Required. Indicates the schedule for replication.
*
* Output only. Condition of the relationship. Can be one of the following:
* - true: The replication relationship is healthy. It has not missed the most
* recent scheduled transfer.
* - false: The replication relationship is not healthy. It has missed the
* most recent scheduled transfer.
*
*
* optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return Whether the healthy field is set.
*/
@java.lang.Override
public boolean hasHealthy() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* Output only. Condition of the relationship. Can be one of the following:
* - true: The replication relationship is healthy. It has not missed the most
* recent scheduled transfer.
* - false: The replication relationship is not healthy. It has missed the
* most recent scheduled transfer.
*
* Output only. Condition of the relationship. Can be one of the following:
* - true: The replication relationship is healthy. It has not missed the most
* recent scheduled transfer.
* - false: The replication relationship is not healthy. It has missed the
* most recent scheduled transfer.
*
*
* optional bool healthy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The healthy to set.
* @return This builder for chaining.
*/
public Builder setHealthy(boolean value) {
healthy_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Output only. Condition of the relationship. Can be one of the following:
* - true: The replication relationship is healthy. It has not missed the most
* recent scheduled transfer.
* - false: The replication relationship is not healthy. It has missed the
* most recent scheduled transfer.
*