CredentialHealth Class

  • java.lang.Object
    • com.azure.resourcemanager.containerregistry.models.CredentialHealth

Implements

public final class CredentialHealth
implements JsonSerializable<CredentialHealth>

The health of the auth credential.

Constructor Summary

Constructor Description
CredentialHealth()

Creates an instance of CredentialHealth class.

Method Summary

Modifier and Type Method and Description
String errorCode()

Get the errorCode property: Error code representing the health check error.

String errorMessage()

Get the errorMessage property: Descriptive message representing the health check error.

static CredentialHealth fromJson(JsonReader jsonReader)

Reads an instance of CredentialHealth from the JsonReader.

CredentialHealthStatus status()

Get the status property: The health status of credential.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

CredentialHealth withErrorCode(String errorCode)

Set the errorCode property: Error code representing the health check error.

CredentialHealth withErrorMessage(String errorMessage)

Set the errorMessage property: Descriptive message representing the health check error.

CredentialHealth withStatus(CredentialHealthStatus status)

Set the status property: The health status of credential.

Methods inherited from java.lang.Object

Constructor Details

CredentialHealth

public CredentialHealth()

Creates an instance of CredentialHealth class.

Method Details

errorCode

public String errorCode()

Get the errorCode property: Error code representing the health check error.

Returns:

the errorCode value.

errorMessage

public String errorMessage()

Get the errorMessage property: Descriptive message representing the health check error.

Returns:

the errorMessage value.

fromJson

public static CredentialHealth fromJson(JsonReader jsonReader)

Reads an instance of CredentialHealth from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

status

public CredentialHealthStatus status()

Get the status property: The health status of credential.

Returns:

the status value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withErrorCode

public CredentialHealth withErrorCode(String errorCode)

Set the errorCode property: Error code representing the health check error.

Parameters:

errorCode - the errorCode value to set.

Returns:

the CredentialHealth object itself.

withErrorMessage

public CredentialHealth withErrorMessage(String errorMessage)

Set the errorMessage property: Descriptive message representing the health check error.

Parameters:

errorMessage - the errorMessage value to set.

Returns:

the CredentialHealth object itself.

withStatus

public CredentialHealth withStatus(CredentialHealthStatus status)

Set the status property: The health status of credential.

Parameters:

status - the status value to set.

Returns:

the CredentialHealth object itself.

Applies to