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

com.google.cloud.redis.v1beta1.Instance Maven / Gradle / Ivy

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

// Protobuf Java Version: 3.25.4
package com.google.cloud.redis.v1beta1;

/**
 *
 *
 * 
 * A Memorystore for Redis instance.
 * 
* * Protobuf type {@code google.cloud.redis.v1beta1.Instance} */ public final class Instance extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.redis.v1beta1.Instance) InstanceOrBuilder { private static final long serialVersionUID = 0L; // Use Instance.newBuilder() to construct. private Instance(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Instance() { name_ = ""; displayName_ = ""; locationId_ = ""; alternativeLocationId_ = ""; redisVersion_ = ""; reservedIpRange_ = ""; secondaryIpRange_ = ""; host_ = ""; currentLocationId_ = ""; state_ = 0; statusMessage_ = ""; tier_ = 0; authorizedNetwork_ = ""; persistenceIamIdentity_ = ""; connectMode_ = 0; serverCaCerts_ = java.util.Collections.emptyList(); transitEncryptionMode_ = 0; nodes_ = java.util.Collections.emptyList(); readEndpoint_ = ""; readReplicasMode_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new Instance(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto .internal_static_google_cloud_redis_v1beta1_Instance_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: return internalGetLabels(); case 16: return internalGetRedisConfigs(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto .internal_static_google_cloud_redis_v1beta1_Instance_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.redis.v1beta1.Instance.class, com.google.cloud.redis.v1beta1.Instance.Builder.class); } /** * * *
   * Represents the different states of a Redis instance.
   * 
* * Protobuf enum {@code google.cloud.redis.v1beta1.Instance.State} */ public enum State implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Not set.
     * 
* * STATE_UNSPECIFIED = 0; */ STATE_UNSPECIFIED(0), /** * * *
     * Redis instance is being created.
     * 
* * CREATING = 1; */ CREATING(1), /** * * *
     * Redis instance has been created and is fully usable.
     * 
* * READY = 2; */ READY(2), /** * * *
     * Redis instance configuration is being updated. Certain kinds of updates
     * may cause the instance to become unusable while the update is in
     * progress.
     * 
* * UPDATING = 3; */ UPDATING(3), /** * * *
     * Redis instance is being deleted.
     * 
* * DELETING = 4; */ DELETING(4), /** * * *
     * Redis instance is being repaired and may be unusable.
     * 
* * REPAIRING = 5; */ REPAIRING(5), /** * * *
     * Maintenance is being performed on this Redis instance.
     * 
* * MAINTENANCE = 6; */ MAINTENANCE(6), /** * * *
     * Redis instance is importing data (availability may be affected).
     * 
* * IMPORTING = 8; */ IMPORTING(8), /** * * *
     * Redis instance is failing over (availability may be affected).
     * 
* * FAILING_OVER = 10; */ FAILING_OVER(10), UNRECOGNIZED(-1), ; /** * * *
     * Not set.
     * 
* * STATE_UNSPECIFIED = 0; */ public static final int STATE_UNSPECIFIED_VALUE = 0; /** * * *
     * Redis instance is being created.
     * 
* * CREATING = 1; */ public static final int CREATING_VALUE = 1; /** * * *
     * Redis instance has been created and is fully usable.
     * 
* * READY = 2; */ public static final int READY_VALUE = 2; /** * * *
     * Redis instance configuration is being updated. Certain kinds of updates
     * may cause the instance to become unusable while the update is in
     * progress.
     * 
* * UPDATING = 3; */ public static final int UPDATING_VALUE = 3; /** * * *
     * Redis instance is being deleted.
     * 
* * DELETING = 4; */ public static final int DELETING_VALUE = 4; /** * * *
     * Redis instance is being repaired and may be unusable.
     * 
* * REPAIRING = 5; */ public static final int REPAIRING_VALUE = 5; /** * * *
     * Maintenance is being performed on this Redis instance.
     * 
* * MAINTENANCE = 6; */ public static final int MAINTENANCE_VALUE = 6; /** * * *
     * Redis instance is importing data (availability may be affected).
     * 
* * IMPORTING = 8; */ public static final int IMPORTING_VALUE = 8; /** * * *
     * Redis instance is failing over (availability may be affected).
     * 
* * FAILING_OVER = 10; */ public static final int FAILING_OVER_VALUE = 10; 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 4: return DELETING; case 5: return REPAIRING; case 6: return MAINTENANCE; case 8: return IMPORTING; case 10: return FAILING_OVER; 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.redis.v1beta1.Instance.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.redis.v1beta1.Instance.State) } /** * * *
   * Available service tiers to choose from
   * 
* * Protobuf enum {@code google.cloud.redis.v1beta1.Instance.Tier} */ public enum Tier implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Not set.
     * 
* * TIER_UNSPECIFIED = 0; */ TIER_UNSPECIFIED(0), /** * * *
     * BASIC tier: standalone instance
     * 
* * BASIC = 1; */ BASIC(1), /** * * *
     * STANDARD_HA tier: highly available primary/replica instances
     * 
* * STANDARD_HA = 3; */ STANDARD_HA(3), UNRECOGNIZED(-1), ; /** * * *
     * Not set.
     * 
* * TIER_UNSPECIFIED = 0; */ public static final int TIER_UNSPECIFIED_VALUE = 0; /** * * *
     * BASIC tier: standalone instance
     * 
* * BASIC = 1; */ public static final int BASIC_VALUE = 1; /** * * *
     * STANDARD_HA tier: highly available primary/replica instances
     * 
* * STANDARD_HA = 3; */ public static final int STANDARD_HA_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 Tier 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 Tier forNumber(int value) { switch (value) { case 0: return TIER_UNSPECIFIED; case 1: return BASIC; case 3: return STANDARD_HA; 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 Tier findValueByNumber(int number) { return Tier.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.redis.v1beta1.Instance.getDescriptor().getEnumTypes().get(1); } private static final Tier[] VALUES = values(); public static Tier 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 Tier(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1beta1.Instance.Tier) } /** * * *
   * Available connection modes.
   * 
* * Protobuf enum {@code google.cloud.redis.v1beta1.Instance.ConnectMode} */ public enum ConnectMode implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Not set.
     * 
* * CONNECT_MODE_UNSPECIFIED = 0; */ CONNECT_MODE_UNSPECIFIED(0), /** * * *
     * Connect via direct peering to the Memorystore for Redis hosted service.
     * 
* * DIRECT_PEERING = 1; */ DIRECT_PEERING(1), /** * * *
     * Connect your Memorystore for Redis instance using Private Service
     * Access. Private services access provides an IP address range for multiple
     * Google Cloud services, including Memorystore.
     * 
* * PRIVATE_SERVICE_ACCESS = 2; */ PRIVATE_SERVICE_ACCESS(2), UNRECOGNIZED(-1), ; /** * * *
     * Not set.
     * 
* * CONNECT_MODE_UNSPECIFIED = 0; */ public static final int CONNECT_MODE_UNSPECIFIED_VALUE = 0; /** * * *
     * Connect via direct peering to the Memorystore for Redis hosted service.
     * 
* * DIRECT_PEERING = 1; */ public static final int DIRECT_PEERING_VALUE = 1; /** * * *
     * Connect your Memorystore for Redis instance using Private Service
     * Access. Private services access provides an IP address range for multiple
     * Google Cloud services, including Memorystore.
     * 
* * PRIVATE_SERVICE_ACCESS = 2; */ public static final int PRIVATE_SERVICE_ACCESS_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 ConnectMode 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 ConnectMode forNumber(int value) { switch (value) { case 0: return CONNECT_MODE_UNSPECIFIED; case 1: return DIRECT_PEERING; case 2: return PRIVATE_SERVICE_ACCESS; 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 ConnectMode findValueByNumber(int number) { return ConnectMode.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.redis.v1beta1.Instance.getDescriptor().getEnumTypes().get(2); } private static final ConnectMode[] VALUES = values(); public static ConnectMode 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 ConnectMode(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1beta1.Instance.ConnectMode) } /** * * *
   * Available TLS modes.
   * 
* * Protobuf enum {@code google.cloud.redis.v1beta1.Instance.TransitEncryptionMode} */ public enum TransitEncryptionMode implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * Not set.
     * 
* * TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; */ TRANSIT_ENCRYPTION_MODE_UNSPECIFIED(0), /** * * *
     * Client to Server traffic encryption enabled with server authentication.
     * 
* * SERVER_AUTHENTICATION = 1; */ SERVER_AUTHENTICATION(1), /** * * *
     * TLS is disabled for the instance.
     * 
* * DISABLED = 2; */ DISABLED(2), UNRECOGNIZED(-1), ; /** * * *
     * Not set.
     * 
* * TRANSIT_ENCRYPTION_MODE_UNSPECIFIED = 0; */ public static final int TRANSIT_ENCRYPTION_MODE_UNSPECIFIED_VALUE = 0; /** * * *
     * Client to Server traffic encryption enabled with server authentication.
     * 
* * SERVER_AUTHENTICATION = 1; */ public static final int SERVER_AUTHENTICATION_VALUE = 1; /** * * *
     * TLS is disabled for the instance.
     * 
* * DISABLED = 2; */ public static final int DISABLED_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 TransitEncryptionMode 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 TransitEncryptionMode forNumber(int value) { switch (value) { case 0: return TRANSIT_ENCRYPTION_MODE_UNSPECIFIED; case 1: return SERVER_AUTHENTICATION; case 2: return DISABLED; 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 TransitEncryptionMode findValueByNumber(int number) { return TransitEncryptionMode.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.redis.v1beta1.Instance.getDescriptor().getEnumTypes().get(3); } private static final TransitEncryptionMode[] VALUES = values(); public static TransitEncryptionMode 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 TransitEncryptionMode(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1beta1.Instance.TransitEncryptionMode) } /** * * *
   * Read replicas mode.
   * 
* * Protobuf enum {@code google.cloud.redis.v1beta1.Instance.ReadReplicasMode} */ public enum ReadReplicasMode implements com.google.protobuf.ProtocolMessageEnum { /** * * *
     * If not set, Memorystore Redis backend will default to
     * READ_REPLICAS_DISABLED.
     * 
* * READ_REPLICAS_MODE_UNSPECIFIED = 0; */ READ_REPLICAS_MODE_UNSPECIFIED(0), /** * * *
     * If disabled, read endpoint will not be provided and the instance cannot
     * scale up or down the number of replicas.
     * 
* * READ_REPLICAS_DISABLED = 1; */ READ_REPLICAS_DISABLED(1), /** * * *
     * If enabled, read endpoint will be provided and the instance can scale
     * up and down the number of replicas. Not valid for basic tier.
     * 
* * READ_REPLICAS_ENABLED = 2; */ READ_REPLICAS_ENABLED(2), UNRECOGNIZED(-1), ; /** * * *
     * If not set, Memorystore Redis backend will default to
     * READ_REPLICAS_DISABLED.
     * 
* * READ_REPLICAS_MODE_UNSPECIFIED = 0; */ public static final int READ_REPLICAS_MODE_UNSPECIFIED_VALUE = 0; /** * * *
     * If disabled, read endpoint will not be provided and the instance cannot
     * scale up or down the number of replicas.
     * 
* * READ_REPLICAS_DISABLED = 1; */ public static final int READ_REPLICAS_DISABLED_VALUE = 1; /** * * *
     * If enabled, read endpoint will be provided and the instance can scale
     * up and down the number of replicas. Not valid for basic tier.
     * 
* * READ_REPLICAS_ENABLED = 2; */ public static final int READ_REPLICAS_ENABLED_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 ReadReplicasMode 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 ReadReplicasMode forNumber(int value) { switch (value) { case 0: return READ_REPLICAS_MODE_UNSPECIFIED; case 1: return READ_REPLICAS_DISABLED; case 2: return READ_REPLICAS_ENABLED; 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 ReadReplicasMode findValueByNumber(int number) { return ReadReplicasMode.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.redis.v1beta1.Instance.getDescriptor().getEnumTypes().get(4); } private static final ReadReplicasMode[] VALUES = values(); public static ReadReplicasMode 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 ReadReplicasMode(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:google.cloud.redis.v1beta1.Instance.ReadReplicasMode) } private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Required. Unique name of the resource in this scope including project and
   * location using the form:
   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
   *
   * Note: Redis instances are managed and addressed at regional level so
   * location_id here refers to a GCP region; however, users may choose which
   * specific zone (or collection of zones for cross-zone instances) an instance
   * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and
   * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details.
   * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } } /** * * *
   * Required. Unique name of the resource in this scope including project and
   * location using the form:
   *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
   *
   * Note: Redis instances are managed and addressed at regional level so
   * location_id here refers to a GCP region; however, users may choose which
   * specific zone (or collection of zones for cross-zone instances) an instance
   * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and
   * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details.
   * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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 DISPLAY_NAME_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object displayName_ = ""; /** * * *
   * An arbitrary and optional user-provided name for the instance.
   * 
* * string display_name = 2; * * @return The displayName. */ @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; 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(); displayName_ = s; return s; } } /** * * *
   * An arbitrary and optional user-provided name for the instance.
   * 
* * string display_name = 2; * * @return The bytes for displayName. */ @java.lang.Override public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LABELS_FIELD_NUMBER = 3; private static final class LabelsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto .internal_static_google_cloud_redis_v1beta1_Instance_LabelsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
   * Resource labels to represent user provided metadata
   * 
* * map<string, string> labels = 3; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
   * Resource labels to represent user provided metadata
   * 
* * map<string, string> labels = 3; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
   * Resource labels to represent user provided metadata
   * 
* * map<string, string> labels = 3; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * Resource labels to represent user provided metadata
   * 
* * map<string, string> labels = 3; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int LOCATION_ID_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object locationId_ = ""; /** * * *
   * Optional. The zone where the instance will be provisioned. If not provided,
   * the service will choose a zone from the specified region for the instance.
   * For standard tier, additional nodes will be added across multiple zones for
   * protection against zonal failures. If specified, at least one node will be
   * provisioned in this zone.
   * 
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The locationId. */ @java.lang.Override public java.lang.String getLocationId() { java.lang.Object ref = locationId_; 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(); locationId_ = s; return s; } } /** * * *
   * Optional. The zone where the instance will be provisioned. If not provided,
   * the service will choose a zone from the specified region for the instance.
   * For standard tier, additional nodes will be added across multiple zones for
   * protection against zonal failures. If specified, at least one node will be
   * provisioned in this zone.
   * 
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for locationId. */ @java.lang.Override public com.google.protobuf.ByteString getLocationIdBytes() { java.lang.Object ref = locationId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); locationId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ALTERNATIVE_LOCATION_ID_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object alternativeLocationId_ = ""; /** * * *
   * Optional. If specified, at least one node will be provisioned in this zone
   * in addition to the zone specified in location_id. Only applicable to
   * standard tier. If provided, it must be a different zone from the one
   * provided in [location_id]. Additional nodes beyond the first 2 will be
   * placed in zones selected by the service.
   * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The alternativeLocationId. */ @java.lang.Override public java.lang.String getAlternativeLocationId() { java.lang.Object ref = alternativeLocationId_; 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(); alternativeLocationId_ = s; return s; } } /** * * *
   * Optional. If specified, at least one node will be provisioned in this zone
   * in addition to the zone specified in location_id. Only applicable to
   * standard tier. If provided, it must be a different zone from the one
   * provided in [location_id]. Additional nodes beyond the first 2 will be
   * placed in zones selected by the service.
   * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for alternativeLocationId. */ @java.lang.Override public com.google.protobuf.ByteString getAlternativeLocationIdBytes() { java.lang.Object ref = alternativeLocationId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); alternativeLocationId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REDIS_VERSION_FIELD_NUMBER = 7; @SuppressWarnings("serial") private volatile java.lang.Object redisVersion_ = ""; /** * * *
   * Optional. The version of Redis software.
   * If not provided, latest supported version will be used. Currently, the
   * supported values are:
   *
   *  *   `REDIS_3_2` for Redis 3.2 compatibility
   *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
   *  *   `REDIS_5_0` for Redis 5.0 compatibility
   *  *   `REDIS_6_X` for Redis 6.x compatibility
   * 
* * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The redisVersion. */ @java.lang.Override public java.lang.String getRedisVersion() { java.lang.Object ref = redisVersion_; 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(); redisVersion_ = s; return s; } } /** * * *
   * Optional. The version of Redis software.
   * If not provided, latest supported version will be used. Currently, the
   * supported values are:
   *
   *  *   `REDIS_3_2` for Redis 3.2 compatibility
   *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
   *  *   `REDIS_5_0` for Redis 5.0 compatibility
   *  *   `REDIS_6_X` for Redis 6.x compatibility
   * 
* * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for redisVersion. */ @java.lang.Override public com.google.protobuf.ByteString getRedisVersionBytes() { java.lang.Object ref = redisVersion_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); redisVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int RESERVED_IP_RANGE_FIELD_NUMBER = 9; @SuppressWarnings("serial") private volatile java.lang.Object reservedIpRange_ = ""; /** * * *
   * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
   * that are reserved for this instance. Range must
   * be unique and non-overlapping with existing subnets in an authorized
   * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
   * address ranges associated with this private service access connection.
   * If not provided, the service will choose an unused /29 block, for
   * example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED
   * the default block size is /28.
   * 
* * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The reservedIpRange. */ @java.lang.Override public java.lang.String getReservedIpRange() { java.lang.Object ref = reservedIpRange_; 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(); reservedIpRange_ = s; return s; } } /** * * *
   * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
   * that are reserved for this instance. Range must
   * be unique and non-overlapping with existing subnets in an authorized
   * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
   * address ranges associated with this private service access connection.
   * If not provided, the service will choose an unused /29 block, for
   * example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED
   * the default block size is /28.
   * 
* * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for reservedIpRange. */ @java.lang.Override public com.google.protobuf.ByteString getReservedIpRangeBytes() { java.lang.Object ref = reservedIpRange_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); reservedIpRange_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SECONDARY_IP_RANGE_FIELD_NUMBER = 30; @SuppressWarnings("serial") private volatile java.lang.Object secondaryIpRange_ = ""; /** * * *
   * Optional. Additional IP range for node placement. Required when enabling read
   * replicas on an existing instance. For DIRECT_PEERING mode value must be a
   * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
   * must be the name of an allocated address range associated with the private
   * service access connection, or "auto".
   * 
* * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @return The secondaryIpRange. */ @java.lang.Override public java.lang.String getSecondaryIpRange() { java.lang.Object ref = secondaryIpRange_; 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(); secondaryIpRange_ = s; return s; } } /** * * *
   * Optional. Additional IP range for node placement. Required when enabling read
   * replicas on an existing instance. For DIRECT_PEERING mode value must be a
   * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
   * must be the name of an allocated address range associated with the private
   * service access connection, or "auto".
   * 
* * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for secondaryIpRange. */ @java.lang.Override public com.google.protobuf.ByteString getSecondaryIpRangeBytes() { java.lang.Object ref = secondaryIpRange_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); secondaryIpRange_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int HOST_FIELD_NUMBER = 10; @SuppressWarnings("serial") private volatile java.lang.Object host_ = ""; /** * * *
   * Output only. Hostname or IP address of the exposed Redis endpoint used by
   *  clients to connect to the service.
   * 
* * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The host. */ @java.lang.Override public java.lang.String getHost() { java.lang.Object ref = host_; 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(); host_ = s; return s; } } /** * * *
   * Output only. Hostname or IP address of the exposed Redis endpoint used by
   *  clients to connect to the service.
   * 
* * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for host. */ @java.lang.Override public com.google.protobuf.ByteString getHostBytes() { java.lang.Object ref = host_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); host_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PORT_FIELD_NUMBER = 11; private int port_ = 0; /** * * *
   * Output only. The port number of the exposed Redis endpoint.
   * 
* * int32 port = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The port. */ @java.lang.Override public int getPort() { return port_; } public static final int CURRENT_LOCATION_ID_FIELD_NUMBER = 12; @SuppressWarnings("serial") private volatile java.lang.Object currentLocationId_ = ""; /** * * *
   * Output only. The current zone where the Redis primary node is located. In
   * basic tier, this will always be the same as [location_id]. In
   * standard tier, this can be the zone of any node in the instance.
   * 
* * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The currentLocationId. */ @java.lang.Override public java.lang.String getCurrentLocationId() { java.lang.Object ref = currentLocationId_; 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(); currentLocationId_ = s; return s; } } /** * * *
   * Output only. The current zone where the Redis primary node is located. In
   * basic tier, this will always be the same as [location_id]. In
   * standard tier, this can be the zone of any node in the instance.
   * 
* * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for currentLocationId. */ @java.lang.Override public com.google.protobuf.ByteString getCurrentLocationIdBytes() { java.lang.Object ref = currentLocationId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); currentLocationId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CREATE_TIME_FIELD_NUMBER = 13; private com.google.protobuf.Timestamp createTime_; /** * * *
   * Output only. The time the instance was created.
   * 
* * .google.protobuf.Timestamp create_time = 13 [(.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 time the instance was created.
   * 
* * .google.protobuf.Timestamp create_time = 13 [(.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 time the instance was created.
   * 
* * .google.protobuf.Timestamp create_time = 13 [(.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 STATE_FIELD_NUMBER = 14; private int state_ = 0; /** * * *
   * Output only. The current state of this instance.
   * 
* * * .google.cloud.redis.v1beta1.Instance.State state = 14 [(.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 instance.
   * 
* * * .google.cloud.redis.v1beta1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The state. */ @java.lang.Override public com.google.cloud.redis.v1beta1.Instance.State getState() { com.google.cloud.redis.v1beta1.Instance.State result = com.google.cloud.redis.v1beta1.Instance.State.forNumber(state_); return result == null ? com.google.cloud.redis.v1beta1.Instance.State.UNRECOGNIZED : result; } public static final int STATUS_MESSAGE_FIELD_NUMBER = 15; @SuppressWarnings("serial") private volatile java.lang.Object statusMessage_ = ""; /** * * *
   * Output only. Additional information about the current status of this
   * instance, if available.
   * 
* * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The statusMessage. */ @java.lang.Override public java.lang.String getStatusMessage() { java.lang.Object ref = statusMessage_; 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(); statusMessage_ = s; return s; } } /** * * *
   * Output only. Additional information about the current status of this
   * instance, if available.
   * 
* * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for statusMessage. */ @java.lang.Override public com.google.protobuf.ByteString getStatusMessageBytes() { java.lang.Object ref = statusMessage_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); statusMessage_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int REDIS_CONFIGS_FIELD_NUMBER = 16; private static final class RedisConfigsDefaultEntryHolder { static final com.google.protobuf.MapEntry defaultEntry = com.google.protobuf.MapEntry.newDefaultInstance( com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto .internal_static_google_cloud_redis_v1beta1_Instance_RedisConfigsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.STRING, ""); } @SuppressWarnings("serial") private com.google.protobuf.MapField redisConfigs_; private com.google.protobuf.MapField internalGetRedisConfigs() { if (redisConfigs_ == null) { return com.google.protobuf.MapField.emptyMapField( RedisConfigsDefaultEntryHolder.defaultEntry); } return redisConfigs_; } public int getRedisConfigsCount() { return internalGetRedisConfigs().getMap().size(); } /** * * *
   * Optional. Redis configuration parameters, according to
   * http://redis.io/topics/config. Currently, the only supported parameters
   * are:
   *
   *  Redis version 3.2 and newer:
   *
   *  *   maxmemory-policy
   *  *   notify-keyspace-events
   *
   *  Redis version 4.0 and newer:
   *
   *  *   activedefrag
   *  *   lfu-decay-time
   *  *   lfu-log-factor
   *  *   maxmemory-gb
   *
   *  Redis version 5.0 and newer:
   *
   *  *   stream-node-max-bytes
   *  *   stream-node-max-entries
   * 
* * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public boolean containsRedisConfigs(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetRedisConfigs().getMap().containsKey(key); } /** Use {@link #getRedisConfigsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getRedisConfigs() { return getRedisConfigsMap(); } /** * * *
   * Optional. Redis configuration parameters, according to
   * http://redis.io/topics/config. Currently, the only supported parameters
   * are:
   *
   *  Redis version 3.2 and newer:
   *
   *  *   maxmemory-policy
   *  *   notify-keyspace-events
   *
   *  Redis version 4.0 and newer:
   *
   *  *   activedefrag
   *  *   lfu-decay-time
   *  *   lfu-log-factor
   *  *   maxmemory-gb
   *
   *  Redis version 5.0 and newer:
   *
   *  *   stream-node-max-bytes
   *  *   stream-node-max-entries
   * 
* * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.Map getRedisConfigsMap() { return internalGetRedisConfigs().getMap(); } /** * * *
   * Optional. Redis configuration parameters, according to
   * http://redis.io/topics/config. Currently, the only supported parameters
   * are:
   *
   *  Redis version 3.2 and newer:
   *
   *  *   maxmemory-policy
   *  *   notify-keyspace-events
   *
   *  Redis version 4.0 and newer:
   *
   *  *   activedefrag
   *  *   lfu-decay-time
   *  *   lfu-log-factor
   *  *   maxmemory-gb
   *
   *  Redis version 5.0 and newer:
   *
   *  *   stream-node-max-bytes
   *  *   stream-node-max-entries
   * 
* * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public /* nullable */ java.lang.String getRedisConfigsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetRedisConfigs().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
   * Optional. Redis configuration parameters, according to
   * http://redis.io/topics/config. Currently, the only supported parameters
   * are:
   *
   *  Redis version 3.2 and newer:
   *
   *  *   maxmemory-policy
   *  *   notify-keyspace-events
   *
   *  Redis version 4.0 and newer:
   *
   *  *   activedefrag
   *  *   lfu-decay-time
   *  *   lfu-log-factor
   *  *   maxmemory-gb
   *
   *  Redis version 5.0 and newer:
   *
   *  *   stream-node-max-bytes
   *  *   stream-node-max-entries
   * 
* * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.lang.String getRedisConfigsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetRedisConfigs().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public static final int TIER_FIELD_NUMBER = 17; private int tier_ = 0; /** * * *
   * Required. The service tier of the instance.
   * 
* * * .google.cloud.redis.v1beta1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for tier. */ @java.lang.Override public int getTierValue() { return tier_; } /** * * *
   * Required. The service tier of the instance.
   * 
* * * .google.cloud.redis.v1beta1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; * * * @return The tier. */ @java.lang.Override public com.google.cloud.redis.v1beta1.Instance.Tier getTier() { com.google.cloud.redis.v1beta1.Instance.Tier result = com.google.cloud.redis.v1beta1.Instance.Tier.forNumber(tier_); return result == null ? com.google.cloud.redis.v1beta1.Instance.Tier.UNRECOGNIZED : result; } public static final int MEMORY_SIZE_GB_FIELD_NUMBER = 18; private int memorySizeGb_ = 0; /** * * *
   * Required. Redis memory size in GiB.
   * 
* * int32 memory_size_gb = 18 [(.google.api.field_behavior) = REQUIRED]; * * @return The memorySizeGb. */ @java.lang.Override public int getMemorySizeGb() { return memorySizeGb_; } public static final int AUTHORIZED_NETWORK_FIELD_NUMBER = 20; @SuppressWarnings("serial") private volatile java.lang.Object authorizedNetwork_ = ""; /** * * *
   * Optional. The full name of the Google Compute Engine
   * [network](https://cloud.google.com/vpc/docs/vpc) to which the
   * instance is connected. If left unspecified, the `default` network
   * will be used.
   * 
* * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return The authorizedNetwork. */ @java.lang.Override public java.lang.String getAuthorizedNetwork() { java.lang.Object ref = authorizedNetwork_; 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(); authorizedNetwork_ = s; return s; } } /** * * *
   * Optional. The full name of the Google Compute Engine
   * [network](https://cloud.google.com/vpc/docs/vpc) to which the
   * instance is connected. If left unspecified, the `default` network
   * will be used.
   * 
* * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for authorizedNetwork. */ @java.lang.Override public com.google.protobuf.ByteString getAuthorizedNetworkBytes() { java.lang.Object ref = authorizedNetwork_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); authorizedNetwork_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PERSISTENCE_IAM_IDENTITY_FIELD_NUMBER = 21; @SuppressWarnings("serial") private volatile java.lang.Object persistenceIamIdentity_ = ""; /** * * *
   * Output only. Cloud IAM identity used by import / export operations to
   * transfer data to/from Cloud Storage. Format is
   * "serviceAccount:<service_account_email>". The value may change over time
   * for a given instance so should be checked before each import/export
   * operation.
   * 
* * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The persistenceIamIdentity. */ @java.lang.Override public java.lang.String getPersistenceIamIdentity() { java.lang.Object ref = persistenceIamIdentity_; 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(); persistenceIamIdentity_ = s; return s; } } /** * * *
   * Output only. Cloud IAM identity used by import / export operations to
   * transfer data to/from Cloud Storage. Format is
   * "serviceAccount:<service_account_email>". The value may change over time
   * for a given instance so should be checked before each import/export
   * operation.
   * 
* * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for persistenceIamIdentity. */ @java.lang.Override public com.google.protobuf.ByteString getPersistenceIamIdentityBytes() { java.lang.Object ref = persistenceIamIdentity_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); persistenceIamIdentity_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CONNECT_MODE_FIELD_NUMBER = 22; private int connectMode_ = 0; /** * * *
   * Optional. The network connect mode of the Redis instance.
   * If not provided, the connect mode defaults to DIRECT_PEERING.
   * 
* * * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for connectMode. */ @java.lang.Override public int getConnectModeValue() { return connectMode_; } /** * * *
   * Optional. The network connect mode of the Redis instance.
   * If not provided, the connect mode defaults to DIRECT_PEERING.
   * 
* * * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The connectMode. */ @java.lang.Override public com.google.cloud.redis.v1beta1.Instance.ConnectMode getConnectMode() { com.google.cloud.redis.v1beta1.Instance.ConnectMode result = com.google.cloud.redis.v1beta1.Instance.ConnectMode.forNumber(connectMode_); return result == null ? com.google.cloud.redis.v1beta1.Instance.ConnectMode.UNRECOGNIZED : result; } public static final int AUTH_ENABLED_FIELD_NUMBER = 23; private boolean authEnabled_ = false; /** * * *
   * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to
   * "true" AUTH is enabled on the instance. Default value is "false" meaning
   * AUTH is disabled.
   * 
* * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; * * @return The authEnabled. */ @java.lang.Override public boolean getAuthEnabled() { return authEnabled_; } public static final int SERVER_CA_CERTS_FIELD_NUMBER = 25; @SuppressWarnings("serial") private java.util.List serverCaCerts_; /** * * *
   * Output only. List of server CA certificates for the instance.
   * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.List getServerCaCertsList() { return serverCaCerts_; } /** * * *
   * Output only. List of server CA certificates for the instance.
   * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.List getServerCaCertsOrBuilderList() { return serverCaCerts_; } /** * * *
   * Output only. List of server CA certificates for the instance.
   * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public int getServerCaCertsCount() { return serverCaCerts_.size(); } /** * * *
   * Output only. List of server CA certificates for the instance.
   * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.redis.v1beta1.TlsCertificate getServerCaCerts(int index) { return serverCaCerts_.get(index); } /** * * *
   * Output only. List of server CA certificates for the instance.
   * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.redis.v1beta1.TlsCertificateOrBuilder getServerCaCertsOrBuilder( int index) { return serverCaCerts_.get(index); } public static final int TRANSIT_ENCRYPTION_MODE_FIELD_NUMBER = 26; private int transitEncryptionMode_ = 0; /** * * *
   * Optional. The TLS mode of the Redis instance.
   * If not provided, TLS is disabled for the instance.
   * 
* * * .google.cloud.redis.v1beta1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for transitEncryptionMode. */ @java.lang.Override public int getTransitEncryptionModeValue() { return transitEncryptionMode_; } /** * * *
   * Optional. The TLS mode of the Redis instance.
   * If not provided, TLS is disabled for the instance.
   * 
* * * .google.cloud.redis.v1beta1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The transitEncryptionMode. */ @java.lang.Override public com.google.cloud.redis.v1beta1.Instance.TransitEncryptionMode getTransitEncryptionMode() { com.google.cloud.redis.v1beta1.Instance.TransitEncryptionMode result = com.google.cloud.redis.v1beta1.Instance.TransitEncryptionMode.forNumber( transitEncryptionMode_); return result == null ? com.google.cloud.redis.v1beta1.Instance.TransitEncryptionMode.UNRECOGNIZED : result; } public static final int MAINTENANCE_POLICY_FIELD_NUMBER = 27; private com.google.cloud.redis.v1beta1.MaintenancePolicy maintenancePolicy_; /** * * *
   * Optional. The maintenance policy for the instance. If not provided,
   * maintenance events can be performed at any time.
   * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the maintenancePolicy field is set. */ @java.lang.Override public boolean hasMaintenancePolicy() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * Optional. The maintenance policy for the instance. If not provided,
   * maintenance events can be performed at any time.
   * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The maintenancePolicy. */ @java.lang.Override public com.google.cloud.redis.v1beta1.MaintenancePolicy getMaintenancePolicy() { return maintenancePolicy_ == null ? com.google.cloud.redis.v1beta1.MaintenancePolicy.getDefaultInstance() : maintenancePolicy_; } /** * * *
   * Optional. The maintenance policy for the instance. If not provided,
   * maintenance events can be performed at any time.
   * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.redis.v1beta1.MaintenancePolicyOrBuilder getMaintenancePolicyOrBuilder() { return maintenancePolicy_ == null ? com.google.cloud.redis.v1beta1.MaintenancePolicy.getDefaultInstance() : maintenancePolicy_; } public static final int MAINTENANCE_SCHEDULE_FIELD_NUMBER = 28; private com.google.cloud.redis.v1beta1.MaintenanceSchedule maintenanceSchedule_; /** * * *
   * Output only. Date and time of upcoming maintenance events which have been
   * scheduled.
   * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the maintenanceSchedule field is set. */ @java.lang.Override public boolean hasMaintenanceSchedule() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * Output only. Date and time of upcoming maintenance events which have been
   * scheduled.
   * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The maintenanceSchedule. */ @java.lang.Override public com.google.cloud.redis.v1beta1.MaintenanceSchedule getMaintenanceSchedule() { return maintenanceSchedule_ == null ? com.google.cloud.redis.v1beta1.MaintenanceSchedule.getDefaultInstance() : maintenanceSchedule_; } /** * * *
   * Output only. Date and time of upcoming maintenance events which have been
   * scheduled.
   * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.redis.v1beta1.MaintenanceScheduleOrBuilder getMaintenanceScheduleOrBuilder() { return maintenanceSchedule_ == null ? com.google.cloud.redis.v1beta1.MaintenanceSchedule.getDefaultInstance() : maintenanceSchedule_; } public static final int REPLICA_COUNT_FIELD_NUMBER = 31; private int replicaCount_ = 0; /** * * *
   * Optional. The number of replica nodes. The valid range for the Standard Tier with
   * read replicas enabled is [1-5] and defaults to 2. If read replicas are not
   * enabled for a Standard Tier instance, the only valid value is 1 and the
   * default is 1. The valid value for basic tier is 0 and the default is also
   * 0.
   * 
* * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; * * @return The replicaCount. */ @java.lang.Override public int getReplicaCount() { return replicaCount_; } public static final int NODES_FIELD_NUMBER = 32; @SuppressWarnings("serial") private java.util.List nodes_; /** * * *
   * Output only. Info per node.
   * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.List getNodesList() { return nodes_; } /** * * *
   * Output only. Info per node.
   * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public java.util.List getNodesOrBuilderList() { return nodes_; } /** * * *
   * Output only. Info per node.
   * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public int getNodesCount() { return nodes_.size(); } /** * * *
   * Output only. Info per node.
   * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.redis.v1beta1.NodeInfo getNodes(int index) { return nodes_.get(index); } /** * * *
   * Output only. Info per node.
   * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.cloud.redis.v1beta1.NodeInfoOrBuilder getNodesOrBuilder(int index) { return nodes_.get(index); } public static final int READ_ENDPOINT_FIELD_NUMBER = 33; @SuppressWarnings("serial") private volatile java.lang.Object readEndpoint_ = ""; /** * * *
   * Output only. Hostname or IP address of the exposed readonly Redis
   * endpoint. Standard tier only. Targets all healthy replica nodes in
   * instance. Replication is asynchronous and replica nodes will exhibit some
   * lag behind the primary. Write requests must target 'host'.
   * 
* * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The readEndpoint. */ @java.lang.Override public java.lang.String getReadEndpoint() { java.lang.Object ref = readEndpoint_; 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(); readEndpoint_ = s; return s; } } /** * * *
   * Output only. Hostname or IP address of the exposed readonly Redis
   * endpoint. Standard tier only. Targets all healthy replica nodes in
   * instance. Replication is asynchronous and replica nodes will exhibit some
   * lag behind the primary. Write requests must target 'host'.
   * 
* * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for readEndpoint. */ @java.lang.Override public com.google.protobuf.ByteString getReadEndpointBytes() { java.lang.Object ref = readEndpoint_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); readEndpoint_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int READ_ENDPOINT_PORT_FIELD_NUMBER = 34; private int readEndpointPort_ = 0; /** * * *
   * Output only. The port number of the exposed readonly redis
   * endpoint. Standard tier only. Write requests should target 'port'.
   * 
* * int32 read_endpoint_port = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The readEndpointPort. */ @java.lang.Override public int getReadEndpointPort() { return readEndpointPort_; } public static final int READ_REPLICAS_MODE_FIELD_NUMBER = 35; private int readReplicasMode_ = 0; /** * * *
   * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
   * 
* * * .google.cloud.redis.v1beta1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for readReplicasMode. */ @java.lang.Override public int getReadReplicasModeValue() { return readReplicasMode_; } /** * * *
   * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
   * 
* * * .google.cloud.redis.v1beta1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The readReplicasMode. */ @java.lang.Override public com.google.cloud.redis.v1beta1.Instance.ReadReplicasMode getReadReplicasMode() { com.google.cloud.redis.v1beta1.Instance.ReadReplicasMode result = com.google.cloud.redis.v1beta1.Instance.ReadReplicasMode.forNumber(readReplicasMode_); return result == null ? com.google.cloud.redis.v1beta1.Instance.ReadReplicasMode.UNRECOGNIZED : result; } public static final int PERSISTENCE_CONFIG_FIELD_NUMBER = 37; private com.google.cloud.redis.v1beta1.PersistenceConfig persistenceConfig_; /** * * *
   * Optional. Persistence configuration parameters
   * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the persistenceConfig field is set. */ @java.lang.Override public boolean hasPersistenceConfig() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
   * Optional. Persistence configuration parameters
   * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The persistenceConfig. */ @java.lang.Override public com.google.cloud.redis.v1beta1.PersistenceConfig getPersistenceConfig() { return persistenceConfig_ == null ? com.google.cloud.redis.v1beta1.PersistenceConfig.getDefaultInstance() : persistenceConfig_; } /** * * *
   * Optional. Persistence configuration parameters
   * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.redis.v1beta1.PersistenceConfigOrBuilder getPersistenceConfigOrBuilder() { return persistenceConfig_ == null ? com.google.cloud.redis.v1beta1.PersistenceConfig.getDefaultInstance() : persistenceConfig_; } 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(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 3); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, locationId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alternativeLocationId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, alternativeLocationId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redisVersion_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, redisVersion_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reservedIpRange_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 9, reservedIpRange_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 10, host_); } if (port_ != 0) { output.writeInt32(11, port_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentLocationId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 12, currentLocationId_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(13, getCreateTime()); } if (state_ != com.google.cloud.redis.v1beta1.Instance.State.STATE_UNSPECIFIED.getNumber()) { output.writeEnum(14, state_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 15, statusMessage_); } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetRedisConfigs(), RedisConfigsDefaultEntryHolder.defaultEntry, 16); if (tier_ != com.google.cloud.redis.v1beta1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { output.writeEnum(17, tier_); } if (memorySizeGb_ != 0) { output.writeInt32(18, memorySizeGb_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedNetwork_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 20, authorizedNetwork_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(persistenceIamIdentity_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 21, persistenceIamIdentity_); } if (connectMode_ != com.google.cloud.redis.v1beta1.Instance.ConnectMode.CONNECT_MODE_UNSPECIFIED .getNumber()) { output.writeEnum(22, connectMode_); } if (authEnabled_ != false) { output.writeBool(23, authEnabled_); } for (int i = 0; i < serverCaCerts_.size(); i++) { output.writeMessage(25, serverCaCerts_.get(i)); } if (transitEncryptionMode_ != com.google.cloud.redis.v1beta1.Instance.TransitEncryptionMode .TRANSIT_ENCRYPTION_MODE_UNSPECIFIED .getNumber()) { output.writeEnum(26, transitEncryptionMode_); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(27, getMaintenancePolicy()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(28, getMaintenanceSchedule()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secondaryIpRange_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 30, secondaryIpRange_); } if (replicaCount_ != 0) { output.writeInt32(31, replicaCount_); } for (int i = 0; i < nodes_.size(); i++) { output.writeMessage(32, nodes_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(readEndpoint_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 33, readEndpoint_); } if (readEndpointPort_ != 0) { output.writeInt32(34, readEndpointPort_); } if (readReplicasMode_ != com.google.cloud.redis.v1beta1.Instance.ReadReplicasMode.READ_REPLICAS_MODE_UNSPECIFIED .getNumber()) { output.writeEnum(35, readReplicasMode_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(37, getPersistenceConfig()); } 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(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); } for (java.util.Map.Entry entry : internalGetLabels().getMap().entrySet()) { com.google.protobuf.MapEntry labels__ = LabelsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, labels__); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(locationId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, locationId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(alternativeLocationId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, alternativeLocationId_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redisVersion_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, redisVersion_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(reservedIpRange_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, reservedIpRange_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(host_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, host_); } if (port_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(11, port_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currentLocationId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, currentLocationId_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getCreateTime()); } if (state_ != com.google.cloud.redis.v1beta1.Instance.State.STATE_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, state_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(statusMessage_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, statusMessage_); } for (java.util.Map.Entry entry : internalGetRedisConfigs().getMap().entrySet()) { com.google.protobuf.MapEntry redisConfigs__ = RedisConfigsDefaultEntryHolder.defaultEntry .newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, redisConfigs__); } if (tier_ != com.google.cloud.redis.v1beta1.Instance.Tier.TIER_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(17, tier_); } if (memorySizeGb_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(18, memorySizeGb_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(authorizedNetwork_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(20, authorizedNetwork_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(persistenceIamIdentity_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(21, persistenceIamIdentity_); } if (connectMode_ != com.google.cloud.redis.v1beta1.Instance.ConnectMode.CONNECT_MODE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(22, connectMode_); } if (authEnabled_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(23, authEnabled_); } for (int i = 0; i < serverCaCerts_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(25, serverCaCerts_.get(i)); } if (transitEncryptionMode_ != com.google.cloud.redis.v1beta1.Instance.TransitEncryptionMode .TRANSIT_ENCRYPTION_MODE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(26, transitEncryptionMode_); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(27, getMaintenancePolicy()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(28, getMaintenanceSchedule()); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(secondaryIpRange_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(30, secondaryIpRange_); } if (replicaCount_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(31, replicaCount_); } for (int i = 0; i < nodes_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(32, nodes_.get(i)); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(readEndpoint_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(33, readEndpoint_); } if (readEndpointPort_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(34, readEndpointPort_); } if (readReplicasMode_ != com.google.cloud.redis.v1beta1.Instance.ReadReplicasMode.READ_REPLICAS_MODE_UNSPECIFIED .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(35, readReplicasMode_); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(37, getPersistenceConfig()); } 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.redis.v1beta1.Instance)) { return super.equals(obj); } com.google.cloud.redis.v1beta1.Instance other = (com.google.cloud.redis.v1beta1.Instance) obj; if (!getName().equals(other.getName())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; if (!getLocationId().equals(other.getLocationId())) return false; if (!getAlternativeLocationId().equals(other.getAlternativeLocationId())) return false; if (!getRedisVersion().equals(other.getRedisVersion())) return false; if (!getReservedIpRange().equals(other.getReservedIpRange())) return false; if (!getSecondaryIpRange().equals(other.getSecondaryIpRange())) return false; if (!getHost().equals(other.getHost())) return false; if (getPort() != other.getPort()) return false; if (!getCurrentLocationId().equals(other.getCurrentLocationId())) return false; if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } if (state_ != other.state_) return false; if (!getStatusMessage().equals(other.getStatusMessage())) return false; if (!internalGetRedisConfigs().equals(other.internalGetRedisConfigs())) return false; if (tier_ != other.tier_) return false; if (getMemorySizeGb() != other.getMemorySizeGb()) return false; if (!getAuthorizedNetwork().equals(other.getAuthorizedNetwork())) return false; if (!getPersistenceIamIdentity().equals(other.getPersistenceIamIdentity())) return false; if (connectMode_ != other.connectMode_) return false; if (getAuthEnabled() != other.getAuthEnabled()) return false; if (!getServerCaCertsList().equals(other.getServerCaCertsList())) return false; if (transitEncryptionMode_ != other.transitEncryptionMode_) return false; if (hasMaintenancePolicy() != other.hasMaintenancePolicy()) return false; if (hasMaintenancePolicy()) { if (!getMaintenancePolicy().equals(other.getMaintenancePolicy())) return false; } if (hasMaintenanceSchedule() != other.hasMaintenanceSchedule()) return false; if (hasMaintenanceSchedule()) { if (!getMaintenanceSchedule().equals(other.getMaintenanceSchedule())) return false; } if (getReplicaCount() != other.getReplicaCount()) return false; if (!getNodesList().equals(other.getNodesList())) return false; if (!getReadEndpoint().equals(other.getReadEndpoint())) return false; if (getReadEndpointPort() != other.getReadEndpointPort()) return false; if (readReplicasMode_ != other.readReplicasMode_) return false; if (hasPersistenceConfig() != other.hasPersistenceConfig()) return false; if (hasPersistenceConfig()) { if (!getPersistenceConfig().equals(other.getPersistenceConfig())) 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) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); if (!internalGetLabels().getMap().isEmpty()) { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } hash = (37 * hash) + LOCATION_ID_FIELD_NUMBER; hash = (53 * hash) + getLocationId().hashCode(); hash = (37 * hash) + ALTERNATIVE_LOCATION_ID_FIELD_NUMBER; hash = (53 * hash) + getAlternativeLocationId().hashCode(); hash = (37 * hash) + REDIS_VERSION_FIELD_NUMBER; hash = (53 * hash) + getRedisVersion().hashCode(); hash = (37 * hash) + RESERVED_IP_RANGE_FIELD_NUMBER; hash = (53 * hash) + getReservedIpRange().hashCode(); hash = (37 * hash) + SECONDARY_IP_RANGE_FIELD_NUMBER; hash = (53 * hash) + getSecondaryIpRange().hashCode(); hash = (37 * hash) + HOST_FIELD_NUMBER; hash = (53 * hash) + getHost().hashCode(); hash = (37 * hash) + PORT_FIELD_NUMBER; hash = (53 * hash) + getPort(); hash = (37 * hash) + CURRENT_LOCATION_ID_FIELD_NUMBER; hash = (53 * hash) + getCurrentLocationId().hashCode(); if (hasCreateTime()) { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } hash = (37 * hash) + STATE_FIELD_NUMBER; hash = (53 * hash) + state_; hash = (37 * hash) + STATUS_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getStatusMessage().hashCode(); if (!internalGetRedisConfigs().getMap().isEmpty()) { hash = (37 * hash) + REDIS_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + internalGetRedisConfigs().hashCode(); } hash = (37 * hash) + TIER_FIELD_NUMBER; hash = (53 * hash) + tier_; hash = (37 * hash) + MEMORY_SIZE_GB_FIELD_NUMBER; hash = (53 * hash) + getMemorySizeGb(); hash = (37 * hash) + AUTHORIZED_NETWORK_FIELD_NUMBER; hash = (53 * hash) + getAuthorizedNetwork().hashCode(); hash = (37 * hash) + PERSISTENCE_IAM_IDENTITY_FIELD_NUMBER; hash = (53 * hash) + getPersistenceIamIdentity().hashCode(); hash = (37 * hash) + CONNECT_MODE_FIELD_NUMBER; hash = (53 * hash) + connectMode_; hash = (37 * hash) + AUTH_ENABLED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAuthEnabled()); if (getServerCaCertsCount() > 0) { hash = (37 * hash) + SERVER_CA_CERTS_FIELD_NUMBER; hash = (53 * hash) + getServerCaCertsList().hashCode(); } hash = (37 * hash) + TRANSIT_ENCRYPTION_MODE_FIELD_NUMBER; hash = (53 * hash) + transitEncryptionMode_; if (hasMaintenancePolicy()) { hash = (37 * hash) + MAINTENANCE_POLICY_FIELD_NUMBER; hash = (53 * hash) + getMaintenancePolicy().hashCode(); } if (hasMaintenanceSchedule()) { hash = (37 * hash) + MAINTENANCE_SCHEDULE_FIELD_NUMBER; hash = (53 * hash) + getMaintenanceSchedule().hashCode(); } hash = (37 * hash) + REPLICA_COUNT_FIELD_NUMBER; hash = (53 * hash) + getReplicaCount(); if (getNodesCount() > 0) { hash = (37 * hash) + NODES_FIELD_NUMBER; hash = (53 * hash) + getNodesList().hashCode(); } hash = (37 * hash) + READ_ENDPOINT_FIELD_NUMBER; hash = (53 * hash) + getReadEndpoint().hashCode(); hash = (37 * hash) + READ_ENDPOINT_PORT_FIELD_NUMBER; hash = (53 * hash) + getReadEndpointPort(); hash = (37 * hash) + READ_REPLICAS_MODE_FIELD_NUMBER; hash = (53 * hash) + readReplicasMode_; if (hasPersistenceConfig()) { hash = (37 * hash) + PERSISTENCE_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getPersistenceConfig().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.redis.v1beta1.Instance parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.redis.v1beta1.Instance 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.redis.v1beta1.Instance parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.redis.v1beta1.Instance 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.redis.v1beta1.Instance parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.redis.v1beta1.Instance parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.redis.v1beta1.Instance parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.redis.v1beta1.Instance 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.redis.v1beta1.Instance parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.redis.v1beta1.Instance 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.redis.v1beta1.Instance parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.redis.v1beta1.Instance 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.redis.v1beta1.Instance 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; } /** * * *
   * A Memorystore for Redis instance.
   * 
* * Protobuf type {@code google.cloud.redis.v1beta1.Instance} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.redis.v1beta1.Instance) com.google.cloud.redis.v1beta1.InstanceOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto .internal_static_google_cloud_redis_v1beta1_Instance_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: return internalGetLabels(); case 16: return internalGetRedisConfigs(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 3: return internalGetMutableLabels(); case 16: return internalGetMutableRedisConfigs(); default: throw new RuntimeException("Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto .internal_static_google_cloud_redis_v1beta1_Instance_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.redis.v1beta1.Instance.class, com.google.cloud.redis.v1beta1.Instance.Builder.class); } // Construct using com.google.cloud.redis.v1beta1.Instance.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(); getServerCaCertsFieldBuilder(); getMaintenancePolicyFieldBuilder(); getMaintenanceScheduleFieldBuilder(); getNodesFieldBuilder(); getPersistenceConfigFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; name_ = ""; displayName_ = ""; internalGetMutableLabels().clear(); locationId_ = ""; alternativeLocationId_ = ""; redisVersion_ = ""; reservedIpRange_ = ""; secondaryIpRange_ = ""; host_ = ""; port_ = 0; currentLocationId_ = ""; createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } state_ = 0; statusMessage_ = ""; internalGetMutableRedisConfigs().clear(); tier_ = 0; memorySizeGb_ = 0; authorizedNetwork_ = ""; persistenceIamIdentity_ = ""; connectMode_ = 0; authEnabled_ = false; if (serverCaCertsBuilder_ == null) { serverCaCerts_ = java.util.Collections.emptyList(); } else { serverCaCerts_ = null; serverCaCertsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00200000); transitEncryptionMode_ = 0; maintenancePolicy_ = null; if (maintenancePolicyBuilder_ != null) { maintenancePolicyBuilder_.dispose(); maintenancePolicyBuilder_ = null; } maintenanceSchedule_ = null; if (maintenanceScheduleBuilder_ != null) { maintenanceScheduleBuilder_.dispose(); maintenanceScheduleBuilder_ = null; } replicaCount_ = 0; if (nodesBuilder_ == null) { nodes_ = java.util.Collections.emptyList(); } else { nodes_ = null; nodesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x04000000); readEndpoint_ = ""; readEndpointPort_ = 0; readReplicasMode_ = 0; persistenceConfig_ = null; if (persistenceConfigBuilder_ != null) { persistenceConfigBuilder_.dispose(); persistenceConfigBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto .internal_static_google_cloud_redis_v1beta1_Instance_descriptor; } @java.lang.Override public com.google.cloud.redis.v1beta1.Instance getDefaultInstanceForType() { return com.google.cloud.redis.v1beta1.Instance.getDefaultInstance(); } @java.lang.Override public com.google.cloud.redis.v1beta1.Instance build() { com.google.cloud.redis.v1beta1.Instance result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.redis.v1beta1.Instance buildPartial() { com.google.cloud.redis.v1beta1.Instance result = new com.google.cloud.redis.v1beta1.Instance(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.google.cloud.redis.v1beta1.Instance result) { if (serverCaCertsBuilder_ == null) { if (((bitField0_ & 0x00200000) != 0)) { serverCaCerts_ = java.util.Collections.unmodifiableList(serverCaCerts_); bitField0_ = (bitField0_ & ~0x00200000); } result.serverCaCerts_ = serverCaCerts_; } else { result.serverCaCerts_ = serverCaCertsBuilder_.build(); } if (nodesBuilder_ == null) { if (((bitField0_ & 0x04000000) != 0)) { nodes_ = java.util.Collections.unmodifiableList(nodes_); bitField0_ = (bitField0_ & ~0x04000000); } result.nodes_ = nodes_; } else { result.nodes_ = nodesBuilder_.build(); } } private void buildPartial0(com.google.cloud.redis.v1beta1.Instance result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.name_ = name_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.displayName_ = displayName_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.labels_ = internalGetLabels(); result.labels_.makeImmutable(); } if (((from_bitField0_ & 0x00000008) != 0)) { result.locationId_ = locationId_; } if (((from_bitField0_ & 0x00000010) != 0)) { result.alternativeLocationId_ = alternativeLocationId_; } if (((from_bitField0_ & 0x00000020) != 0)) { result.redisVersion_ = redisVersion_; } if (((from_bitField0_ & 0x00000040) != 0)) { result.reservedIpRange_ = reservedIpRange_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.secondaryIpRange_ = secondaryIpRange_; } if (((from_bitField0_ & 0x00000100) != 0)) { result.host_ = host_; } if (((from_bitField0_ & 0x00000200) != 0)) { result.port_ = port_; } if (((from_bitField0_ & 0x00000400) != 0)) { result.currentLocationId_ = currentLocationId_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000800) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00001000) != 0)) { result.state_ = state_; } if (((from_bitField0_ & 0x00002000) != 0)) { result.statusMessage_ = statusMessage_; } if (((from_bitField0_ & 0x00004000) != 0)) { result.redisConfigs_ = internalGetRedisConfigs(); result.redisConfigs_.makeImmutable(); } if (((from_bitField0_ & 0x00008000) != 0)) { result.tier_ = tier_; } if (((from_bitField0_ & 0x00010000) != 0)) { result.memorySizeGb_ = memorySizeGb_; } if (((from_bitField0_ & 0x00020000) != 0)) { result.authorizedNetwork_ = authorizedNetwork_; } if (((from_bitField0_ & 0x00040000) != 0)) { result.persistenceIamIdentity_ = persistenceIamIdentity_; } if (((from_bitField0_ & 0x00080000) != 0)) { result.connectMode_ = connectMode_; } if (((from_bitField0_ & 0x00100000) != 0)) { result.authEnabled_ = authEnabled_; } if (((from_bitField0_ & 0x00400000) != 0)) { result.transitEncryptionMode_ = transitEncryptionMode_; } if (((from_bitField0_ & 0x00800000) != 0)) { result.maintenancePolicy_ = maintenancePolicyBuilder_ == null ? maintenancePolicy_ : maintenancePolicyBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x01000000) != 0)) { result.maintenanceSchedule_ = maintenanceScheduleBuilder_ == null ? maintenanceSchedule_ : maintenanceScheduleBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x02000000) != 0)) { result.replicaCount_ = replicaCount_; } if (((from_bitField0_ & 0x08000000) != 0)) { result.readEndpoint_ = readEndpoint_; } if (((from_bitField0_ & 0x10000000) != 0)) { result.readEndpointPort_ = readEndpointPort_; } if (((from_bitField0_ & 0x20000000) != 0)) { result.readReplicasMode_ = readReplicasMode_; } if (((from_bitField0_ & 0x40000000) != 0)) { result.persistenceConfig_ = persistenceConfigBuilder_ == null ? persistenceConfig_ : persistenceConfigBuilder_.build(); to_bitField0_ |= 0x00000008; } 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.redis.v1beta1.Instance) { return mergeFrom((com.google.cloud.redis.v1beta1.Instance) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.redis.v1beta1.Instance other) { if (other == com.google.cloud.redis.v1beta1.Instance.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; bitField0_ |= 0x00000002; onChanged(); } internalGetMutableLabels().mergeFrom(other.internalGetLabels()); bitField0_ |= 0x00000004; if (!other.getLocationId().isEmpty()) { locationId_ = other.locationId_; bitField0_ |= 0x00000008; onChanged(); } if (!other.getAlternativeLocationId().isEmpty()) { alternativeLocationId_ = other.alternativeLocationId_; bitField0_ |= 0x00000010; onChanged(); } if (!other.getRedisVersion().isEmpty()) { redisVersion_ = other.redisVersion_; bitField0_ |= 0x00000020; onChanged(); } if (!other.getReservedIpRange().isEmpty()) { reservedIpRange_ = other.reservedIpRange_; bitField0_ |= 0x00000040; onChanged(); } if (!other.getSecondaryIpRange().isEmpty()) { secondaryIpRange_ = other.secondaryIpRange_; bitField0_ |= 0x00000080; onChanged(); } if (!other.getHost().isEmpty()) { host_ = other.host_; bitField0_ |= 0x00000100; onChanged(); } if (other.getPort() != 0) { setPort(other.getPort()); } if (!other.getCurrentLocationId().isEmpty()) { currentLocationId_ = other.currentLocationId_; bitField0_ |= 0x00000400; onChanged(); } if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } if (other.state_ != 0) { setStateValue(other.getStateValue()); } if (!other.getStatusMessage().isEmpty()) { statusMessage_ = other.statusMessage_; bitField0_ |= 0x00002000; onChanged(); } internalGetMutableRedisConfigs().mergeFrom(other.internalGetRedisConfigs()); bitField0_ |= 0x00004000; if (other.tier_ != 0) { setTierValue(other.getTierValue()); } if (other.getMemorySizeGb() != 0) { setMemorySizeGb(other.getMemorySizeGb()); } if (!other.getAuthorizedNetwork().isEmpty()) { authorizedNetwork_ = other.authorizedNetwork_; bitField0_ |= 0x00020000; onChanged(); } if (!other.getPersistenceIamIdentity().isEmpty()) { persistenceIamIdentity_ = other.persistenceIamIdentity_; bitField0_ |= 0x00040000; onChanged(); } if (other.connectMode_ != 0) { setConnectModeValue(other.getConnectModeValue()); } if (other.getAuthEnabled() != false) { setAuthEnabled(other.getAuthEnabled()); } if (serverCaCertsBuilder_ == null) { if (!other.serverCaCerts_.isEmpty()) { if (serverCaCerts_.isEmpty()) { serverCaCerts_ = other.serverCaCerts_; bitField0_ = (bitField0_ & ~0x00200000); } else { ensureServerCaCertsIsMutable(); serverCaCerts_.addAll(other.serverCaCerts_); } onChanged(); } } else { if (!other.serverCaCerts_.isEmpty()) { if (serverCaCertsBuilder_.isEmpty()) { serverCaCertsBuilder_.dispose(); serverCaCertsBuilder_ = null; serverCaCerts_ = other.serverCaCerts_; bitField0_ = (bitField0_ & ~0x00200000); serverCaCertsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getServerCaCertsFieldBuilder() : null; } else { serverCaCertsBuilder_.addAllMessages(other.serverCaCerts_); } } } if (other.transitEncryptionMode_ != 0) { setTransitEncryptionModeValue(other.getTransitEncryptionModeValue()); } if (other.hasMaintenancePolicy()) { mergeMaintenancePolicy(other.getMaintenancePolicy()); } if (other.hasMaintenanceSchedule()) { mergeMaintenanceSchedule(other.getMaintenanceSchedule()); } if (other.getReplicaCount() != 0) { setReplicaCount(other.getReplicaCount()); } if (nodesBuilder_ == null) { if (!other.nodes_.isEmpty()) { if (nodes_.isEmpty()) { nodes_ = other.nodes_; bitField0_ = (bitField0_ & ~0x04000000); } else { ensureNodesIsMutable(); nodes_.addAll(other.nodes_); } onChanged(); } } else { if (!other.nodes_.isEmpty()) { if (nodesBuilder_.isEmpty()) { nodesBuilder_.dispose(); nodesBuilder_ = null; nodes_ = other.nodes_; bitField0_ = (bitField0_ & ~0x04000000); nodesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getNodesFieldBuilder() : null; } else { nodesBuilder_.addAllMessages(other.nodes_); } } } if (!other.getReadEndpoint().isEmpty()) { readEndpoint_ = other.readEndpoint_; bitField0_ |= 0x08000000; onChanged(); } if (other.getReadEndpointPort() != 0) { setReadEndpointPort(other.getReadEndpointPort()); } if (other.readReplicasMode_ != 0) { setReadReplicasModeValue(other.getReadReplicasModeValue()); } if (other.hasPersistenceConfig()) { mergePersistenceConfig(other.getPersistenceConfig()); } 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: { displayName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { com.google.protobuf.MapEntry labels__ = input.readMessage( LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableLabels() .getMutableMap() .put(labels__.getKey(), labels__.getValue()); bitField0_ |= 0x00000004; break; } // case 26 case 34: { locationId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000008; break; } // case 34 case 42: { alternativeLocationId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000010; break; } // case 42 case 58: { redisVersion_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000020; break; } // case 58 case 74: { reservedIpRange_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000040; break; } // case 74 case 82: { host_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000100; break; } // case 82 case 88: { port_ = input.readInt32(); bitField0_ |= 0x00000200; break; } // case 88 case 98: { currentLocationId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000400; break; } // case 98 case 106: { input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000800; break; } // case 106 case 112: { state_ = input.readEnum(); bitField0_ |= 0x00001000; break; } // case 112 case 122: { statusMessage_ = input.readStringRequireUtf8(); bitField0_ |= 0x00002000; break; } // case 122 case 130: { com.google.protobuf.MapEntry redisConfigs__ = input.readMessage( RedisConfigsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableRedisConfigs() .getMutableMap() .put(redisConfigs__.getKey(), redisConfigs__.getValue()); bitField0_ |= 0x00004000; break; } // case 130 case 136: { tier_ = input.readEnum(); bitField0_ |= 0x00008000; break; } // case 136 case 144: { memorySizeGb_ = input.readInt32(); bitField0_ |= 0x00010000; break; } // case 144 case 162: { authorizedNetwork_ = input.readStringRequireUtf8(); bitField0_ |= 0x00020000; break; } // case 162 case 170: { persistenceIamIdentity_ = input.readStringRequireUtf8(); bitField0_ |= 0x00040000; break; } // case 170 case 176: { connectMode_ = input.readEnum(); bitField0_ |= 0x00080000; break; } // case 176 case 184: { authEnabled_ = input.readBool(); bitField0_ |= 0x00100000; break; } // case 184 case 202: { com.google.cloud.redis.v1beta1.TlsCertificate m = input.readMessage( com.google.cloud.redis.v1beta1.TlsCertificate.parser(), extensionRegistry); if (serverCaCertsBuilder_ == null) { ensureServerCaCertsIsMutable(); serverCaCerts_.add(m); } else { serverCaCertsBuilder_.addMessage(m); } break; } // case 202 case 208: { transitEncryptionMode_ = input.readEnum(); bitField0_ |= 0x00400000; break; } // case 208 case 218: { input.readMessage( getMaintenancePolicyFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00800000; break; } // case 218 case 226: { input.readMessage( getMaintenanceScheduleFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x01000000; break; } // case 226 case 242: { secondaryIpRange_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000080; break; } // case 242 case 248: { replicaCount_ = input.readInt32(); bitField0_ |= 0x02000000; break; } // case 248 case 258: { com.google.cloud.redis.v1beta1.NodeInfo m = input.readMessage( com.google.cloud.redis.v1beta1.NodeInfo.parser(), extensionRegistry); if (nodesBuilder_ == null) { ensureNodesIsMutable(); nodes_.add(m); } else { nodesBuilder_.addMessage(m); } break; } // case 258 case 266: { readEndpoint_ = input.readStringRequireUtf8(); bitField0_ |= 0x08000000; break; } // case 266 case 272: { readEndpointPort_ = input.readInt32(); bitField0_ |= 0x10000000; break; } // case 272 case 280: { readReplicasMode_ = input.readEnum(); bitField0_ |= 0x20000000; break; } // case 280 case 298: { input.readMessage( getPersistenceConfigFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x40000000; break; } // case 298 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_ = ""; /** * * *
     * Required. Unique name of the resource in this scope including project and
     * location using the form:
     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
     *
     * Note: Redis instances are managed and addressed at regional level so
     * location_id here refers to a GCP region; however, users may choose which
     * specific zone (or collection of zones for cross-zone instances) an instance
     * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and
     * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } } /** * * *
     * Required. Unique name of the resource in this scope including project and
     * location using the form:
     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
     *
     * Note: Redis instances are managed and addressed at regional level so
     * location_id here refers to a GCP region; however, users may choose which
     * specific zone (or collection of zones for cross-zone instances) an instance
     * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and
     * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } } /** * * *
     * Required. Unique name of the resource in this scope including project and
     * location using the form:
     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
     *
     * Note: Redis instances are managed and addressed at regional level so
     * location_id here refers to a GCP region; however, users may choose which
     * specific zone (or collection of zones for cross-zone instances) an instance
     * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and
     * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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; } /** * * *
     * Required. Unique name of the resource in this scope including project and
     * location using the form:
     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
     *
     * Note: Redis instances are managed and addressed at regional level so
     * location_id here refers to a GCP region; however, users may choose which
     * specific zone (or collection of zones for cross-zone instances) an instance
     * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and
     * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Required. Unique name of the resource in this scope including project and
     * location using the form:
     *     `projects/{project_id}/locations/{location_id}/instances/{instance_id}`
     *
     * Note: Redis instances are managed and addressed at regional level so
     * location_id here refers to a GCP region; however, users may choose which
     * specific zone (or collection of zones for cross-zone instances) an instance
     * should be provisioned in. Refer to [location_id][google.cloud.redis.v1beta1.Instance.location_id] and
     * [alternative_location_id][google.cloud.redis.v1beta1.Instance.alternative_location_id] fields for more details.
     * 
* * string name = 1 [(.google.api.field_behavior) = REQUIRED]; * * @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 displayName_ = ""; /** * * *
     * An arbitrary and optional user-provided name for the instance.
     * 
* * string display_name = 2; * * @return The displayName. */ public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * An arbitrary and optional user-provided name for the instance.
     * 
* * string display_name = 2; * * @return The bytes for displayName. */ public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * An arbitrary and optional user-provided name for the instance.
     * 
* * string display_name = 2; * * @param value The displayName to set. * @return This builder for chaining. */ public Builder setDisplayName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } displayName_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * An arbitrary and optional user-provided name for the instance.
     * 
* * string display_name = 2; * * @return This builder for chaining. */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * An arbitrary and optional user-provided name for the instance.
     * 
* * string display_name = 2; * * @param value The bytes for displayName to set. * @return This builder for chaining. */ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); displayName_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.protobuf.MapField labels_; private com.google.protobuf.MapField internalGetLabels() { if (labels_ == null) { return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); } return labels_; } private com.google.protobuf.MapField internalGetMutableLabels() { if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } bitField0_ |= 0x00000004; onChanged(); return labels_; } public int getLabelsCount() { return internalGetLabels().getMap().size(); } /** * * *
     * Resource labels to represent user provided metadata
     * 
* * map<string, string> labels = 3; */ @java.lang.Override public boolean containsLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetLabels().getMap().containsKey(key); } /** Use {@link #getLabelsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getLabels() { return getLabelsMap(); } /** * * *
     * Resource labels to represent user provided metadata
     * 
* * map<string, string> labels = 3; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
     * Resource labels to represent user provided metadata
     * 
* * map<string, string> labels = 3; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
     * Resource labels to represent user provided metadata
     * 
* * map<string, string> labels = 3; */ @java.lang.Override public java.lang.String getLabelsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetLabels().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearLabels() { bitField0_ = (bitField0_ & ~0x00000004); internalGetMutableLabels().getMutableMap().clear(); return this; } /** * * *
     * Resource labels to represent user provided metadata
     * 
* * map<string, string> labels = 3; */ public Builder removeLabels(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableLabels().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableLabels() { bitField0_ |= 0x00000004; return internalGetMutableLabels().getMutableMap(); } /** * * *
     * Resource labels to represent user provided metadata
     * 
* * map<string, string> labels = 3; */ public Builder putLabels(java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableLabels().getMutableMap().put(key, value); bitField0_ |= 0x00000004; return this; } /** * * *
     * Resource labels to represent user provided metadata
     * 
* * map<string, string> labels = 3; */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); bitField0_ |= 0x00000004; return this; } private java.lang.Object locationId_ = ""; /** * * *
     * Optional. The zone where the instance will be provisioned. If not provided,
     * the service will choose a zone from the specified region for the instance.
     * For standard tier, additional nodes will be added across multiple zones for
     * protection against zonal failures. If specified, at least one node will be
     * provisioned in this zone.
     * 
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The locationId. */ public java.lang.String getLocationId() { java.lang.Object ref = locationId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); locationId_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. The zone where the instance will be provisioned. If not provided,
     * the service will choose a zone from the specified region for the instance.
     * For standard tier, additional nodes will be added across multiple zones for
     * protection against zonal failures. If specified, at least one node will be
     * provisioned in this zone.
     * 
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for locationId. */ public com.google.protobuf.ByteString getLocationIdBytes() { java.lang.Object ref = locationId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); locationId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. The zone where the instance will be provisioned. If not provided,
     * the service will choose a zone from the specified region for the instance.
     * For standard tier, additional nodes will be added across multiple zones for
     * protection against zonal failures. If specified, at least one node will be
     * provisioned in this zone.
     * 
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The locationId to set. * @return This builder for chaining. */ public Builder setLocationId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } locationId_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Optional. The zone where the instance will be provisioned. If not provided,
     * the service will choose a zone from the specified region for the instance.
     * For standard tier, additional nodes will be added across multiple zones for
     * protection against zonal failures. If specified, at least one node will be
     * provisioned in this zone.
     * 
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearLocationId() { locationId_ = getDefaultInstance().getLocationId(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } /** * * *
     * Optional. The zone where the instance will be provisioned. If not provided,
     * the service will choose a zone from the specified region for the instance.
     * For standard tier, additional nodes will be added across multiple zones for
     * protection against zonal failures. If specified, at least one node will be
     * provisioned in this zone.
     * 
* * string location_id = 4 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for locationId to set. * @return This builder for chaining. */ public Builder setLocationIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); locationId_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } private java.lang.Object alternativeLocationId_ = ""; /** * * *
     * Optional. If specified, at least one node will be provisioned in this zone
     * in addition to the zone specified in location_id. Only applicable to
     * standard tier. If provided, it must be a different zone from the one
     * provided in [location_id]. Additional nodes beyond the first 2 will be
     * placed in zones selected by the service.
     * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The alternativeLocationId. */ public java.lang.String getAlternativeLocationId() { java.lang.Object ref = alternativeLocationId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); alternativeLocationId_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. If specified, at least one node will be provisioned in this zone
     * in addition to the zone specified in location_id. Only applicable to
     * standard tier. If provided, it must be a different zone from the one
     * provided in [location_id]. Additional nodes beyond the first 2 will be
     * placed in zones selected by the service.
     * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for alternativeLocationId. */ public com.google.protobuf.ByteString getAlternativeLocationIdBytes() { java.lang.Object ref = alternativeLocationId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); alternativeLocationId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. If specified, at least one node will be provisioned in this zone
     * in addition to the zone specified in location_id. Only applicable to
     * standard tier. If provided, it must be a different zone from the one
     * provided in [location_id]. Additional nodes beyond the first 2 will be
     * placed in zones selected by the service.
     * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The alternativeLocationId to set. * @return This builder for chaining. */ public Builder setAlternativeLocationId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } alternativeLocationId_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * Optional. If specified, at least one node will be provisioned in this zone
     * in addition to the zone specified in location_id. Only applicable to
     * standard tier. If provided, it must be a different zone from the one
     * provided in [location_id]. Additional nodes beyond the first 2 will be
     * placed in zones selected by the service.
     * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearAlternativeLocationId() { alternativeLocationId_ = getDefaultInstance().getAlternativeLocationId(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
     * Optional. If specified, at least one node will be provisioned in this zone
     * in addition to the zone specified in location_id. Only applicable to
     * standard tier. If provided, it must be a different zone from the one
     * provided in [location_id]. Additional nodes beyond the first 2 will be
     * placed in zones selected by the service.
     * 
* * string alternative_location_id = 5 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for alternativeLocationId to set. * @return This builder for chaining. */ public Builder setAlternativeLocationIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); alternativeLocationId_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } private java.lang.Object redisVersion_ = ""; /** * * *
     * Optional. The version of Redis software.
     * If not provided, latest supported version will be used. Currently, the
     * supported values are:
     *
     *  *   `REDIS_3_2` for Redis 3.2 compatibility
     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
     *  *   `REDIS_5_0` for Redis 5.0 compatibility
     *  *   `REDIS_6_X` for Redis 6.x compatibility
     * 
* * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The redisVersion. */ public java.lang.String getRedisVersion() { java.lang.Object ref = redisVersion_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); redisVersion_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. The version of Redis software.
     * If not provided, latest supported version will be used. Currently, the
     * supported values are:
     *
     *  *   `REDIS_3_2` for Redis 3.2 compatibility
     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
     *  *   `REDIS_5_0` for Redis 5.0 compatibility
     *  *   `REDIS_6_X` for Redis 6.x compatibility
     * 
* * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for redisVersion. */ public com.google.protobuf.ByteString getRedisVersionBytes() { java.lang.Object ref = redisVersion_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); redisVersion_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. The version of Redis software.
     * If not provided, latest supported version will be used. Currently, the
     * supported values are:
     *
     *  *   `REDIS_3_2` for Redis 3.2 compatibility
     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
     *  *   `REDIS_5_0` for Redis 5.0 compatibility
     *  *   `REDIS_6_X` for Redis 6.x compatibility
     * 
* * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The redisVersion to set. * @return This builder for chaining. */ public Builder setRedisVersion(java.lang.String value) { if (value == null) { throw new NullPointerException(); } redisVersion_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * Optional. The version of Redis software.
     * If not provided, latest supported version will be used. Currently, the
     * supported values are:
     *
     *  *   `REDIS_3_2` for Redis 3.2 compatibility
     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
     *  *   `REDIS_5_0` for Redis 5.0 compatibility
     *  *   `REDIS_6_X` for Redis 6.x compatibility
     * 
* * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearRedisVersion() { redisVersion_ = getDefaultInstance().getRedisVersion(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } /** * * *
     * Optional. The version of Redis software.
     * If not provided, latest supported version will be used. Currently, the
     * supported values are:
     *
     *  *   `REDIS_3_2` for Redis 3.2 compatibility
     *  *   `REDIS_4_0` for Redis 4.0 compatibility (default)
     *  *   `REDIS_5_0` for Redis 5.0 compatibility
     *  *   `REDIS_6_X` for Redis 6.x compatibility
     * 
* * string redis_version = 7 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for redisVersion to set. * @return This builder for chaining. */ public Builder setRedisVersionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); redisVersion_ = value; bitField0_ |= 0x00000020; onChanged(); return this; } private java.lang.Object reservedIpRange_ = ""; /** * * *
     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
     * that are reserved for this instance. Range must
     * be unique and non-overlapping with existing subnets in an authorized
     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
     * address ranges associated with this private service access connection.
     * If not provided, the service will choose an unused /29 block, for
     * example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED
     * the default block size is /28.
     * 
* * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The reservedIpRange. */ public java.lang.String getReservedIpRange() { java.lang.Object ref = reservedIpRange_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); reservedIpRange_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
     * that are reserved for this instance. Range must
     * be unique and non-overlapping with existing subnets in an authorized
     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
     * address ranges associated with this private service access connection.
     * If not provided, the service will choose an unused /29 block, for
     * example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED
     * the default block size is /28.
     * 
* * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for reservedIpRange. */ public com.google.protobuf.ByteString getReservedIpRangeBytes() { java.lang.Object ref = reservedIpRange_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); reservedIpRange_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
     * that are reserved for this instance. Range must
     * be unique and non-overlapping with existing subnets in an authorized
     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
     * address ranges associated with this private service access connection.
     * If not provided, the service will choose an unused /29 block, for
     * example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED
     * the default block size is /28.
     * 
* * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The reservedIpRange to set. * @return This builder for chaining. */ public Builder setReservedIpRange(java.lang.String value) { if (value == null) { throw new NullPointerException(); } reservedIpRange_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
     * that are reserved for this instance. Range must
     * be unique and non-overlapping with existing subnets in an authorized
     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
     * address ranges associated with this private service access connection.
     * If not provided, the service will choose an unused /29 block, for
     * example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED
     * the default block size is /28.
     * 
* * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearReservedIpRange() { reservedIpRange_ = getDefaultInstance().getReservedIpRange(); bitField0_ = (bitField0_ & ~0x00000040); onChanged(); return this; } /** * * *
     * Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses
     * that are reserved for this instance. Range must
     * be unique and non-overlapping with existing subnets in an authorized
     * network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP
     * address ranges associated with this private service access connection.
     * If not provided, the service will choose an unused /29 block, for
     * example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED
     * the default block size is /28.
     * 
* * string reserved_ip_range = 9 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for reservedIpRange to set. * @return This builder for chaining. */ public Builder setReservedIpRangeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); reservedIpRange_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } private java.lang.Object secondaryIpRange_ = ""; /** * * *
     * Optional. Additional IP range for node placement. Required when enabling read
     * replicas on an existing instance. For DIRECT_PEERING mode value must be a
     * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
     * must be the name of an allocated address range associated with the private
     * service access connection, or "auto".
     * 
* * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @return The secondaryIpRange. */ public java.lang.String getSecondaryIpRange() { java.lang.Object ref = secondaryIpRange_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); secondaryIpRange_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. Additional IP range for node placement. Required when enabling read
     * replicas on an existing instance. For DIRECT_PEERING mode value must be a
     * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
     * must be the name of an allocated address range associated with the private
     * service access connection, or "auto".
     * 
* * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for secondaryIpRange. */ public com.google.protobuf.ByteString getSecondaryIpRangeBytes() { java.lang.Object ref = secondaryIpRange_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); secondaryIpRange_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. Additional IP range for node placement. Required when enabling read
     * replicas on an existing instance. For DIRECT_PEERING mode value must be a
     * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
     * must be the name of an allocated address range associated with the private
     * service access connection, or "auto".
     * 
* * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The secondaryIpRange to set. * @return This builder for chaining. */ public Builder setSecondaryIpRange(java.lang.String value) { if (value == null) { throw new NullPointerException(); } secondaryIpRange_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * Optional. Additional IP range for node placement. Required when enabling read
     * replicas on an existing instance. For DIRECT_PEERING mode value must be a
     * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
     * must be the name of an allocated address range associated with the private
     * service access connection, or "auto".
     * 
* * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearSecondaryIpRange() { secondaryIpRange_ = getDefaultInstance().getSecondaryIpRange(); bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; } /** * * *
     * Optional. Additional IP range for node placement. Required when enabling read
     * replicas on an existing instance. For DIRECT_PEERING mode value must be a
     * CIDR range of size /28, or "auto". For PRIVATE_SERVICE_ACCESS mode value
     * must be the name of an allocated address range associated with the private
     * service access connection, or "auto".
     * 
* * string secondary_ip_range = 30 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for secondaryIpRange to set. * @return This builder for chaining. */ public Builder setSecondaryIpRangeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); secondaryIpRange_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } private java.lang.Object host_ = ""; /** * * *
     * Output only. Hostname or IP address of the exposed Redis endpoint used by
     *  clients to connect to the service.
     * 
* * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The host. */ public java.lang.String getHost() { java.lang.Object ref = host_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); host_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. Hostname or IP address of the exposed Redis endpoint used by
     *  clients to connect to the service.
     * 
* * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for host. */ public com.google.protobuf.ByteString getHostBytes() { java.lang.Object ref = host_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); host_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. Hostname or IP address of the exposed Redis endpoint used by
     *  clients to connect to the service.
     * 
* * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The host to set. * @return This builder for chaining. */ public Builder setHost(java.lang.String value) { if (value == null) { throw new NullPointerException(); } host_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * Output only. Hostname or IP address of the exposed Redis endpoint used by
     *  clients to connect to the service.
     * 
* * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearHost() { host_ = getDefaultInstance().getHost(); bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } /** * * *
     * Output only. Hostname or IP address of the exposed Redis endpoint used by
     *  clients to connect to the service.
     * 
* * string host = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for host to set. * @return This builder for chaining. */ public Builder setHostBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); host_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } private int port_; /** * * *
     * Output only. The port number of the exposed Redis endpoint.
     * 
* * int32 port = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The port. */ @java.lang.Override public int getPort() { return port_; } /** * * *
     * Output only. The port number of the exposed Redis endpoint.
     * 
* * int32 port = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The port to set. * @return This builder for chaining. */ public Builder setPort(int value) { port_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * Output only. The port number of the exposed Redis endpoint.
     * 
* * int32 port = 11 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearPort() { bitField0_ = (bitField0_ & ~0x00000200); port_ = 0; onChanged(); return this; } private java.lang.Object currentLocationId_ = ""; /** * * *
     * Output only. The current zone where the Redis primary node is located. In
     * basic tier, this will always be the same as [location_id]. In
     * standard tier, this can be the zone of any node in the instance.
     * 
* * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The currentLocationId. */ public java.lang.String getCurrentLocationId() { java.lang.Object ref = currentLocationId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); currentLocationId_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. The current zone where the Redis primary node is located. In
     * basic tier, this will always be the same as [location_id]. In
     * standard tier, this can be the zone of any node in the instance.
     * 
* * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for currentLocationId. */ public com.google.protobuf.ByteString getCurrentLocationIdBytes() { java.lang.Object ref = currentLocationId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); currentLocationId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. The current zone where the Redis primary node is located. In
     * basic tier, this will always be the same as [location_id]. In
     * standard tier, this can be the zone of any node in the instance.
     * 
* * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The currentLocationId to set. * @return This builder for chaining. */ public Builder setCurrentLocationId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } currentLocationId_ = value; bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * Output only. The current zone where the Redis primary node is located. In
     * basic tier, this will always be the same as [location_id]. In
     * standard tier, this can be the zone of any node in the instance.
     * 
* * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearCurrentLocationId() { currentLocationId_ = getDefaultInstance().getCurrentLocationId(); bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } /** * * *
     * Output only. The current zone where the Redis primary node is located. In
     * basic tier, this will always be the same as [location_id]. In
     * standard tier, this can be the zone of any node in the instance.
     * 
* * string current_location_id = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for currentLocationId to set. * @return This builder for chaining. */ public Builder setCurrentLocationIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); currentLocationId_ = value; bitField0_ |= 0x00000400; 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 time the instance was created.
     * 
* * * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return ((bitField0_ & 0x00000800) != 0); } /** * * *
     * Output only. The time the instance was created.
     * 
* * * .google.protobuf.Timestamp create_time = 13 [(.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 time the instance was created.
     * 
* * * .google.protobuf.Timestamp create_time = 13 [(.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_ |= 0x00000800; onChanged(); return this; } /** * * *
     * Output only. The time the instance was created.
     * 
* * * .google.protobuf.Timestamp create_time = 13 [(.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_ |= 0x00000800; onChanged(); return this; } /** * * *
     * Output only. The time the instance was created.
     * 
* * * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (((bitField0_ & 0x00000800) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); } else { createTime_ = value; } } else { createTimeBuilder_.mergeFrom(value); } if (createTime_ != null) { bitField0_ |= 0x00000800; onChanged(); } return this; } /** * * *
     * Output only. The time the instance was created.
     * 
* * * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearCreateTime() { bitField0_ = (bitField0_ & ~0x00000800); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. The time the instance was created.
     * 
* * * .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000800; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. The time the instance was created.
     * 
* * * .google.protobuf.Timestamp create_time = 13 [(.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 time the instance was created.
     * 
* * * .google.protobuf.Timestamp create_time = 13 [(.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 int state_ = 0; /** * * *
     * Output only. The current state of this instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.State state = 14 [(.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 instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.State state = 14 [(.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_ |= 0x00001000; onChanged(); return this; } /** * * *
     * Output only. The current state of this instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The state. */ @java.lang.Override public com.google.cloud.redis.v1beta1.Instance.State getState() { com.google.cloud.redis.v1beta1.Instance.State result = com.google.cloud.redis.v1beta1.Instance.State.forNumber(state_); return result == null ? com.google.cloud.redis.v1beta1.Instance.State.UNRECOGNIZED : result; } /** * * *
     * Output only. The current state of this instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @param value The state to set. * @return This builder for chaining. */ public Builder setState(com.google.cloud.redis.v1beta1.Instance.State value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00001000; state_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Output only. The current state of this instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.State state = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return This builder for chaining. */ public Builder clearState() { bitField0_ = (bitField0_ & ~0x00001000); state_ = 0; onChanged(); return this; } private java.lang.Object statusMessage_ = ""; /** * * *
     * Output only. Additional information about the current status of this
     * instance, if available.
     * 
* * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The statusMessage. */ public java.lang.String getStatusMessage() { java.lang.Object ref = statusMessage_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); statusMessage_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. Additional information about the current status of this
     * instance, if available.
     * 
* * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for statusMessage. */ public com.google.protobuf.ByteString getStatusMessageBytes() { java.lang.Object ref = statusMessage_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); statusMessage_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. Additional information about the current status of this
     * instance, if available.
     * 
* * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The statusMessage to set. * @return This builder for chaining. */ public Builder setStatusMessage(java.lang.String value) { if (value == null) { throw new NullPointerException(); } statusMessage_ = value; bitField0_ |= 0x00002000; onChanged(); return this; } /** * * *
     * Output only. Additional information about the current status of this
     * instance, if available.
     * 
* * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearStatusMessage() { statusMessage_ = getDefaultInstance().getStatusMessage(); bitField0_ = (bitField0_ & ~0x00002000); onChanged(); return this; } /** * * *
     * Output only. Additional information about the current status of this
     * instance, if available.
     * 
* * string status_message = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for statusMessage to set. * @return This builder for chaining. */ public Builder setStatusMessageBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); statusMessage_ = value; bitField0_ |= 0x00002000; onChanged(); return this; } private com.google.protobuf.MapField redisConfigs_; private com.google.protobuf.MapField internalGetRedisConfigs() { if (redisConfigs_ == null) { return com.google.protobuf.MapField.emptyMapField( RedisConfigsDefaultEntryHolder.defaultEntry); } return redisConfigs_; } private com.google.protobuf.MapField internalGetMutableRedisConfigs() { if (redisConfigs_ == null) { redisConfigs_ = com.google.protobuf.MapField.newMapField(RedisConfigsDefaultEntryHolder.defaultEntry); } if (!redisConfigs_.isMutable()) { redisConfigs_ = redisConfigs_.copy(); } bitField0_ |= 0x00004000; onChanged(); return redisConfigs_; } public int getRedisConfigsCount() { return internalGetRedisConfigs().getMap().size(); } /** * * *
     * Optional. Redis configuration parameters, according to
     * http://redis.io/topics/config. Currently, the only supported parameters
     * are:
     *
     *  Redis version 3.2 and newer:
     *
     *  *   maxmemory-policy
     *  *   notify-keyspace-events
     *
     *  Redis version 4.0 and newer:
     *
     *  *   activedefrag
     *  *   lfu-decay-time
     *  *   lfu-log-factor
     *  *   maxmemory-gb
     *
     *  Redis version 5.0 and newer:
     *
     *  *   stream-node-max-bytes
     *  *   stream-node-max-entries
     * 
* * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public boolean containsRedisConfigs(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetRedisConfigs().getMap().containsKey(key); } /** Use {@link #getRedisConfigsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getRedisConfigs() { return getRedisConfigsMap(); } /** * * *
     * Optional. Redis configuration parameters, according to
     * http://redis.io/topics/config. Currently, the only supported parameters
     * are:
     *
     *  Redis version 3.2 and newer:
     *
     *  *   maxmemory-policy
     *  *   notify-keyspace-events
     *
     *  Redis version 4.0 and newer:
     *
     *  *   activedefrag
     *  *   lfu-decay-time
     *  *   lfu-log-factor
     *  *   maxmemory-gb
     *
     *  Redis version 5.0 and newer:
     *
     *  *   stream-node-max-bytes
     *  *   stream-node-max-entries
     * 
* * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.Map getRedisConfigsMap() { return internalGetRedisConfigs().getMap(); } /** * * *
     * Optional. Redis configuration parameters, according to
     * http://redis.io/topics/config. Currently, the only supported parameters
     * are:
     *
     *  Redis version 3.2 and newer:
     *
     *  *   maxmemory-policy
     *  *   notify-keyspace-events
     *
     *  Redis version 4.0 and newer:
     *
     *  *   activedefrag
     *  *   lfu-decay-time
     *  *   lfu-log-factor
     *  *   maxmemory-gb
     *
     *  Redis version 5.0 and newer:
     *
     *  *   stream-node-max-bytes
     *  *   stream-node-max-entries
     * 
* * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public /* nullable */ java.lang.String getRedisConfigsOrDefault( java.lang.String key, /* nullable */ java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetRedisConfigs().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
     * Optional. Redis configuration parameters, according to
     * http://redis.io/topics/config. Currently, the only supported parameters
     * are:
     *
     *  Redis version 3.2 and newer:
     *
     *  *   maxmemory-policy
     *  *   notify-keyspace-events
     *
     *  Redis version 4.0 and newer:
     *
     *  *   activedefrag
     *  *   lfu-decay-time
     *  *   lfu-log-factor
     *  *   maxmemory-gb
     *
     *  Redis version 5.0 and newer:
     *
     *  *   stream-node-max-bytes
     *  *   stream-node-max-entries
     * 
* * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.lang.String getRedisConfigsOrThrow(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetRedisConfigs().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearRedisConfigs() { bitField0_ = (bitField0_ & ~0x00004000); internalGetMutableRedisConfigs().getMutableMap().clear(); return this; } /** * * *
     * Optional. Redis configuration parameters, according to
     * http://redis.io/topics/config. Currently, the only supported parameters
     * are:
     *
     *  Redis version 3.2 and newer:
     *
     *  *   maxmemory-policy
     *  *   notify-keyspace-events
     *
     *  Redis version 4.0 and newer:
     *
     *  *   activedefrag
     *  *   lfu-decay-time
     *  *   lfu-log-factor
     *  *   maxmemory-gb
     *
     *  Redis version 5.0 and newer:
     *
     *  *   stream-node-max-bytes
     *  *   stream-node-max-entries
     * 
* * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder removeRedisConfigs(java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableRedisConfigs().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableRedisConfigs() { bitField0_ |= 0x00004000; return internalGetMutableRedisConfigs().getMutableMap(); } /** * * *
     * Optional. Redis configuration parameters, according to
     * http://redis.io/topics/config. Currently, the only supported parameters
     * are:
     *
     *  Redis version 3.2 and newer:
     *
     *  *   maxmemory-policy
     *  *   notify-keyspace-events
     *
     *  Redis version 4.0 and newer:
     *
     *  *   activedefrag
     *  *   lfu-decay-time
     *  *   lfu-log-factor
     *  *   maxmemory-gb
     *
     *  Redis version 5.0 and newer:
     *
     *  *   stream-node-max-bytes
     *  *   stream-node-max-entries
     * 
* * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder putRedisConfigs(java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableRedisConfigs().getMutableMap().put(key, value); bitField0_ |= 0x00004000; return this; } /** * * *
     * Optional. Redis configuration parameters, according to
     * http://redis.io/topics/config. Currently, the only supported parameters
     * are:
     *
     *  Redis version 3.2 and newer:
     *
     *  *   maxmemory-policy
     *  *   notify-keyspace-events
     *
     *  Redis version 4.0 and newer:
     *
     *  *   activedefrag
     *  *   lfu-decay-time
     *  *   lfu-log-factor
     *  *   maxmemory-gb
     *
     *  Redis version 5.0 and newer:
     *
     *  *   stream-node-max-bytes
     *  *   stream-node-max-entries
     * 
* * map<string, string> redis_configs = 16 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder putAllRedisConfigs(java.util.Map values) { internalGetMutableRedisConfigs().getMutableMap().putAll(values); bitField0_ |= 0x00004000; return this; } private int tier_ = 0; /** * * *
     * Required. The service tier of the instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; * * * @return The enum numeric value on the wire for tier. */ @java.lang.Override public int getTierValue() { return tier_; } /** * * *
     * Required. The service tier of the instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The enum numeric value on the wire for tier to set. * @return This builder for chaining. */ public Builder setTierValue(int value) { tier_ = value; bitField0_ |= 0x00008000; onChanged(); return this; } /** * * *
     * Required. The service tier of the instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; * * * @return The tier. */ @java.lang.Override public com.google.cloud.redis.v1beta1.Instance.Tier getTier() { com.google.cloud.redis.v1beta1.Instance.Tier result = com.google.cloud.redis.v1beta1.Instance.Tier.forNumber(tier_); return result == null ? com.google.cloud.redis.v1beta1.Instance.Tier.UNRECOGNIZED : result; } /** * * *
     * Required. The service tier of the instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; * * * @param value The tier to set. * @return This builder for chaining. */ public Builder setTier(com.google.cloud.redis.v1beta1.Instance.Tier value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00008000; tier_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Required. The service tier of the instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.Tier tier = 17 [(.google.api.field_behavior) = REQUIRED]; * * * @return This builder for chaining. */ public Builder clearTier() { bitField0_ = (bitField0_ & ~0x00008000); tier_ = 0; onChanged(); return this; } private int memorySizeGb_; /** * * *
     * Required. Redis memory size in GiB.
     * 
* * int32 memory_size_gb = 18 [(.google.api.field_behavior) = REQUIRED]; * * @return The memorySizeGb. */ @java.lang.Override public int getMemorySizeGb() { return memorySizeGb_; } /** * * *
     * Required. Redis memory size in GiB.
     * 
* * int32 memory_size_gb = 18 [(.google.api.field_behavior) = REQUIRED]; * * @param value The memorySizeGb to set. * @return This builder for chaining. */ public Builder setMemorySizeGb(int value) { memorySizeGb_ = value; bitField0_ |= 0x00010000; onChanged(); return this; } /** * * *
     * Required. Redis memory size in GiB.
     * 
* * int32 memory_size_gb = 18 [(.google.api.field_behavior) = REQUIRED]; * * @return This builder for chaining. */ public Builder clearMemorySizeGb() { bitField0_ = (bitField0_ & ~0x00010000); memorySizeGb_ = 0; onChanged(); return this; } private java.lang.Object authorizedNetwork_ = ""; /** * * *
     * Optional. The full name of the Google Compute Engine
     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
     * instance is connected. If left unspecified, the `default` network
     * will be used.
     * 
* * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return The authorizedNetwork. */ public java.lang.String getAuthorizedNetwork() { java.lang.Object ref = authorizedNetwork_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); authorizedNetwork_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Optional. The full name of the Google Compute Engine
     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
     * instance is connected. If left unspecified, the `default` network
     * will be used.
     * 
* * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return The bytes for authorizedNetwork. */ public com.google.protobuf.ByteString getAuthorizedNetworkBytes() { java.lang.Object ref = authorizedNetwork_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); authorizedNetwork_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Optional. The full name of the Google Compute Engine
     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
     * instance is connected. If left unspecified, the `default` network
     * will be used.
     * 
* * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The authorizedNetwork to set. * @return This builder for chaining. */ public Builder setAuthorizedNetwork(java.lang.String value) { if (value == null) { throw new NullPointerException(); } authorizedNetwork_ = value; bitField0_ |= 0x00020000; onChanged(); return this; } /** * * *
     * Optional. The full name of the Google Compute Engine
     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
     * instance is connected. If left unspecified, the `default` network
     * will be used.
     * 
* * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearAuthorizedNetwork() { authorizedNetwork_ = getDefaultInstance().getAuthorizedNetwork(); bitField0_ = (bitField0_ & ~0x00020000); onChanged(); return this; } /** * * *
     * Optional. The full name of the Google Compute Engine
     * [network](https://cloud.google.com/vpc/docs/vpc) to which the
     * instance is connected. If left unspecified, the `default` network
     * will be used.
     * 
* * string authorized_network = 20 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The bytes for authorizedNetwork to set. * @return This builder for chaining. */ public Builder setAuthorizedNetworkBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); authorizedNetwork_ = value; bitField0_ |= 0x00020000; onChanged(); return this; } private java.lang.Object persistenceIamIdentity_ = ""; /** * * *
     * Output only. Cloud IAM identity used by import / export operations to
     * transfer data to/from Cloud Storage. Format is
     * "serviceAccount:<service_account_email>". The value may change over time
     * for a given instance so should be checked before each import/export
     * operation.
     * 
* * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The persistenceIamIdentity. */ public java.lang.String getPersistenceIamIdentity() { java.lang.Object ref = persistenceIamIdentity_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); persistenceIamIdentity_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. Cloud IAM identity used by import / export operations to
     * transfer data to/from Cloud Storage. Format is
     * "serviceAccount:<service_account_email>". The value may change over time
     * for a given instance so should be checked before each import/export
     * operation.
     * 
* * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The bytes for persistenceIamIdentity. */ public com.google.protobuf.ByteString getPersistenceIamIdentityBytes() { java.lang.Object ref = persistenceIamIdentity_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); persistenceIamIdentity_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. Cloud IAM identity used by import / export operations to
     * transfer data to/from Cloud Storage. Format is
     * "serviceAccount:<service_account_email>". The value may change over time
     * for a given instance so should be checked before each import/export
     * operation.
     * 
* * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @param value The persistenceIamIdentity to set. * @return This builder for chaining. */ public Builder setPersistenceIamIdentity(java.lang.String value) { if (value == null) { throw new NullPointerException(); } persistenceIamIdentity_ = value; bitField0_ |= 0x00040000; onChanged(); return this; } /** * * *
     * Output only. Cloud IAM identity used by import / export operations to
     * transfer data to/from Cloud Storage. Format is
     * "serviceAccount:<service_account_email>". The value may change over time
     * for a given instance so should be checked before each import/export
     * operation.
     * 
* * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return This builder for chaining. */ public Builder clearPersistenceIamIdentity() { persistenceIamIdentity_ = getDefaultInstance().getPersistenceIamIdentity(); bitField0_ = (bitField0_ & ~0x00040000); onChanged(); return this; } /** * * *
     * Output only. Cloud IAM identity used by import / export operations to
     * transfer data to/from Cloud Storage. Format is
     * "serviceAccount:<service_account_email>". The value may change over time
     * for a given instance so should be checked before each import/export
     * operation.
     * 
* * string persistence_iam_identity = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @param value The bytes for persistenceIamIdentity to set. * @return This builder for chaining. */ public Builder setPersistenceIamIdentityBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); persistenceIamIdentity_ = value; bitField0_ |= 0x00040000; onChanged(); return this; } private int connectMode_ = 0; /** * * *
     * Optional. The network connect mode of the Redis instance.
     * If not provided, the connect mode defaults to DIRECT_PEERING.
     * 
* * * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for connectMode. */ @java.lang.Override public int getConnectModeValue() { return connectMode_; } /** * * *
     * Optional. The network connect mode of the Redis instance.
     * If not provided, the connect mode defaults to DIRECT_PEERING.
     * 
* * * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The enum numeric value on the wire for connectMode to set. * @return This builder for chaining. */ public Builder setConnectModeValue(int value) { connectMode_ = value; bitField0_ |= 0x00080000; onChanged(); return this; } /** * * *
     * Optional. The network connect mode of the Redis instance.
     * If not provided, the connect mode defaults to DIRECT_PEERING.
     * 
* * * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The connectMode. */ @java.lang.Override public com.google.cloud.redis.v1beta1.Instance.ConnectMode getConnectMode() { com.google.cloud.redis.v1beta1.Instance.ConnectMode result = com.google.cloud.redis.v1beta1.Instance.ConnectMode.forNumber(connectMode_); return result == null ? com.google.cloud.redis.v1beta1.Instance.ConnectMode.UNRECOGNIZED : result; } /** * * *
     * Optional. The network connect mode of the Redis instance.
     * If not provided, the connect mode defaults to DIRECT_PEERING.
     * 
* * * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The connectMode to set. * @return This builder for chaining. */ public Builder setConnectMode(com.google.cloud.redis.v1beta1.Instance.ConnectMode value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00080000; connectMode_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Optional. The network connect mode of the Redis instance.
     * If not provided, the connect mode defaults to DIRECT_PEERING.
     * 
* * * .google.cloud.redis.v1beta1.Instance.ConnectMode connect_mode = 22 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ public Builder clearConnectMode() { bitField0_ = (bitField0_ & ~0x00080000); connectMode_ = 0; onChanged(); return this; } private boolean authEnabled_; /** * * *
     * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to
     * "true" AUTH is enabled on the instance. Default value is "false" meaning
     * AUTH is disabled.
     * 
* * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; * * @return The authEnabled. */ @java.lang.Override public boolean getAuthEnabled() { return authEnabled_; } /** * * *
     * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to
     * "true" AUTH is enabled on the instance. Default value is "false" meaning
     * AUTH is disabled.
     * 
* * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The authEnabled to set. * @return This builder for chaining. */ public Builder setAuthEnabled(boolean value) { authEnabled_ = value; bitField0_ |= 0x00100000; onChanged(); return this; } /** * * *
     * Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to
     * "true" AUTH is enabled on the instance. Default value is "false" meaning
     * AUTH is disabled.
     * 
* * bool auth_enabled = 23 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearAuthEnabled() { bitField0_ = (bitField0_ & ~0x00100000); authEnabled_ = false; onChanged(); return this; } private java.util.List serverCaCerts_ = java.util.Collections.emptyList(); private void ensureServerCaCertsIsMutable() { if (!((bitField0_ & 0x00200000) != 0)) { serverCaCerts_ = new java.util.ArrayList(serverCaCerts_); bitField0_ |= 0x00200000; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.redis.v1beta1.TlsCertificate, com.google.cloud.redis.v1beta1.TlsCertificate.Builder, com.google.cloud.redis.v1beta1.TlsCertificateOrBuilder> serverCaCertsBuilder_; /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getServerCaCertsList() { if (serverCaCertsBuilder_ == null) { return java.util.Collections.unmodifiableList(serverCaCerts_); } else { return serverCaCertsBuilder_.getMessageList(); } } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public int getServerCaCertsCount() { if (serverCaCertsBuilder_ == null) { return serverCaCerts_.size(); } else { return serverCaCertsBuilder_.getCount(); } } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.TlsCertificate getServerCaCerts(int index) { if (serverCaCertsBuilder_ == null) { return serverCaCerts_.get(index); } else { return serverCaCertsBuilder_.getMessage(index); } } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setServerCaCerts( int index, com.google.cloud.redis.v1beta1.TlsCertificate value) { if (serverCaCertsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureServerCaCertsIsMutable(); serverCaCerts_.set(index, value); onChanged(); } else { serverCaCertsBuilder_.setMessage(index, value); } return this; } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setServerCaCerts( int index, com.google.cloud.redis.v1beta1.TlsCertificate.Builder builderForValue) { if (serverCaCertsBuilder_ == null) { ensureServerCaCertsIsMutable(); serverCaCerts_.set(index, builderForValue.build()); onChanged(); } else { serverCaCertsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addServerCaCerts(com.google.cloud.redis.v1beta1.TlsCertificate value) { if (serverCaCertsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureServerCaCertsIsMutable(); serverCaCerts_.add(value); onChanged(); } else { serverCaCertsBuilder_.addMessage(value); } return this; } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addServerCaCerts( int index, com.google.cloud.redis.v1beta1.TlsCertificate value) { if (serverCaCertsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureServerCaCertsIsMutable(); serverCaCerts_.add(index, value); onChanged(); } else { serverCaCertsBuilder_.addMessage(index, value); } return this; } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addServerCaCerts( com.google.cloud.redis.v1beta1.TlsCertificate.Builder builderForValue) { if (serverCaCertsBuilder_ == null) { ensureServerCaCertsIsMutable(); serverCaCerts_.add(builderForValue.build()); onChanged(); } else { serverCaCertsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addServerCaCerts( int index, com.google.cloud.redis.v1beta1.TlsCertificate.Builder builderForValue) { if (serverCaCertsBuilder_ == null) { ensureServerCaCertsIsMutable(); serverCaCerts_.add(index, builderForValue.build()); onChanged(); } else { serverCaCertsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addAllServerCaCerts( java.lang.Iterable values) { if (serverCaCertsBuilder_ == null) { ensureServerCaCertsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serverCaCerts_); onChanged(); } else { serverCaCertsBuilder_.addAllMessages(values); } return this; } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearServerCaCerts() { if (serverCaCertsBuilder_ == null) { serverCaCerts_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00200000); onChanged(); } else { serverCaCertsBuilder_.clear(); } return this; } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder removeServerCaCerts(int index) { if (serverCaCertsBuilder_ == null) { ensureServerCaCertsIsMutable(); serverCaCerts_.remove(index); onChanged(); } else { serverCaCertsBuilder_.remove(index); } return this; } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.TlsCertificate.Builder getServerCaCertsBuilder( int index) { return getServerCaCertsFieldBuilder().getBuilder(index); } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.TlsCertificateOrBuilder getServerCaCertsOrBuilder( int index) { if (serverCaCertsBuilder_ == null) { return serverCaCerts_.get(index); } else { return serverCaCertsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getServerCaCertsOrBuilderList() { if (serverCaCertsBuilder_ != null) { return serverCaCertsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(serverCaCerts_); } } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.TlsCertificate.Builder addServerCaCertsBuilder() { return getServerCaCertsFieldBuilder() .addBuilder(com.google.cloud.redis.v1beta1.TlsCertificate.getDefaultInstance()); } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.TlsCertificate.Builder addServerCaCertsBuilder( int index) { return getServerCaCertsFieldBuilder() .addBuilder(index, com.google.cloud.redis.v1beta1.TlsCertificate.getDefaultInstance()); } /** * * *
     * Output only. List of server CA certificates for the instance.
     * 
* * * repeated .google.cloud.redis.v1beta1.TlsCertificate server_ca_certs = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getServerCaCertsBuilderList() { return getServerCaCertsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.redis.v1beta1.TlsCertificate, com.google.cloud.redis.v1beta1.TlsCertificate.Builder, com.google.cloud.redis.v1beta1.TlsCertificateOrBuilder> getServerCaCertsFieldBuilder() { if (serverCaCertsBuilder_ == null) { serverCaCertsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.redis.v1beta1.TlsCertificate, com.google.cloud.redis.v1beta1.TlsCertificate.Builder, com.google.cloud.redis.v1beta1.TlsCertificateOrBuilder>( serverCaCerts_, ((bitField0_ & 0x00200000) != 0), getParentForChildren(), isClean()); serverCaCerts_ = null; } return serverCaCertsBuilder_; } private int transitEncryptionMode_ = 0; /** * * *
     * Optional. The TLS mode of the Redis instance.
     * If not provided, TLS is disabled for the instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for transitEncryptionMode. */ @java.lang.Override public int getTransitEncryptionModeValue() { return transitEncryptionMode_; } /** * * *
     * Optional. The TLS mode of the Redis instance.
     * If not provided, TLS is disabled for the instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The enum numeric value on the wire for transitEncryptionMode to set. * @return This builder for chaining. */ public Builder setTransitEncryptionModeValue(int value) { transitEncryptionMode_ = value; bitField0_ |= 0x00400000; onChanged(); return this; } /** * * *
     * Optional. The TLS mode of the Redis instance.
     * If not provided, TLS is disabled for the instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The transitEncryptionMode. */ @java.lang.Override public com.google.cloud.redis.v1beta1.Instance.TransitEncryptionMode getTransitEncryptionMode() { com.google.cloud.redis.v1beta1.Instance.TransitEncryptionMode result = com.google.cloud.redis.v1beta1.Instance.TransitEncryptionMode.forNumber( transitEncryptionMode_); return result == null ? com.google.cloud.redis.v1beta1.Instance.TransitEncryptionMode.UNRECOGNIZED : result; } /** * * *
     * Optional. The TLS mode of the Redis instance.
     * If not provided, TLS is disabled for the instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The transitEncryptionMode to set. * @return This builder for chaining. */ public Builder setTransitEncryptionMode( com.google.cloud.redis.v1beta1.Instance.TransitEncryptionMode value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00400000; transitEncryptionMode_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Optional. The TLS mode of the Redis instance.
     * If not provided, TLS is disabled for the instance.
     * 
* * * .google.cloud.redis.v1beta1.Instance.TransitEncryptionMode transit_encryption_mode = 26 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ public Builder clearTransitEncryptionMode() { bitField0_ = (bitField0_ & ~0x00400000); transitEncryptionMode_ = 0; onChanged(); return this; } private com.google.cloud.redis.v1beta1.MaintenancePolicy maintenancePolicy_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.redis.v1beta1.MaintenancePolicy, com.google.cloud.redis.v1beta1.MaintenancePolicy.Builder, com.google.cloud.redis.v1beta1.MaintenancePolicyOrBuilder> maintenancePolicyBuilder_; /** * * *
     * Optional. The maintenance policy for the instance. If not provided,
     * maintenance events can be performed at any time.
     * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the maintenancePolicy field is set. */ public boolean hasMaintenancePolicy() { return ((bitField0_ & 0x00800000) != 0); } /** * * *
     * Optional. The maintenance policy for the instance. If not provided,
     * maintenance events can be performed at any time.
     * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The maintenancePolicy. */ public com.google.cloud.redis.v1beta1.MaintenancePolicy getMaintenancePolicy() { if (maintenancePolicyBuilder_ == null) { return maintenancePolicy_ == null ? com.google.cloud.redis.v1beta1.MaintenancePolicy.getDefaultInstance() : maintenancePolicy_; } else { return maintenancePolicyBuilder_.getMessage(); } } /** * * *
     * Optional. The maintenance policy for the instance. If not provided,
     * maintenance events can be performed at any time.
     * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setMaintenancePolicy(com.google.cloud.redis.v1beta1.MaintenancePolicy value) { if (maintenancePolicyBuilder_ == null) { if (value == null) { throw new NullPointerException(); } maintenancePolicy_ = value; } else { maintenancePolicyBuilder_.setMessage(value); } bitField0_ |= 0x00800000; onChanged(); return this; } /** * * *
     * Optional. The maintenance policy for the instance. If not provided,
     * maintenance events can be performed at any time.
     * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setMaintenancePolicy( com.google.cloud.redis.v1beta1.MaintenancePolicy.Builder builderForValue) { if (maintenancePolicyBuilder_ == null) { maintenancePolicy_ = builderForValue.build(); } else { maintenancePolicyBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00800000; onChanged(); return this; } /** * * *
     * Optional. The maintenance policy for the instance. If not provided,
     * maintenance events can be performed at any time.
     * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergeMaintenancePolicy(com.google.cloud.redis.v1beta1.MaintenancePolicy value) { if (maintenancePolicyBuilder_ == null) { if (((bitField0_ & 0x00800000) != 0) && maintenancePolicy_ != null && maintenancePolicy_ != com.google.cloud.redis.v1beta1.MaintenancePolicy.getDefaultInstance()) { getMaintenancePolicyBuilder().mergeFrom(value); } else { maintenancePolicy_ = value; } } else { maintenancePolicyBuilder_.mergeFrom(value); } if (maintenancePolicy_ != null) { bitField0_ |= 0x00800000; onChanged(); } return this; } /** * * *
     * Optional. The maintenance policy for the instance. If not provided,
     * maintenance events can be performed at any time.
     * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearMaintenancePolicy() { bitField0_ = (bitField0_ & ~0x00800000); maintenancePolicy_ = null; if (maintenancePolicyBuilder_ != null) { maintenancePolicyBuilder_.dispose(); maintenancePolicyBuilder_ = null; } onChanged(); return this; } /** * * *
     * Optional. The maintenance policy for the instance. If not provided,
     * maintenance events can be performed at any time.
     * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.redis.v1beta1.MaintenancePolicy.Builder getMaintenancePolicyBuilder() { bitField0_ |= 0x00800000; onChanged(); return getMaintenancePolicyFieldBuilder().getBuilder(); } /** * * *
     * Optional. The maintenance policy for the instance. If not provided,
     * maintenance events can be performed at any time.
     * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.redis.v1beta1.MaintenancePolicyOrBuilder getMaintenancePolicyOrBuilder() { if (maintenancePolicyBuilder_ != null) { return maintenancePolicyBuilder_.getMessageOrBuilder(); } else { return maintenancePolicy_ == null ? com.google.cloud.redis.v1beta1.MaintenancePolicy.getDefaultInstance() : maintenancePolicy_; } } /** * * *
     * Optional. The maintenance policy for the instance. If not provided,
     * maintenance events can be performed at any time.
     * 
* * * .google.cloud.redis.v1beta1.MaintenancePolicy maintenance_policy = 27 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.redis.v1beta1.MaintenancePolicy, com.google.cloud.redis.v1beta1.MaintenancePolicy.Builder, com.google.cloud.redis.v1beta1.MaintenancePolicyOrBuilder> getMaintenancePolicyFieldBuilder() { if (maintenancePolicyBuilder_ == null) { maintenancePolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.redis.v1beta1.MaintenancePolicy, com.google.cloud.redis.v1beta1.MaintenancePolicy.Builder, com.google.cloud.redis.v1beta1.MaintenancePolicyOrBuilder>( getMaintenancePolicy(), getParentForChildren(), isClean()); maintenancePolicy_ = null; } return maintenancePolicyBuilder_; } private com.google.cloud.redis.v1beta1.MaintenanceSchedule maintenanceSchedule_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.redis.v1beta1.MaintenanceSchedule, com.google.cloud.redis.v1beta1.MaintenanceSchedule.Builder, com.google.cloud.redis.v1beta1.MaintenanceScheduleOrBuilder> maintenanceScheduleBuilder_; /** * * *
     * Output only. Date and time of upcoming maintenance events which have been
     * scheduled.
     * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the maintenanceSchedule field is set. */ public boolean hasMaintenanceSchedule() { return ((bitField0_ & 0x01000000) != 0); } /** * * *
     * Output only. Date and time of upcoming maintenance events which have been
     * scheduled.
     * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The maintenanceSchedule. */ public com.google.cloud.redis.v1beta1.MaintenanceSchedule getMaintenanceSchedule() { if (maintenanceScheduleBuilder_ == null) { return maintenanceSchedule_ == null ? com.google.cloud.redis.v1beta1.MaintenanceSchedule.getDefaultInstance() : maintenanceSchedule_; } else { return maintenanceScheduleBuilder_.getMessage(); } } /** * * *
     * Output only. Date and time of upcoming maintenance events which have been
     * scheduled.
     * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setMaintenanceSchedule( com.google.cloud.redis.v1beta1.MaintenanceSchedule value) { if (maintenanceScheduleBuilder_ == null) { if (value == null) { throw new NullPointerException(); } maintenanceSchedule_ = value; } else { maintenanceScheduleBuilder_.setMessage(value); } bitField0_ |= 0x01000000; onChanged(); return this; } /** * * *
     * Output only. Date and time of upcoming maintenance events which have been
     * scheduled.
     * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setMaintenanceSchedule( com.google.cloud.redis.v1beta1.MaintenanceSchedule.Builder builderForValue) { if (maintenanceScheduleBuilder_ == null) { maintenanceSchedule_ = builderForValue.build(); } else { maintenanceScheduleBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x01000000; onChanged(); return this; } /** * * *
     * Output only. Date and time of upcoming maintenance events which have been
     * scheduled.
     * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeMaintenanceSchedule( com.google.cloud.redis.v1beta1.MaintenanceSchedule value) { if (maintenanceScheduleBuilder_ == null) { if (((bitField0_ & 0x01000000) != 0) && maintenanceSchedule_ != null && maintenanceSchedule_ != com.google.cloud.redis.v1beta1.MaintenanceSchedule.getDefaultInstance()) { getMaintenanceScheduleBuilder().mergeFrom(value); } else { maintenanceSchedule_ = value; } } else { maintenanceScheduleBuilder_.mergeFrom(value); } if (maintenanceSchedule_ != null) { bitField0_ |= 0x01000000; onChanged(); } return this; } /** * * *
     * Output only. Date and time of upcoming maintenance events which have been
     * scheduled.
     * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearMaintenanceSchedule() { bitField0_ = (bitField0_ & ~0x01000000); maintenanceSchedule_ = null; if (maintenanceScheduleBuilder_ != null) { maintenanceScheduleBuilder_.dispose(); maintenanceScheduleBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. Date and time of upcoming maintenance events which have been
     * scheduled.
     * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.MaintenanceSchedule.Builder getMaintenanceScheduleBuilder() { bitField0_ |= 0x01000000; onChanged(); return getMaintenanceScheduleFieldBuilder().getBuilder(); } /** * * *
     * Output only. Date and time of upcoming maintenance events which have been
     * scheduled.
     * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.MaintenanceScheduleOrBuilder getMaintenanceScheduleOrBuilder() { if (maintenanceScheduleBuilder_ != null) { return maintenanceScheduleBuilder_.getMessageOrBuilder(); } else { return maintenanceSchedule_ == null ? com.google.cloud.redis.v1beta1.MaintenanceSchedule.getDefaultInstance() : maintenanceSchedule_; } } /** * * *
     * Output only. Date and time of upcoming maintenance events which have been
     * scheduled.
     * 
* * * .google.cloud.redis.v1beta1.MaintenanceSchedule maintenance_schedule = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.redis.v1beta1.MaintenanceSchedule, com.google.cloud.redis.v1beta1.MaintenanceSchedule.Builder, com.google.cloud.redis.v1beta1.MaintenanceScheduleOrBuilder> getMaintenanceScheduleFieldBuilder() { if (maintenanceScheduleBuilder_ == null) { maintenanceScheduleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.redis.v1beta1.MaintenanceSchedule, com.google.cloud.redis.v1beta1.MaintenanceSchedule.Builder, com.google.cloud.redis.v1beta1.MaintenanceScheduleOrBuilder>( getMaintenanceSchedule(), getParentForChildren(), isClean()); maintenanceSchedule_ = null; } return maintenanceScheduleBuilder_; } private int replicaCount_; /** * * *
     * Optional. The number of replica nodes. The valid range for the Standard Tier with
     * read replicas enabled is [1-5] and defaults to 2. If read replicas are not
     * enabled for a Standard Tier instance, the only valid value is 1 and the
     * default is 1. The valid value for basic tier is 0 and the default is also
     * 0.
     * 
* * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; * * @return The replicaCount. */ @java.lang.Override public int getReplicaCount() { return replicaCount_; } /** * * *
     * Optional. The number of replica nodes. The valid range for the Standard Tier with
     * read replicas enabled is [1-5] and defaults to 2. If read replicas are not
     * enabled for a Standard Tier instance, the only valid value is 1 and the
     * default is 1. The valid value for basic tier is 0 and the default is also
     * 0.
     * 
* * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; * * @param value The replicaCount to set. * @return This builder for chaining. */ public Builder setReplicaCount(int value) { replicaCount_ = value; bitField0_ |= 0x02000000; onChanged(); return this; } /** * * *
     * Optional. The number of replica nodes. The valid range for the Standard Tier with
     * read replicas enabled is [1-5] and defaults to 2. If read replicas are not
     * enabled for a Standard Tier instance, the only valid value is 1 and the
     * default is 1. The valid value for basic tier is 0 and the default is also
     * 0.
     * 
* * int32 replica_count = 31 [(.google.api.field_behavior) = OPTIONAL]; * * @return This builder for chaining. */ public Builder clearReplicaCount() { bitField0_ = (bitField0_ & ~0x02000000); replicaCount_ = 0; onChanged(); return this; } private java.util.List nodes_ = java.util.Collections.emptyList(); private void ensureNodesIsMutable() { if (!((bitField0_ & 0x04000000) != 0)) { nodes_ = new java.util.ArrayList(nodes_); bitField0_ |= 0x04000000; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.redis.v1beta1.NodeInfo, com.google.cloud.redis.v1beta1.NodeInfo.Builder, com.google.cloud.redis.v1beta1.NodeInfoOrBuilder> nodesBuilder_; /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getNodesList() { if (nodesBuilder_ == null) { return java.util.Collections.unmodifiableList(nodes_); } else { return nodesBuilder_.getMessageList(); } } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public int getNodesCount() { if (nodesBuilder_ == null) { return nodes_.size(); } else { return nodesBuilder_.getCount(); } } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.NodeInfo getNodes(int index) { if (nodesBuilder_ == null) { return nodes_.get(index); } else { return nodesBuilder_.getMessage(index); } } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setNodes(int index, com.google.cloud.redis.v1beta1.NodeInfo value) { if (nodesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNodesIsMutable(); nodes_.set(index, value); onChanged(); } else { nodesBuilder_.setMessage(index, value); } return this; } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setNodes( int index, com.google.cloud.redis.v1beta1.NodeInfo.Builder builderForValue) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); nodes_.set(index, builderForValue.build()); onChanged(); } else { nodesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addNodes(com.google.cloud.redis.v1beta1.NodeInfo value) { if (nodesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNodesIsMutable(); nodes_.add(value); onChanged(); } else { nodesBuilder_.addMessage(value); } return this; } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addNodes(int index, com.google.cloud.redis.v1beta1.NodeInfo value) { if (nodesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNodesIsMutable(); nodes_.add(index, value); onChanged(); } else { nodesBuilder_.addMessage(index, value); } return this; } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addNodes(com.google.cloud.redis.v1beta1.NodeInfo.Builder builderForValue) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); nodes_.add(builderForValue.build()); onChanged(); } else { nodesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addNodes( int index, com.google.cloud.redis.v1beta1.NodeInfo.Builder builderForValue) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); nodes_.add(index, builderForValue.build()); onChanged(); } else { nodesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder addAllNodes( java.lang.Iterable values) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, nodes_); onChanged(); } else { nodesBuilder_.addAllMessages(values); } return this; } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearNodes() { if (nodesBuilder_ == null) { nodes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x04000000); onChanged(); } else { nodesBuilder_.clear(); } return this; } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder removeNodes(int index) { if (nodesBuilder_ == null) { ensureNodesIsMutable(); nodes_.remove(index); onChanged(); } else { nodesBuilder_.remove(index); } return this; } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.NodeInfo.Builder getNodesBuilder(int index) { return getNodesFieldBuilder().getBuilder(index); } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.NodeInfoOrBuilder getNodesOrBuilder(int index) { if (nodesBuilder_ == null) { return nodes_.get(index); } else { return nodesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getNodesOrBuilderList() { if (nodesBuilder_ != null) { return nodesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(nodes_); } } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.NodeInfo.Builder addNodesBuilder() { return getNodesFieldBuilder() .addBuilder(com.google.cloud.redis.v1beta1.NodeInfo.getDefaultInstance()); } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.cloud.redis.v1beta1.NodeInfo.Builder addNodesBuilder(int index) { return getNodesFieldBuilder() .addBuilder(index, com.google.cloud.redis.v1beta1.NodeInfo.getDefaultInstance()); } /** * * *
     * Output only. Info per node.
     * 
* * * repeated .google.cloud.redis.v1beta1.NodeInfo nodes = 32 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public java.util.List getNodesBuilderList() { return getNodesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.redis.v1beta1.NodeInfo, com.google.cloud.redis.v1beta1.NodeInfo.Builder, com.google.cloud.redis.v1beta1.NodeInfoOrBuilder> getNodesFieldBuilder() { if (nodesBuilder_ == null) { nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.redis.v1beta1.NodeInfo, com.google.cloud.redis.v1beta1.NodeInfo.Builder, com.google.cloud.redis.v1beta1.NodeInfoOrBuilder>( nodes_, ((bitField0_ & 0x04000000) != 0), getParentForChildren(), isClean()); nodes_ = null; } return nodesBuilder_; } private java.lang.Object readEndpoint_ = ""; /** * * *
     * Output only. Hostname or IP address of the exposed readonly Redis
     * endpoint. Standard tier only. Targets all healthy replica nodes in
     * instance. Replication is asynchronous and replica nodes will exhibit some
     * lag behind the primary. Write requests must target 'host'.
     * 
* * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The readEndpoint. */ public java.lang.String getReadEndpoint() { java.lang.Object ref = readEndpoint_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); readEndpoint_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. Hostname or IP address of the exposed readonly Redis
     * endpoint. Standard tier only. Targets all healthy replica nodes in
     * instance. Replication is asynchronous and replica nodes will exhibit some
     * lag behind the primary. Write requests must target 'host'.
     * 
* * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The bytes for readEndpoint. */ public com.google.protobuf.ByteString getReadEndpointBytes() { java.lang.Object ref = readEndpoint_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); readEndpoint_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. Hostname or IP address of the exposed readonly Redis
     * endpoint. Standard tier only. Targets all healthy replica nodes in
     * instance. Replication is asynchronous and replica nodes will exhibit some
     * lag behind the primary. Write requests must target 'host'.
     * 
* * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The readEndpoint to set. * @return This builder for chaining. */ public Builder setReadEndpoint(java.lang.String value) { if (value == null) { throw new NullPointerException(); } readEndpoint_ = value; bitField0_ |= 0x08000000; onChanged(); return this; } /** * * *
     * Output only. Hostname or IP address of the exposed readonly Redis
     * endpoint. Standard tier only. Targets all healthy replica nodes in
     * instance. Replication is asynchronous and replica nodes will exhibit some
     * lag behind the primary. Write requests must target 'host'.
     * 
* * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearReadEndpoint() { readEndpoint_ = getDefaultInstance().getReadEndpoint(); bitField0_ = (bitField0_ & ~0x08000000); onChanged(); return this; } /** * * *
     * Output only. Hostname or IP address of the exposed readonly Redis
     * endpoint. Standard tier only. Targets all healthy replica nodes in
     * instance. Replication is asynchronous and replica nodes will exhibit some
     * lag behind the primary. Write requests must target 'host'.
     * 
* * string read_endpoint = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The bytes for readEndpoint to set. * @return This builder for chaining. */ public Builder setReadEndpointBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); readEndpoint_ = value; bitField0_ |= 0x08000000; onChanged(); return this; } private int readEndpointPort_; /** * * *
     * Output only. The port number of the exposed readonly redis
     * endpoint. Standard tier only. Write requests should target 'port'.
     * 
* * int32 read_endpoint_port = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return The readEndpointPort. */ @java.lang.Override public int getReadEndpointPort() { return readEndpointPort_; } /** * * *
     * Output only. The port number of the exposed readonly redis
     * endpoint. Standard tier only. Write requests should target 'port'.
     * 
* * int32 read_endpoint_port = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @param value The readEndpointPort to set. * @return This builder for chaining. */ public Builder setReadEndpointPort(int value) { readEndpointPort_ = value; bitField0_ |= 0x10000000; onChanged(); return this; } /** * * *
     * Output only. The port number of the exposed readonly redis
     * endpoint. Standard tier only. Write requests should target 'port'.
     * 
* * int32 read_endpoint_port = 34 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearReadEndpointPort() { bitField0_ = (bitField0_ & ~0x10000000); readEndpointPort_ = 0; onChanged(); return this; } private int readReplicasMode_ = 0; /** * * *
     * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
     * 
* * * .google.cloud.redis.v1beta1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The enum numeric value on the wire for readReplicasMode. */ @java.lang.Override public int getReadReplicasModeValue() { return readReplicasMode_; } /** * * *
     * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
     * 
* * * .google.cloud.redis.v1beta1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The enum numeric value on the wire for readReplicasMode to set. * @return This builder for chaining. */ public Builder setReadReplicasModeValue(int value) { readReplicasMode_ = value; bitField0_ |= 0x20000000; onChanged(); return this; } /** * * *
     * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
     * 
* * * .google.cloud.redis.v1beta1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The readReplicasMode. */ @java.lang.Override public com.google.cloud.redis.v1beta1.Instance.ReadReplicasMode getReadReplicasMode() { com.google.cloud.redis.v1beta1.Instance.ReadReplicasMode result = com.google.cloud.redis.v1beta1.Instance.ReadReplicasMode.forNumber(readReplicasMode_); return result == null ? com.google.cloud.redis.v1beta1.Instance.ReadReplicasMode.UNRECOGNIZED : result; } /** * * *
     * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
     * 
* * * .google.cloud.redis.v1beta1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * * * @param value The readReplicasMode to set. * @return This builder for chaining. */ public Builder setReadReplicasMode( com.google.cloud.redis.v1beta1.Instance.ReadReplicasMode value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x20000000; readReplicasMode_ = value.getNumber(); onChanged(); return this; } /** * * *
     * Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.
     * 
* * * .google.cloud.redis.v1beta1.Instance.ReadReplicasMode read_replicas_mode = 35 [(.google.api.field_behavior) = OPTIONAL]; * * * @return This builder for chaining. */ public Builder clearReadReplicasMode() { bitField0_ = (bitField0_ & ~0x20000000); readReplicasMode_ = 0; onChanged(); return this; } private com.google.cloud.redis.v1beta1.PersistenceConfig persistenceConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.redis.v1beta1.PersistenceConfig, com.google.cloud.redis.v1beta1.PersistenceConfig.Builder, com.google.cloud.redis.v1beta1.PersistenceConfigOrBuilder> persistenceConfigBuilder_; /** * * *
     * Optional. Persistence configuration parameters
     * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * * * @return Whether the persistenceConfig field is set. */ public boolean hasPersistenceConfig() { return ((bitField0_ & 0x40000000) != 0); } /** * * *
     * Optional. Persistence configuration parameters
     * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * * * @return The persistenceConfig. */ public com.google.cloud.redis.v1beta1.PersistenceConfig getPersistenceConfig() { if (persistenceConfigBuilder_ == null) { return persistenceConfig_ == null ? com.google.cloud.redis.v1beta1.PersistenceConfig.getDefaultInstance() : persistenceConfig_; } else { return persistenceConfigBuilder_.getMessage(); } } /** * * *
     * Optional. Persistence configuration parameters
     * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setPersistenceConfig(com.google.cloud.redis.v1beta1.PersistenceConfig value) { if (persistenceConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } persistenceConfig_ = value; } else { persistenceConfigBuilder_.setMessage(value); } bitField0_ |= 0x40000000; onChanged(); return this; } /** * * *
     * Optional. Persistence configuration parameters
     * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder setPersistenceConfig( com.google.cloud.redis.v1beta1.PersistenceConfig.Builder builderForValue) { if (persistenceConfigBuilder_ == null) { persistenceConfig_ = builderForValue.build(); } else { persistenceConfigBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x40000000; onChanged(); return this; } /** * * *
     * Optional. Persistence configuration parameters
     * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder mergePersistenceConfig(com.google.cloud.redis.v1beta1.PersistenceConfig value) { if (persistenceConfigBuilder_ == null) { if (((bitField0_ & 0x40000000) != 0) && persistenceConfig_ != null && persistenceConfig_ != com.google.cloud.redis.v1beta1.PersistenceConfig.getDefaultInstance()) { getPersistenceConfigBuilder().mergeFrom(value); } else { persistenceConfig_ = value; } } else { persistenceConfigBuilder_.mergeFrom(value); } if (persistenceConfig_ != null) { bitField0_ |= 0x40000000; onChanged(); } return this; } /** * * *
     * Optional. Persistence configuration parameters
     * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ public Builder clearPersistenceConfig() { bitField0_ = (bitField0_ & ~0x40000000); persistenceConfig_ = null; if (persistenceConfigBuilder_ != null) { persistenceConfigBuilder_.dispose(); persistenceConfigBuilder_ = null; } onChanged(); return this; } /** * * *
     * Optional. Persistence configuration parameters
     * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.redis.v1beta1.PersistenceConfig.Builder getPersistenceConfigBuilder() { bitField0_ |= 0x40000000; onChanged(); return getPersistenceConfigFieldBuilder().getBuilder(); } /** * * *
     * Optional. Persistence configuration parameters
     * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ public com.google.cloud.redis.v1beta1.PersistenceConfigOrBuilder getPersistenceConfigOrBuilder() { if (persistenceConfigBuilder_ != null) { return persistenceConfigBuilder_.getMessageOrBuilder(); } else { return persistenceConfig_ == null ? com.google.cloud.redis.v1beta1.PersistenceConfig.getDefaultInstance() : persistenceConfig_; } } /** * * *
     * Optional. Persistence configuration parameters
     * 
* * * .google.cloud.redis.v1beta1.PersistenceConfig persistence_config = 37 [(.google.api.field_behavior) = OPTIONAL]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.redis.v1beta1.PersistenceConfig, com.google.cloud.redis.v1beta1.PersistenceConfig.Builder, com.google.cloud.redis.v1beta1.PersistenceConfigOrBuilder> getPersistenceConfigFieldBuilder() { if (persistenceConfigBuilder_ == null) { persistenceConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.redis.v1beta1.PersistenceConfig, com.google.cloud.redis.v1beta1.PersistenceConfig.Builder, com.google.cloud.redis.v1beta1.PersistenceConfigOrBuilder>( getPersistenceConfig(), getParentForChildren(), isClean()); persistenceConfig_ = null; } return persistenceConfigBuilder_; } @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.redis.v1beta1.Instance) } // @@protoc_insertion_point(class_scope:google.cloud.redis.v1beta1.Instance) private static final com.google.cloud.redis.v1beta1.Instance DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.redis.v1beta1.Instance(); } public static com.google.cloud.redis.v1beta1.Instance getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Instance 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.redis.v1beta1.Instance getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy