/* * 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 DescribeMergeConflictsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the repository where you want to get information about a merge conflict. *
*/ private String repositoryName; /** ** The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name * or a full commit ID). *
*/ private String destinationCommitSpecifier; /** ** The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name * or a full commit ID). *
*/ private String sourceCommitSpecifier; /** ** The merge option or strategy you want to use to merge the code. *
*/ private String mergeOption; /** ** The maximum number of merge hunks to include in the output. *
*/ private Integer maxMergeHunks; /** ** The path of the target files used to describe the conflicts. *
*/ private String filePath; /** ** The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a * not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is * considered not mergeable if the same file in both branches has differences on the same line. *
*/ private String conflictDetailLevel; /** ** Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions * of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation * is successful. *
*/ private String conflictResolutionStrategy; /** ** An enumeration token that, when provided in a request, returns the next batch of the results. *
*/ private String nextToken; /** ** The name of the repository where you want to get information about a merge conflict. *
* * @param repositoryName * The name of the repository where you want to get information about a merge conflict. */ public void setRepositoryName(String repositoryName) { this.repositoryName = repositoryName; } /** ** The name of the repository where you want to get information about a merge conflict. *
* * @return The name of the repository where you want to get information about a merge conflict. */ public String getRepositoryName() { return this.repositoryName; } /** ** The name of the repository where you want to get information about a merge conflict. *
* * @param repositoryName * The name of the repository where you want to get information about a merge conflict. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeMergeConflictsRequest withRepositoryName(String repositoryName) { setRepositoryName(repositoryName); return this; } /** ** The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name * or a full commit ID). *
* * @param destinationCommitSpecifier * The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch * name or a full commit ID). */ public void setDestinationCommitSpecifier(String destinationCommitSpecifier) { this.destinationCommitSpecifier = destinationCommitSpecifier; } /** ** The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name * or a full commit ID). *
* * @return The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a * branch name or a full commit ID). */ public String getDestinationCommitSpecifier() { return this.destinationCommitSpecifier; } /** ** The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name * or a full commit ID). *
* * @param destinationCommitSpecifier * The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch * name or a full commit ID). * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeMergeConflictsRequest withDestinationCommitSpecifier(String destinationCommitSpecifier) { setDestinationCommitSpecifier(destinationCommitSpecifier); return this; } /** ** The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name * or a full commit ID). *
* * @param sourceCommitSpecifier * The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch * name or a full commit ID). */ public void setSourceCommitSpecifier(String sourceCommitSpecifier) { this.sourceCommitSpecifier = sourceCommitSpecifier; } /** ** The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name * or a full commit ID). *
* * @return The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a * branch name or a full commit ID). */ public String getSourceCommitSpecifier() { return this.sourceCommitSpecifier; } /** ** The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch name * or a full commit ID). *
* * @param sourceCommitSpecifier * The branch, tag, HEAD, or other fully qualified reference used to identify a commit (for example, a branch * name or a full commit ID). * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeMergeConflictsRequest withSourceCommitSpecifier(String sourceCommitSpecifier) { setSourceCommitSpecifier(sourceCommitSpecifier); return this; } /** ** The merge option or strategy you want to use to merge the code. *
* * @param mergeOption * The merge option or strategy you want to use to merge the code. * @see MergeOptionTypeEnum */ public void setMergeOption(String mergeOption) { this.mergeOption = mergeOption; } /** ** The merge option or strategy you want to use to merge the code. *
* * @return The merge option or strategy you want to use to merge the code. * @see MergeOptionTypeEnum */ public String getMergeOption() { return this.mergeOption; } /** ** The merge option or strategy you want to use to merge the code. *
* * @param mergeOption * The merge option or strategy you want to use to merge the code. * @return Returns a reference to this object so that method calls can be chained together. * @see MergeOptionTypeEnum */ public DescribeMergeConflictsRequest withMergeOption(String mergeOption) { setMergeOption(mergeOption); return this; } /** ** The merge option or strategy you want to use to merge the code. *
* * @param mergeOption * The merge option or strategy you want to use to merge the code. * @return Returns a reference to this object so that method calls can be chained together. * @see MergeOptionTypeEnum */ public DescribeMergeConflictsRequest withMergeOption(MergeOptionTypeEnum mergeOption) { this.mergeOption = mergeOption.toString(); return this; } /** ** The maximum number of merge hunks to include in the output. *
* * @param maxMergeHunks * The maximum number of merge hunks to include in the output. */ public void setMaxMergeHunks(Integer maxMergeHunks) { this.maxMergeHunks = maxMergeHunks; } /** ** The maximum number of merge hunks to include in the output. *
* * @return The maximum number of merge hunks to include in the output. */ public Integer getMaxMergeHunks() { return this.maxMergeHunks; } /** ** The maximum number of merge hunks to include in the output. *
* * @param maxMergeHunks * The maximum number of merge hunks to include in the output. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeMergeConflictsRequest withMaxMergeHunks(Integer maxMergeHunks) { setMaxMergeHunks(maxMergeHunks); return this; } /** ** The path of the target files used to describe the conflicts. *
* * @param filePath * The path of the target files used to describe the conflicts. */ public void setFilePath(String filePath) { this.filePath = filePath; } /** ** The path of the target files used to describe the conflicts. *
* * @return The path of the target files used to describe the conflicts. */ public String getFilePath() { return this.filePath; } /** ** The path of the target files used to describe the conflicts. *
* * @param filePath * The path of the target files used to describe the conflicts. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeMergeConflictsRequest withFilePath(String filePath) { setFilePath(filePath); return this; } /** ** The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a * not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is * considered not mergeable if the same file in both branches has differences on the same line. *
* * @param conflictDetailLevel * The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a * not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a * conflict is considered not mergeable if the same file in both branches has differences on the same line. * @see ConflictDetailLevelTypeEnum */ public void setConflictDetailLevel(String conflictDetailLevel) { this.conflictDetailLevel = conflictDetailLevel; } /** ** The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a * not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is * considered not mergeable if the same file in both branches has differences on the same line. *
* * @return The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a * not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a * conflict is considered not mergeable if the same file in both branches has differences on the same line. * @see ConflictDetailLevelTypeEnum */ public String getConflictDetailLevel() { return this.conflictDetailLevel; } /** ** The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a * not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is * considered not mergeable if the same file in both branches has differences on the same line. *
* * @param conflictDetailLevel * The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a * not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a * conflict is considered not mergeable if the same file in both branches has differences on the same line. * @return Returns a reference to this object so that method calls can be chained together. * @see ConflictDetailLevelTypeEnum */ public DescribeMergeConflictsRequest withConflictDetailLevel(String conflictDetailLevel) { setConflictDetailLevel(conflictDetailLevel); return this; } /** ** The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a * not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a conflict is * considered not mergeable if the same file in both branches has differences on the same line. *
* * @param conflictDetailLevel * The level of conflict detail to use. If unspecified, the default FILE_LEVEL is used, which returns a * not-mergeable result if the same file has differences in both branches. If LINE_LEVEL is specified, a * conflict is considered not mergeable if the same file in both branches has differences on the same line. * @return Returns a reference to this object so that method calls can be chained together. * @see ConflictDetailLevelTypeEnum */ public DescribeMergeConflictsRequest withConflictDetailLevel(ConflictDetailLevelTypeEnum conflictDetailLevel) { this.conflictDetailLevel = conflictDetailLevel.toString(); return this; } /** ** Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions * of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation * is successful. *
* * @param conflictResolutionStrategy * Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two * versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the * merge operation is successful. * @see ConflictResolutionStrategyTypeEnum */ public void setConflictResolutionStrategy(String conflictResolutionStrategy) { this.conflictResolutionStrategy = conflictResolutionStrategy; } /** ** Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions * of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation * is successful. *
* * @return Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two * versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the * merge operation is successful. * @see ConflictResolutionStrategyTypeEnum */ public String getConflictResolutionStrategy() { return this.conflictResolutionStrategy; } /** ** Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions * of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation * is successful. *
* * @param conflictResolutionStrategy * Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two * versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the * merge operation is successful. * @return Returns a reference to this object so that method calls can be chained together. * @see ConflictResolutionStrategyTypeEnum */ public DescribeMergeConflictsRequest withConflictResolutionStrategy(String conflictResolutionStrategy) { setConflictResolutionStrategy(conflictResolutionStrategy); return this; } /** ** Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two versions * of a file. The default is NONE, which requires any conflicts to be resolved manually before the merge operation * is successful. *
* * @param conflictResolutionStrategy * Specifies which branch to use when resolving conflicts, or whether to attempt automatically merging two * versions of a file. The default is NONE, which requires any conflicts to be resolved manually before the * merge operation is successful. * @return Returns a reference to this object so that method calls can be chained together. * @see ConflictResolutionStrategyTypeEnum */ public DescribeMergeConflictsRequest withConflictResolutionStrategy(ConflictResolutionStrategyTypeEnum conflictResolutionStrategy) { this.conflictResolutionStrategy = conflictResolutionStrategy.toString(); return this; } /** ** An enumeration token that, when provided in a request, returns the next batch of the results. *
* * @param nextToken * An enumeration token that, when provided in a request, returns the next batch of the results. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** ** An enumeration token that, when provided in a request, returns the next batch of the results. *
* * @return An enumeration token that, when provided in a request, returns the next batch of the results. */ public String getNextToken() { return this.nextToken; } /** ** An enumeration token that, when provided in a request, returns the next batch of the results. *
* * @param nextToken * An enumeration token that, when provided in a request, returns the next batch of the results. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeMergeConflictsRequest withNextToken(String nextToken) { setNextToken(nextToken); 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 (getDestinationCommitSpecifier() != null) sb.append("DestinationCommitSpecifier: ").append(getDestinationCommitSpecifier()).append(","); if (getSourceCommitSpecifier() != null) sb.append("SourceCommitSpecifier: ").append(getSourceCommitSpecifier()).append(","); if (getMergeOption() != null) sb.append("MergeOption: ").append(getMergeOption()).append(","); if (getMaxMergeHunks() != null) sb.append("MaxMergeHunks: ").append(getMaxMergeHunks()).append(","); if (getFilePath() != null) sb.append("FilePath: ").append(getFilePath()).append(","); if (getConflictDetailLevel() != null) sb.append("ConflictDetailLevel: ").append(getConflictDetailLevel()).append(","); if (getConflictResolutionStrategy() != null) sb.append("ConflictResolutionStrategy: ").append(getConflictResolutionStrategy()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeMergeConflictsRequest == false) return false; DescribeMergeConflictsRequest other = (DescribeMergeConflictsRequest) obj; if (other.getRepositoryName() == null ^ this.getRepositoryName() == null) return false; if (other.getRepositoryName() != null && other.getRepositoryName().equals(this.getRepositoryName()) == false) return false; if (other.getDestinationCommitSpecifier() == null ^ this.getDestinationCommitSpecifier() == null) return false; if (other.getDestinationCommitSpecifier() != null && other.getDestinationCommitSpecifier().equals(this.getDestinationCommitSpecifier()) == false) return false; if (other.getSourceCommitSpecifier() == null ^ this.getSourceCommitSpecifier() == null) return false; if (other.getSourceCommitSpecifier() != null && other.getSourceCommitSpecifier().equals(this.getSourceCommitSpecifier()) == false) return false; if (other.getMergeOption() == null ^ this.getMergeOption() == null) return false; if (other.getMergeOption() != null && other.getMergeOption().equals(this.getMergeOption()) == false) return false; if (other.getMaxMergeHunks() == null ^ this.getMaxMergeHunks() == null) return false; if (other.getMaxMergeHunks() != null && other.getMaxMergeHunks().equals(this.getMaxMergeHunks()) == false) return false; if (other.getFilePath() == null ^ this.getFilePath() == null) return false; if (other.getFilePath() != null && other.getFilePath().equals(this.getFilePath()) == false) return false; if (other.getConflictDetailLevel() == null ^ this.getConflictDetailLevel() == null) return false; if (other.getConflictDetailLevel() != null && other.getConflictDetailLevel().equals(this.getConflictDetailLevel()) == false) return false; if (other.getConflictResolutionStrategy() == null ^ this.getConflictResolutionStrategy() == null) return false; if (other.getConflictResolutionStrategy() != null && other.getConflictResolutionStrategy().equals(this.getConflictResolutionStrategy()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == 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 + ((getDestinationCommitSpecifier() == null) ? 0 : getDestinationCommitSpecifier().hashCode()); hashCode = prime * hashCode + ((getSourceCommitSpecifier() == null) ? 0 : getSourceCommitSpecifier().hashCode()); hashCode = prime * hashCode + ((getMergeOption() == null) ? 0 : getMergeOption().hashCode()); hashCode = prime * hashCode + ((getMaxMergeHunks() == null) ? 0 : getMaxMergeHunks().hashCode()); hashCode = prime * hashCode + ((getFilePath() == null) ? 0 : getFilePath().hashCode()); hashCode = prime * hashCode + ((getConflictDetailLevel() == null) ? 0 : getConflictDetailLevel().hashCode()); hashCode = prime * hashCode + ((getConflictResolutionStrategy() == null) ? 0 : getConflictResolutionStrategy().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public DescribeMergeConflictsRequest clone() { return (DescribeMergeConflictsRequest) super.clone(); } }