/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CodeArtifact { namespace Model { /** *

Details about a package dependency.

See Also:

AWS * API Reference

*/ class PackageDependency { public: AWS_CODEARTIFACT_API PackageDependency(); AWS_CODEARTIFACT_API PackageDependency(Aws::Utils::Json::JsonView jsonValue); AWS_CODEARTIFACT_API PackageDependency& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CODEARTIFACT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The namespace of the package that this package depends on. 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.

    *
  • Python and NuGet packages do not contain a corresponding * component, packages of those formats do not have a namespace.

*/ inline const Aws::String& GetNamespace() const{ return m_namespace; } /** *

The namespace of the package that this package depends on. 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.

    *
  • Python and NuGet packages do not contain a corresponding * component, packages of those formats do not have a namespace.

*/ inline bool NamespaceHasBeenSet() const { return m_namespaceHasBeenSet; } /** *

The namespace of the package that this package depends on. 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.

    *
  • Python and NuGet packages do not contain a corresponding * component, packages of those formats do not have a namespace.

*/ inline void SetNamespace(const Aws::String& value) { m_namespaceHasBeenSet = true; m_namespace = value; } /** *

The namespace of the package that this package depends on. 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.

    *
  • Python and NuGet packages do not contain a corresponding * component, packages of those formats do not have a namespace.

*/ inline void SetNamespace(Aws::String&& value) { m_namespaceHasBeenSet = true; m_namespace = std::move(value); } /** *

The namespace of the package that this package depends on. 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.

    *
  • Python and NuGet packages do not contain a corresponding * component, packages of those formats do not have a namespace.

*/ inline void SetNamespace(const char* value) { m_namespaceHasBeenSet = true; m_namespace.assign(value); } /** *

The namespace of the package that this package depends on. 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.

    *
  • Python and NuGet packages do not contain a corresponding * component, packages of those formats do not have a namespace.

*/ inline PackageDependency& WithNamespace(const Aws::String& value) { SetNamespace(value); return *this;} /** *

The namespace of the package that this package depends on. 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.

    *
  • Python and NuGet packages do not contain a corresponding * component, packages of those formats do not have a namespace.

*/ inline PackageDependency& WithNamespace(Aws::String&& value) { SetNamespace(std::move(value)); return *this;} /** *

The namespace of the package that this package depends on. 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.

    *
  • Python and NuGet packages do not contain a corresponding * component, packages of those formats do not have a namespace.

*/ inline PackageDependency& WithNamespace(const char* value) { SetNamespace(value); return *this;} /** *

The name of the package that this package depends on.

*/ inline const Aws::String& GetPackage() const{ return m_package; } /** *

The name of the package that this package depends on.

*/ inline bool PackageHasBeenSet() const { return m_packageHasBeenSet; } /** *

The name of the package that this package depends on.

*/ inline void SetPackage(const Aws::String& value) { m_packageHasBeenSet = true; m_package = value; } /** *

The name of the package that this package depends on.

*/ inline void SetPackage(Aws::String&& value) { m_packageHasBeenSet = true; m_package = std::move(value); } /** *

The name of the package that this package depends on.

*/ inline void SetPackage(const char* value) { m_packageHasBeenSet = true; m_package.assign(value); } /** *

The name of the package that this package depends on.

*/ inline PackageDependency& WithPackage(const Aws::String& value) { SetPackage(value); return *this;} /** *

The name of the package that this package depends on.

*/ inline PackageDependency& WithPackage(Aws::String&& value) { SetPackage(std::move(value)); return *this;} /** *

The name of the package that this package depends on.

*/ inline PackageDependency& WithPackage(const char* value) { SetPackage(value); return *this;} /** *

The type of a package dependency. The possible values depend on the package * type.

  • npm: regular, dev, * peer, optional

  • maven: * optional, parent, compile, * runtime, test, system, * provided.

    Note that parent is not a * regular Maven dependency type; instead this is extracted from the * <parent> element if one is defined in the package version's * POM file.

  • nuget: The dependencyType field * is never set for NuGet packages.

  • pypi: * Requires-Dist

*/ inline const Aws::String& GetDependencyType() const{ return m_dependencyType; } /** *

The type of a package dependency. The possible values depend on the package * type.

  • npm: regular, dev, * peer, optional

  • maven: * optional, parent, compile, * runtime, test, system, * provided.

    Note that parent is not a * regular Maven dependency type; instead this is extracted from the * <parent> element if one is defined in the package version's * POM file.

  • nuget: The dependencyType field * is never set for NuGet packages.

  • pypi: * Requires-Dist

*/ inline bool DependencyTypeHasBeenSet() const { return m_dependencyTypeHasBeenSet; } /** *

The type of a package dependency. The possible values depend on the package * type.

  • npm: regular, dev, * peer, optional

  • maven: * optional, parent, compile, * runtime, test, system, * provided.

    Note that parent is not a * regular Maven dependency type; instead this is extracted from the * <parent> element if one is defined in the package version's * POM file.

  • nuget: The dependencyType field * is never set for NuGet packages.

  • pypi: * Requires-Dist

*/ inline void SetDependencyType(const Aws::String& value) { m_dependencyTypeHasBeenSet = true; m_dependencyType = value; } /** *

The type of a package dependency. The possible values depend on the package * type.

  • npm: regular, dev, * peer, optional

  • maven: * optional, parent, compile, * runtime, test, system, * provided.

    Note that parent is not a * regular Maven dependency type; instead this is extracted from the * <parent> element if one is defined in the package version's * POM file.

  • nuget: The dependencyType field * is never set for NuGet packages.

  • pypi: * Requires-Dist

*/ inline void SetDependencyType(Aws::String&& value) { m_dependencyTypeHasBeenSet = true; m_dependencyType = std::move(value); } /** *

The type of a package dependency. The possible values depend on the package * type.

  • npm: regular, dev, * peer, optional

  • maven: * optional, parent, compile, * runtime, test, system, * provided.

    Note that parent is not a * regular Maven dependency type; instead this is extracted from the * <parent> element if one is defined in the package version's * POM file.

  • nuget: The dependencyType field * is never set for NuGet packages.

  • pypi: * Requires-Dist

*/ inline void SetDependencyType(const char* value) { m_dependencyTypeHasBeenSet = true; m_dependencyType.assign(value); } /** *

The type of a package dependency. The possible values depend on the package * type.

  • npm: regular, dev, * peer, optional

  • maven: * optional, parent, compile, * runtime, test, system, * provided.

    Note that parent is not a * regular Maven dependency type; instead this is extracted from the * <parent> element if one is defined in the package version's * POM file.

  • nuget: The dependencyType field * is never set for NuGet packages.

  • pypi: * Requires-Dist

*/ inline PackageDependency& WithDependencyType(const Aws::String& value) { SetDependencyType(value); return *this;} /** *

The type of a package dependency. The possible values depend on the package * type.

  • npm: regular, dev, * peer, optional

  • maven: * optional, parent, compile, * runtime, test, system, * provided.

    Note that parent is not a * regular Maven dependency type; instead this is extracted from the * <parent> element if one is defined in the package version's * POM file.

  • nuget: The dependencyType field * is never set for NuGet packages.

  • pypi: * Requires-Dist

*/ inline PackageDependency& WithDependencyType(Aws::String&& value) { SetDependencyType(std::move(value)); return *this;} /** *

The type of a package dependency. The possible values depend on the package * type.

  • npm: regular, dev, * peer, optional

  • maven: * optional, parent, compile, * runtime, test, system, * provided.

    Note that parent is not a * regular Maven dependency type; instead this is extracted from the * <parent> element if one is defined in the package version's * POM file.

  • nuget: The dependencyType field * is never set for NuGet packages.

  • pypi: * Requires-Dist

*/ inline PackageDependency& WithDependencyType(const char* value) { SetDependencyType(value); 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.

*/ inline const Aws::String& GetVersionRequirement() const{ return m_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.

*/ inline bool VersionRequirementHasBeenSet() const { return m_versionRequirementHasBeenSet; } /** *

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.

*/ inline void SetVersionRequirement(const Aws::String& value) { m_versionRequirementHasBeenSet = true; m_versionRequirement = value; } /** *

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.

*/ inline void SetVersionRequirement(Aws::String&& value) { m_versionRequirementHasBeenSet = true; m_versionRequirement = std::move(value); } /** *

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.

*/ inline void SetVersionRequirement(const char* value) { m_versionRequirementHasBeenSet = true; m_versionRequirement.assign(value); } /** *

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.

*/ inline PackageDependency& WithVersionRequirement(const Aws::String& value) { SetVersionRequirement(value); 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.

*/ inline PackageDependency& WithVersionRequirement(Aws::String&& value) { SetVersionRequirement(std::move(value)); 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.

*/ inline PackageDependency& WithVersionRequirement(const char* value) { SetVersionRequirement(value); return *this;} private: Aws::String m_namespace; bool m_namespaceHasBeenSet = false; Aws::String m_package; bool m_packageHasBeenSet = false; Aws::String m_dependencyType; bool m_dependencyTypeHasBeenSet = false; Aws::String m_versionRequirement; bool m_versionRequirementHasBeenSet = false; }; } // namespace Model } // namespace CodeArtifact } // namespace Aws