Class LoginProfile.Builder (2.45.0)

public static final class LoginProfile.Builder extends GeneratedMessageV3.Builder<LoginProfile.Builder> implements LoginProfileOrBuilder

The user profile information used for logging in to a virtual machine on Google Compute Engine.

Protobuf type google.cloud.oslogin.v1.LoginProfile

Static Methods

getDescriptor()

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

Methods

addAllPosixAccounts(Iterable<? extends OsLoginProto.PosixAccount> values)

public LoginProfile.Builder addAllPosixAccounts(Iterable<? extends OsLoginProto.PosixAccount> values)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameter
Name Description
values Iterable<? extends com.google.cloud.oslogin.common.OsLoginProto.PosixAccount>
Returns
Type Description
LoginProfile.Builder

addPosixAccounts(OsLoginProto.PosixAccount value)

public LoginProfile.Builder addPosixAccounts(OsLoginProto.PosixAccount value)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameter
Name Description
value OsLoginProto.PosixAccount
Returns
Type Description
LoginProfile.Builder

addPosixAccounts(OsLoginProto.PosixAccount.Builder builderForValue)

public LoginProfile.Builder addPosixAccounts(OsLoginProto.PosixAccount.Builder builderForValue)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameter
Name Description
builderForValue OsLoginProto.PosixAccount.Builder
Returns
Type Description
LoginProfile.Builder

addPosixAccounts(int index, OsLoginProto.PosixAccount value)

public LoginProfile.Builder addPosixAccounts(int index, OsLoginProto.PosixAccount value)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameters
Name Description
index int
value OsLoginProto.PosixAccount
Returns
Type Description
LoginProfile.Builder

addPosixAccounts(int index, OsLoginProto.PosixAccount.Builder builderForValue)

public LoginProfile.Builder addPosixAccounts(int index, OsLoginProto.PosixAccount.Builder builderForValue)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameters
Name Description
index int
builderForValue OsLoginProto.PosixAccount.Builder
Returns
Type Description
LoginProfile.Builder

addPosixAccountsBuilder()

public OsLoginProto.PosixAccount.Builder addPosixAccountsBuilder()

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Returns
Type Description
OsLoginProto.PosixAccount.Builder

addPosixAccountsBuilder(int index)

public OsLoginProto.PosixAccount.Builder addPosixAccountsBuilder(int index)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameter
Name Description
index int
Returns
Type Description
OsLoginProto.PosixAccount.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public LoginProfile.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
LoginProfile.Builder
Overrides

build()

public LoginProfile build()
Returns
Type Description
LoginProfile

buildPartial()

public LoginProfile buildPartial()
Returns
Type Description
LoginProfile

clear()

public LoginProfile.Builder clear()
Returns
Type Description
LoginProfile.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public LoginProfile.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
LoginProfile.Builder
Overrides

clearName()

public LoginProfile.Builder clearName()

Required. A unique user ID.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
LoginProfile.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public LoginProfile.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
LoginProfile.Builder
Overrides

clearPosixAccounts()

public LoginProfile.Builder clearPosixAccounts()

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Returns
Type Description
LoginProfile.Builder

clearSshPublicKeys()

public LoginProfile.Builder clearSshPublicKeys()
Returns
Type Description
LoginProfile.Builder

clone()

public LoginProfile.Builder clone()
Returns
Type Description
LoginProfile.Builder
Overrides

containsSshPublicKeys(String key)

public boolean containsSshPublicKeys(String key)

A map from SSH public key fingerprint to the associated key object.

map<string, .google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;

Parameter
Name Description
key String
Returns
Type Description
boolean

getDefaultInstanceForType()

public LoginProfile getDefaultInstanceForType()
Returns
Type Description
LoginProfile

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMutableSshPublicKeys() (deprecated)

public Map<String,OsLoginProto.SshPublicKey> getMutableSshPublicKeys()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,SshPublicKey>

getName()

public String getName()

Required. A unique user ID.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Required. A unique user ID.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for name.

getPosixAccounts(int index)

public OsLoginProto.PosixAccount getPosixAccounts(int index)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameter
Name Description
index int
Returns
Type Description
OsLoginProto.PosixAccount

getPosixAccountsBuilder(int index)

public OsLoginProto.PosixAccount.Builder getPosixAccountsBuilder(int index)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameter
Name Description
index int
Returns
Type Description
OsLoginProto.PosixAccount.Builder

getPosixAccountsBuilderList()

public List<OsLoginProto.PosixAccount.Builder> getPosixAccountsBuilderList()

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Returns
Type Description
List<Builder>

getPosixAccountsCount()

public int getPosixAccountsCount()

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Returns
Type Description
int

getPosixAccountsList()

public List<OsLoginProto.PosixAccount> getPosixAccountsList()

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Returns
Type Description
List<PosixAccount>

getPosixAccountsOrBuilder(int index)

public OsLoginProto.PosixAccountOrBuilder getPosixAccountsOrBuilder(int index)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameter
Name Description
index int
Returns
Type Description
OsLoginProto.PosixAccountOrBuilder

getPosixAccountsOrBuilderList()

public List<? extends OsLoginProto.PosixAccountOrBuilder> getPosixAccountsOrBuilderList()

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Returns
Type Description
List<? extends com.google.cloud.oslogin.common.OsLoginProto.PosixAccountOrBuilder>

getSshPublicKeys() (deprecated)

public Map<String,OsLoginProto.SshPublicKey> getSshPublicKeys()
Returns
Type Description
Map<String,SshPublicKey>

getSshPublicKeysCount()

public int getSshPublicKeysCount()

A map from SSH public key fingerprint to the associated key object.

map<string, .google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;

Returns
Type Description
int

getSshPublicKeysMap()

public Map<String,OsLoginProto.SshPublicKey> getSshPublicKeysMap()

A map from SSH public key fingerprint to the associated key object.

map<string, .google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;

Returns
Type Description
Map<String,SshPublicKey>

getSshPublicKeysOrDefault(String key, OsLoginProto.SshPublicKey defaultValue)

public OsLoginProto.SshPublicKey getSshPublicKeysOrDefault(String key, OsLoginProto.SshPublicKey defaultValue)

A map from SSH public key fingerprint to the associated key object.

map<string, .google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;

Parameters
Name Description
key String
defaultValue OsLoginProto.SshPublicKey
Returns
Type Description
OsLoginProto.SshPublicKey

getSshPublicKeysOrThrow(String key)

public OsLoginProto.SshPublicKey getSshPublicKeysOrThrow(String key)

A map from SSH public key fingerprint to the associated key object.

map<string, .google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;

Parameter
Name Description
key String
Returns
Type Description
OsLoginProto.SshPublicKey

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(LoginProfile other)

public LoginProfile.Builder mergeFrom(LoginProfile other)
Parameter
Name Description
other LoginProfile
Returns
Type Description
LoginProfile.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public LoginProfile.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
LoginProfile.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public LoginProfile.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
LoginProfile.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final LoginProfile.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
LoginProfile.Builder
Overrides

putAllSshPublicKeys(Map<String,OsLoginProto.SshPublicKey> values)

public LoginProfile.Builder putAllSshPublicKeys(Map<String,OsLoginProto.SshPublicKey> values)

A map from SSH public key fingerprint to the associated key object.

map<string, .google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;

Parameter
Name Description
values Map<String,SshPublicKey>
Returns
Type Description
LoginProfile.Builder

putSshPublicKeys(String key, OsLoginProto.SshPublicKey value)

public LoginProfile.Builder putSshPublicKeys(String key, OsLoginProto.SshPublicKey value)

A map from SSH public key fingerprint to the associated key object.

map<string, .google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;

Parameters
Name Description
key String
value OsLoginProto.SshPublicKey
Returns
Type Description
LoginProfile.Builder

putSshPublicKeysBuilderIfAbsent(String key)

public OsLoginProto.SshPublicKey.Builder putSshPublicKeysBuilderIfAbsent(String key)

A map from SSH public key fingerprint to the associated key object.

map<string, .google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;

Parameter
Name Description
key String
Returns
Type Description
OsLoginProto.SshPublicKey.Builder

removePosixAccounts(int index)

public LoginProfile.Builder removePosixAccounts(int index)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameter
Name Description
index int
Returns
Type Description
LoginProfile.Builder

removeSshPublicKeys(String key)

public LoginProfile.Builder removeSshPublicKeys(String key)

A map from SSH public key fingerprint to the associated key object.

map<string, .google.cloud.oslogin.common.SshPublicKey> ssh_public_keys = 3;

Parameter
Name Description
key String
Returns
Type Description
LoginProfile.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public LoginProfile.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
LoginProfile.Builder
Overrides

setName(String value)

public LoginProfile.Builder setName(String value)

Required. A unique user ID.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
LoginProfile.Builder

This builder for chaining.

setNameBytes(ByteString value)

public LoginProfile.Builder setNameBytes(ByteString value)

Required. A unique user ID.

string name = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
LoginProfile.Builder

This builder for chaining.

setPosixAccounts(int index, OsLoginProto.PosixAccount value)

public LoginProfile.Builder setPosixAccounts(int index, OsLoginProto.PosixAccount value)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameters
Name Description
index int
value OsLoginProto.PosixAccount
Returns
Type Description
LoginProfile.Builder

setPosixAccounts(int index, OsLoginProto.PosixAccount.Builder builderForValue)

public LoginProfile.Builder setPosixAccounts(int index, OsLoginProto.PosixAccount.Builder builderForValue)

The list of POSIX accounts associated with the user.

repeated .google.cloud.oslogin.common.PosixAccount posix_accounts = 2;

Parameters
Name Description
index int
builderForValue OsLoginProto.PosixAccount.Builder
Returns
Type Description
LoginProfile.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public LoginProfile.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
LoginProfile.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final LoginProfile.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
LoginProfile.Builder
Overrides