Share via


ImportSourceCredentials Class

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

Implements

public final class ImportSourceCredentials
implements JsonSerializable<ImportSourceCredentials>

The ImportSourceCredentials model.

Constructor Summary

Constructor Description
ImportSourceCredentials()

Creates an instance of ImportSourceCredentials class.

Method Summary

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

Reads an instance of ImportSourceCredentials from the JsonReader.

String password()

Get the password property: The password used to authenticate with the source registry.

JsonWriter toJson(JsonWriter jsonWriter)
String username()

Get the username property: The username to authenticate with the source registry.

void validate()

Validates the instance.

ImportSourceCredentials withPassword(String password)

Set the password property: The password used to authenticate with the source registry.

ImportSourceCredentials withUsername(String username)

Set the username property: The username to authenticate with the source registry.

Methods inherited from java.lang.Object

Constructor Details

ImportSourceCredentials

public ImportSourceCredentials()

Creates an instance of ImportSourceCredentials class.

Method Details

fromJson

public static ImportSourceCredentials fromJson(JsonReader jsonReader)

Reads an instance of ImportSourceCredentials from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

password

public String password()

Get the password property: The password used to authenticate with the source registry.

Returns:

the password value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

username

public String username()

Get the username property: The username to authenticate with the source registry.

Returns:

the username value.

validate

public void validate()

Validates the instance.

withPassword

public ImportSourceCredentials withPassword(String password)

Set the password property: The password used to authenticate with the source registry.

Parameters:

password - the password value to set.

Returns:

the ImportSourceCredentials object itself.

withUsername

public ImportSourceCredentials withUsername(String username)

Set the username property: The username to authenticate with the source registry.

Parameters:

username - the username value to set.

Returns:

the ImportSourceCredentials object itself.

Applies to