Google Cloud Artifact Registry V1 Client - Class UsernamePasswordCredentials (0.5.1)

Reference documentation and code samples for the Google Cloud Artifact Registry V1 Client class UsernamePasswordCredentials.

Username and password credentials.

Generated from protobuf message google.devtools.artifactregistry.v1.RemoteRepositoryConfig.UpstreamCredentials.UsernamePasswordCredentials

Namespace

Google \ Cloud \ ArtifactRegistry \ V1 \ RemoteRepositoryConfig \ UpstreamCredentials

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ username string

The username to access the remote repository.

↳ password_secret_version string

The Secret Manager key version that holds the password to access the remote repository. Must be in the format of projects/{project}/secrets/{secret}/versions/{version}.

getUsername

The username to access the remote repository.

Returns
TypeDescription
string

setUsername

The username to access the remote repository.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getPasswordSecretVersion

The Secret Manager key version that holds the password to access the remote repository. Must be in the format of projects/{project}/secrets/{secret}/versions/{version}.

Returns
TypeDescription
string

setPasswordSecretVersion

The Secret Manager key version that holds the password to access the remote repository. Must be in the format of projects/{project}/secrets/{secret}/versions/{version}.

Parameter
NameDescription
var string
Returns
TypeDescription
$this