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

com.amazonaws.services.codeartifact.model.PackageDependency Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2015-2020 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.codeartifact.model;

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

/**
 * 

* Details about a package dependency. *

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

* The namespace of the package. The package component that specifies its namespace depends on its type. For * example: *

*
    *
  • *

    * The namespace of a Maven package is its groupId. *

    *
  • *
  • *

    * The namespace of an npm package is its scope. *

    *
  • *
  • *

    * A Python package does not contain a corresponding component, so Python packages do not have a namespace. *

    *
  • *
*/ private String namespace; /** *

* The name of the package that this package depends on. *

*/ private String packageValue; /** *

* The type of a package dependency. The possible values depend on the package type. Example types are * compile, runtime, and test for Maven packages, and dev, * prod, and optional for npm packages. *

*/ private String dependencyType; /** *

* The required version, or version range, of the package that this package depends on. The version format is * specific to the package type. For example, the following are possible valid required versions: 1.2.3, ^2.3.4, or 4.x. *

*/ private String versionRequirement; /** *

* The namespace of the package. The package component that specifies its namespace depends on its type. For * example: *

*
    *
  • *

    * The namespace of a Maven package is its groupId. *

    *
  • *
  • *

    * The namespace of an npm package is its scope. *

    *
  • *
  • *

    * A Python package does not contain a corresponding component, so Python packages do not have a namespace. *

    *
  • *
* * @param namespace * The namespace of the package. The package component that specifies its namespace depends on its type. For * example:

*
    *
  • *

    * The namespace of a Maven package is its groupId. *

    *
  • *
  • *

    * The namespace of an npm package is its scope. *

    *
  • *
  • *

    * A Python package does not contain a corresponding component, so Python packages do not have a namespace. *

    *
  • */ public void setNamespace(String namespace) { this.namespace = namespace; } /** *

    * The namespace of the package. The package component that specifies its namespace depends on its type. For * example: *

    *
      *
    • *

      * The namespace of a Maven package is its groupId. *

      *
    • *
    • *

      * The namespace of an npm package is its scope. *

      *
    • *
    • *

      * A Python package does not contain a corresponding component, so Python packages do not have a namespace. *

      *
    • *
    * * @return The namespace of the package. The package component that specifies its namespace depends on its type. For * example:

    *
      *
    • *

      * The namespace of a Maven package is its groupId. *

      *
    • *
    • *

      * The namespace of an npm package is its scope. *

      *
    • *
    • *

      * A Python package does not contain a corresponding component, so Python packages do not have a namespace. *

      *
    • */ public String getNamespace() { return this.namespace; } /** *

      * The namespace of the package. The package component that specifies its namespace depends on its type. For * example: *

      *
        *
      • *

        * The namespace of a Maven package is its groupId. *

        *
      • *
      • *

        * The namespace of an npm package is its scope. *

        *
      • *
      • *

        * A Python package does not contain a corresponding component, so Python packages do not have a namespace. *

        *
      • *
      * * @param namespace * The namespace of the package. The package component that specifies its namespace depends on its type. For * example:

      *
        *
      • *

        * The namespace of a Maven package is its groupId. *

        *
      • *
      • *

        * The namespace of an npm package is its scope. *

        *
      • *
      • *

        * A Python package does not contain a corresponding component, so Python packages do not have a namespace. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. */ public PackageDependency withNamespace(String namespace) { setNamespace(namespace); return this; } /** *

        * The name of the package that this package depends on. *

        * * @param packageValue * The name of the package that this package depends on. */ public void setPackage(String packageValue) { this.packageValue = packageValue; } /** *

        * The name of the package that this package depends on. *

        * * @return The name of the package that this package depends on. */ public String getPackage() { return this.packageValue; } /** *

        * The name of the package that this package depends on. *

        * * @param packageValue * The name of the package that this package depends on. * @return Returns a reference to this object so that method calls can be chained together. */ public PackageDependency withPackage(String packageValue) { setPackage(packageValue); return this; } /** *

        * The type of a package dependency. The possible values depend on the package type. Example types are * compile, runtime, and test for Maven packages, and dev, * prod, and optional for npm packages. *

        * * @param dependencyType * The type of a package dependency. The possible values depend on the package type. Example types are * compile, runtime, and test for Maven packages, and dev * , prod, and optional for npm packages. */ public void setDependencyType(String dependencyType) { this.dependencyType = dependencyType; } /** *

        * The type of a package dependency. The possible values depend on the package type. Example types are * compile, runtime, and test for Maven packages, and dev, * prod, and optional for npm packages. *

        * * @return The type of a package dependency. The possible values depend on the package type. Example types are * compile, runtime, and test for Maven packages, and * dev, prod, and optional for npm packages. */ public String getDependencyType() { return this.dependencyType; } /** *

        * The type of a package dependency. The possible values depend on the package type. Example types are * compile, runtime, and test for Maven packages, and dev, * prod, and optional for npm packages. *

        * * @param dependencyType * The type of a package dependency. The possible values depend on the package type. Example types are * compile, runtime, and test for Maven packages, and dev * , prod, and optional for npm packages. * @return Returns a reference to this object so that method calls can be chained together. */ public PackageDependency withDependencyType(String dependencyType) { setDependencyType(dependencyType); return this; } /** *

        * The required version, or version range, of the package that this package depends on. The version format is * specific to the package type. For example, the following are possible valid required versions: 1.2.3, ^2.3.4, or 4.x. *

        * * @param versionRequirement * The required version, or version range, of the package that this package depends on. The version format is * specific to the package type. For example, the following are possible valid required versions: * 1.2.3, ^2.3.4, or 4.x. */ public void setVersionRequirement(String versionRequirement) { this.versionRequirement = versionRequirement; } /** *

        * The required version, or version range, of the package that this package depends on. The version format is * specific to the package type. For example, the following are possible valid required versions: 1.2.3, ^2.3.4, or 4.x. *

        * * @return The required version, or version range, of the package that this package depends on. The version format * is specific to the package type. For example, the following are possible valid required versions: * 1.2.3, ^2.3.4, or 4.x. */ public String getVersionRequirement() { return this.versionRequirement; } /** *

        * The required version, or version range, of the package that this package depends on. The version format is * specific to the package type. For example, the following are possible valid required versions: 1.2.3, ^2.3.4, or 4.x. *

        * * @param versionRequirement * The required version, or version range, of the package that this package depends on. The version format is * specific to the package type. For example, the following are possible valid required versions: * 1.2.3, ^2.3.4, or 4.x. * @return Returns a reference to this object so that method calls can be chained together. */ public PackageDependency withVersionRequirement(String versionRequirement) { setVersionRequirement(versionRequirement); 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 (getNamespace() != null) sb.append("Namespace: ").append(getNamespace()).append(","); if (getPackage() != null) sb.append("Package: ").append(getPackage()).append(","); if (getDependencyType() != null) sb.append("DependencyType: ").append(getDependencyType()).append(","); if (getVersionRequirement() != null) sb.append("VersionRequirement: ").append(getVersionRequirement()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PackageDependency == false) return false; PackageDependency other = (PackageDependency) obj; if (other.getNamespace() == null ^ this.getNamespace() == null) return false; if (other.getNamespace() != null && other.getNamespace().equals(this.getNamespace()) == false) return false; if (other.getPackage() == null ^ this.getPackage() == null) return false; if (other.getPackage() != null && other.getPackage().equals(this.getPackage()) == false) return false; if (other.getDependencyType() == null ^ this.getDependencyType() == null) return false; if (other.getDependencyType() != null && other.getDependencyType().equals(this.getDependencyType()) == false) return false; if (other.getVersionRequirement() == null ^ this.getVersionRequirement() == null) return false; if (other.getVersionRequirement() != null && other.getVersionRequirement().equals(this.getVersionRequirement()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); hashCode = prime * hashCode + ((getPackage() == null) ? 0 : getPackage().hashCode()); hashCode = prime * hashCode + ((getDependencyType() == null) ? 0 : getDependencyType().hashCode()); hashCode = prime * hashCode + ((getVersionRequirement() == null) ? 0 : getVersionRequirement().hashCode()); return hashCode; } @Override public PackageDependency clone() { try { return (PackageDependency) 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.codeartifact.model.transform.PackageDependencyMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy