Class User (0.1.0)

public final class User extends GeneratedMessage implements UserOrBuilder

A Cloud SQL user resource.

Protobuf type google.cloud.sql.v1.User

Implements

UserOrBuilder

Static Fields

DATABASE_ROLES_FIELD_NUMBER

public static final int DATABASE_ROLES_FIELD_NUMBER
Field Value
Type Description
int

DUAL_PASSWORD_TYPE_FIELD_NUMBER

public static final int DUAL_PASSWORD_TYPE_FIELD_NUMBER
Field Value
Type Description
int

ETAG_FIELD_NUMBER

public static final int ETAG_FIELD_NUMBER
Field Value
Type Description
int

HOST_FIELD_NUMBER

public static final int HOST_FIELD_NUMBER
Field Value
Type Description
int

IAM_EMAIL_FIELD_NUMBER

public static final int IAM_EMAIL_FIELD_NUMBER
Field Value
Type Description
int

IAM_STATUS_FIELD_NUMBER

public static final int IAM_STATUS_FIELD_NUMBER
Field Value
Type Description
int

INSTANCE_FIELD_NUMBER

public static final int INSTANCE_FIELD_NUMBER
Field Value
Type Description
int

KIND_FIELD_NUMBER

public static final int KIND_FIELD_NUMBER
Field Value
Type Description
int

NAME_FIELD_NUMBER

public static final int NAME_FIELD_NUMBER
Field Value
Type Description
int

PASSWORD_FIELD_NUMBER

public static final int PASSWORD_FIELD_NUMBER
Field Value
Type Description
int

PASSWORD_POLICY_FIELD_NUMBER

public static final int PASSWORD_POLICY_FIELD_NUMBER
Field Value
Type Description
int

PROJECT_FIELD_NUMBER

public static final int PROJECT_FIELD_NUMBER
Field Value
Type Description
int

SERVER_ROLES_FIELD_NUMBER

public static final int SERVER_ROLES_FIELD_NUMBER
Field Value
Type Description
int

SQLSERVER_USER_DETAILS_FIELD_NUMBER

public static final int SQLSERVER_USER_DETAILS_FIELD_NUMBER
Field Value
Type Description
int

TYPE_FIELD_NUMBER

public static final int TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static User getDefaultInstance()
Returns
Type Description
User

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static User.Builder newBuilder()
Returns
Type Description
User.Builder

newBuilder(User prototype)

public static User.Builder newBuilder(User prototype)
Parameter
Name Description
prototype User
Returns
Type Description
User.Builder

parseDelimitedFrom(InputStream input)

public static User parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
User
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static User parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static User parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static User parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static User parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static User parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static User parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
User
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static User parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static User parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
User
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static User parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static User parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static User parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
User
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<User> parser()
Returns
Type Description
Parser<User>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDatabaseRoles(int index)

public String getDatabaseRoles(int index)

Optional. Role memberships of the user

repeated string database_roles = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The databaseRoles at the given index.

getDatabaseRolesBytes(int index)

public ByteString getDatabaseRolesBytes(int index)

Optional. Role memberships of the user

repeated string database_roles = 15 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the databaseRoles at the given index.

getDatabaseRolesCount()

public int getDatabaseRolesCount()

Optional. Role memberships of the user

repeated string database_roles = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of databaseRoles.

getDatabaseRolesList()

public ProtocolStringList getDatabaseRolesList()

Optional. Role memberships of the user

repeated string database_roles = 15 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the databaseRoles.

getDefaultInstanceForType()

public User getDefaultInstanceForType()
Returns
Type Description
User

getDualPasswordType()

public User.DualPasswordType getDualPasswordType()

Dual password status for the user.

optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13;

Returns
Type Description
User.DualPasswordType

The dualPasswordType.

getDualPasswordTypeValue()

public int getDualPasswordTypeValue()

Dual password status for the user.

optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13;

Returns
Type Description
int

The enum numeric value on the wire for dualPasswordType.

getEtag()

public String getEtag()

This field is deprecated and will be removed from a future version of the API.

string etag = 3;

Returns
Type Description
String

The etag.

getEtagBytes()

public ByteString getEtagBytes()

This field is deprecated and will be removed from a future version of the API.

string etag = 3;

Returns
Type Description
ByteString

The bytes for etag.

getHost()

public String getHost()

Optional. The host from which the user can connect. For insert operations, host defaults to an empty string. For update operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional.

string host = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The host.

getHostBytes()

public ByteString getHostBytes()

Optional. The host from which the user can connect. For insert operations, host defaults to an empty string. For update operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional.

string host = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for host.

getIamEmail()

public String getIamEmail()

Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users.

string iam_email = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The iamEmail.

getIamEmailBytes()

public ByteString getIamEmailBytes()

Optional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users.

string iam_email = 11 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for iamEmail.

getIamStatus()

public User.IamStatus getIamStatus()

Indicates if a group is active or inactive for IAM database authentication.

optional .google.cloud.sql.v1.User.IamStatus iam_status = 14;

Returns
Type Description
User.IamStatus

The iamStatus.

getIamStatusValue()

public int getIamStatusValue()

Indicates if a group is active or inactive for IAM database authentication.

optional .google.cloud.sql.v1.User.IamStatus iam_status = 14;

Returns
Type Description
int

The enum numeric value on the wire for iamStatus.

getInstance()

public String getInstance()

The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for update because it is already specified on the URL.

string instance = 6;

Returns
Type Description
String

The instance.

getInstanceBytes()

public ByteString getInstanceBytes()

The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for update because it is already specified on the URL.

string instance = 6;

Returns
Type Description
ByteString

The bytes for instance.

getKind()

public String getKind()

This is always sql#user.

string kind = 1;

Returns
Type Description
String

The kind.

getKindBytes()

public ByteString getKindBytes()

This is always sql#user.

string kind = 1;

Returns
Type Description
ByteString

The bytes for kind.

getName()

public String getName()

The name of the user in the Cloud SQL instance. Can be omitted for update because it is already specified in the URL.

string name = 4;

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

The name of the user in the Cloud SQL instance. Can be omitted for update because it is already specified in the URL.

string name = 4;

Returns
Type Description
ByteString

The bytes for name.

getParserForType()

public Parser<User> getParserForType()
Returns
Type Description
Parser<User>
Overrides

getPassword()

public String getPassword()

The password for the user.

string password = 2;

Returns
Type Description
String

The password.

getPasswordBytes()

public ByteString getPasswordBytes()

The password for the user.

string password = 2;

Returns
Type Description
ByteString

The bytes for password.

getPasswordPolicy()

public UserPasswordValidationPolicy getPasswordPolicy()

User level password validation policy.

.google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12;

Returns
Type Description
UserPasswordValidationPolicy

The passwordPolicy.

getPasswordPolicyOrBuilder()

public UserPasswordValidationPolicyOrBuilder getPasswordPolicyOrBuilder()

User level password validation policy.

.google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12;

Returns
Type Description
UserPasswordValidationPolicyOrBuilder

getProject()

public String getProject()

The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for update because it is already specified on the URL.

string project = 7;

Returns
Type Description
String

The project.

getProjectBytes()

public ByteString getProjectBytes()

The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for update because it is already specified on the URL.

string project = 7;

Returns
Type Description
ByteString

The bytes for project.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getServerRoles(int index)

public String getServerRoles(int index)

Optional. The server roles for the SQL Server login.

repeated string server_roles = 16 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The serverRoles at the given index.

getServerRolesBytes(int index)

public ByteString getServerRolesBytes(int index)

Optional. The server roles for the SQL Server login.

repeated string server_roles = 16 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the serverRoles at the given index.

getServerRolesCount()

public int getServerRolesCount()

Optional. The server roles for the SQL Server login.

repeated string server_roles = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of serverRoles.

getServerRolesList()

public ProtocolStringList getServerRolesList()

Optional. The server roles for the SQL Server login.

repeated string server_roles = 16 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the serverRoles.

getSqlserverUserDetails()

public SqlServerUserDetails getSqlserverUserDetails()

.google.cloud.sql.v1.SqlServerUserDetails sqlserver_user_details = 9;

Returns
Type Description
SqlServerUserDetails

The sqlserverUserDetails.

getSqlserverUserDetailsOrBuilder()

public SqlServerUserDetailsOrBuilder getSqlserverUserDetailsOrBuilder()

.google.cloud.sql.v1.SqlServerUserDetails sqlserver_user_details = 9;

Returns
Type Description
SqlServerUserDetailsOrBuilder

getType()

public User.SqlUserType getType()

The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.

.google.cloud.sql.v1.User.SqlUserType type = 8;

Returns
Type Description
User.SqlUserType

The type.

getTypeValue()

public int getTypeValue()

The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.

.google.cloud.sql.v1.User.SqlUserType type = 8;

Returns
Type Description
int

The enum numeric value on the wire for type.

getUserDetailsCase()

public User.UserDetailsCase getUserDetailsCase()
Returns
Type Description
User.UserDetailsCase

hasDualPasswordType()

public boolean hasDualPasswordType()

Dual password status for the user.

optional .google.cloud.sql.v1.User.DualPasswordType dual_password_type = 13;

Returns
Type Description
boolean

Whether the dualPasswordType field is set.

hasIamStatus()

public boolean hasIamStatus()

Indicates if a group is active or inactive for IAM database authentication.

optional .google.cloud.sql.v1.User.IamStatus iam_status = 14;

Returns
Type Description
boolean

Whether the iamStatus field is set.

hasPasswordPolicy()

public boolean hasPasswordPolicy()

User level password validation policy.

.google.cloud.sql.v1.UserPasswordValidationPolicy password_policy = 12;

Returns
Type Description
boolean

Whether the passwordPolicy field is set.

hasSqlserverUserDetails()

public boolean hasSqlserverUserDetails()

.google.cloud.sql.v1.SqlServerUserDetails sqlserver_user_details = 9;

Returns
Type Description
boolean

Whether the sqlserverUserDetails field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public User.Builder newBuilderForType()
Returns
Type Description
User.Builder

newBuilderForType(AbstractMessage.BuilderParent parent)

protected User.Builder newBuilderForType(AbstractMessage.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
User.Builder
Overrides

toBuilder()

public User.Builder toBuilder()
Returns
Type Description
User.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException