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.com or a pattern such as *.example.org
username - the user name (HTTPS), or the user of the SSH server (usually git)
keyFile - the private key (SSH key accounts); empty otherwise
hasSecret - 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
    Constructor
    Description
    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 a Account record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    A short description for lists and messages: the label, the host and the user name.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the hasSecret record component.
    Returns the value of the host record component.
    id()
    Returns the value of the id record component.
    Returns the value of the keyFile record component.
    io.github.jbastgen.stemma.git.api.CredentialLookup.Kind
    Returns the value of the kind record component.
    Returns the value of the label record component.
    final String
    Returns a string representation of this record class.
    Returns the value of the username record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 a Account record class.
      Parameters:
      id - the value for the id record component
      label - the value for the label record component
      kind - the value for the kind record component
      host - the value for the host record component
      username - the value for the username record component
      keyFile - the value for the keyFile record component
      hasSecret - the value for the hasSecret record component
  • Method Details

    • describe

      public String describe()
      A short description for lists and messages: the label, the host and the user name.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • kind

      public io.github.jbastgen.stemma.git.api.CredentialLookup.Kind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • host

      public String host()
      Returns the value of the host record component.
      Returns:
      the value of the host record component
    • username

      public String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • keyFile

      public String keyFile()
      Returns the value of the keyFile record component.
      Returns:
      the value of the keyFile record component
    • hasSecret

      public boolean hasSecret()
      Returns the value of the hasSecret record component.
      Returns:
      the value of the hasSecret record component