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

yandex.cloud.api.mdb.mysql.v1.UserOuterClass Maven / Gradle / Ivy

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: yandex/cloud/mdb/mysql/v1/user.proto

package yandex.cloud.api.mdb.mysql.v1;

public final class UserOuterClass {
  private UserOuterClass() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  /**
   * Protobuf enum {@code yandex.cloud.mdb.mysql.v1.GlobalPermission}
   */
  public enum GlobalPermission
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * GLOBAL_PERMISSION_UNSPECIFIED = 0;
     */
    GLOBAL_PERMISSION_UNSPECIFIED(0),
    /**
     * 
     * Enables use of the `SHOW MASTER STATUS`, `SHOW SLAVE STATUS`, and `SHOW BINARY LOGS` statements.
     * 
* * REPLICATION_CLIENT = 1; */ REPLICATION_CLIENT(1), /** *
     * Enables the account to request updates that have been made to databases on the master server,
     * using the `SHOW SLAVE HOSTS`, `SHOW RELAYLOG EVENTS` and `SHOW BINLOG EVENTS` statements.
     * 
* * REPLICATION_SLAVE = 2; */ REPLICATION_SLAVE(2), /** *
     * Enables display of information about the the statements currently being performed by sessions (the set of threads executing within the server).
     * The privilege enables use of `SHOW PROCESSLIST` or `mysqladmin` processlist to see threads belonging to other users.
     * You can always see your own threads. The `PROCESS` privilege also enables use of `SHOW ENGINE`.
     * 
* * PROCESS = 3; */ PROCESS(3), /** *
     * Enables use of the `FLUSH OPTIMIZER_COSTS` statement.
     * 
* * FLUSH_OPTIMIZER_COSTS = 4; */ FLUSH_OPTIMIZER_COSTS(4), /** *
     * Enables a user to access definitions and properties of all stored routines (stored procedures and functions), even those for which the user is not named as the routine DEFINER.
     * This access includes:
     * The contents of the Information Schema `ROUTINES` table.
     * The `SHOW CREATE FUNCTION` and `SHOW CREATE PROCEDURE` statements.
     * The `SHOW FUNCTION CODE` and `SHOW PROCEDURE CODE` statements.
     * The SHOW `FUNCTION STATUS` and `SHOW PROCEDURE STATUS` statements.
     * 
* * SHOW_ROUTINE = 5; */ SHOW_ROUTINE(5), UNRECOGNIZED(-1), ; /** * GLOBAL_PERMISSION_UNSPECIFIED = 0; */ public static final int GLOBAL_PERMISSION_UNSPECIFIED_VALUE = 0; /** *
     * Enables use of the `SHOW MASTER STATUS`, `SHOW SLAVE STATUS`, and `SHOW BINARY LOGS` statements.
     * 
* * REPLICATION_CLIENT = 1; */ public static final int REPLICATION_CLIENT_VALUE = 1; /** *
     * Enables the account to request updates that have been made to databases on the master server,
     * using the `SHOW SLAVE HOSTS`, `SHOW RELAYLOG EVENTS` and `SHOW BINLOG EVENTS` statements.
     * 
* * REPLICATION_SLAVE = 2; */ public static final int REPLICATION_SLAVE_VALUE = 2; /** *
     * Enables display of information about the the statements currently being performed by sessions (the set of threads executing within the server).
     * The privilege enables use of `SHOW PROCESSLIST` or `mysqladmin` processlist to see threads belonging to other users.
     * You can always see your own threads. The `PROCESS` privilege also enables use of `SHOW ENGINE`.
     * 
* * PROCESS = 3; */ public static final int PROCESS_VALUE = 3; /** *
     * Enables use of the `FLUSH OPTIMIZER_COSTS` statement.
     * 
* * FLUSH_OPTIMIZER_COSTS = 4; */ public static final int FLUSH_OPTIMIZER_COSTS_VALUE = 4; /** *
     * Enables a user to access definitions and properties of all stored routines (stored procedures and functions), even those for which the user is not named as the routine DEFINER.
     * This access includes:
     * The contents of the Information Schema `ROUTINES` table.
     * The `SHOW CREATE FUNCTION` and `SHOW CREATE PROCEDURE` statements.
     * The `SHOW FUNCTION CODE` and `SHOW PROCEDURE CODE` statements.
     * The SHOW `FUNCTION STATUS` and `SHOW PROCEDURE STATUS` statements.
     * 
* * SHOW_ROUTINE = 5; */ public static final int SHOW_ROUTINE_VALUE = 5; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static GlobalPermission 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 GlobalPermission forNumber(int value) { switch (value) { case 0: return GLOBAL_PERMISSION_UNSPECIFIED; case 1: return REPLICATION_CLIENT; case 2: return REPLICATION_SLAVE; case 3: return PROCESS; case 4: return FLUSH_OPTIMIZER_COSTS; case 5: return SHOW_ROUTINE; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< GlobalPermission> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public GlobalPermission findValueByNumber(int number) { return GlobalPermission.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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.getDescriptor().getEnumTypes().get(0); } private static final GlobalPermission[] VALUES = values(); public static GlobalPermission 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 GlobalPermission(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:yandex.cloud.mdb.mysql.v1.GlobalPermission) } /** * Protobuf enum {@code yandex.cloud.mdb.mysql.v1.AuthPlugin} */ public enum AuthPlugin implements com.google.protobuf.ProtocolMessageEnum { /** * AUTH_PLUGIN_UNSPECIFIED = 0; */ AUTH_PLUGIN_UNSPECIFIED(0), /** *
     * Use [Native Pluggable Authentication](https://dev.mysql.com/doc/refman/8.0/en/native-pluggable-authentication.html).
     * 
* * MYSQL_NATIVE_PASSWORD = 1; */ MYSQL_NATIVE_PASSWORD(1), /** *
     * Use [Caching SHA-2 Pluggable Authentication](https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html).
     * 
* * CACHING_SHA2_PASSWORD = 2; */ CACHING_SHA2_PASSWORD(2), /** *
     * Use [SHA-256 Pluggable Authentication](https://dev.mysql.com/doc/refman/8.0/en/sha256-pluggable-authentication.html).
     * 
* * SHA256_PASSWORD = 3; */ SHA256_PASSWORD(3), UNRECOGNIZED(-1), ; /** * AUTH_PLUGIN_UNSPECIFIED = 0; */ public static final int AUTH_PLUGIN_UNSPECIFIED_VALUE = 0; /** *
     * Use [Native Pluggable Authentication](https://dev.mysql.com/doc/refman/8.0/en/native-pluggable-authentication.html).
     * 
* * MYSQL_NATIVE_PASSWORD = 1; */ public static final int MYSQL_NATIVE_PASSWORD_VALUE = 1; /** *
     * Use [Caching SHA-2 Pluggable Authentication](https://dev.mysql.com/doc/refman/8.0/en/caching-sha2-pluggable-authentication.html).
     * 
* * CACHING_SHA2_PASSWORD = 2; */ public static final int CACHING_SHA2_PASSWORD_VALUE = 2; /** *
     * Use [SHA-256 Pluggable Authentication](https://dev.mysql.com/doc/refman/8.0/en/sha256-pluggable-authentication.html).
     * 
* * SHA256_PASSWORD = 3; */ public static final int SHA256_PASSWORD_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 AuthPlugin 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 AuthPlugin forNumber(int value) { switch (value) { case 0: return AUTH_PLUGIN_UNSPECIFIED; case 1: return MYSQL_NATIVE_PASSWORD; case 2: return CACHING_SHA2_PASSWORD; case 3: return SHA256_PASSWORD; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< AuthPlugin> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public AuthPlugin findValueByNumber(int number) { return AuthPlugin.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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.getDescriptor().getEnumTypes().get(1); } private static final AuthPlugin[] VALUES = values(); public static AuthPlugin 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 AuthPlugin(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:yandex.cloud.mdb.mysql.v1.AuthPlugin) } public interface UserOrBuilder extends // @@protoc_insertion_point(interface_extends:yandex.cloud.mdb.mysql.v1.User) com.google.protobuf.MessageOrBuilder { /** *
     * Name of the user.
     * 
* * string name = 1; * @return The name. */ java.lang.String getName(); /** *
     * Name of the user.
     * 
* * string name = 1; * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** *
     * ID of the cluster the user belongs to.
     * 
* * string cluster_id = 2; * @return The clusterId. */ java.lang.String getClusterId(); /** *
     * ID of the cluster the user belongs to.
     * 
* * string cluster_id = 2; * @return The bytes for clusterId. */ com.google.protobuf.ByteString getClusterIdBytes(); /** *
     * Set of permissions granted to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ java.util.List getPermissionsList(); /** *
     * Set of permissions granted to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission getPermissions(int index); /** *
     * Set of permissions granted to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ int getPermissionsCount(); /** *
     * Set of permissions granted to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ java.util.List getPermissionsOrBuilderList(); /** *
     * Set of permissions granted to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder getPermissionsOrBuilder( int index); /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the globalPermissions. */ java.util.List getGlobalPermissionsList(); /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return The count of globalPermissions. */ int getGlobalPermissionsCount(); /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the element to return. * @return The globalPermissions at the given index. */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission getGlobalPermissions(int index); /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the enum numeric values on the wire for globalPermissions. */ java.util.List getGlobalPermissionsValueList(); /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the value to return. * @return The enum numeric value on the wire of globalPermissions at the given index. */ int getGlobalPermissionsValue(int index); /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return Whether the connectionLimits field is set. */ boolean hasConnectionLimits(); /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return The connectionLimits. */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits getConnectionLimits(); /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder getConnectionLimitsOrBuilder(); /** *
     * User authentication plugin.
     * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The enum numeric value on the wire for authenticationPlugin. */ int getAuthenticationPluginValue(); /** *
     * User authentication plugin.
     * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The authenticationPlugin. */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin getAuthenticationPlugin(); } /** *
   * An object that represents MySQL user.
   * See [the documentation](/docs/managed-mysql/operations/cluster-users) for details.
   * 
* * Protobuf type {@code yandex.cloud.mdb.mysql.v1.User} */ public static final class User extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:yandex.cloud.mdb.mysql.v1.User) UserOrBuilder { private static final long serialVersionUID = 0L; // Use User.newBuilder() to construct. private User(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private User() { name_ = ""; clusterId_ = ""; permissions_ = java.util.Collections.emptyList(); globalPermissions_ = java.util.Collections.emptyList(); authenticationPlugin_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new User(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private User( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); clusterId_ = s; break; } case 26: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { permissions_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } permissions_.add( input.readMessage(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.parser(), extensionRegistry)); break; } case 32: { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000002) != 0)) { globalPermissions_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } globalPermissions_.add(rawValue); break; } case 34: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while(input.getBytesUntilLimit() > 0) { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000002) != 0)) { globalPermissions_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } globalPermissions_.add(rawValue); } input.popLimit(oldLimit); break; } case 42: { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder subBuilder = null; if (connectionLimits_ != null) { subBuilder = connectionLimits_.toBuilder(); } connectionLimits_ = input.readMessage(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(connectionLimits_); connectionLimits_ = subBuilder.buildPartial(); } break; } case 48: { int rawValue = input.readEnum(); authenticationPlugin_ = rawValue; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { permissions_ = java.util.Collections.unmodifiableList(permissions_); } if (((mutable_bitField0_ & 0x00000002) != 0)) { globalPermissions_ = java.util.Collections.unmodifiableList(globalPermissions_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_User_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_User_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User.class, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
     * Name of the user.
     * 
* * string name = 1; * @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; } } /** *
     * Name of the user.
     * 
* * string name = 1; * @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 CLUSTER_ID_FIELD_NUMBER = 2; private volatile java.lang.Object clusterId_; /** *
     * ID of the cluster the user belongs to.
     * 
* * string cluster_id = 2; * @return The clusterId. */ @java.lang.Override public java.lang.String getClusterId() { java.lang.Object ref = clusterId_; 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(); clusterId_ = s; return s; } } /** *
     * ID of the cluster the user belongs to.
     * 
* * string cluster_id = 2; * @return The bytes for clusterId. */ @java.lang.Override public com.google.protobuf.ByteString getClusterIdBytes() { java.lang.Object ref = clusterId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); clusterId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PERMISSIONS_FIELD_NUMBER = 3; private java.util.List permissions_; /** *
     * Set of permissions granted to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ @java.lang.Override public java.util.List getPermissionsList() { return permissions_; } /** *
     * Set of permissions granted to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ @java.lang.Override public java.util.List getPermissionsOrBuilderList() { return permissions_; } /** *
     * Set of permissions granted to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ @java.lang.Override public int getPermissionsCount() { return permissions_.size(); } /** *
     * Set of permissions granted to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission getPermissions(int index) { return permissions_.get(index); } /** *
     * Set of permissions granted to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder getPermissionsOrBuilder( int index) { return permissions_.get(index); } public static final int GLOBAL_PERMISSIONS_FIELD_NUMBER = 4; private java.util.List globalPermissions_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission> globalPermissions_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission>() { public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission convert(java.lang.Integer from) { @SuppressWarnings("deprecation") yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission result = yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission.valueOf(from); return result == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission.UNRECOGNIZED : result; } }; /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the globalPermissions. */ @java.lang.Override public java.util.List getGlobalPermissionsList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission>(globalPermissions_, globalPermissions_converter_); } /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return The count of globalPermissions. */ @java.lang.Override public int getGlobalPermissionsCount() { return globalPermissions_.size(); } /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the element to return. * @return The globalPermissions at the given index. */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission getGlobalPermissions(int index) { return globalPermissions_converter_.convert(globalPermissions_.get(index)); } /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the enum numeric values on the wire for globalPermissions. */ @java.lang.Override public java.util.List getGlobalPermissionsValueList() { return globalPermissions_; } /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the value to return. * @return The enum numeric value on the wire of globalPermissions at the given index. */ @java.lang.Override public int getGlobalPermissionsValue(int index) { return globalPermissions_.get(index); } private int globalPermissionsMemoizedSerializedSize; public static final int CONNECTION_LIMITS_FIELD_NUMBER = 5; private yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits connectionLimits_; /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return Whether the connectionLimits field is set. */ @java.lang.Override public boolean hasConnectionLimits() { return connectionLimits_ != null; } /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return The connectionLimits. */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits getConnectionLimits() { return connectionLimits_ == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.getDefaultInstance() : connectionLimits_; } /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder getConnectionLimitsOrBuilder() { return getConnectionLimits(); } public static final int AUTHENTICATION_PLUGIN_FIELD_NUMBER = 6; private int authenticationPlugin_; /** *
     * User authentication plugin.
     * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The enum numeric value on the wire for authenticationPlugin. */ @java.lang.Override public int getAuthenticationPluginValue() { return authenticationPlugin_; } /** *
     * User authentication plugin.
     * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The authenticationPlugin. */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin getAuthenticationPlugin() { @SuppressWarnings("deprecation") yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin result = yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.valueOf(authenticationPlugin_); return result == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.UNRECOGNIZED : result; } 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 { getSerializedSize(); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clusterId_); } for (int i = 0; i < permissions_.size(); i++) { output.writeMessage(3, permissions_.get(i)); } if (getGlobalPermissionsList().size() > 0) { output.writeUInt32NoTag(34); output.writeUInt32NoTag(globalPermissionsMemoizedSerializedSize); } for (int i = 0; i < globalPermissions_.size(); i++) { output.writeEnumNoTag(globalPermissions_.get(i)); } if (connectionLimits_ != null) { output.writeMessage(5, getConnectionLimits()); } if (authenticationPlugin_ != yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.AUTH_PLUGIN_UNSPECIFIED.getNumber()) { output.writeEnum(6, authenticationPlugin_); } unknownFields.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(clusterId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clusterId_); } for (int i = 0; i < permissions_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, permissions_.get(i)); } { int dataSize = 0; for (int i = 0; i < globalPermissions_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeEnumSizeNoTag(globalPermissions_.get(i)); } size += dataSize; if (!getGlobalPermissionsList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(dataSize); }globalPermissionsMemoizedSerializedSize = dataSize; } if (connectionLimits_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getConnectionLimits()); } if (authenticationPlugin_ != yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.AUTH_PLUGIN_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(6, authenticationPlugin_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User)) { return super.equals(obj); } yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User other = (yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User) obj; if (!getName() .equals(other.getName())) return false; if (!getClusterId() .equals(other.getClusterId())) return false; if (!getPermissionsList() .equals(other.getPermissionsList())) return false; if (!globalPermissions_.equals(other.globalPermissions_)) return false; if (hasConnectionLimits() != other.hasConnectionLimits()) return false; if (hasConnectionLimits()) { if (!getConnectionLimits() .equals(other.getConnectionLimits())) return false; } if (authenticationPlugin_ != other.authenticationPlugin_) return false; if (!unknownFields.equals(other.unknownFields)) 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) + CLUSTER_ID_FIELD_NUMBER; hash = (53 * hash) + getClusterId().hashCode(); if (getPermissionsCount() > 0) { hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + getPermissionsList().hashCode(); } if (getGlobalPermissionsCount() > 0) { hash = (37 * hash) + GLOBAL_PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + globalPermissions_.hashCode(); } if (hasConnectionLimits()) { hash = (37 * hash) + CONNECTION_LIMITS_FIELD_NUMBER; hash = (53 * hash) + getConnectionLimits().hashCode(); } hash = (37 * hash) + AUTHENTICATION_PLUGIN_FIELD_NUMBER; hash = (53 * hash) + authenticationPlugin_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User 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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User 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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User 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(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User 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; } /** *
     * An object that represents MySQL user.
     * See [the documentation](/docs/managed-mysql/operations/cluster-users) for details.
     * 
* * Protobuf type {@code yandex.cloud.mdb.mysql.v1.User} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yandex.cloud.mdb.mysql.v1.User) yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_User_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_User_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User.class, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User.Builder.class); } // Construct using yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getPermissionsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; clusterId_ = ""; if (permissionsBuilder_ == null) { permissions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { permissionsBuilder_.clear(); } globalPermissions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); if (connectionLimitsBuilder_ == null) { connectionLimits_ = null; } else { connectionLimits_ = null; connectionLimitsBuilder_ = null; } authenticationPlugin_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_User_descriptor; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User getDefaultInstanceForType() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User.getDefaultInstance(); } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User build() { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User buildPartial() { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User result = new yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User(this); int from_bitField0_ = bitField0_; result.name_ = name_; result.clusterId_ = clusterId_; if (permissionsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { permissions_ = java.util.Collections.unmodifiableList(permissions_); bitField0_ = (bitField0_ & ~0x00000001); } result.permissions_ = permissions_; } else { result.permissions_ = permissionsBuilder_.build(); } if (((bitField0_ & 0x00000002) != 0)) { globalPermissions_ = java.util.Collections.unmodifiableList(globalPermissions_); bitField0_ = (bitField0_ & ~0x00000002); } result.globalPermissions_ = globalPermissions_; if (connectionLimitsBuilder_ == null) { result.connectionLimits_ = connectionLimits_; } else { result.connectionLimits_ = connectionLimitsBuilder_.build(); } result.authenticationPlugin_ = authenticationPlugin_; onBuilt(); return result; } @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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User) { return mergeFrom((yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User other) { if (other == yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getClusterId().isEmpty()) { clusterId_ = other.clusterId_; onChanged(); } if (permissionsBuilder_ == null) { if (!other.permissions_.isEmpty()) { if (permissions_.isEmpty()) { permissions_ = other.permissions_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensurePermissionsIsMutable(); permissions_.addAll(other.permissions_); } onChanged(); } } else { if (!other.permissions_.isEmpty()) { if (permissionsBuilder_.isEmpty()) { permissionsBuilder_.dispose(); permissionsBuilder_ = null; permissions_ = other.permissions_; bitField0_ = (bitField0_ & ~0x00000001); permissionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPermissionsFieldBuilder() : null; } else { permissionsBuilder_.addAllMessages(other.permissions_); } } } if (!other.globalPermissions_.isEmpty()) { if (globalPermissions_.isEmpty()) { globalPermissions_ = other.globalPermissions_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureGlobalPermissionsIsMutable(); globalPermissions_.addAll(other.globalPermissions_); } onChanged(); } if (other.hasConnectionLimits()) { mergeConnectionLimits(other.getConnectionLimits()); } if (other.authenticationPlugin_ != 0) { setAuthenticationPluginValue(other.getAuthenticationPluginValue()); } this.mergeUnknownFields(other.unknownFields); 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 { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
       * Name of the user.
       * 
* * string name = 1; * @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; } } /** *
       * Name of the user.
       * 
* * string name = 1; * @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; } } /** *
       * Name of the user.
       * 
* * string name = 1; * @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; onChanged(); return this; } /** *
       * Name of the user.
       * 
* * string name = 1; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * Name of the user.
       * 
* * string name = 1; * @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; onChanged(); return this; } private java.lang.Object clusterId_ = ""; /** *
       * ID of the cluster the user belongs to.
       * 
* * string cluster_id = 2; * @return The clusterId. */ public java.lang.String getClusterId() { java.lang.Object ref = clusterId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); clusterId_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * ID of the cluster the user belongs to.
       * 
