Record Class CredentialService.Account
java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.credential.CredentialService.Account
- Record Components:
host- the host it is for:github.comor a pattern such as*.example.orgusername- the user name (HTTPS), or the user of the SSH server (usuallygit)keyFile- the private key (SSH key accounts); empty otherwisehasSecret- whether the vault holds a secret for it (an access token or password, or a key passphrase)
- Enclosing class:
CredentialService
public static record CredentialService.Account(String id, String label, io.github.jbastgen.stemma.git.api.CredentialLookup.Kind kind, String host, String username, String keyFile, boolean hasSecret)
extends Record
One account.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondescribe()A short description for lists and messages: the label, the host and the user name.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasSecretrecord component.host()Returns the value of thehostrecord component.id()Returns the value of theidrecord component.keyFile()Returns the value of thekeyFilerecord component.io.github.jbastgen.stemma.git.api.CredentialLookup.Kindkind()Returns the value of thekindrecord component.label()Returns the value of thelabelrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.
-
Constructor Details
-
Account
public Account(String id, String label, io.github.jbastgen.stemma.git.api.CredentialLookup.Kind kind, String host, String username, String keyFile, boolean hasSecret) Creates an instance of aAccountrecord class.- Parameters:
id- the value for theidrecord componentlabel- the value for thelabelrecord componentkind- the value for thekindrecord componenthost- the value for thehostrecord componentusername- the value for theusernamerecord componentkeyFile- the value for thekeyFilerecord componenthasSecret- the value for thehasSecretrecord component
-
-
Method Details
-
describe
A short description for lists and messages: the label, the host and the user name. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
kind
public io.github.jbastgen.stemma.git.api.CredentialLookup.Kind kind()Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
host
Returns the value of thehostrecord component.- Returns:
- the value of the
hostrecord component
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
keyFile
Returns the value of thekeyFilerecord component.- Returns:
- the value of the
keyFilerecord component
-
hasSecret
public boolean hasSecret()Returns the value of thehasSecretrecord component.- Returns:
- the value of the
hasSecretrecord component
-