
com.amazonaws.services.codecommit.model.ConflictMetadata Maven / Gradle / Ivy
/*
* Copyright 2014-2019 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about the metadata for a conflict in a merge operation.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ConflictMetadata implements Serializable, Cloneable, StructuredPojo {
/**
*
* The path of the file that contains conflicts.
*
*/
private String filePath;
/**
*
* The file sizes of the file in the source, destination, and base of the merge.
*
*/
private FileSizes fileSizes;
/**
*
* The file modes of the file in the source, destination, and base of the merge.
*
*/
private FileModes fileModes;
/**
*
* Information about any object type conflicts in a merge operation.
*
*/
private ObjectTypes objectTypes;
/**
*
* The number of conflicts, including both hunk conflicts and metadata conflicts.
*
*/
private Integer numberOfConflicts;
/**
*
* A boolean value (true or false) indicating whether the file is binary or textual in the source, destination, and
* base of the merge.
*
*/
private IsBinaryFile isBinaryFile;
/**
*
* A boolean value indicating whether there are conflicts in the content of a file.
*
*/
private Boolean contentConflict;
/**
*
* A boolean value indicating whether there are conflicts in the file mode of a file.
*
*/
private Boolean fileModeConflict;
/**
*
* A boolean value (true or false) indicating whether there are conflicts in the object type of a file.
*
*/
private Boolean objectTypeConflict;
/**
*
* Whether an add, modify, or delete operation caused the conflict between the source and destination of the merge.
*
*/
private MergeOperations mergeOperations;
/**
*
* The path of the file that contains conflicts.
*
*
* @param filePath
* The path of the file that contains conflicts.
*/
public void setFilePath(String filePath) {
this.filePath = filePath;
}
/**
*
* The path of the file that contains conflicts.
*
*
* @return The path of the file that contains conflicts.
*/
public String getFilePath() {
return this.filePath;
}
/**
*
* The path of the file that contains conflicts.
*
*
* @param filePath
* The path of the file that contains conflicts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConflictMetadata withFilePath(String filePath) {
setFilePath(filePath);
return this;
}
/**
*
* The file sizes of the file in the source, destination, and base of the merge.
*
*
* @param fileSizes
* The file sizes of the file in the source, destination, and base of the merge.
*/
public void setFileSizes(FileSizes fileSizes) {
this.fileSizes = fileSizes;
}
/**
*
* The file sizes of the file in the source, destination, and base of the merge.
*
*
* @return The file sizes of the file in the source, destination, and base of the merge.
*/
public FileSizes getFileSizes() {
return this.fileSizes;
}
/**
*
* The file sizes of the file in the source, destination, and base of the merge.
*
*
* @param fileSizes
* The file sizes of the file in the source, destination, and base of the merge.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConflictMetadata withFileSizes(FileSizes fileSizes) {
setFileSizes(fileSizes);
return this;
}
/**
*
* The file modes of the file in the source, destination, and base of the merge.
*
*
* @param fileModes
* The file modes of the file in the source, destination, and base of the merge.
*/
public void setFileModes(FileModes fileModes) {
this.fileModes = fileModes;
}
/**
*
* The file modes of the file in the source, destination, and base of the merge.
*
*
* @return The file modes of the file in the source, destination, and base of the merge.
*/
public FileModes getFileModes() {
return this.fileModes;
}
/**
*
* The file modes of the file in the source, destination, and base of the merge.
*
*
* @param fileModes
* The file modes of the file in the source, destination, and base of the merge.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConflictMetadata withFileModes(FileModes fileModes) {
setFileModes(fileModes);
return this;
}
/**
*
* Information about any object type conflicts in a merge operation.
*
*
* @param objectTypes
* Information about any object type conflicts in a merge operation.
*/
public void setObjectTypes(ObjectTypes objectTypes) {
this.objectTypes = objectTypes;
}
/**
*
* Information about any object type conflicts in a merge operation.
*
*
* @return Information about any object type conflicts in a merge operation.
*/
public ObjectTypes getObjectTypes() {
return this.objectTypes;
}
/**
*
* Information about any object type conflicts in a merge operation.
*
*
* @param objectTypes
* Information about any object type conflicts in a merge operation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConflictMetadata withObjectTypes(ObjectTypes objectTypes) {
setObjectTypes(objectTypes);
return this;
}
/**
*
* The number of conflicts, including both hunk conflicts and metadata conflicts.
*
*
* @param numberOfConflicts
* The number of conflicts, including both hunk conflicts and metadata conflicts.
*/
public void setNumberOfConflicts(Integer numberOfConflicts) {
this.numberOfConflicts = numberOfConflicts;
}
/**
*
* The number of conflicts, including both hunk conflicts and metadata conflicts.
*
*
* @return The number of conflicts, including both hunk conflicts and metadata conflicts.
*/
public Integer getNumberOfConflicts() {
return this.numberOfConflicts;
}
/**
*
* The number of conflicts, including both hunk conflicts and metadata conflicts.
*
*
* @param numberOfConflicts
* The number of conflicts, including both hunk conflicts and metadata conflicts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConflictMetadata withNumberOfConflicts(Integer numberOfConflicts) {
setNumberOfConflicts(numberOfConflicts);
return this;
}
/**
*
* A boolean value (true or false) indicating whether the file is binary or textual in the source, destination, and
* base of the merge.
*
*
* @param isBinaryFile
* A boolean value (true or false) indicating whether the file is binary or textual in the source,
* destination, and base of the merge.
*/
public void setIsBinaryFile(IsBinaryFile isBinaryFile) {
this.isBinaryFile = isBinaryFile;
}
/**
*
* A boolean value (true or false) indicating whether the file is binary or textual in the source, destination, and
* base of the merge.
*
*
* @return A boolean value (true or false) indicating whether the file is binary or textual in the source,
* destination, and base of the merge.
*/
public IsBinaryFile getIsBinaryFile() {
return this.isBinaryFile;
}
/**
*
* A boolean value (true or false) indicating whether the file is binary or textual in the source, destination, and
* base of the merge.
*
*
* @param isBinaryFile
* A boolean value (true or false) indicating whether the file is binary or textual in the source,
* destination, and base of the merge.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConflictMetadata withIsBinaryFile(IsBinaryFile isBinaryFile) {
setIsBinaryFile(isBinaryFile);
return this;
}
/**
*
* A boolean value indicating whether there are conflicts in the content of a file.
*
*
* @param contentConflict
* A boolean value indicating whether there are conflicts in the content of a file.
*/
public void setContentConflict(Boolean contentConflict) {
this.contentConflict = contentConflict;
}
/**
*
* A boolean value indicating whether there are conflicts in the content of a file.
*
*
* @return A boolean value indicating whether there are conflicts in the content of a file.
*/
public Boolean getContentConflict() {
return this.contentConflict;
}
/**
*
* A boolean value indicating whether there are conflicts in the content of a file.
*
*
* @param contentConflict
* A boolean value indicating whether there are conflicts in the content of a file.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConflictMetadata withContentConflict(Boolean contentConflict) {
setContentConflict(contentConflict);
return this;
}
/**
*
* A boolean value indicating whether there are conflicts in the content of a file.
*
*
* @return A boolean value indicating whether there are conflicts in the content of a file.
*/
public Boolean isContentConflict() {
return this.contentConflict;
}
/**
*
* A boolean value indicating whether there are conflicts in the file mode of a file.
*
*
* @param fileModeConflict
* A boolean value indicating whether there are conflicts in the file mode of a file.
*/
public void setFileModeConflict(Boolean fileModeConflict) {
this.fileModeConflict = fileModeConflict;
}
/**
*
* A boolean value indicating whether there are conflicts in the file mode of a file.
*
*
* @return A boolean value indicating whether there are conflicts in the file mode of a file.
*/
public Boolean getFileModeConflict() {
return this.fileModeConflict;
}
/**
*
* A boolean value indicating whether there are conflicts in the file mode of a file.
*
*
* @param fileModeConflict
* A boolean value indicating whether there are conflicts in the file mode of a file.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConflictMetadata withFileModeConflict(Boolean fileModeConflict) {
setFileModeConflict(fileModeConflict);
return this;
}
/**
*
* A boolean value indicating whether there are conflicts in the file mode of a file.
*
*
* @return A boolean value indicating whether there are conflicts in the file mode of a file.
*/
public Boolean isFileModeConflict() {
return this.fileModeConflict;
}
/**
*
* A boolean value (true or false) indicating whether there are conflicts in the object type of a file.
*
*
* @param objectTypeConflict
* A boolean value (true or false) indicating whether there are conflicts in the object type of a file.
*/
public void setObjectTypeConflict(Boolean objectTypeConflict) {
this.objectTypeConflict = objectTypeConflict;
}
/**
*
* A boolean value (true or false) indicating whether there are conflicts in the object type of a file.
*
*
* @return A boolean value (true or false) indicating whether there are conflicts in the object type of a file.
*/
public Boolean getObjectTypeConflict() {
return this.objectTypeConflict;
}
/**
*
* A boolean value (true or false) indicating whether there are conflicts in the object type of a file.
*
*
* @param objectTypeConflict
* A boolean value (true or false) indicating whether there are conflicts in the object type of a file.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConflictMetadata withObjectTypeConflict(Boolean objectTypeConflict) {
setObjectTypeConflict(objectTypeConflict);
return this;
}
/**
*
* A boolean value (true or false) indicating whether there are conflicts in the object type of a file.
*
*
* @return A boolean value (true or false) indicating whether there are conflicts in the object type of a file.
*/
public Boolean isObjectTypeConflict() {
return this.objectTypeConflict;
}
/**
*
* Whether an add, modify, or delete operation caused the conflict between the source and destination of the merge.
*
*
* @param mergeOperations
* Whether an add, modify, or delete operation caused the conflict between the source and destination of the
* merge.
*/
public void setMergeOperations(MergeOperations mergeOperations) {
this.mergeOperations = mergeOperations;
}
/**
*
* Whether an add, modify, or delete operation caused the conflict between the source and destination of the merge.
*
*
* @return Whether an add, modify, or delete operation caused the conflict between the source and destination of the
* merge.
*/
public MergeOperations getMergeOperations() {
return this.mergeOperations;
}
/**
*
* Whether an add, modify, or delete operation caused the conflict between the source and destination of the merge.
*
*
* @param mergeOperations
* Whether an add, modify, or delete operation caused the conflict between the source and destination of the
* merge.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ConflictMetadata withMergeOperations(MergeOperations mergeOperations) {
setMergeOperations(mergeOperations);
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 (getFilePath() != null)
sb.append("FilePath: ").append(getFilePath()).append(",");
if (getFileSizes() != null)
sb.append("FileSizes: ").append(getFileSizes()).append(",");
if (getFileModes() != null)
sb.append("FileModes: ").append(getFileModes()).append(",");
if (getObjectTypes() != null)
sb.append("ObjectTypes: ").append(getObjectTypes()).append(",");
if (getNumberOfConflicts() != null)
sb.append("NumberOfConflicts: ").append(getNumberOfConflicts()).append(",");
if (getIsBinaryFile() != null)
sb.append("IsBinaryFile: ").append(getIsBinaryFile()).append(",");
if (getContentConflict() != null)
sb.append("ContentConflict: ").append(getContentConflict()).append(",");
if (getFileModeConflict() != null)
sb.append("FileModeConflict: ").append(getFileModeConflict()).append(",");
if (getObjectTypeConflict() != null)
sb.append("ObjectTypeConflict: ").append(getObjectTypeConflict()).append(",");
if (getMergeOperations() != null)
sb.append("MergeOperations: ").append(getMergeOperations());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ConflictMetadata == false)
return false;
ConflictMetadata other = (ConflictMetadata) obj;
if (other.getFilePath() == null ^ this.getFilePath() == null)
return false;
if (other.getFilePath() != null && other.getFilePath().equals(this.getFilePath()) == false)
return false;
if (other.getFileSizes() == null ^ this.getFileSizes() == null)
return false;
if (other.getFileSizes() != null && other.getFileSizes().equals(this.getFileSizes()) == false)
return false;
if (other.getFileModes() == null ^ this.getFileModes() == null)
return false;
if (other.getFileModes() != null && other.getFileModes().equals(this.getFileModes()) == false)
return false;
if (other.getObjectTypes() == null ^ this.getObjectTypes() == null)
return false;
if (other.getObjectTypes() != null && other.getObjectTypes().equals(this.getObjectTypes()) == false)
return false;
if (other.getNumberOfConflicts() == null ^ this.getNumberOfConflicts() == null)
return false;
if (other.getNumberOfConflicts() != null && other.getNumberOfConflicts().equals(this.getNumberOfConflicts()) == false)
return false;
if (other.getIsBinaryFile() == null ^ this.getIsBinaryFile() == null)
return false;
if (other.getIsBinaryFile() != null && other.getIsBinaryFile().equals(this.getIsBinaryFile()) == false)
return false;
if (other.getContentConflict() == null ^ this.getContentConflict() == null)
return false;
if (other.getContentConflict() != null && other.getContentConflict().equals(this.getContentConflict()) == false)
return false;
if (other.getFileModeConflict() == null ^ this.getFileModeConflict() == null)
return false;
if (other.getFileModeConflict() != null && other.getFileModeConflict().equals(this.getFileModeConflict()) == false)
return false;
if (other.getObjectTypeConflict() == null ^ this.getObjectTypeConflict() == null)
return false;
if (other.getObjectTypeConflict() != null && other.getObjectTypeConflict().equals(this.getObjectTypeConflict()) == false)
return false;
if (other.getMergeOperations() == null ^ this.getMergeOperations() == null)
return false;
if (other.getMergeOperations() != null && other.getMergeOperations().equals(this.getMergeOperations()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFilePath() == null) ? 0 : getFilePath().hashCode());
hashCode = prime * hashCode + ((getFileSizes() == null) ? 0 : getFileSizes().hashCode());
hashCode = prime * hashCode + ((getFileModes() == null) ? 0 : getFileModes().hashCode());
hashCode = prime * hashCode + ((getObjectTypes() == null) ? 0 : getObjectTypes().hashCode());
hashCode = prime * hashCode + ((getNumberOfConflicts() == null) ? 0 : getNumberOfConflicts().hashCode());
hashCode = prime * hashCode + ((getIsBinaryFile() == null) ? 0 : getIsBinaryFile().hashCode());
hashCode = prime * hashCode + ((getContentConflict() == null) ? 0 : getContentConflict().hashCode());
hashCode = prime * hashCode + ((getFileModeConflict() == null) ? 0 : getFileModeConflict().hashCode());
hashCode = prime * hashCode + ((getObjectTypeConflict() == null) ? 0 : getObjectTypeConflict().hashCode());
hashCode = prime * hashCode + ((getMergeOperations() == null) ? 0 : getMergeOperations().hashCode());
return hashCode;
}
@Override
public ConflictMetadata clone() {
try {
return (ConflictMetadata) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.codecommit.model.transform.ConflictMetadataMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}