* * string cluster_id = 2; * @return The bytes for clusterId. */ public com.google.protobuf.ByteString getClusterIdBytes() { java.lang.Object ref = clusterId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); clusterId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * ID of the cluster the user belongs to.
       * 
* * string cluster_id = 2; * @param value The clusterId to set. * @return This builder for chaining. */ public Builder setClusterId( java.lang.String value) { if (value == null) { throw new NullPointerException(); } clusterId_ = value; onChanged(); return this; } /** *
       * ID of the cluster the user belongs to.
       * 
* * string cluster_id = 2; * @return This builder for chaining. */ public Builder clearClusterId() { clusterId_ = getDefaultInstance().getClusterId(); onChanged(); return this; } /** *
       * ID of the cluster the user belongs to.
       * 
* * string cluster_id = 2; * @param value The bytes for clusterId to set. * @return This builder for chaining. */ public Builder setClusterIdBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); clusterId_ = value; onChanged(); return this; } private java.util.List permissions_ = java.util.Collections.emptyList(); private void ensurePermissionsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { permissions_ = new java.util.ArrayList(permissions_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder> permissionsBuilder_; /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public java.util.List getPermissionsList() { if (permissionsBuilder_ == null) { return java.util.Collections.unmodifiableList(permissions_); } else { return permissionsBuilder_.getMessageList(); } } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public int getPermissionsCount() { if (permissionsBuilder_ == null) { return permissions_.size(); } else { return permissionsBuilder_.getCount(); } } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission getPermissions(int index) { if (permissionsBuilder_ == null) { return permissions_.get(index); } else { return permissionsBuilder_.getMessage(index); } } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder setPermissions( int index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission value) { if (permissionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePermissionsIsMutable(); permissions_.set(index, value); onChanged(); } else { permissionsBuilder_.setMessage(index, value); } return this; } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder setPermissions( int index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder builderForValue) { if (permissionsBuilder_ == null) { ensurePermissionsIsMutable(); permissions_.set(index, builderForValue.build()); onChanged(); } else { permissionsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder addPermissions(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission value) { if (permissionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePermissionsIsMutable(); permissions_.add(value); onChanged(); } else { permissionsBuilder_.addMessage(value); } return this; } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder addPermissions( int index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission value) { if (permissionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePermissionsIsMutable(); permissions_.add(index, value); onChanged(); } else { permissionsBuilder_.addMessage(index, value); } return this; } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder addPermissions( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder builderForValue) { if (permissionsBuilder_ == null) { ensurePermissionsIsMutable(); permissions_.add(builderForValue.build()); onChanged(); } else { permissionsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder addPermissions( int index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder builderForValue) { if (permissionsBuilder_ == null) { ensurePermissionsIsMutable(); permissions_.add(index, builderForValue.build()); onChanged(); } else { permissionsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder addAllPermissions( java.lang.Iterable values) { if (permissionsBuilder_ == null) { ensurePermissionsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, permissions_); onChanged(); } else { permissionsBuilder_.addAllMessages(values); } return this; } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder clearPermissions() { if (permissionsBuilder_ == null) { permissions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { permissionsBuilder_.clear(); } return this; } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder removePermissions(int index) { if (permissionsBuilder_ == null) { ensurePermissionsIsMutable(); permissions_.remove(index); onChanged(); } else { permissionsBuilder_.remove(index); } return this; } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder getPermissionsBuilder( int index) { return getPermissionsFieldBuilder().getBuilder(index); } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder getPermissionsOrBuilder( int index) { if (permissionsBuilder_ == null) { return permissions_.get(index); } else { return permissionsBuilder_.getMessageOrBuilder(index); } } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public java.util.List getPermissionsOrBuilderList() { if (permissionsBuilder_ != null) { return permissionsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(permissions_); } } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder addPermissionsBuilder() { return getPermissionsFieldBuilder().addBuilder( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.getDefaultInstance()); } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder addPermissionsBuilder( int index) { return getPermissionsFieldBuilder().addBuilder( index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.getDefaultInstance()); } /** *
       * Set of permissions granted to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public java.util.List getPermissionsBuilderList() { return getPermissionsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder> getPermissionsFieldBuilder() { if (permissionsBuilder_ == null) { permissionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder>( permissions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); permissions_ = null; } return permissionsBuilder_; } private java.util.List globalPermissions_ = java.util.Collections.emptyList(); private void ensureGlobalPermissionsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { globalPermissions_ = new java.util.ArrayList(globalPermissions_); bitField0_ |= 0x00000002; } } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the globalPermissions. */ public java.util.List getGlobalPermissionsList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission>(globalPermissions_, globalPermissions_converter_); } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return The count of globalPermissions. */ public int getGlobalPermissionsCount() { return globalPermissions_.size(); } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the element to return. * @return The globalPermissions at the given index. */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission getGlobalPermissions(int index) { return globalPermissions_converter_.convert(globalPermissions_.get(index)); } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index to set the value at. * @param value The globalPermissions to set. * @return This builder for chaining. */ public Builder setGlobalPermissions( int index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission value) { if (value == null) { throw new NullPointerException(); } ensureGlobalPermissionsIsMutable(); globalPermissions_.set(index, value.getNumber()); onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param value The globalPermissions to add. * @return This builder for chaining. */ public Builder addGlobalPermissions(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission value) { if (value == null) { throw new NullPointerException(); } ensureGlobalPermissionsIsMutable(); globalPermissions_.add(value.getNumber()); onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param values The globalPermissions to add. * @return This builder for chaining. */ public Builder addAllGlobalPermissions( java.lang.Iterable values) { ensureGlobalPermissionsIsMutable(); for (yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission value : values) { globalPermissions_.add(value.getNumber()); } onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return This builder for chaining. */ public Builder clearGlobalPermissions() { globalPermissions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the enum numeric values on the wire for globalPermissions. */ public java.util.List getGlobalPermissionsValueList() { return java.util.Collections.unmodifiableList(globalPermissions_); } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the value to return. * @return The enum numeric value on the wire of globalPermissions at the given index. */ public int getGlobalPermissionsValue(int index) { return globalPermissions_.get(index); } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the value to return. * @return The enum numeric value on the wire of globalPermissions at the given index. * @return This builder for chaining. */ public Builder setGlobalPermissionsValue( int index, int value) { ensureGlobalPermissionsIsMutable(); globalPermissions_.set(index, value); onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param value The enum numeric value on the wire for globalPermissions to add. * @return This builder for chaining. */ public Builder addGlobalPermissionsValue(int value) { ensureGlobalPermissionsIsMutable(); globalPermissions_.add(value); onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param values The enum numeric values on the wire for globalPermissions to add. * @return This builder for chaining. */ public Builder addAllGlobalPermissionsValue( java.lang.Iterable values) { ensureGlobalPermissionsIsMutable(); for (int value : values) { globalPermissions_.add(value); } onChanged(); return this; } private yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits connectionLimits_; private com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder> connectionLimitsBuilder_; /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return Whether the connectionLimits field is set. */ public boolean hasConnectionLimits() { return connectionLimitsBuilder_ != null || connectionLimits_ != null; } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return The connectionLimits. */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits getConnectionLimits() { if (connectionLimitsBuilder_ == null) { return connectionLimits_ == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.getDefaultInstance() : connectionLimits_; } else { return connectionLimitsBuilder_.getMessage(); } } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public Builder setConnectionLimits(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits value) { if (connectionLimitsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } connectionLimits_ = value; onChanged(); } else { connectionLimitsBuilder_.setMessage(value); } return this; } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public Builder setConnectionLimits( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder builderForValue) { if (connectionLimitsBuilder_ == null) { connectionLimits_ = builderForValue.build(); onChanged(); } else { connectionLimitsBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public Builder mergeConnectionLimits(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits value) { if (connectionLimitsBuilder_ == null) { if (connectionLimits_ != null) { connectionLimits_ = yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.newBuilder(connectionLimits_).mergeFrom(value).buildPartial(); } else { connectionLimits_ = value; } onChanged(); } else { connectionLimitsBuilder_.mergeFrom(value); } return this; } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public Builder clearConnectionLimits() { if (connectionLimitsBuilder_ == null) { connectionLimits_ = null; onChanged(); } else { connectionLimits_ = null; connectionLimitsBuilder_ = null; } return this; } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder getConnectionLimitsBuilder() { onChanged(); return getConnectionLimitsFieldBuilder().getBuilder(); } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder getConnectionLimitsOrBuilder() { if (connectionLimitsBuilder_ != null) { return connectionLimitsBuilder_.getMessageOrBuilder(); } else { return connectionLimits_ == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.getDefaultInstance() : connectionLimits_; } } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ private com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder> getConnectionLimitsFieldBuilder() { if (connectionLimitsBuilder_ == null) { connectionLimitsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder>( getConnectionLimits(), getParentForChildren(), isClean()); connectionLimits_ = null; } return connectionLimitsBuilder_; } private int authenticationPlugin_ = 0; /** *
       * User authentication plugin.
       * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The enum numeric value on the wire for authenticationPlugin. */ @java.lang.Override public int getAuthenticationPluginValue() { return authenticationPlugin_; } /** *
       * User authentication plugin.
       * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @param value The enum numeric value on the wire for authenticationPlugin to set. * @return This builder for chaining. */ public Builder setAuthenticationPluginValue(int value) { authenticationPlugin_ = value; onChanged(); return this; } /** *
       * User authentication plugin.
       * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The authenticationPlugin. */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin getAuthenticationPlugin() { @SuppressWarnings("deprecation") yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin result = yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.valueOf(authenticationPlugin_); return result == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.UNRECOGNIZED : result; } /** *
       * User authentication plugin.
       * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @param value The authenticationPlugin to set. * @return This builder for chaining. */ public Builder setAuthenticationPlugin(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin value) { if (value == null) { throw new NullPointerException(); } authenticationPlugin_ = value.getNumber(); onChanged(); return this; } /** *
       * User authentication plugin.
       * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return This builder for chaining. */ public Builder clearAuthenticationPlugin() { authenticationPlugin_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:yandex.cloud.mdb.mysql.v1.User) } // @@protoc_insertion_point(class_scope:yandex.cloud.mdb.mysql.v1.User) private static final yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User(); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public User parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new User(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.User getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface PermissionOrBuilder extends // @@protoc_insertion_point(interface_extends:yandex.cloud.mdb.mysql.v1.Permission) com.google.protobuf.MessageOrBuilder { /** *
     * Name of the database that the permission grants access to.
     * 
* * string database_name = 1; * @return The databaseName. */ java.lang.String getDatabaseName(); /** *
     * Name of the database that the permission grants access to.
     * 
* * string database_name = 1; * @return The bytes for databaseName. */ com.google.protobuf.ByteString getDatabaseNameBytes(); /** *
     * Roles granted to the user within the database.
     * See [the documentation](/docs/managed-mysql/operations/grant) for details.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @return A list containing the roles. */ java.util.List getRolesList(); /** *
     * Roles granted to the user within the database.
     * See [the documentation](/docs/managed-mysql/operations/grant) for details.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @return The count of roles. */ int getRolesCount(); /** *
     * Roles granted to the user within the database.
     * See [the documentation](/docs/managed-mysql/operations/grant) for details.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param index The index of the element to return. * @return The roles at the given index. */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege getRoles(int index); /** *
     * Roles granted to the user within the database.
     * See [the documentation](/docs/managed-mysql/operations/grant) for details.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @return A list containing the enum numeric values on the wire for roles. */ java.util.List getRolesValueList(); /** *
     * Roles granted to the user within the database.
     * See [the documentation](/docs/managed-mysql/operations/grant) for details.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param index The index of the value to return. * @return The enum numeric value on the wire of roles at the given index. */ int getRolesValue(int index); } /** * Protobuf type {@code yandex.cloud.mdb.mysql.v1.Permission} */ public static final class Permission extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:yandex.cloud.mdb.mysql.v1.Permission) PermissionOrBuilder { private static final long serialVersionUID = 0L; // Use Permission.newBuilder() to construct. private Permission(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Permission() { databaseName_ = ""; roles_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Permission(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Permission( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); databaseName_ = s; break; } case 16: { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { roles_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } roles_.add(rawValue); break; } case 18: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while(input.getBytesUntilLimit() > 0) { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { roles_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } roles_.add(rawValue); } input.popLimit(oldLimit); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { roles_ = java.util.Collections.unmodifiableList(roles_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_Permission_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_Permission_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.class, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder.class); } /** * Protobuf enum {@code yandex.cloud.mdb.mysql.v1.Permission.Privilege} */ public enum Privilege implements com.google.protobuf.ProtocolMessageEnum { /** * PRIVILEGE_UNSPECIFIED = 0; */ PRIVILEGE_UNSPECIFIED(0), /** *
       * All privileges that can be made available to the user.
       * 
* * ALL_PRIVILEGES = 1; */ ALL_PRIVILEGES(1), /** *
       * Altering tables.
       * 
* * ALTER = 2; */ ALTER(2), /** *
       * Altering stored routines and functions.
       * 
* * ALTER_ROUTINE = 3; */ ALTER_ROUTINE(3), /** *
       * Creating tables or indexes.
       * 
* * CREATE = 4; */ CREATE(4), /** *
       * Creating stored routines.
       * 
* * CREATE_ROUTINE = 5; */ CREATE_ROUTINE(5), /** *
       * Creating temporary tables.
       * 
* * CREATE_TEMPORARY_TABLES = 6; */ CREATE_TEMPORARY_TABLES(6), /** *
       * Creating views.
       * 
* * CREATE_VIEW = 7; */ CREATE_VIEW(7), /** *
       * Deleting tables.
       * 
* * DELETE = 8; */ DELETE(8), /** *
       * Removing tables or views.
       * 
* * DROP = 9; */ DROP(9), /** *
       * Creating, altering, dropping, or displaying events for the Event Scheduler.
       * 
* * EVENT = 10; */ EVENT(10), /** *
       * Executing stored routines.
       * 
* * EXECUTE = 11; */ EXECUTE(11), /** *
       * Creating and removing indexes.
       * 
* * INDEX = 12; */ INDEX(12), /** *
       * Inserting rows into the database.
       * 
* * INSERT = 13; */ INSERT(13), /** *
       * Using `LOCK TABLES` statement for tables available with `SELECT` privilege.
       * 
* * LOCK_TABLES = 14; */ LOCK_TABLES(14), /** *
       * Selecting rows from tables.
       * Some `SELECT` statements can be allowed without the `SELECT` privilege. All statements that read column values require the `SELECT` privilege.
       * See [MySQL documentation](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_select) for details.
       * 
* * SELECT = 15; */ SELECT(15), /** *
       * Using the `SHOW CREATE VIEW` statement. Also needed for views used with `EXPLAIN`.
       * 
* * SHOW_VIEW = 16; */ SHOW_VIEW(16), /** *
       * Creating, removing, executing, or displaying triggers for a table.
       * 
* * TRIGGER = 17; */ TRIGGER(17), /** *
       * Updating rows in the database.
       * 
* * UPDATE = 18; */ UPDATE(18), /** *
       * Creation of a foreign key constraint for the parent table.
       * 
* * REFERENCES = 19; */ REFERENCES(19), UNRECOGNIZED(-1), ; /** * PRIVILEGE_UNSPECIFIED = 0; */ public static final int PRIVILEGE_UNSPECIFIED_VALUE = 0; /** *
       * All privileges that can be made available to the user.
       * 
* * ALL_PRIVILEGES = 1; */ public static final int ALL_PRIVILEGES_VALUE = 1; /** *
       * Altering tables.
       * 
* * ALTER = 2; */ public static final int ALTER_VALUE = 2; /** *
       * Altering stored routines and functions.
       * 
* * ALTER_ROUTINE = 3; */ public static final int ALTER_ROUTINE_VALUE = 3; /** *
       * Creating tables or indexes.
       * 
* * CREATE = 4; */ public static final int CREATE_VALUE = 4; /** *
       * Creating stored routines.
       * 
* * CREATE_ROUTINE = 5; */ public static final int CREATE_ROUTINE_VALUE = 5; /** *
       * Creating temporary tables.
       * 
* * CREATE_TEMPORARY_TABLES = 6; */ public static final int CREATE_TEMPORARY_TABLES_VALUE = 6; /** *
       * Creating views.
       * 
* * CREATE_VIEW = 7; */ public static final int CREATE_VIEW_VALUE = 7; /** *
       * Deleting tables.
       * 
* * DELETE = 8; */ public static final int DELETE_VALUE = 8; /** *
       * Removing tables or views.
       * 
* * DROP = 9; */ public static final int DROP_VALUE = 9; /** *
       * Creating, altering, dropping, or displaying events for the Event Scheduler.
       * 
* * EVENT = 10; */ public static final int EVENT_VALUE = 10; /** *
       * Executing stored routines.
       * 
* * EXECUTE = 11; */ public static final int EXECUTE_VALUE = 11; /** *
       * Creating and removing indexes.
       * 
* * INDEX = 12; */ public static final int INDEX_VALUE = 12; /** *
       * Inserting rows into the database.
       * 
* * INSERT = 13; */ public static final int INSERT_VALUE = 13; /** *
       * Using `LOCK TABLES` statement for tables available with `SELECT` privilege.
       * 
* * LOCK_TABLES = 14; */ public static final int LOCK_TABLES_VALUE = 14; /** *
       * Selecting rows from tables.
       * Some `SELECT` statements can be allowed without the `SELECT` privilege. All statements that read column values require the `SELECT` privilege.
       * See [MySQL documentation](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_select) for details.
       * 
* * SELECT = 15; */ public static final int SELECT_VALUE = 15; /** *
       * Using the `SHOW CREATE VIEW` statement. Also needed for views used with `EXPLAIN`.
       * 
* * SHOW_VIEW = 16; */ public static final int SHOW_VIEW_VALUE = 16; /** *
       * Creating, removing, executing, or displaying triggers for a table.
       * 
* * TRIGGER = 17; */ public static final int TRIGGER_VALUE = 17; /** *
       * Updating rows in the database.
       * 
* * UPDATE = 18; */ public static final int UPDATE_VALUE = 18; /** *
       * Creation of a foreign key constraint for the parent table.
       * 
* * REFERENCES = 19; */ public static final int REFERENCES_VALUE = 19; 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 Privilege 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 Privilege forNumber(int value) { switch (value) { case 0: return PRIVILEGE_UNSPECIFIED; case 1: return ALL_PRIVILEGES; case 2: return ALTER; case 3: return ALTER_ROUTINE; case 4: return CREATE; case 5: return CREATE_ROUTINE; case 6: return CREATE_TEMPORARY_TABLES; case 7: return CREATE_VIEW; case 8: return DELETE; case 9: return DROP; case 10: return EVENT; case 11: return EXECUTE; case 12: return INDEX; case 13: return INSERT; case 14: return LOCK_TABLES; case 15: return SELECT; case 16: return SHOW_VIEW; case 17: return TRIGGER; case 18: return UPDATE; case 19: return REFERENCES; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Privilege> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Privilege findValueByNumber(int number) { return Privilege.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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.getDescriptor().getEnumTypes().get(0); } private static final Privilege[] VALUES = values(); public static Privilege 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 Privilege(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:yandex.cloud.mdb.mysql.v1.Permission.Privilege) } public static final int DATABASE_NAME_FIELD_NUMBER = 1; private volatile java.lang.Object databaseName_; /** *
     * Name of the database that the permission grants access to.
     * 
* * string database_name = 1; * @return The databaseName. */ @java.lang.Override public java.lang.String getDatabaseName() { java.lang.Object ref = databaseName_; 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(); databaseName_ = s; return s; } } /** *
     * Name of the database that the permission grants access to.
     * 
* * string database_name = 1; * @return The bytes for databaseName. */ @java.lang.Override public com.google.protobuf.ByteString getDatabaseNameBytes() { java.lang.Object ref = databaseName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); databaseName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int ROLES_FIELD_NUMBER = 2; private java.util.List roles_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege> roles_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege>() { public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege convert(java.lang.Integer from) { @SuppressWarnings("deprecation") yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege result = yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege.valueOf(from); return result == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege.UNRECOGNIZED : result; } }; /** *
     * Roles granted to the user within the database.
     * See [the documentation](/docs/managed-mysql/operations/grant) for details.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @return A list containing the roles. */ @java.lang.Override public java.util.List getRolesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege>(roles_, roles_converter_); } /** *
     * Roles granted to the user within the database.
     * See [the documentation](/docs/managed-mysql/operations/grant) for details.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @return The count of roles. */ @java.lang.Override public int getRolesCount() { return roles_.size(); } /** *
     * Roles granted to the user within the database.
     * See [the documentation](/docs/managed-mysql/operations/grant) for details.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param index The index of the element to return. * @return The roles at the given index. */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege getRoles(int index) { return roles_converter_.convert(roles_.get(index)); } /** *
     * Roles granted to the user within the database.
     * See [the documentation](/docs/managed-mysql/operations/grant) for details.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @return A list containing the enum numeric values on the wire for roles. */ @java.lang.Override public java.util.List getRolesValueList() { return roles_; } /** *
     * Roles granted to the user within the database.
     * See [the documentation](/docs/managed-mysql/operations/grant) for details.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param index The index of the value to return. * @return The enum numeric value on the wire of roles at the given index. */ @java.lang.Override public int getRolesValue(int index) { return roles_.get(index); } private int rolesMemoizedSerializedSize; 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 { getSerializedSize(); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, databaseName_); } if (getRolesList().size() > 0) { output.writeUInt32NoTag(18); output.writeUInt32NoTag(rolesMemoizedSerializedSize); } for (int i = 0; i < roles_.size(); i++) { output.writeEnumNoTag(roles_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(databaseName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, databaseName_); } { int dataSize = 0; for (int i = 0; i < roles_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeEnumSizeNoTag(roles_.get(i)); } size += dataSize; if (!getRolesList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(dataSize); }rolesMemoizedSerializedSize = dataSize; } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission)) { return super.equals(obj); } yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission other = (yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission) obj; if (!getDatabaseName() .equals(other.getDatabaseName())) return false; if (!roles_.equals(other.roles_)) return false; if (!unknownFields.equals(other.unknownFields)) 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) + DATABASE_NAME_FIELD_NUMBER; hash = (53 * hash) + getDatabaseName().hashCode(); if (getRolesCount() > 0) { hash = (37 * hash) + ROLES_FIELD_NUMBER; hash = (53 * hash) + roles_.hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission 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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission 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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission 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(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission 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; } /** * Protobuf type {@code yandex.cloud.mdb.mysql.v1.Permission} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yandex.cloud.mdb.mysql.v1.Permission) yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_Permission_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_Permission_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.class, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder.class); } // Construct using yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); databaseName_ = ""; roles_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_Permission_descriptor; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission getDefaultInstanceForType() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.getDefaultInstance(); } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission build() { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission buildPartial() { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission result = new yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission(this); int from_bitField0_ = bitField0_; result.databaseName_ = databaseName_; if (((bitField0_ & 0x00000001) != 0)) { roles_ = java.util.Collections.unmodifiableList(roles_); bitField0_ = (bitField0_ & ~0x00000001); } result.roles_ = roles_; onBuilt(); return result; } @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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission) { return mergeFrom((yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission other) { if (other == yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.getDefaultInstance()) return this; if (!other.getDatabaseName().isEmpty()) { databaseName_ = other.databaseName_; onChanged(); } if (!other.roles_.isEmpty()) { if (roles_.isEmpty()) { roles_ = other.roles_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureRolesIsMutable(); roles_.addAll(other.roles_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); 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 { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object databaseName_ = ""; /** *
       * Name of the database that the permission grants access to.
       * 
* * string database_name = 1; * @return The databaseName. */ public java.lang.String getDatabaseName() { java.lang.Object ref = databaseName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); databaseName_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Name of the database that the permission grants access to.
       * 
* * string database_name = 1; * @return The bytes for databaseName. */ public com.google.protobuf.ByteString getDatabaseNameBytes() { java.lang.Object ref = databaseName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); databaseName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Name of the database that the permission grants access to.
       * 
* * string database_name = 1; * @param value The databaseName to set. * @return This builder for chaining. */ public Builder setDatabaseName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } databaseName_ = value; onChanged(); return this; } /** *
       * Name of the database that the permission grants access to.
       * 
* * string database_name = 1; * @return This builder for chaining. */ public Builder clearDatabaseName() { databaseName_ = getDefaultInstance().getDatabaseName(); onChanged(); return this; } /** *
       * Name of the database that the permission grants access to.
       * 
* * string database_name = 1; * @param value The bytes for databaseName to set. * @return This builder for chaining. */ public Builder setDatabaseNameBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); databaseName_ = value; onChanged(); return this; } private java.util.List roles_ = java.util.Collections.emptyList(); private void ensureRolesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { roles_ = new java.util.ArrayList(roles_); bitField0_ |= 0x00000001; } } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @return A list containing the roles. */ public java.util.List getRolesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege>(roles_, roles_converter_); } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @return The count of roles. */ public int getRolesCount() { return roles_.size(); } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param index The index of the element to return. * @return The roles at the given index. */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege getRoles(int index) { return roles_converter_.convert(roles_.get(index)); } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param index The index to set the value at. * @param value The roles to set. * @return This builder for chaining. */ public Builder setRoles( int index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege value) { if (value == null) { throw new NullPointerException(); } ensureRolesIsMutable(); roles_.set(index, value.getNumber()); onChanged(); return this; } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param value The roles to add. * @return This builder for chaining. */ public Builder addRoles(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege value) { if (value == null) { throw new NullPointerException(); } ensureRolesIsMutable(); roles_.add(value.getNumber()); onChanged(); return this; } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param values The roles to add. * @return This builder for chaining. */ public Builder addAllRoles( java.lang.Iterable values) { ensureRolesIsMutable(); for (yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Privilege value : values) { roles_.add(value.getNumber()); } onChanged(); return this; } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @return This builder for chaining. */ public Builder clearRoles() { roles_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @return A list containing the enum numeric values on the wire for roles. */ public java.util.List getRolesValueList() { return java.util.Collections.unmodifiableList(roles_); } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param index The index of the value to return. * @return The enum numeric value on the wire of roles at the given index. */ public int getRolesValue(int index) { return roles_.get(index); } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param index The index of the value to return. * @return The enum numeric value on the wire of roles at the given index. * @return This builder for chaining. */ public Builder setRolesValue( int index, int value) { ensureRolesIsMutable(); roles_.set(index, value); onChanged(); return this; } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param value The enum numeric value on the wire for roles to add. * @return This builder for chaining. */ public Builder addRolesValue(int value) { ensureRolesIsMutable(); roles_.add(value); onChanged(); return this; } /** *
       * Roles granted to the user within the database.
       * See [the documentation](/docs/managed-mysql/operations/grant) for details.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission.Privilege roles = 2 [(.yandex.cloud.size) = ">=1"]; * @param values The enum numeric values on the wire for roles to add. * @return This builder for chaining. */ public Builder addAllRolesValue( java.lang.Iterable values) { ensureRolesIsMutable(); for (int value : values) { roles_.add(value); } onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:yandex.cloud.mdb.mysql.v1.Permission) } // @@protoc_insertion_point(class_scope:yandex.cloud.mdb.mysql.v1.Permission) private static final yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission(); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Permission parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Permission(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface ConnectionLimitsOrBuilder extends // @@protoc_insertion_point(interface_extends:yandex.cloud.mdb.mysql.v1.ConnectionLimits) com.google.protobuf.MessageOrBuilder { /** *
     * The maximum permitted number of user questions per hour.
     * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxQuestionsPerHour field is set. */ boolean hasMaxQuestionsPerHour(); /** *
     * The maximum permitted number of user questions per hour.
     * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; * @return The maxQuestionsPerHour. */ com.google.protobuf.Int64Value getMaxQuestionsPerHour(); /** *
     * The maximum permitted number of user questions per hour.
     * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; */ com.google.protobuf.Int64ValueOrBuilder getMaxQuestionsPerHourOrBuilder(); /** *
     * The maximum permitted number of user updates per hour.
     * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxUpdatesPerHour field is set. */ boolean hasMaxUpdatesPerHour(); /** *
     * The maximum permitted number of user updates per hour.
     * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; * @return The maxUpdatesPerHour. */ com.google.protobuf.Int64Value getMaxUpdatesPerHour(); /** *
     * The maximum permitted number of user updates per hour.
     * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; */ com.google.protobuf.Int64ValueOrBuilder getMaxUpdatesPerHourOrBuilder(); /** *
     * The maximum permitted number of simultaneous client connections per hour.
     * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxConnectionsPerHour field is set. */ boolean hasMaxConnectionsPerHour(); /** *
     * The maximum permitted number of simultaneous client connections per hour.
     * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; * @return The maxConnectionsPerHour. */ com.google.protobuf.Int64Value getMaxConnectionsPerHour(); /** *
     * The maximum permitted number of simultaneous client connections per hour.
     * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; */ com.google.protobuf.Int64ValueOrBuilder getMaxConnectionsPerHourOrBuilder(); /** *
     * The maximum number of simultaneous connections permitted to any given MySQL user account.
     * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxUserConnections field is set. */ boolean hasMaxUserConnections(); /** *
     * The maximum number of simultaneous connections permitted to any given MySQL user account.
     * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; * @return The maxUserConnections. */ com.google.protobuf.Int64Value getMaxUserConnections(); /** *
     * The maximum number of simultaneous connections permitted to any given MySQL user account.
     * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; */ com.google.protobuf.Int64ValueOrBuilder getMaxUserConnectionsOrBuilder(); } /** * Protobuf type {@code yandex.cloud.mdb.mysql.v1.ConnectionLimits} */ public static final class ConnectionLimits extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:yandex.cloud.mdb.mysql.v1.ConnectionLimits) ConnectionLimitsOrBuilder { private static final long serialVersionUID = 0L; // Use ConnectionLimits.newBuilder() to construct. private ConnectionLimits(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ConnectionLimits() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ConnectionLimits(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private ConnectionLimits( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { com.google.protobuf.Int64Value.Builder subBuilder = null; if (maxQuestionsPerHour_ != null) { subBuilder = maxQuestionsPerHour_.toBuilder(); } maxQuestionsPerHour_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(maxQuestionsPerHour_); maxQuestionsPerHour_ = subBuilder.buildPartial(); } break; } case 18: { com.google.protobuf.Int64Value.Builder subBuilder = null; if (maxUpdatesPerHour_ != null) { subBuilder = maxUpdatesPerHour_.toBuilder(); } maxUpdatesPerHour_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(maxUpdatesPerHour_); maxUpdatesPerHour_ = subBuilder.buildPartial(); } break; } case 26: { com.google.protobuf.Int64Value.Builder subBuilder = null; if (maxConnectionsPerHour_ != null) { subBuilder = maxConnectionsPerHour_.toBuilder(); } maxConnectionsPerHour_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(maxConnectionsPerHour_); maxConnectionsPerHour_ = subBuilder.buildPartial(); } break; } case 34: { com.google.protobuf.Int64Value.Builder subBuilder = null; if (maxUserConnections_ != null) { subBuilder = maxUserConnections_.toBuilder(); } maxUserConnections_ = input.readMessage(com.google.protobuf.Int64Value.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(maxUserConnections_); maxUserConnections_ = subBuilder.buildPartial(); } break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_ConnectionLimits_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_ConnectionLimits_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.class, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder.class); } public static final int MAX_QUESTIONS_PER_HOUR_FIELD_NUMBER = 1; private com.google.protobuf.Int64Value maxQuestionsPerHour_; /** *
     * The maximum permitted number of user questions per hour.
     * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxQuestionsPerHour field is set. */ @java.lang.Override public boolean hasMaxQuestionsPerHour() { return maxQuestionsPerHour_ != null; } /** *
     * The maximum permitted number of user questions per hour.
     * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; * @return The maxQuestionsPerHour. */ @java.lang.Override public com.google.protobuf.Int64Value getMaxQuestionsPerHour() { return maxQuestionsPerHour_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxQuestionsPerHour_; } /** *
     * The maximum permitted number of user questions per hour.
     * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; */ @java.lang.Override public com.google.protobuf.Int64ValueOrBuilder getMaxQuestionsPerHourOrBuilder() { return getMaxQuestionsPerHour(); } public static final int MAX_UPDATES_PER_HOUR_FIELD_NUMBER = 2; private com.google.protobuf.Int64Value maxUpdatesPerHour_; /** *
     * The maximum permitted number of user updates per hour.
     * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxUpdatesPerHour field is set. */ @java.lang.Override public boolean hasMaxUpdatesPerHour() { return maxUpdatesPerHour_ != null; } /** *
     * The maximum permitted number of user updates per hour.
     * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; * @return The maxUpdatesPerHour. */ @java.lang.Override public com.google.protobuf.Int64Value getMaxUpdatesPerHour() { return maxUpdatesPerHour_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxUpdatesPerHour_; } /** *
     * The maximum permitted number of user updates per hour.
     * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; */ @java.lang.Override public com.google.protobuf.Int64ValueOrBuilder getMaxUpdatesPerHourOrBuilder() { return getMaxUpdatesPerHour(); } public static final int MAX_CONNECTIONS_PER_HOUR_FIELD_NUMBER = 3; private com.google.protobuf.Int64Value maxConnectionsPerHour_; /** *
     * The maximum permitted number of simultaneous client connections per hour.
     * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxConnectionsPerHour field is set. */ @java.lang.Override public boolean hasMaxConnectionsPerHour() { return maxConnectionsPerHour_ != null; } /** *
     * The maximum permitted number of simultaneous client connections per hour.
     * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; * @return The maxConnectionsPerHour. */ @java.lang.Override public com.google.protobuf.Int64Value getMaxConnectionsPerHour() { return maxConnectionsPerHour_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxConnectionsPerHour_; } /** *
     * The maximum permitted number of simultaneous client connections per hour.
     * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; */ @java.lang.Override public com.google.protobuf.Int64ValueOrBuilder getMaxConnectionsPerHourOrBuilder() { return getMaxConnectionsPerHour(); } public static final int MAX_USER_CONNECTIONS_FIELD_NUMBER = 4; private com.google.protobuf.Int64Value maxUserConnections_; /** *
     * The maximum number of simultaneous connections permitted to any given MySQL user account.
     * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxUserConnections field is set. */ @java.lang.Override public boolean hasMaxUserConnections() { return maxUserConnections_ != null; } /** *
     * The maximum number of simultaneous connections permitted to any given MySQL user account.
     * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; * @return The maxUserConnections. */ @java.lang.Override public com.google.protobuf.Int64Value getMaxUserConnections() { return maxUserConnections_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxUserConnections_; } /** *
     * The maximum number of simultaneous connections permitted to any given MySQL user account.
     * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; */ @java.lang.Override public com.google.protobuf.Int64ValueOrBuilder getMaxUserConnectionsOrBuilder() { return getMaxUserConnections(); } 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 (maxQuestionsPerHour_ != null) { output.writeMessage(1, getMaxQuestionsPerHour()); } if (maxUpdatesPerHour_ != null) { output.writeMessage(2, getMaxUpdatesPerHour()); } if (maxConnectionsPerHour_ != null) { output.writeMessage(3, getMaxConnectionsPerHour()); } if (maxUserConnections_ != null) { output.writeMessage(4, getMaxUserConnections()); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (maxQuestionsPerHour_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getMaxQuestionsPerHour()); } if (maxUpdatesPerHour_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getMaxUpdatesPerHour()); } if (maxConnectionsPerHour_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getMaxConnectionsPerHour()); } if (maxUserConnections_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getMaxUserConnections()); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits)) { return super.equals(obj); } yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits other = (yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits) obj; if (hasMaxQuestionsPerHour() != other.hasMaxQuestionsPerHour()) return false; if (hasMaxQuestionsPerHour()) { if (!getMaxQuestionsPerHour() .equals(other.getMaxQuestionsPerHour())) return false; } if (hasMaxUpdatesPerHour() != other.hasMaxUpdatesPerHour()) return false; if (hasMaxUpdatesPerHour()) { if (!getMaxUpdatesPerHour() .equals(other.getMaxUpdatesPerHour())) return false; } if (hasMaxConnectionsPerHour() != other.hasMaxConnectionsPerHour()) return false; if (hasMaxConnectionsPerHour()) { if (!getMaxConnectionsPerHour() .equals(other.getMaxConnectionsPerHour())) return false; } if (hasMaxUserConnections() != other.hasMaxUserConnections()) return false; if (hasMaxUserConnections()) { if (!getMaxUserConnections() .equals(other.getMaxUserConnections())) return false; } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (hasMaxQuestionsPerHour()) { hash = (37 * hash) + MAX_QUESTIONS_PER_HOUR_FIELD_NUMBER; hash = (53 * hash) + getMaxQuestionsPerHour().hashCode(); } if (hasMaxUpdatesPerHour()) { hash = (37 * hash) + MAX_UPDATES_PER_HOUR_FIELD_NUMBER; hash = (53 * hash) + getMaxUpdatesPerHour().hashCode(); } if (hasMaxConnectionsPerHour()) { hash = (37 * hash) + MAX_CONNECTIONS_PER_HOUR_FIELD_NUMBER; hash = (53 * hash) + getMaxConnectionsPerHour().hashCode(); } if (hasMaxUserConnections()) { hash = (37 * hash) + MAX_USER_CONNECTIONS_FIELD_NUMBER; hash = (53 * hash) + getMaxUserConnections().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits 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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits 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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits 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(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits 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; } /** * Protobuf type {@code yandex.cloud.mdb.mysql.v1.ConnectionLimits} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yandex.cloud.mdb.mysql.v1.ConnectionLimits) yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_ConnectionLimits_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_ConnectionLimits_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.class, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder.class); } // Construct using yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); if (maxQuestionsPerHourBuilder_ == null) { maxQuestionsPerHour_ = null; } else { maxQuestionsPerHour_ = null; maxQuestionsPerHourBuilder_ = null; } if (maxUpdatesPerHourBuilder_ == null) { maxUpdatesPerHour_ = null; } else { maxUpdatesPerHour_ = null; maxUpdatesPerHourBuilder_ = null; } if (maxConnectionsPerHourBuilder_ == null) { maxConnectionsPerHour_ = null; } else { maxConnectionsPerHour_ = null; maxConnectionsPerHourBuilder_ = null; } if (maxUserConnectionsBuilder_ == null) { maxUserConnections_ = null; } else { maxUserConnections_ = null; maxUserConnectionsBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_ConnectionLimits_descriptor; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits getDefaultInstanceForType() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.getDefaultInstance(); } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits build() { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits buildPartial() { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits result = new yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits(this); if (maxQuestionsPerHourBuilder_ == null) { result.maxQuestionsPerHour_ = maxQuestionsPerHour_; } else { result.maxQuestionsPerHour_ = maxQuestionsPerHourBuilder_.build(); } if (maxUpdatesPerHourBuilder_ == null) { result.maxUpdatesPerHour_ = maxUpdatesPerHour_; } else { result.maxUpdatesPerHour_ = maxUpdatesPerHourBuilder_.build(); } if (maxConnectionsPerHourBuilder_ == null) { result.maxConnectionsPerHour_ = maxConnectionsPerHour_; } else { result.maxConnectionsPerHour_ = maxConnectionsPerHourBuilder_.build(); } if (maxUserConnectionsBuilder_ == null) { result.maxUserConnections_ = maxUserConnections_; } else { result.maxUserConnections_ = maxUserConnectionsBuilder_.build(); } onBuilt(); return result; } @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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits) { return mergeFrom((yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits other) { if (other == yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.getDefaultInstance()) return this; if (other.hasMaxQuestionsPerHour()) { mergeMaxQuestionsPerHour(other.getMaxQuestionsPerHour()); } if (other.hasMaxUpdatesPerHour()) { mergeMaxUpdatesPerHour(other.getMaxUpdatesPerHour()); } if (other.hasMaxConnectionsPerHour()) { mergeMaxConnectionsPerHour(other.getMaxConnectionsPerHour()); } if (other.hasMaxUserConnections()) { mergeMaxUserConnections(other.getMaxUserConnections()); } this.mergeUnknownFields(other.unknownFields); 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 { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.Int64Value maxQuestionsPerHour_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> maxQuestionsPerHourBuilder_; /** *
       * The maximum permitted number of user questions per hour.
       * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxQuestionsPerHour field is set. */ public boolean hasMaxQuestionsPerHour() { return maxQuestionsPerHourBuilder_ != null || maxQuestionsPerHour_ != null; } /** *
       * The maximum permitted number of user questions per hour.
       * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; * @return The maxQuestionsPerHour. */ public com.google.protobuf.Int64Value getMaxQuestionsPerHour() { if (maxQuestionsPerHourBuilder_ == null) { return maxQuestionsPerHour_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxQuestionsPerHour_; } else { return maxQuestionsPerHourBuilder_.getMessage(); } } /** *
       * The maximum permitted number of user questions per hour.
       * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; */ public Builder setMaxQuestionsPerHour(com.google.protobuf.Int64Value value) { if (maxQuestionsPerHourBuilder_ == null) { if (value == null) { throw new NullPointerException(); } maxQuestionsPerHour_ = value; onChanged(); } else { maxQuestionsPerHourBuilder_.setMessage(value); } return this; } /** *
       * The maximum permitted number of user questions per hour.
       * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; */ public Builder setMaxQuestionsPerHour( com.google.protobuf.Int64Value.Builder builderForValue) { if (maxQuestionsPerHourBuilder_ == null) { maxQuestionsPerHour_ = builderForValue.build(); onChanged(); } else { maxQuestionsPerHourBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * The maximum permitted number of user questions per hour.
       * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; */ public Builder mergeMaxQuestionsPerHour(com.google.protobuf.Int64Value value) { if (maxQuestionsPerHourBuilder_ == null) { if (maxQuestionsPerHour_ != null) { maxQuestionsPerHour_ = com.google.protobuf.Int64Value.newBuilder(maxQuestionsPerHour_).mergeFrom(value).buildPartial(); } else { maxQuestionsPerHour_ = value; } onChanged(); } else { maxQuestionsPerHourBuilder_.mergeFrom(value); } return this; } /** *
       * The maximum permitted number of user questions per hour.
       * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; */ public Builder clearMaxQuestionsPerHour() { if (maxQuestionsPerHourBuilder_ == null) { maxQuestionsPerHour_ = null; onChanged(); } else { maxQuestionsPerHour_ = null; maxQuestionsPerHourBuilder_ = null; } return this; } /** *
       * The maximum permitted number of user questions per hour.
       * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; */ public com.google.protobuf.Int64Value.Builder getMaxQuestionsPerHourBuilder() { onChanged(); return getMaxQuestionsPerHourFieldBuilder().getBuilder(); } /** *
       * The maximum permitted number of user questions per hour.
       * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; */ public com.google.protobuf.Int64ValueOrBuilder getMaxQuestionsPerHourOrBuilder() { if (maxQuestionsPerHourBuilder_ != null) { return maxQuestionsPerHourBuilder_.getMessageOrBuilder(); } else { return maxQuestionsPerHour_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxQuestionsPerHour_; } } /** *
       * The maximum permitted number of user questions per hour.
       * 
* * .google.protobuf.Int64Value max_questions_per_hour = 1 [(.yandex.cloud.value) = ">=0"]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> getMaxQuestionsPerHourFieldBuilder() { if (maxQuestionsPerHourBuilder_ == null) { maxQuestionsPerHourBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( getMaxQuestionsPerHour(), getParentForChildren(), isClean()); maxQuestionsPerHour_ = null; } return maxQuestionsPerHourBuilder_; } private com.google.protobuf.Int64Value maxUpdatesPerHour_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> maxUpdatesPerHourBuilder_; /** *
       * The maximum permitted number of user updates per hour.
       * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxUpdatesPerHour field is set. */ public boolean hasMaxUpdatesPerHour() { return maxUpdatesPerHourBuilder_ != null || maxUpdatesPerHour_ != null; } /** *
       * The maximum permitted number of user updates per hour.
       * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; * @return The maxUpdatesPerHour. */ public com.google.protobuf.Int64Value getMaxUpdatesPerHour() { if (maxUpdatesPerHourBuilder_ == null) { return maxUpdatesPerHour_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxUpdatesPerHour_; } else { return maxUpdatesPerHourBuilder_.getMessage(); } } /** *
       * The maximum permitted number of user updates per hour.
       * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; */ public Builder setMaxUpdatesPerHour(com.google.protobuf.Int64Value value) { if (maxUpdatesPerHourBuilder_ == null) { if (value == null) { throw new NullPointerException(); } maxUpdatesPerHour_ = value; onChanged(); } else { maxUpdatesPerHourBuilder_.setMessage(value); } return this; } /** *
       * The maximum permitted number of user updates per hour.
       * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; */ public Builder setMaxUpdatesPerHour( com.google.protobuf.Int64Value.Builder builderForValue) { if (maxUpdatesPerHourBuilder_ == null) { maxUpdatesPerHour_ = builderForValue.build(); onChanged(); } else { maxUpdatesPerHourBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * The maximum permitted number of user updates per hour.
       * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; */ public Builder mergeMaxUpdatesPerHour(com.google.protobuf.Int64Value value) { if (maxUpdatesPerHourBuilder_ == null) { if (maxUpdatesPerHour_ != null) { maxUpdatesPerHour_ = com.google.protobuf.Int64Value.newBuilder(maxUpdatesPerHour_).mergeFrom(value).buildPartial(); } else { maxUpdatesPerHour_ = value; } onChanged(); } else { maxUpdatesPerHourBuilder_.mergeFrom(value); } return this; } /** *
       * The maximum permitted number of user updates per hour.
       * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; */ public Builder clearMaxUpdatesPerHour() { if (maxUpdatesPerHourBuilder_ == null) { maxUpdatesPerHour_ = null; onChanged(); } else { maxUpdatesPerHour_ = null; maxUpdatesPerHourBuilder_ = null; } return this; } /** *
       * The maximum permitted number of user updates per hour.
       * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; */ public com.google.protobuf.Int64Value.Builder getMaxUpdatesPerHourBuilder() { onChanged(); return getMaxUpdatesPerHourFieldBuilder().getBuilder(); } /** *
       * The maximum permitted number of user updates per hour.
       * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; */ public com.google.protobuf.Int64ValueOrBuilder getMaxUpdatesPerHourOrBuilder() { if (maxUpdatesPerHourBuilder_ != null) { return maxUpdatesPerHourBuilder_.getMessageOrBuilder(); } else { return maxUpdatesPerHour_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxUpdatesPerHour_; } } /** *
       * The maximum permitted number of user updates per hour.
       * 
* * .google.protobuf.Int64Value max_updates_per_hour = 2 [(.yandex.cloud.value) = ">=0"]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> getMaxUpdatesPerHourFieldBuilder() { if (maxUpdatesPerHourBuilder_ == null) { maxUpdatesPerHourBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( getMaxUpdatesPerHour(), getParentForChildren(), isClean()); maxUpdatesPerHour_ = null; } return maxUpdatesPerHourBuilder_; } private com.google.protobuf.Int64Value maxConnectionsPerHour_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> maxConnectionsPerHourBuilder_; /** *
       * The maximum permitted number of simultaneous client connections per hour.
       * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxConnectionsPerHour field is set. */ public boolean hasMaxConnectionsPerHour() { return maxConnectionsPerHourBuilder_ != null || maxConnectionsPerHour_ != null; } /** *
       * The maximum permitted number of simultaneous client connections per hour.
       * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; * @return The maxConnectionsPerHour. */ public com.google.protobuf.Int64Value getMaxConnectionsPerHour() { if (maxConnectionsPerHourBuilder_ == null) { return maxConnectionsPerHour_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxConnectionsPerHour_; } else { return maxConnectionsPerHourBuilder_.getMessage(); } } /** *
       * The maximum permitted number of simultaneous client connections per hour.
       * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; */ public Builder setMaxConnectionsPerHour(com.google.protobuf.Int64Value value) { if (maxConnectionsPerHourBuilder_ == null) { if (value == null) { throw new NullPointerException(); } maxConnectionsPerHour_ = value; onChanged(); } else { maxConnectionsPerHourBuilder_.setMessage(value); } return this; } /** *
       * The maximum permitted number of simultaneous client connections per hour.
       * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; */ public Builder setMaxConnectionsPerHour( com.google.protobuf.Int64Value.Builder builderForValue) { if (maxConnectionsPerHourBuilder_ == null) { maxConnectionsPerHour_ = builderForValue.build(); onChanged(); } else { maxConnectionsPerHourBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * The maximum permitted number of simultaneous client connections per hour.
       * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; */ public Builder mergeMaxConnectionsPerHour(com.google.protobuf.Int64Value value) { if (maxConnectionsPerHourBuilder_ == null) { if (maxConnectionsPerHour_ != null) { maxConnectionsPerHour_ = com.google.protobuf.Int64Value.newBuilder(maxConnectionsPerHour_).mergeFrom(value).buildPartial(); } else { maxConnectionsPerHour_ = value; } onChanged(); } else { maxConnectionsPerHourBuilder_.mergeFrom(value); } return this; } /** *
       * The maximum permitted number of simultaneous client connections per hour.
       * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; */ public Builder clearMaxConnectionsPerHour() { if (maxConnectionsPerHourBuilder_ == null) { maxConnectionsPerHour_ = null; onChanged(); } else { maxConnectionsPerHour_ = null; maxConnectionsPerHourBuilder_ = null; } return this; } /** *
       * The maximum permitted number of simultaneous client connections per hour.
       * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; */ public com.google.protobuf.Int64Value.Builder getMaxConnectionsPerHourBuilder() { onChanged(); return getMaxConnectionsPerHourFieldBuilder().getBuilder(); } /** *
       * The maximum permitted number of simultaneous client connections per hour.
       * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; */ public com.google.protobuf.Int64ValueOrBuilder getMaxConnectionsPerHourOrBuilder() { if (maxConnectionsPerHourBuilder_ != null) { return maxConnectionsPerHourBuilder_.getMessageOrBuilder(); } else { return maxConnectionsPerHour_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxConnectionsPerHour_; } } /** *
       * The maximum permitted number of simultaneous client connections per hour.
       * 
* * .google.protobuf.Int64Value max_connections_per_hour = 3 [(.yandex.cloud.value) = ">=0"]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> getMaxConnectionsPerHourFieldBuilder() { if (maxConnectionsPerHourBuilder_ == null) { maxConnectionsPerHourBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( getMaxConnectionsPerHour(), getParentForChildren(), isClean()); maxConnectionsPerHour_ = null; } return maxConnectionsPerHourBuilder_; } private com.google.protobuf.Int64Value maxUserConnections_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> maxUserConnectionsBuilder_; /** *
       * The maximum number of simultaneous connections permitted to any given MySQL user account.
       * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; * @return Whether the maxUserConnections field is set. */ public boolean hasMaxUserConnections() { return maxUserConnectionsBuilder_ != null || maxUserConnections_ != null; } /** *
       * The maximum number of simultaneous connections permitted to any given MySQL user account.
       * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; * @return The maxUserConnections. */ public com.google.protobuf.Int64Value getMaxUserConnections() { if (maxUserConnectionsBuilder_ == null) { return maxUserConnections_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxUserConnections_; } else { return maxUserConnectionsBuilder_.getMessage(); } } /** *
       * The maximum number of simultaneous connections permitted to any given MySQL user account.
       * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; */ public Builder setMaxUserConnections(com.google.protobuf.Int64Value value) { if (maxUserConnectionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } maxUserConnections_ = value; onChanged(); } else { maxUserConnectionsBuilder_.setMessage(value); } return this; } /** *
       * The maximum number of simultaneous connections permitted to any given MySQL user account.
       * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; */ public Builder setMaxUserConnections( com.google.protobuf.Int64Value.Builder builderForValue) { if (maxUserConnectionsBuilder_ == null) { maxUserConnections_ = builderForValue.build(); onChanged(); } else { maxUserConnectionsBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * The maximum number of simultaneous connections permitted to any given MySQL user account.
       * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; */ public Builder mergeMaxUserConnections(com.google.protobuf.Int64Value value) { if (maxUserConnectionsBuilder_ == null) { if (maxUserConnections_ != null) { maxUserConnections_ = com.google.protobuf.Int64Value.newBuilder(maxUserConnections_).mergeFrom(value).buildPartial(); } else { maxUserConnections_ = value; } onChanged(); } else { maxUserConnectionsBuilder_.mergeFrom(value); } return this; } /** *
       * The maximum number of simultaneous connections permitted to any given MySQL user account.
       * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; */ public Builder clearMaxUserConnections() { if (maxUserConnectionsBuilder_ == null) { maxUserConnections_ = null; onChanged(); } else { maxUserConnections_ = null; maxUserConnectionsBuilder_ = null; } return this; } /** *
       * The maximum number of simultaneous connections permitted to any given MySQL user account.
       * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; */ public com.google.protobuf.Int64Value.Builder getMaxUserConnectionsBuilder() { onChanged(); return getMaxUserConnectionsFieldBuilder().getBuilder(); } /** *
       * The maximum number of simultaneous connections permitted to any given MySQL user account.
       * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; */ public com.google.protobuf.Int64ValueOrBuilder getMaxUserConnectionsOrBuilder() { if (maxUserConnectionsBuilder_ != null) { return maxUserConnectionsBuilder_.getMessageOrBuilder(); } else { return maxUserConnections_ == null ? com.google.protobuf.Int64Value.getDefaultInstance() : maxUserConnections_; } } /** *
       * The maximum number of simultaneous connections permitted to any given MySQL user account.
       * 
* * .google.protobuf.Int64Value max_user_connections = 4 [(.yandex.cloud.value) = ">=0"]; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder> getMaxUserConnectionsFieldBuilder() { if (maxUserConnectionsBuilder_ == null) { maxUserConnectionsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Int64Value, com.google.protobuf.Int64Value.Builder, com.google.protobuf.Int64ValueOrBuilder>( getMaxUserConnections(), getParentForChildren(), isClean()); maxUserConnections_ = null; } return maxUserConnectionsBuilder_; } @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:yandex.cloud.mdb.mysql.v1.ConnectionLimits) } // @@protoc_insertion_point(class_scope:yandex.cloud.mdb.mysql.v1.ConnectionLimits) private static final yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits(); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ConnectionLimits parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new ConnectionLimits(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface UserSpecOrBuilder extends // @@protoc_insertion_point(interface_extends:yandex.cloud.mdb.mysql.v1.UserSpec) com.google.protobuf.MessageOrBuilder { /** *
     * Name of the user.
     * 
* * string name = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.pattern) = "[a-zA-Z0-9_]*", (.yandex.cloud.length) = "<=32"]; * @return The name. */ java.lang.String getName(); /** *
     * Name of the user.
     * 
* * string name = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.pattern) = "[a-zA-Z0-9_]*", (.yandex.cloud.length) = "<=32"]; * @return The bytes for name. */ com.google.protobuf.ByteString getNameBytes(); /** *
     * Password of the user.
     * 
* * string password = 2 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "8-128"]; * @return The password. */ java.lang.String getPassword(); /** *
     * Password of the user.
     * 
* * string password = 2 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "8-128"]; * @return The bytes for password. */ com.google.protobuf.ByteString getPasswordBytes(); /** *
     * Set of permissions granted to the user to access specific databases.
     * One permission per database.
     * When a permission for a database is set, the user will have access to the database.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ java.util.List getPermissionsList(); /** *
     * Set of permissions granted to the user to access specific databases.
     * One permission per database.
     * When a permission for a database is set, the user will have access to the database.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission getPermissions(int index); /** *
     * Set of permissions granted to the user to access specific databases.
     * One permission per database.
     * When a permission for a database is set, the user will have access to the database.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ int getPermissionsCount(); /** *
     * Set of permissions granted to the user to access specific databases.
     * One permission per database.
     * When a permission for a database is set, the user will have access to the database.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ java.util.List getPermissionsOrBuilderList(); /** *
     * Set of permissions granted to the user to access specific databases.
     * One permission per database.
     * When a permission for a database is set, the user will have access to the database.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder getPermissionsOrBuilder( int index); /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the globalPermissions. */ java.util.List getGlobalPermissionsList(); /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return The count of globalPermissions. */ int getGlobalPermissionsCount(); /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the element to return. * @return The globalPermissions at the given index. */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission getGlobalPermissions(int index); /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the enum numeric values on the wire for globalPermissions. */ java.util.List getGlobalPermissionsValueList(); /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the value to return. * @return The enum numeric value on the wire of globalPermissions at the given index. */ int getGlobalPermissionsValue(int index); /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return Whether the connectionLimits field is set. */ boolean hasConnectionLimits(); /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return The connectionLimits. */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits getConnectionLimits(); /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder getConnectionLimitsOrBuilder(); /** *
     * User authentication plugin.
     * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The enum numeric value on the wire for authenticationPlugin. */ int getAuthenticationPluginValue(); /** *
     * User authentication plugin.
     * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The authenticationPlugin. */ yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin getAuthenticationPlugin(); } /** * Protobuf type {@code yandex.cloud.mdb.mysql.v1.UserSpec} */ public static final class UserSpec extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:yandex.cloud.mdb.mysql.v1.UserSpec) UserSpecOrBuilder { private static final long serialVersionUID = 0L; // Use UserSpec.newBuilder() to construct. private UserSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private UserSpec() { name_ = ""; password_ = ""; permissions_ = java.util.Collections.emptyList(); globalPermissions_ = java.util.Collections.emptyList(); authenticationPlugin_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new UserSpec(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private UserSpec( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); password_ = s; break; } case 26: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { permissions_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } permissions_.add( input.readMessage(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.parser(), extensionRegistry)); break; } case 32: { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000002) != 0)) { globalPermissions_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } globalPermissions_.add(rawValue); break; } case 34: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while(input.getBytesUntilLimit() > 0) { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000002) != 0)) { globalPermissions_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } globalPermissions_.add(rawValue); } input.popLimit(oldLimit); break; } case 42: { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder subBuilder = null; if (connectionLimits_ != null) { subBuilder = connectionLimits_.toBuilder(); } connectionLimits_ = input.readMessage(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(connectionLimits_); connectionLimits_ = subBuilder.buildPartial(); } break; } case 48: { int rawValue = input.readEnum(); authenticationPlugin_ = rawValue; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { permissions_ = java.util.Collections.unmodifiableList(permissions_); } if (((mutable_bitField0_ & 0x00000002) != 0)) { globalPermissions_ = java.util.Collections.unmodifiableList(globalPermissions_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_UserSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_UserSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec.class, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec.Builder.class); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
     * Name of the user.
     * 
* * string name = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.pattern) = "[a-zA-Z0-9_]*", (.yandex.cloud.length) = "<=32"]; * @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; } } /** *
     * Name of the user.
     * 
* * string name = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.pattern) = "[a-zA-Z0-9_]*", (.yandex.cloud.length) = "<=32"]; * @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 PASSWORD_FIELD_NUMBER = 2; private volatile java.lang.Object password_; /** *
     * Password of the user.
     * 
* * string password = 2 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "8-128"]; * @return The password. */ @java.lang.Override public java.lang.String getPassword() { java.lang.Object ref = password_; 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(); password_ = s; return s; } } /** *
     * Password of the user.
     * 
* * string password = 2 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "8-128"]; * @return The bytes for password. */ @java.lang.Override public com.google.protobuf.ByteString getPasswordBytes() { java.lang.Object ref = password_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); password_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int PERMISSIONS_FIELD_NUMBER = 3; private java.util.List permissions_; /** *
     * Set of permissions granted to the user to access specific databases.
     * One permission per database.
     * When a permission for a database is set, the user will have access to the database.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ @java.lang.Override public java.util.List getPermissionsList() { return permissions_; } /** *
     * Set of permissions granted to the user to access specific databases.
     * One permission per database.
     * When a permission for a database is set, the user will have access to the database.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ @java.lang.Override public java.util.List getPermissionsOrBuilderList() { return permissions_; } /** *
     * Set of permissions granted to the user to access specific databases.
     * One permission per database.
     * When a permission for a database is set, the user will have access to the database.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ @java.lang.Override public int getPermissionsCount() { return permissions_.size(); } /** *
     * Set of permissions granted to the user to access specific databases.
     * One permission per database.
     * When a permission for a database is set, the user will have access to the database.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission getPermissions(int index) { return permissions_.get(index); } /** *
     * Set of permissions granted to the user to access specific databases.
     * One permission per database.
     * When a permission for a database is set, the user will have access to the database.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder getPermissionsOrBuilder( int index) { return permissions_.get(index); } public static final int GLOBAL_PERMISSIONS_FIELD_NUMBER = 4; private java.util.List globalPermissions_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission> globalPermissions_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission>() { public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission convert(java.lang.Integer from) { @SuppressWarnings("deprecation") yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission result = yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission.valueOf(from); return result == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission.UNRECOGNIZED : result; } }; /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the globalPermissions. */ @java.lang.Override public java.util.List getGlobalPermissionsList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission>(globalPermissions_, globalPermissions_converter_); } /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return The count of globalPermissions. */ @java.lang.Override public int getGlobalPermissionsCount() { return globalPermissions_.size(); } /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the element to return. * @return The globalPermissions at the given index. */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission getGlobalPermissions(int index) { return globalPermissions_converter_.convert(globalPermissions_.get(index)); } /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the enum numeric values on the wire for globalPermissions. */ @java.lang.Override public java.util.List getGlobalPermissionsValueList() { return globalPermissions_; } /** *
     * Set of global permissions to grant to the user.
     * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the value to return. * @return The enum numeric value on the wire of globalPermissions at the given index. */ @java.lang.Override public int getGlobalPermissionsValue(int index) { return globalPermissions_.get(index); } private int globalPermissionsMemoizedSerializedSize; public static final int CONNECTION_LIMITS_FIELD_NUMBER = 5; private yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits connectionLimits_; /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return Whether the connectionLimits field is set. */ @java.lang.Override public boolean hasConnectionLimits() { return connectionLimits_ != null; } /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return The connectionLimits. */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits getConnectionLimits() { return connectionLimits_ == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.getDefaultInstance() : connectionLimits_; } /** *
     * Set of user connection limits.
     * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder getConnectionLimitsOrBuilder() { return getConnectionLimits(); } public static final int AUTHENTICATION_PLUGIN_FIELD_NUMBER = 6; private int authenticationPlugin_; /** *
     * User authentication plugin.
     * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The enum numeric value on the wire for authenticationPlugin. */ @java.lang.Override public int getAuthenticationPluginValue() { return authenticationPlugin_; } /** *
     * User authentication plugin.
     * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The authenticationPlugin. */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin getAuthenticationPlugin() { @SuppressWarnings("deprecation") yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin result = yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.valueOf(authenticationPlugin_); return result == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.UNRECOGNIZED : result; } 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 { getSerializedSize(); if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(password_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, password_); } for (int i = 0; i < permissions_.size(); i++) { output.writeMessage(3, permissions_.get(i)); } if (getGlobalPermissionsList().size() > 0) { output.writeUInt32NoTag(34); output.writeUInt32NoTag(globalPermissionsMemoizedSerializedSize); } for (int i = 0; i < globalPermissions_.size(); i++) { output.writeEnumNoTag(globalPermissions_.get(i)); } if (connectionLimits_ != null) { output.writeMessage(5, getConnectionLimits()); } if (authenticationPlugin_ != yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.AUTH_PLUGIN_UNSPECIFIED.getNumber()) { output.writeEnum(6, authenticationPlugin_); } unknownFields.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(password_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, password_); } for (int i = 0; i < permissions_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, permissions_.get(i)); } { int dataSize = 0; for (int i = 0; i < globalPermissions_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeEnumSizeNoTag(globalPermissions_.get(i)); } size += dataSize; if (!getGlobalPermissionsList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(dataSize); }globalPermissionsMemoizedSerializedSize = dataSize; } if (connectionLimits_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getConnectionLimits()); } if (authenticationPlugin_ != yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.AUTH_PLUGIN_UNSPECIFIED.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(6, authenticationPlugin_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec)) { return super.equals(obj); } yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec other = (yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec) obj; if (!getName() .equals(other.getName())) return false; if (!getPassword() .equals(other.getPassword())) return false; if (!getPermissionsList() .equals(other.getPermissionsList())) return false; if (!globalPermissions_.equals(other.globalPermissions_)) return false; if (hasConnectionLimits() != other.hasConnectionLimits()) return false; if (hasConnectionLimits()) { if (!getConnectionLimits() .equals(other.getConnectionLimits())) return false; } if (authenticationPlugin_ != other.authenticationPlugin_) return false; if (!unknownFields.equals(other.unknownFields)) 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) + PASSWORD_FIELD_NUMBER; hash = (53 * hash) + getPassword().hashCode(); if (getPermissionsCount() > 0) { hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + getPermissionsList().hashCode(); } if (getGlobalPermissionsCount() > 0) { hash = (37 * hash) + GLOBAL_PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + globalPermissions_.hashCode(); } if (hasConnectionLimits()) { hash = (37 * hash) + CONNECTION_LIMITS_FIELD_NUMBER; hash = (53 * hash) + getConnectionLimits().hashCode(); } hash = (37 * hash) + AUTHENTICATION_PLUGIN_FIELD_NUMBER; hash = (53 * hash) + authenticationPlugin_; hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec 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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec 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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec 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(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec 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; } /** * Protobuf type {@code yandex.cloud.mdb.mysql.v1.UserSpec} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:yandex.cloud.mdb.mysql.v1.UserSpec) yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpecOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_UserSpec_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_UserSpec_fieldAccessorTable .ensureFieldAccessorsInitialized( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec.class, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec.Builder.class); } // Construct using yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getPermissionsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; password_ = ""; if (permissionsBuilder_ == null) { permissions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { permissionsBuilder_.clear(); } globalPermissions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); if (connectionLimitsBuilder_ == null) { connectionLimits_ = null; } else { connectionLimits_ = null; connectionLimitsBuilder_ = null; } authenticationPlugin_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.internal_static_yandex_cloud_mdb_mysql_v1_UserSpec_descriptor; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec getDefaultInstanceForType() { return yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec.getDefaultInstance(); } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec build() { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec buildPartial() { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec result = new yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec(this); int from_bitField0_ = bitField0_; result.name_ = name_; result.password_ = password_; if (permissionsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { permissions_ = java.util.Collections.unmodifiableList(permissions_); bitField0_ = (bitField0_ & ~0x00000001); } result.permissions_ = permissions_; } else { result.permissions_ = permissionsBuilder_.build(); } if (((bitField0_ & 0x00000002) != 0)) { globalPermissions_ = java.util.Collections.unmodifiableList(globalPermissions_); bitField0_ = (bitField0_ & ~0x00000002); } result.globalPermissions_ = globalPermissions_; if (connectionLimitsBuilder_ == null) { result.connectionLimits_ = connectionLimits_; } else { result.connectionLimits_ = connectionLimitsBuilder_.build(); } result.authenticationPlugin_ = authenticationPlugin_; onBuilt(); return result; } @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 yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec) { return mergeFrom((yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec other) { if (other == yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getPassword().isEmpty()) { password_ = other.password_; onChanged(); } if (permissionsBuilder_ == null) { if (!other.permissions_.isEmpty()) { if (permissions_.isEmpty()) { permissions_ = other.permissions_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensurePermissionsIsMutable(); permissions_.addAll(other.permissions_); } onChanged(); } } else { if (!other.permissions_.isEmpty()) { if (permissionsBuilder_.isEmpty()) { permissionsBuilder_.dispose(); permissionsBuilder_ = null; permissions_ = other.permissions_; bitField0_ = (bitField0_ & ~0x00000001); permissionsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPermissionsFieldBuilder() : null; } else { permissionsBuilder_.addAllMessages(other.permissions_); } } } if (!other.globalPermissions_.isEmpty()) { if (globalPermissions_.isEmpty()) { globalPermissions_ = other.globalPermissions_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureGlobalPermissionsIsMutable(); globalPermissions_.addAll(other.globalPermissions_); } onChanged(); } if (other.hasConnectionLimits()) { mergeConnectionLimits(other.getConnectionLimits()); } if (other.authenticationPlugin_ != 0) { setAuthenticationPluginValue(other.getAuthenticationPluginValue()); } this.mergeUnknownFields(other.unknownFields); 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 { yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object name_ = ""; /** *
       * Name of the user.
       * 
* * string name = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.pattern) = "[a-zA-Z0-9_]*", (.yandex.cloud.length) = "<=32"]; * @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; } } /** *
       * Name of the user.
       * 
* * string name = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.pattern) = "[a-zA-Z0-9_]*", (.yandex.cloud.length) = "<=32"]; * @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; } } /** *
       * Name of the user.
       * 
* * string name = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.pattern) = "[a-zA-Z0-9_]*", (.yandex.cloud.length) = "<=32"]; * @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; onChanged(); return this; } /** *
       * Name of the user.
       * 
* * string name = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.pattern) = "[a-zA-Z0-9_]*", (.yandex.cloud.length) = "<=32"]; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
       * Name of the user.
       * 
* * string name = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.pattern) = "[a-zA-Z0-9_]*", (.yandex.cloud.length) = "<=32"]; * @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; onChanged(); return this; } private java.lang.Object password_ = ""; /** *
       * Password of the user.
       * 
* * string password = 2 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "8-128"]; * @return The password. */ public java.lang.String getPassword() { java.lang.Object ref = password_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); password_ = s; return s; } else { return (java.lang.String) ref; } } /** *
       * Password of the user.
       * 
* * string password = 2 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "8-128"]; * @return The bytes for password. */ public com.google.protobuf.ByteString getPasswordBytes() { java.lang.Object ref = password_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); password_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
       * Password of the user.
       * 
