UserIdentity Class

  • java.lang.Object
    • com.azure.resourcemanager.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
AutoUserSpecification autoUser()

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

static UserIdentity fromJson(JsonReader jsonReader)

Reads an instance of UserIdentity from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
String username()

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

void validate()

Validates the instance.

UserIdentity withAutoUser(AutoUserSpecification autoUser)

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

UserIdentity withUsername(String username)

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

Methods inherited from java.lang.Object

Constructor Details

UserIdentity

public UserIdentity()

Creates an instance of UserIdentity class.

Method Details

autoUser

public AutoUserSpecification autoUser()

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.

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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

username

public String username()

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.

validate

public void validate()

Validates the instance.

withAutoUser

public UserIdentity withAutoUser(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.

withUsername

public UserIdentity withUsername(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.

Applies to