/* * 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.codecommit.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 GetFolderRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the repository. *
*/ private String repositoryName; /** ** A fully qualified reference used to identify a commit that contains the version of the folder's content to * return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no * specifier is provided, the folder content is returned as it exists in the HEAD commit. *
*/ private String commitSpecifier; /** ** The fully qualified path to the folder whose contents are returned, including the folder name. For example, * /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of * a repository. *
*/ private String folderPath; /** ** The name of the repository. *
* * @param repositoryName * The name of the repository. */ public void setRepositoryName(String repositoryName) { this.repositoryName = repositoryName; } /** ** The name of the repository. *
* * @return The name of the repository. */ public String getRepositoryName() { return this.repositoryName; } /** ** The name of the repository. *
* * @param repositoryName * The name of the repository. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFolderRequest withRepositoryName(String repositoryName) { setRepositoryName(repositoryName); return this; } /** ** A fully qualified reference used to identify a commit that contains the version of the folder's content to * return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no * specifier is provided, the folder content is returned as it exists in the HEAD commit. *
* * @param commitSpecifier * A fully qualified reference used to identify a commit that contains the version of the folder's content to * return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no * specifier is provided, the folder content is returned as it exists in the HEAD commit. */ public void setCommitSpecifier(String commitSpecifier) { this.commitSpecifier = commitSpecifier; } /** ** A fully qualified reference used to identify a commit that contains the version of the folder's content to * return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no * specifier is provided, the folder content is returned as it exists in the HEAD commit. *
* * @return A fully qualified reference used to identify a commit that contains the version of the folder's content * to return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. * If no specifier is provided, the folder content is returned as it exists in the HEAD commit. */ public String getCommitSpecifier() { return this.commitSpecifier; } /** ** A fully qualified reference used to identify a commit that contains the version of the folder's content to * return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no * specifier is provided, the folder content is returned as it exists in the HEAD commit. *
* * @param commitSpecifier * A fully qualified reference used to identify a commit that contains the version of the folder's content to * return. A fully qualified reference can be a commit ID, branch name, tag, or reference such as HEAD. If no * specifier is provided, the folder content is returned as it exists in the HEAD commit. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFolderRequest withCommitSpecifier(String commitSpecifier) { setCommitSpecifier(commitSpecifier); return this; } /** ** The fully qualified path to the folder whose contents are returned, including the folder name. For example, * /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of * a repository. *
* * @param folderPath * The fully qualified path to the folder whose contents are returned, including the folder name. For * example, /examples is a fully-qualified path to a folder named examples that was created off of the root * directory (/) of a repository. */ public void setFolderPath(String folderPath) { this.folderPath = folderPath; } /** ** The fully qualified path to the folder whose contents are returned, including the folder name. For example, * /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of * a repository. *
* * @return The fully qualified path to the folder whose contents are returned, including the folder name. For * example, /examples is a fully-qualified path to a folder named examples that was created off of the root * directory (/) of a repository. */ public String getFolderPath() { return this.folderPath; } /** ** The fully qualified path to the folder whose contents are returned, including the folder name. For example, * /examples is a fully-qualified path to a folder named examples that was created off of the root directory (/) of * a repository. *
* * @param folderPath * The fully qualified path to the folder whose contents are returned, including the folder name. For * example, /examples is a fully-qualified path to a folder named examples that was created off of the root * directory (/) of a repository. * @return Returns a reference to this object so that method calls can be chained together. */ public GetFolderRequest withFolderPath(String folderPath) { setFolderPath(folderPath); 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 (getRepositoryName() != null) sb.append("RepositoryName: ").append(getRepositoryName()).append(","); if (getCommitSpecifier() != null) sb.append("CommitSpecifier: ").append(getCommitSpecifier()).append(","); if (getFolderPath() != null) sb.append("FolderPath: ").append(getFolderPath()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof GetFolderRequest == false) return false; GetFolderRequest other = (GetFolderRequest) obj; if (other.getRepositoryName() == null ^ this.getRepositoryName() == null) return false; if (other.getRepositoryName() != null && other.getRepositoryName().equals(this.getRepositoryName()) == false) return false; if (other.getCommitSpecifier() == null ^ this.getCommitSpecifier() == null) return false; if (other.getCommitSpecifier() != null && other.getCommitSpecifier().equals(this.getCommitSpecifier()) == false) return false; if (other.getFolderPath() == null ^ this.getFolderPath() == null) return false; if (other.getFolderPath() != null && other.getFolderPath().equals(this.getFolderPath()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRepositoryName() == null) ? 0 : getRepositoryName().hashCode()); hashCode = prime * hashCode + ((getCommitSpecifier() == null) ? 0 : getCommitSpecifier().hashCode()); hashCode = prime * hashCode + ((getFolderPath() == null) ? 0 : getFolderPath().hashCode()); return hashCode; } @Override public GetFolderRequest clone() { return (GetFolderRequest) super.clone(); } }