Aracılığıyla paylaş


ManagedIdentityReference Class

  • java.lang.Object
    • com.azure.resourcemanager.digitaltwins.models.ManagedIdentityReference

Implements

public final class ManagedIdentityReference
implements JsonSerializable<ManagedIdentityReference>

The properties of the Managed Identity.

Constructor Summary

Constructor Description
ManagedIdentityReference()

Creates an instance of ManagedIdentityReference class.

Method Summary

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

Reads an instance of ManagedIdentityReference from the JsonReader.

JsonWriter toJson(JsonWriter jsonWriter)
IdentityType type()

Get the type property: The type of managed identity used.

String userAssignedIdentity()

Get the userAssignedIdentity property: The user identity ARM resource id if the managed identity type is 'UserAssigned'.

void validate()

Validates the instance.

ManagedIdentityReference withType(IdentityType type)

Set the type property: The type of managed identity used.

ManagedIdentityReference withUserAssignedIdentity(String userAssignedIdentity)

Set the userAssignedIdentity property: The user identity ARM resource id if the managed identity type is 'UserAssigned'.

Methods inherited from java.lang.Object

Constructor Details

ManagedIdentityReference

public ManagedIdentityReference()

Creates an instance of ManagedIdentityReference class.

Method Details

fromJson

public static ManagedIdentityReference fromJson(JsonReader jsonReader)

Reads an instance of ManagedIdentityReference from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ManagedIdentityReference 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 ManagedIdentityReference.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

type

public IdentityType type()

Get the type property: The type of managed identity used.

Returns:

the type value.

userAssignedIdentity

public String userAssignedIdentity()

Get the userAssignedIdentity property: The user identity ARM resource id if the managed identity type is 'UserAssigned'.

Returns:

the userAssignedIdentity value.

validate

public void validate()

Validates the instance.

withType

public ManagedIdentityReference withType(IdentityType type)

Set the type property: The type of managed identity used.

Parameters:

type - the type value to set.

Returns:

the ManagedIdentityReference object itself.

withUserAssignedIdentity

public ManagedIdentityReference withUserAssignedIdentity(String userAssignedIdentity)

Set the userAssignedIdentity property: The user identity ARM resource id if the managed identity type is 'UserAssigned'.

Parameters:

userAssignedIdentity - the userAssignedIdentity value to set.

Returns:

the ManagedIdentityReference object itself.

Applies to