/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.sagemaker.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class UpdateCodeRepositoryRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the Git repository to update. *
*/ private String codeRepositoryName; /** *
* The configuration of the git repository, including the URL and the Amazon Resource Name (ARN) of the Amazon Web
* Services Secrets Manager secret that contains the credentials used to access the repository. The secret must have
* a staging label of AWSCURRENT
and must be in the following format:
*
* {"username": UserName, "password": Password}
*
* The name of the Git repository to update. *
* * @param codeRepositoryName * The name of the Git repository to update. */ public void setCodeRepositoryName(String codeRepositoryName) { this.codeRepositoryName = codeRepositoryName; } /** ** The name of the Git repository to update. *
* * @return The name of the Git repository to update. */ public String getCodeRepositoryName() { return this.codeRepositoryName; } /** ** The name of the Git repository to update. *
* * @param codeRepositoryName * The name of the Git repository to update. * @return Returns a reference to this object so that method calls can be chained together. */ public UpdateCodeRepositoryRequest withCodeRepositoryName(String codeRepositoryName) { setCodeRepositoryName(codeRepositoryName); return this; } /** *
* The configuration of the git repository, including the URL and the Amazon Resource Name (ARN) of the Amazon Web
* Services Secrets Manager secret that contains the credentials used to access the repository. The secret must have
* a staging label of AWSCURRENT
and must be in the following format:
*
* {"username": UserName, "password": Password}
*
AWSCURRENT
and must be in the following format:
*
* {"username": UserName, "password": Password}
*/
public void setGitConfig(GitConfigForUpdate gitConfig) {
this.gitConfig = gitConfig;
}
/**
*
* The configuration of the git repository, including the URL and the Amazon Resource Name (ARN) of the Amazon Web
* Services Secrets Manager secret that contains the credentials used to access the repository. The secret must have
* a staging label of AWSCURRENT
and must be in the following format:
*
* {"username": UserName, "password": Password}
*
AWSCURRENT
and must be in the following format:
*
* {"username": UserName, "password": Password}
*/
public GitConfigForUpdate getGitConfig() {
return this.gitConfig;
}
/**
*
* The configuration of the git repository, including the URL and the Amazon Resource Name (ARN) of the Amazon Web
* Services Secrets Manager secret that contains the credentials used to access the repository. The secret must have
* a staging label of AWSCURRENT
and must be in the following format:
*
* {"username": UserName, "password": Password}
*
AWSCURRENT
and must be in the following format:
*
* {"username": UserName, "password": Password}
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UpdateCodeRepositoryRequest withGitConfig(GitConfigForUpdate gitConfig) {
setGitConfig(gitConfig);
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 (getCodeRepositoryName() != null)
sb.append("CodeRepositoryName: ").append(getCodeRepositoryName()).append(",");
if (getGitConfig() != null)
sb.append("GitConfig: ").append(getGitConfig());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UpdateCodeRepositoryRequest == false)
return false;
UpdateCodeRepositoryRequest other = (UpdateCodeRepositoryRequest) obj;
if (other.getCodeRepositoryName() == null ^ this.getCodeRepositoryName() == null)
return false;
if (other.getCodeRepositoryName() != null && other.getCodeRepositoryName().equals(this.getCodeRepositoryName()) == false)
return false;
if (other.getGitConfig() == null ^ this.getGitConfig() == null)
return false;
if (other.getGitConfig() != null && other.getGitConfig().equals(this.getGitConfig()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getCodeRepositoryName() == null) ? 0 : getCodeRepositoryName().hashCode());
hashCode = prime * hashCode + ((getGitConfig() == null) ? 0 : getGitConfig().hashCode());
return hashCode;
}
@Override
public UpdateCodeRepositoryRequest clone() {
return (UpdateCodeRepositoryRequest) super.clone();
}
}