Share via


UserIdentity Class

  • java.lang.Object
    • com.azure.compute.batch.models.UserIdentity

Implements

public final class UserIdentity
implements JsonSerializable<UserIdentity>

The definition of the user identity under which the Task is run. Specify either the userName or autoUser property, but not both.

Constructor Summary

Constructor Description
UserIdentity()

Creates an instance of UserIdentity class.

Method Summary

Modifier and Type Method and Description
static UserIdentity fromJson(JsonReader jsonReader)

Reads an instance of UserIdentity from the JsonReader.

AutoUserSpecification getAutoUser()

Get the autoUser property: The auto user under which the Task is run.

String getUsername()

Get the username property: The name of the user identity under which the Task is run.

UserIdentity setAutoUser(AutoUserSpecification autoUser)

Set the autoUser property: The auto user under which the Task is run.

UserIdentity setUsername(String username)

Set the username property: The name of the user identity under which the Task is run.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

UserIdentity

public UserIdentity()

Creates an instance of UserIdentity class.

Method Details

fromJson

public static UserIdentity fromJson(JsonReader jsonReader)

Reads an instance of UserIdentity from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of UserIdentity if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the UserIdentity.

getAutoUser

public AutoUserSpecification getAutoUser()

Get the autoUser property: The auto user under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both.

Returns:

the autoUser value.

getUsername

public String getUsername()

Get the username property: The name of the user identity under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both.

Returns:

the username value.

setAutoUser

public UserIdentity setAutoUser(AutoUserSpecification autoUser)

Set the autoUser property: The auto user under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both.

Parameters:

autoUser - the autoUser value to set.

Returns:

the UserIdentity object itself.

setUsername

public UserIdentity setUsername(String username)

Set the username property: The name of the user identity under which the Task is run. The userName and autoUser properties are mutually exclusive; you must specify one but not both.

Parameters:

username - the username value to set.

Returns:

the UserIdentity object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to