All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.codestarconnections.model.RepositorySyncDefinition Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS CodeStar connections module holds the client classes that are used for communicating with AWS CodeStar connections Service

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2019-2024 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.codestarconnections.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The definition for a repository with a sync configuration. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RepositorySyncDefinition implements Serializable, Cloneable, StructuredPojo { /** *

* The branch specified for a repository sync definition. *

*/ private String branch; /** *

* The configuration file for a repository sync definition. This value comes from creating or updating the * config-file field of a sync-configuration. *

*/ private String directory; /** *

* The parent resource specified for a repository sync definition. *

*/ private String parent; /** *

* The target resource specified for a repository sync definition. In some cases, such as CFN_STACK_SYNC, the parent * and target resource are the same. *

*/ private String target; /** *

* The branch specified for a repository sync definition. *

* * @param branch * The branch specified for a repository sync definition. */ public void setBranch(String branch) { this.branch = branch; } /** *

* The branch specified for a repository sync definition. *

* * @return The branch specified for a repository sync definition. */ public String getBranch() { return this.branch; } /** *

* The branch specified for a repository sync definition. *

* * @param branch * The branch specified for a repository sync definition. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositorySyncDefinition withBranch(String branch) { setBranch(branch); return this; } /** *

* The configuration file for a repository sync definition. This value comes from creating or updating the * config-file field of a sync-configuration. *

* * @param directory * The configuration file for a repository sync definition. This value comes from creating or updating the * config-file field of a sync-configuration. */ public void setDirectory(String directory) { this.directory = directory; } /** *

* The configuration file for a repository sync definition. This value comes from creating or updating the * config-file field of a sync-configuration. *

* * @return The configuration file for a repository sync definition. This value comes from creating or updating the * config-file field of a sync-configuration. */ public String getDirectory() { return this.directory; } /** *

* The configuration file for a repository sync definition. This value comes from creating or updating the * config-file field of a sync-configuration. *

* * @param directory * The configuration file for a repository sync definition. This value comes from creating or updating the * config-file field of a sync-configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositorySyncDefinition withDirectory(String directory) { setDirectory(directory); return this; } /** *

* The parent resource specified for a repository sync definition. *

* * @param parent * The parent resource specified for a repository sync definition. */ public void setParent(String parent) { this.parent = parent; } /** *

* The parent resource specified for a repository sync definition. *

* * @return The parent resource specified for a repository sync definition. */ public String getParent() { return this.parent; } /** *

* The parent resource specified for a repository sync definition. *

* * @param parent * The parent resource specified for a repository sync definition. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositorySyncDefinition withParent(String parent) { setParent(parent); return this; } /** *

* The target resource specified for a repository sync definition. In some cases, such as CFN_STACK_SYNC, the parent * and target resource are the same. *

* * @param target * The target resource specified for a repository sync definition. In some cases, such as CFN_STACK_SYNC, the * parent and target resource are the same. */ public void setTarget(String target) { this.target = target; } /** *

* The target resource specified for a repository sync definition. In some cases, such as CFN_STACK_SYNC, the parent * and target resource are the same. *

* * @return The target resource specified for a repository sync definition. In some cases, such as CFN_STACK_SYNC, * the parent and target resource are the same. */ public String getTarget() { return this.target; } /** *

* The target resource specified for a repository sync definition. In some cases, such as CFN_STACK_SYNC, the parent * and target resource are the same. *

* * @param target * The target resource specified for a repository sync definition. In some cases, such as CFN_STACK_SYNC, the * parent and target resource are the same. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositorySyncDefinition withTarget(String target) { setTarget(target); 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 (getBranch() != null) sb.append("Branch: ").append(getBranch()).append(","); if (getDirectory() != null) sb.append("Directory: ").append(getDirectory()).append(","); if (getParent() != null) sb.append("Parent: ").append(getParent()).append(","); if (getTarget() != null) sb.append("Target: ").append(getTarget()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RepositorySyncDefinition == false) return false; RepositorySyncDefinition other = (RepositorySyncDefinition) obj; if (other.getBranch() == null ^ this.getBranch() == null) return false; if (other.getBranch() != null && other.getBranch().equals(this.getBranch()) == false) return false; if (other.getDirectory() == null ^ this.getDirectory() == null) return false; if (other.getDirectory() != null && other.getDirectory().equals(this.getDirectory()) == false) return false; if (other.getParent() == null ^ this.getParent() == null) return false; if (other.getParent() != null && other.getParent().equals(this.getParent()) == false) return false; if (other.getTarget() == null ^ this.getTarget() == null) return false; if (other.getTarget() != null && other.getTarget().equals(this.getTarget()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getBranch() == null) ? 0 : getBranch().hashCode()); hashCode = prime * hashCode + ((getDirectory() == null) ? 0 : getDirectory().hashCode()); hashCode = prime * hashCode + ((getParent() == null) ? 0 : getParent().hashCode()); hashCode = prime * hashCode + ((getTarget() == null) ? 0 : getTarget().hashCode()); return hashCode; } @Override public RepositorySyncDefinition clone() { try { return (RepositorySyncDefinition) 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.codestarconnections.model.transform.RepositorySyncDefinitionMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy