Class SshConfiguration
- java.lang.Object
-
- com.google.jenkins.plugins.computeengine.SshConfiguration
-
- All Implemented Interfaces:
Describable<SshConfiguration>
,Serializable
public class SshConfiguration extends Object implements Describable<SshConfiguration>, Serializable
Class to contain information needed to configure and access SSH Credential information if custom private SSH key option is selected. This avoids passing in several parameters between multiple classes and also isolates logic in accessing credentials.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SshConfiguration.Builder
static class
SshConfiguration.DescriptorImpl
-
Constructor Summary
Constructors Constructor Description SshConfiguration()
SshConfiguration(String customPrivateKeyCredentialsId)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SshConfiguration.Builder
builder()
protected boolean
canEqual(Object other)
boolean
equals(Object o)
static com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey
getCustomPrivateKeyCredentials(String id)
Returns the SSH private key if a custom SSH Credential is selected.String
getCustomPrivateKeyCredentialsId()
Descriptor<SshConfiguration>
getDescriptor()
int
hashCode()
void
setCustomPrivateKeyCredentialsId(String customPrivateKeyCredentialsId)
String
toString()
-
-
-
Constructor Detail
-
SshConfiguration
@DataBoundConstructor public SshConfiguration()
-
SshConfiguration
public SshConfiguration(String customPrivateKeyCredentialsId)
-
-
Method Detail
-
getCustomPrivateKeyCredentials
public static com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey getCustomPrivateKeyCredentials(String id)
Returns the SSH private key if a custom SSH Credential is selected.- Parameters:
id
- private key id from selected credential- Returns:
- SSH private key in plain text to use for SSH
-
getDescriptor
public Descriptor<SshConfiguration> getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<SshConfiguration>
-
builder
public static SshConfiguration.Builder builder()
-
getCustomPrivateKeyCredentialsId
public String getCustomPrivateKeyCredentialsId()
-
setCustomPrivateKeyCredentialsId
@DataBoundSetter public void setCustomPrivateKeyCredentialsId(String customPrivateKeyCredentialsId)
-
canEqual
protected boolean canEqual(Object other)
-
-