* * string password = 2 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "8-128"]; * @param value The password to set. * @return This builder for chaining. */ public Builder setPassword( java.lang.String value) { if (value == null) { throw new NullPointerException(); } password_ = value; onChanged(); return this; } /** *
       * Password of the user.
       * 
* * string password = 2 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "8-128"]; * @return This builder for chaining. */ public Builder clearPassword() { password_ = getDefaultInstance().getPassword(); onChanged(); return this; } /** *
       * Password of the user.
       * 
* * string password = 2 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "8-128"]; * @param value The bytes for password to set. * @return This builder for chaining. */ public Builder setPasswordBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); password_ = value; onChanged(); return this; } private java.util.List permissions_ = java.util.Collections.emptyList(); private void ensurePermissionsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { permissions_ = new java.util.ArrayList(permissions_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder> permissionsBuilder_; /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public java.util.List getPermissionsList() { if (permissionsBuilder_ == null) { return java.util.Collections.unmodifiableList(permissions_); } else { return permissionsBuilder_.getMessageList(); } } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public int getPermissionsCount() { if (permissionsBuilder_ == null) { return permissions_.size(); } else { return permissionsBuilder_.getCount(); } } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission getPermissions(int index) { if (permissionsBuilder_ == null) { return permissions_.get(index); } else { return permissionsBuilder_.getMessage(index); } } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder setPermissions( int index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission value) { if (permissionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePermissionsIsMutable(); permissions_.set(index, value); onChanged(); } else { permissionsBuilder_.setMessage(index, value); } return this; } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder setPermissions( int index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder builderForValue) { if (permissionsBuilder_ == null) { ensurePermissionsIsMutable(); permissions_.set(index, builderForValue.build()); onChanged(); } else { permissionsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder addPermissions(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission value) { if (permissionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePermissionsIsMutable(); permissions_.add(value); onChanged(); } else { permissionsBuilder_.addMessage(value); } return this; } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder addPermissions( int index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission value) { if (permissionsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePermissionsIsMutable(); permissions_.add(index, value); onChanged(); } else { permissionsBuilder_.addMessage(index, value); } return this; } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder addPermissions( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder builderForValue) { if (permissionsBuilder_ == null) { ensurePermissionsIsMutable(); permissions_.add(builderForValue.build()); onChanged(); } else { permissionsBuilder_.addMessage(builderForValue.build()); } return this; } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder addPermissions( int index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder builderForValue) { if (permissionsBuilder_ == null) { ensurePermissionsIsMutable(); permissions_.add(index, builderForValue.build()); onChanged(); } else { permissionsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder addAllPermissions( java.lang.Iterable values) { if (permissionsBuilder_ == null) { ensurePermissionsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, permissions_); onChanged(); } else { permissionsBuilder_.addAllMessages(values); } return this; } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder clearPermissions() { if (permissionsBuilder_ == null) { permissions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { permissionsBuilder_.clear(); } return this; } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public Builder removePermissions(int index) { if (permissionsBuilder_ == null) { ensurePermissionsIsMutable(); permissions_.remove(index); onChanged(); } else { permissionsBuilder_.remove(index); } return this; } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder getPermissionsBuilder( int index) { return getPermissionsFieldBuilder().getBuilder(index); } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder getPermissionsOrBuilder( int index) { if (permissionsBuilder_ == null) { return permissions_.get(index); } else { return permissionsBuilder_.getMessageOrBuilder(index); } } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public java.util.List getPermissionsOrBuilderList() { if (permissionsBuilder_ != null) { return permissionsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(permissions_); } } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder addPermissionsBuilder() { return getPermissionsFieldBuilder().addBuilder( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.getDefaultInstance()); } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder addPermissionsBuilder( int index) { return getPermissionsFieldBuilder().addBuilder( index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.getDefaultInstance()); } /** *
       * Set of permissions granted to the user to access specific databases.
       * One permission per database.
       * When a permission for a database is set, the user will have access to the database.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.Permission permissions = 3; */ public java.util.List getPermissionsBuilderList() { return getPermissionsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder> getPermissionsFieldBuilder() { if (permissionsBuilder_ == null) { permissionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.Permission.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.PermissionOrBuilder>( permissions_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); permissions_ = null; } return permissionsBuilder_; } private java.util.List globalPermissions_ = java.util.Collections.emptyList(); private void ensureGlobalPermissionsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { globalPermissions_ = new java.util.ArrayList(globalPermissions_); bitField0_ |= 0x00000002; } } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the globalPermissions. */ public java.util.List getGlobalPermissionsList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission>(globalPermissions_, globalPermissions_converter_); } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return The count of globalPermissions. */ public int getGlobalPermissionsCount() { return globalPermissions_.size(); } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the element to return. * @return The globalPermissions at the given index. */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission getGlobalPermissions(int index) { return globalPermissions_converter_.convert(globalPermissions_.get(index)); } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index to set the value at. * @param value The globalPermissions to set. * @return This builder for chaining. */ public Builder setGlobalPermissions( int index, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission value) { if (value == null) { throw new NullPointerException(); } ensureGlobalPermissionsIsMutable(); globalPermissions_.set(index, value.getNumber()); onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param value The globalPermissions to add. * @return This builder for chaining. */ public Builder addGlobalPermissions(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission value) { if (value == null) { throw new NullPointerException(); } ensureGlobalPermissionsIsMutable(); globalPermissions_.add(value.getNumber()); onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param values The globalPermissions to add. * @return This builder for chaining. */ public Builder addAllGlobalPermissions( java.lang.Iterable values) { ensureGlobalPermissionsIsMutable(); for (yandex.cloud.api.mdb.mysql.v1.UserOuterClass.GlobalPermission value : values) { globalPermissions_.add(value.getNumber()); } onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return This builder for chaining. */ public Builder clearGlobalPermissions() { globalPermissions_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @return A list containing the enum numeric values on the wire for globalPermissions. */ public java.util.List getGlobalPermissionsValueList() { return java.util.Collections.unmodifiableList(globalPermissions_); } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the value to return. * @return The enum numeric value on the wire of globalPermissions at the given index. */ public int getGlobalPermissionsValue(int index) { return globalPermissions_.get(index); } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param index The index of the value to return. * @return The enum numeric value on the wire of globalPermissions at the given index. * @return This builder for chaining. */ public Builder setGlobalPermissionsValue( int index, int value) { ensureGlobalPermissionsIsMutable(); globalPermissions_.set(index, value); onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param value The enum numeric value on the wire for globalPermissions to add. * @return This builder for chaining. */ public Builder addGlobalPermissionsValue(int value) { ensureGlobalPermissionsIsMutable(); globalPermissions_.add(value); onChanged(); return this; } /** *
       * Set of global permissions to grant to the user.
       * 
* * repeated .yandex.cloud.mdb.mysql.v1.GlobalPermission global_permissions = 4; * @param values The enum numeric values on the wire for globalPermissions to add. * @return This builder for chaining. */ public Builder addAllGlobalPermissionsValue( java.lang.Iterable values) { ensureGlobalPermissionsIsMutable(); for (int value : values) { globalPermissions_.add(value); } onChanged(); return this; } private yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits connectionLimits_; private com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder> connectionLimitsBuilder_; /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return Whether the connectionLimits field is set. */ public boolean hasConnectionLimits() { return connectionLimitsBuilder_ != null || connectionLimits_ != null; } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; * @return The connectionLimits. */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits getConnectionLimits() { if (connectionLimitsBuilder_ == null) { return connectionLimits_ == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.getDefaultInstance() : connectionLimits_; } else { return connectionLimitsBuilder_.getMessage(); } } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public Builder setConnectionLimits(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits value) { if (connectionLimitsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } connectionLimits_ = value; onChanged(); } else { connectionLimitsBuilder_.setMessage(value); } return this; } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public Builder setConnectionLimits( yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder builderForValue) { if (connectionLimitsBuilder_ == null) { connectionLimits_ = builderForValue.build(); onChanged(); } else { connectionLimitsBuilder_.setMessage(builderForValue.build()); } return this; } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public Builder mergeConnectionLimits(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits value) { if (connectionLimitsBuilder_ == null) { if (connectionLimits_ != null) { connectionLimits_ = yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.newBuilder(connectionLimits_).mergeFrom(value).buildPartial(); } else { connectionLimits_ = value; } onChanged(); } else { connectionLimitsBuilder_.mergeFrom(value); } return this; } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public Builder clearConnectionLimits() { if (connectionLimitsBuilder_ == null) { connectionLimits_ = null; onChanged(); } else { connectionLimits_ = null; connectionLimitsBuilder_ = null; } return this; } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder getConnectionLimitsBuilder() { onChanged(); return getConnectionLimitsFieldBuilder().getBuilder(); } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder getConnectionLimitsOrBuilder() { if (connectionLimitsBuilder_ != null) { return connectionLimitsBuilder_.getMessageOrBuilder(); } else { return connectionLimits_ == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.getDefaultInstance() : connectionLimits_; } } /** *
       * Set of user connection limits.
       * 
* * .yandex.cloud.mdb.mysql.v1.ConnectionLimits connection_limits = 5; */ private com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder> getConnectionLimitsFieldBuilder() { if (connectionLimitsBuilder_ == null) { connectionLimitsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimits.Builder, yandex.cloud.api.mdb.mysql.v1.UserOuterClass.ConnectionLimitsOrBuilder>( getConnectionLimits(), getParentForChildren(), isClean()); connectionLimits_ = null; } return connectionLimitsBuilder_; } private int authenticationPlugin_ = 0; /** *
       * User authentication plugin.
       * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The enum numeric value on the wire for authenticationPlugin. */ @java.lang.Override public int getAuthenticationPluginValue() { return authenticationPlugin_; } /** *
       * User authentication plugin.
       * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @param value The enum numeric value on the wire for authenticationPlugin to set. * @return This builder for chaining. */ public Builder setAuthenticationPluginValue(int value) { authenticationPlugin_ = value; onChanged(); return this; } /** *
       * User authentication plugin.
       * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return The authenticationPlugin. */ @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin getAuthenticationPlugin() { @SuppressWarnings("deprecation") yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin result = yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.valueOf(authenticationPlugin_); return result == null ? yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin.UNRECOGNIZED : result; } /** *
       * User authentication plugin.
       * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @param value The authenticationPlugin to set. * @return This builder for chaining. */ public Builder setAuthenticationPlugin(yandex.cloud.api.mdb.mysql.v1.UserOuterClass.AuthPlugin value) { if (value == null) { throw new NullPointerException(); } authenticationPlugin_ = value.getNumber(); onChanged(); return this; } /** *
       * User authentication plugin.
       * 
* * .yandex.cloud.mdb.mysql.v1.AuthPlugin authentication_plugin = 6; * @return This builder for chaining. */ public Builder clearAuthenticationPlugin() { authenticationPlugin_ = 0; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:yandex.cloud.mdb.mysql.v1.UserSpec) } // @@protoc_insertion_point(class_scope:yandex.cloud.mdb.mysql.v1.UserSpec) private static final yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec(); } public static yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public UserSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new UserSpec(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public yandex.cloud.api.mdb.mysql.v1.UserOuterClass.UserSpec getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_yandex_cloud_mdb_mysql_v1_User_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_yandex_cloud_mdb_mysql_v1_User_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_yandex_cloud_mdb_mysql_v1_Permission_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_yandex_cloud_mdb_mysql_v1_Permission_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_yandex_cloud_mdb_mysql_v1_ConnectionLimits_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_yandex_cloud_mdb_mysql_v1_ConnectionLimits_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_yandex_cloud_mdb_mysql_v1_UserSpec_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_yandex_cloud_mdb_mysql_v1_UserSpec_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n$yandex/cloud/mdb/mysql/v1/user.proto\022\031" + "yandex.cloud.mdb.mysql.v1\032\036google/protob" + "uf/wrappers.proto\032\035yandex/cloud/validati" + "on.proto\"\273\002\n\004User\022\014\n\004name\030\001 \001(\t\022\022\n\nclust" + "er_id\030\002 \001(\t\022:\n\013permissions\030\003 \003(\0132%.yande" + "x.cloud.mdb.mysql.v1.Permission\022G\n\022globa" + "l_permissions\030\004 \003(\0162+.yandex.cloud.mdb.m" + "ysql.v1.GlobalPermission\022F\n\021connection_l" + "imits\030\005 \001(\0132+.yandex.cloud.mdb.mysql.v1." + "ConnectionLimits\022D\n\025authentication_plugi" + "n\030\006 \001(\0162%.yandex.cloud.mdb.mysql.v1.Auth" + "Plugin\"\257\003\n\nPermission\022\025\n\rdatabase_name\030\001" + " \001(\t\022G\n\005roles\030\002 \003(\0162/.yandex.cloud.mdb.m" + "ysql.v1.Permission.PrivilegeB\007\202\3101\003>=1\"\300\002" + "\n\tPrivilege\022\031\n\025PRIVILEGE_UNSPECIFIED\020\000\022\022" + "\n\016ALL_PRIVILEGES\020\001\022\t\n\005ALTER\020\002\022\021\n\rALTER_R" + "OUTINE\020\003\022\n\n\006CREATE\020\004\022\022\n\016CREATE_ROUTINE\020\005" + "\022\033\n\027CREATE_TEMPORARY_TABLES\020\006\022\017\n\013CREATE_" + "VIEW\020\007\022\n\n\006DELETE\020\010\022\010\n\004DROP\020\t\022\t\n\005EVENT\020\n\022" + "\013\n\007EXECUTE\020\013\022\t\n\005INDEX\020\014\022\n\n\006INSERT\020\r\022\017\n\013L" + "OCK_TABLES\020\016\022\n\n\006SELECT\020\017\022\r\n\tSHOW_VIEW\020\020\022" + "\013\n\007TRIGGER\020\021\022\n\n\006UPDATE\020\022\022\016\n\nREFERENCES\020\023" + "\"\250\002\n\020ConnectionLimits\022D\n\026max_questions_p" + "er_hour\030\001 \001(\0132\033.google.protobuf.Int64Val" + "ueB\007\372\3071\003>=0\022B\n\024max_updates_per_hour\030\002 \001(" + "\0132\033.google.protobuf.Int64ValueB\007\372\3071\003>=0\022" + "F\n\030max_connections_per_hour\030\003 \001(\0132\033.goog" + "le.protobuf.Int64ValueB\007\372\3071\003>=0\022B\n\024max_u" + "ser_connections\030\004 \001(\0132\033.google.protobuf." + "Int64ValueB\007\372\3071\003>=0\"\353\002\n\010UserSpec\022+\n\004name" + "\030\001 \001(\tB\035\350\3071\001\212\3101\004<=32\362\3071\r[a-zA-Z0-9_]*\022\037\n" + "\010password\030\002 \001(\tB\r\350\3071\001\212\3101\0058-128\022:\n\013permis" + "sions\030\003 \003(\0132%.yandex.cloud.mdb.mysql.v1." + "Permission\022G\n\022global_permissions\030\004 \003(\0162+" + ".yandex.cloud.mdb.mysql.v1.GlobalPermiss" + "ion\022F\n\021connection_limits\030\005 \001(\0132+.yandex." + "cloud.mdb.mysql.v1.ConnectionLimits\022D\n\025a" + "uthentication_plugin\030\006 \001(\0162%.yandex.clou" + "d.mdb.mysql.v1.AuthPlugin*\236\001\n\020GlobalPerm" + "ission\022!\n\035GLOBAL_PERMISSION_UNSPECIFIED\020" + "\000\022\026\n\022REPLICATION_CLIENT\020\001\022\025\n\021REPLICATION" + "_SLAVE\020\002\022\013\n\007PROCESS\020\003\022\031\n\025FLUSH_OPTIMIZER" + "_COSTS\020\004\022\020\n\014SHOW_ROUTINE\020\005*t\n\nAuthPlugin" + "\022\033\n\027AUTH_PLUGIN_UNSPECIFIED\020\000\022\031\n\025MYSQL_N" + "ATIVE_PASSWORD\020\001\022\031\n\025CACHING_SHA2_PASSWOR" + "D\020\002\022\023\n\017SHA256_PASSWORD\020\003Bd\n\035yandex.cloud" + ".api.mdb.mysql.v1ZCgithub.com/yandex-clo" + "ud/go-genproto/yandex/cloud/mdb/mysql/v1" + ";mysqlb\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { com.google.protobuf.WrappersProto.getDescriptor(), yandex.cloud.api.Validation.getDescriptor(), }); internal_static_yandex_cloud_mdb_mysql_v1_User_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_yandex_cloud_mdb_mysql_v1_User_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_yandex_cloud_mdb_mysql_v1_User_descriptor, new java.lang.String[] { "Name", "ClusterId", "Permissions", "GlobalPermissions", "ConnectionLimits", "AuthenticationPlugin", }); internal_static_yandex_cloud_mdb_mysql_v1_Permission_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_yandex_cloud_mdb_mysql_v1_Permission_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_yandex_cloud_mdb_mysql_v1_Permission_descriptor, new java.lang.String[] { "DatabaseName", "Roles", }); internal_static_yandex_cloud_mdb_mysql_v1_ConnectionLimits_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_yandex_cloud_mdb_mysql_v1_ConnectionLimits_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_yandex_cloud_mdb_mysql_v1_ConnectionLimits_descriptor, new java.lang.String[] { "MaxQuestionsPerHour", "MaxUpdatesPerHour", "MaxConnectionsPerHour", "MaxUserConnections", }); internal_static_yandex_cloud_mdb_mysql_v1_UserSpec_descriptor = getDescriptor().getMessageTypes().get(3); internal_static_yandex_cloud_mdb_mysql_v1_UserSpec_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_yandex_cloud_mdb_mysql_v1_UserSpec_descriptor, new java.lang.String[] { "Name", "Password", "Permissions", "GlobalPermissions", "ConnectionLimits", "AuthenticationPlugin", }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(yandex.cloud.api.Validation.length); registry.add(yandex.cloud.api.Validation.pattern); registry.add(yandex.cloud.api.Validation.required); registry.add(yandex.cloud.api.Validation.size); registry.add(yandex.cloud.api.Validation.value); com.google.protobuf.Descriptors.FileDescriptor .internalUpdateFileDescriptor(descriptor, registry); com.google.protobuf.WrappersProto.getDescriptor(); yandex.cloud.api.Validation.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy