DockerCredential Class

public final class DockerCredential
extends DataReferenceCredential

Credential for docker with username and password.

Constructor Summary

Constructor Description
DockerCredential()

Creates an instance of DockerCredential class.

Method Summary

Modifier and Type Method and Description
DataReferenceCredentialType credentialType()

Get the credentialType property: [Required] Credential type used to authentication with storage.

static DockerCredential fromJson(JsonReader jsonReader)

Reads an instance of DockerCredential from the JsonReader.

String password()

Get the password property: DockerCredential user password.

JsonWriter toJson(JsonWriter jsonWriter)
String username()

Get the username property: DockerCredential user name.

void validate()

Validates the instance.

DockerCredential withPassword(String password)

Set the password property: DockerCredential user password.

DockerCredential withUsername(String username)

Set the username property: DockerCredential user name.

Methods inherited from DataReferenceCredential

Methods inherited from java.lang.Object

Constructor Details

DockerCredential

public DockerCredential()

Creates an instance of DockerCredential class.

Method Details

credentialType

public DataReferenceCredentialType credentialType()

Get the credentialType property: [Required] Credential type used to authentication with storage.

Overrides:

DockerCredential.credentialType()

Returns:

the credentialType value.

fromJson

public static DockerCredential fromJson(JsonReader jsonReader)

Reads an instance of DockerCredential from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

password

public String password()

Get the password property: DockerCredential user password.

Returns:

the password value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

DockerCredential.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

username

public String username()

Get the username property: DockerCredential user name.

Returns:

the username value.

validate

public void validate()

Validates the instance.

Overrides:

DockerCredential.validate()

withPassword

public DockerCredential withPassword(String password)

Set the password property: DockerCredential user password.

Parameters:

password - the password value to set.

Returns:

the DockerCredential object itself.

withUsername

public DockerCredential withUsername(String username)

Set the username property: DockerCredential user name.

Parameters:

username - the username value to set.

Returns:

the DockerCredential object itself.

Applies to