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

com.amazonaws.services.codeartifact.model.PackageSummary 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

The 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.codeartifact.model;

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

/**
 * 

* Details about a package, including its format, namespace, and name. *

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

* The format of the package. *

*/ private String format; /** *

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

*
    *
  • *

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

    *
  • *
  • *

    * The namespace of an npm or Swift package version is its scope. *

    *
  • *
  • *

    * The namespace of a generic package is its namespace. *

    *
  • *
  • *

    * Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of * those formats do not have a namespace. *

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

* The name of the package. *

*/ private String packageValue; /** *

* A * PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package origin * restrictions. *

*/ private PackageOriginConfiguration originConfiguration; /** *

* The format of the package. *

* * @param format * The format of the package. * @see PackageFormat */ public void setFormat(String format) { this.format = format; } /** *

* The format of the package. *

* * @return The format of the package. * @see PackageFormat */ public String getFormat() { return this.format; } /** *

* The format of the package. *

* * @param format * The format of the package. * @return Returns a reference to this object so that method calls can be chained together. * @see PackageFormat */ public PackageSummary withFormat(String format) { setFormat(format); return this; } /** *

* The format of the package. *

* * @param format * The format of the package. * @return Returns a reference to this object so that method calls can be chained together. * @see PackageFormat */ public PackageSummary withFormat(PackageFormat format) { this.format = format.toString(); return this; } /** *

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

*
    *
  • *

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

    *
  • *
  • *

    * The namespace of an npm or Swift package version is its scope. *

    *
  • *
  • *

    * The namespace of a generic package is its namespace. *

    *
  • *
  • *

    * Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of * those formats 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 version is its groupId. *

    *
  • *
  • *

    * The namespace of an npm or Swift package version is its scope. *

    *
  • *
  • *

    * The namespace of a generic package is its namespace. *

    *
  • *
  • *

    * Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions * of those formats 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 version is its groupId. *

      *
    • *
    • *

      * The namespace of an npm or Swift package version is its scope. *

      *
    • *
    • *

      * The namespace of a generic package is its namespace. *

      *
    • *
    • *

      * Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of * those formats 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 version is its groupId. *

      *
    • *
    • *

      * The namespace of an npm or Swift package version is its scope. *

      *
    • *
    • *

      * The namespace of a generic package is its namespace. *

      *
    • *
    • *

      * Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package * versions of those formats 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 version is its groupId. *

        *
      • *
      • *

        * The namespace of an npm or Swift package version is its scope. *

        *
      • *
      • *

        * The namespace of a generic package is its namespace. *

        *
      • *
      • *

        * Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions of * those formats 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 version is its groupId. *

        *
      • *
      • *

        * The namespace of an npm or Swift package version is its scope. *

        *
      • *
      • *

        * The namespace of a generic package is its namespace. *

        *
      • *
      • *

        * Python, NuGet, Ruby, and Cargo package versions do not contain a corresponding component, package versions * of those formats do not have a namespace. *

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

        * The name of the package. *

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

        * The name of the package. *

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

        * The name of the package. *

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

        * A * PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package origin * restrictions. *

        * * @param originConfiguration * A PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package * origin restrictions. */ public void setOriginConfiguration(PackageOriginConfiguration originConfiguration) { this.originConfiguration = originConfiguration; } /** *

        * A * PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package origin * restrictions. *

        * * @return A PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package * origin restrictions. */ public PackageOriginConfiguration getOriginConfiguration() { return this.originConfiguration; } /** *

        * A * PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package origin * restrictions. *

        * * @param originConfiguration * A PackageOriginConfiguration object that contains a PackageOriginRestrictions object that contains information about the upstream and publish package * origin restrictions. * @return Returns a reference to this object so that method calls can be chained together. */ public PackageSummary withOriginConfiguration(PackageOriginConfiguration originConfiguration) { setOriginConfiguration(originConfiguration); 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 (getFormat() != null) sb.append("Format: ").append(getFormat()).append(","); if (getNamespace() != null) sb.append("Namespace: ").append(getNamespace()).append(","); if (getPackage() != null) sb.append("Package: ").append(getPackage()).append(","); if (getOriginConfiguration() != null) sb.append("OriginConfiguration: ").append(getOriginConfiguration()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof PackageSummary == false) return false; PackageSummary other = (PackageSummary) obj; if (other.getFormat() == null ^ this.getFormat() == null) return false; if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == false) return false; 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.getOriginConfiguration() == null ^ this.getOriginConfiguration() == null) return false; if (other.getOriginConfiguration() != null && other.getOriginConfiguration().equals(this.getOriginConfiguration()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode()); hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); hashCode = prime * hashCode + ((getPackage() == null) ? 0 : getPackage().hashCode()); hashCode = prime * hashCode + ((getOriginConfiguration() == null) ? 0 : getOriginConfiguration().hashCode()); return hashCode; } @Override public PackageSummary clone() { try { return (PackageSummary) 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.PackageSummaryMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy