* The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace. *
*/ private String key; /** ** The name of the key that was created. *
*/ private String keyName; /** ** The ID of the workspace that the key is valid for. *
*/ private String workspaceId; /** ** The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace. *
* * @param key * The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace. */ public void setKey(String key) { this.key = key; } /** ** The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace. *
* * @return The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace. */ public String getKey() { return this.key; } /** ** The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace. *
* * @param key * The key token. Use this value as a bearer token to authenticate HTTP requests to the workspace. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkspaceApiKeyResult withKey(String key) { setKey(key); return this; } /** ** The name of the key that was created. *
* * @param keyName * The name of the key that was created. */ public void setKeyName(String keyName) { this.keyName = keyName; } /** ** The name of the key that was created. *
* * @return The name of the key that was created. */ public String getKeyName() { return this.keyName; } /** ** The name of the key that was created. *
* * @param keyName * The name of the key that was created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkspaceApiKeyResult withKeyName(String keyName) { setKeyName(keyName); return this; } /** ** The ID of the workspace that the key is valid for. *
* * @param workspaceId * The ID of the workspace that the key is valid for. */ public void setWorkspaceId(String workspaceId) { this.workspaceId = workspaceId; } /** ** The ID of the workspace that the key is valid for. *
* * @return The ID of the workspace that the key is valid for. */ public String getWorkspaceId() { return this.workspaceId; } /** ** The ID of the workspace that the key is valid for. *
* * @param workspaceId * The ID of the workspace that the key is valid for. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateWorkspaceApiKeyResult withWorkspaceId(String workspaceId) { setWorkspaceId(workspaceId); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getKey() != null) sb.append("Key: ").append("***Sensitive Data Redacted***").append(","); if (getKeyName() != null) sb.append("KeyName: ").append(getKeyName()).append(","); if (getWorkspaceId() != null) sb.append("WorkspaceId: ").append(getWorkspaceId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateWorkspaceApiKeyResult == false) return false; CreateWorkspaceApiKeyResult other = (CreateWorkspaceApiKeyResult) obj; if (other.getKey() == null ^ this.getKey() == null) return false; if (other.getKey() != null && other.getKey().equals(this.getKey()) == false) return false; if (other.getKeyName() == null ^ this.getKeyName() == null) return false; if (other.getKeyName() != null && other.getKeyName().equals(this.getKeyName()) == false) return false; if (other.getWorkspaceId() == null ^ this.getWorkspaceId() == null) return false; if (other.getWorkspaceId() != null && other.getWorkspaceId().equals(this.getWorkspaceId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getKey() == null) ? 0 : getKey().hashCode()); hashCode = prime * hashCode + ((getKeyName() == null) ? 0 : getKeyName().hashCode()); hashCode = prime * hashCode + ((getWorkspaceId() == null) ? 0 : getWorkspaceId().hashCode()); return hashCode; } @Override public CreateWorkspaceApiKeyResult clone() { try { return (CreateWorkspaceApiKeyResult) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }