com.amazonaws.services.amplifyuibuilder.model.CodegenDependency Maven / Gradle / Ivy
Show all versions of aws-java-sdk-amplifyuibuilder Show documentation
/*
* 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.amplifyuibuilder.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Dependency package that may be required for the project code to run.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CodegenDependency implements Serializable, Cloneable, StructuredPojo {
/**
*
* Name of the dependency package.
*
*/
private String name;
/**
*
* Indicates the version of the supported dependency package.
*
*/
private String supportedVersion;
/**
*
* Determines if the dependency package is using Semantic versioning. If set to true, it indicates that the
* dependency package uses Semantic versioning.
*
*/
private Boolean isSemVer;
/**
*
* Indicates the reason to include the dependency package in your project code.
*
*/
private String reason;
/**
*
* Name of the dependency package.
*
*
* @param name
* Name of the dependency package.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* Name of the dependency package.
*
*
* @return Name of the dependency package.
*/
public String getName() {
return this.name;
}
/**
*
* Name of the dependency package.
*
*
* @param name
* Name of the dependency package.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CodegenDependency withName(String name) {
setName(name);
return this;
}
/**
*
* Indicates the version of the supported dependency package.
*
*
* @param supportedVersion
* Indicates the version of the supported dependency package.
*/
public void setSupportedVersion(String supportedVersion) {
this.supportedVersion = supportedVersion;
}
/**
*
* Indicates the version of the supported dependency package.
*
*
* @return Indicates the version of the supported dependency package.
*/
public String getSupportedVersion() {
return this.supportedVersion;
}
/**
*
* Indicates the version of the supported dependency package.
*
*
* @param supportedVersion
* Indicates the version of the supported dependency package.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CodegenDependency withSupportedVersion(String supportedVersion) {
setSupportedVersion(supportedVersion);
return this;
}
/**
*
* Determines if the dependency package is using Semantic versioning. If set to true, it indicates that the
* dependency package uses Semantic versioning.
*
*
* @param isSemVer
* Determines if the dependency package is using Semantic versioning. If set to true, it indicates that the
* dependency package uses Semantic versioning.
*/
public void setIsSemVer(Boolean isSemVer) {
this.isSemVer = isSemVer;
}
/**
*
* Determines if the dependency package is using Semantic versioning. If set to true, it indicates that the
* dependency package uses Semantic versioning.
*
*
* @return Determines if the dependency package is using Semantic versioning. If set to true, it indicates that the
* dependency package uses Semantic versioning.
*/
public Boolean getIsSemVer() {
return this.isSemVer;
}
/**
*
* Determines if the dependency package is using Semantic versioning. If set to true, it indicates that the
* dependency package uses Semantic versioning.
*
*
* @param isSemVer
* Determines if the dependency package is using Semantic versioning. If set to true, it indicates that the
* dependency package uses Semantic versioning.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CodegenDependency withIsSemVer(Boolean isSemVer) {
setIsSemVer(isSemVer);
return this;
}
/**
*
* Determines if the dependency package is using Semantic versioning. If set to true, it indicates that the
* dependency package uses Semantic versioning.
*
*
* @return Determines if the dependency package is using Semantic versioning. If set to true, it indicates that the
* dependency package uses Semantic versioning.
*/
public Boolean isSemVer() {
return this.isSemVer;
}
/**
*
* Indicates the reason to include the dependency package in your project code.
*
*
* @param reason
* Indicates the reason to include the dependency package in your project code.
*/
public void setReason(String reason) {
this.reason = reason;
}
/**
*
* Indicates the reason to include the dependency package in your project code.
*
*
* @return Indicates the reason to include the dependency package in your project code.
*/
public String getReason() {
return this.reason;
}
/**
*
* Indicates the reason to include the dependency package in your project code.
*
*
* @param reason
* Indicates the reason to include the dependency package in your project code.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CodegenDependency withReason(String reason) {
setReason(reason);
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 (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getSupportedVersion() != null)
sb.append("SupportedVersion: ").append(getSupportedVersion()).append(",");
if (getIsSemVer() != null)
sb.append("IsSemVer: ").append(getIsSemVer()).append(",");
if (getReason() != null)
sb.append("Reason: ").append(getReason());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CodegenDependency == false)
return false;
CodegenDependency other = (CodegenDependency) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getSupportedVersion() == null ^ this.getSupportedVersion() == null)
return false;
if (other.getSupportedVersion() != null && other.getSupportedVersion().equals(this.getSupportedVersion()) == false)
return false;
if (other.getIsSemVer() == null ^ this.getIsSemVer() == null)
return false;
if (other.getIsSemVer() != null && other.getIsSemVer().equals(this.getIsSemVer()) == false)
return false;
if (other.getReason() == null ^ this.getReason() == null)
return false;
if (other.getReason() != null && other.getReason().equals(this.getReason()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getSupportedVersion() == null) ? 0 : getSupportedVersion().hashCode());
hashCode = prime * hashCode + ((getIsSemVer() == null) ? 0 : getIsSemVer().hashCode());
hashCode = prime * hashCode + ((getReason() == null) ? 0 : getReason().hashCode());
return hashCode;
}
@Override
public CodegenDependency clone() {
try {
return (CodegenDependency) 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.amplifyuibuilder.model.transform.CodegenDependencyMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}