Partilhar via


Credentials Class

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

Implements

public final class Credentials
implements JsonSerializable<Credentials>

The parameters that describes a set of credentials that will be used when a run is invoked.

Constructor Summary

Constructor Description
Credentials()

Creates an instance of Credentials class.

Method Summary

Modifier and Type Method and Description
Map<String,CustomRegistryCredentials> customRegistries()

Get the customRegistries property: Describes the credential parameters for accessing other custom registries.

static Credentials fromJson(JsonReader jsonReader)

Reads an instance of Credentials from the JsonReader.

SourceRegistryCredentials sourceRegistry()

Get the sourceRegistry property: Describes the credential parameters for accessing the source registry.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

Credentials withCustomRegistries(Map<String,CustomRegistryCredentials> customRegistries)

Set the customRegistries property: Describes the credential parameters for accessing other custom registries.

Credentials withSourceRegistry(SourceRegistryCredentials sourceRegistry)

Set the sourceRegistry property: Describes the credential parameters for accessing the source registry.

Methods inherited from java.lang.Object

Constructor Details

Credentials

public Credentials()

Creates an instance of Credentials class.

Method Details

customRegistries

public Map customRegistries()

Get the customRegistries property: Describes the credential parameters for accessing other custom registries. The key for the dictionary item will be the registry login server (myregistry.azurecr.io) and the value of the item will be the registry credentials for accessing the registry.

Returns:

the customRegistries value.

fromJson

public static Credentials fromJson(JsonReader jsonReader)

Reads an instance of Credentials from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

sourceRegistry

public SourceRegistryCredentials sourceRegistry()

Get the sourceRegistry property: Describes the credential parameters for accessing the source registry.

Returns:

the sourceRegistry value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCustomRegistries

public Credentials withCustomRegistries(Map customRegistries)

Set the customRegistries property: Describes the credential parameters for accessing other custom registries. The key for the dictionary item will be the registry login server (myregistry.azurecr.io) and the value of the item will be the registry credentials for accessing the registry.

Parameters:

customRegistries - the customRegistries value to set.

Returns:

the Credentials object itself.

withSourceRegistry

public Credentials withSourceRegistry(SourceRegistryCredentials sourceRegistry)

Set the sourceRegistry property: Describes the credential parameters for accessing the source registry.

Parameters:

sourceRegistry - the sourceRegistry value to set.

Returns:

the Credentials object itself.

Applies to