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

Details about the origin restrictions set on the package. The package origin * restrictions determine how new versions of a package can be added to a specific * repository.

See Also:

AWS * API Reference

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

The package origin configuration that determines if new versions of the * package can be published directly to the repository.

*/ inline const AllowPublish& GetPublish() const{ return m_publish; } /** *

The package origin configuration that determines if new versions of the * package can be published directly to the repository.

*/ inline bool PublishHasBeenSet() const { return m_publishHasBeenSet; } /** *

The package origin configuration that determines if new versions of the * package can be published directly to the repository.

*/ inline void SetPublish(const AllowPublish& value) { m_publishHasBeenSet = true; m_publish = value; } /** *

The package origin configuration that determines if new versions of the * package can be published directly to the repository.

*/ inline void SetPublish(AllowPublish&& value) { m_publishHasBeenSet = true; m_publish = std::move(value); } /** *

The package origin configuration that determines if new versions of the * package can be published directly to the repository.

*/ inline PackageOriginRestrictions& WithPublish(const AllowPublish& value) { SetPublish(value); return *this;} /** *

The package origin configuration that determines if new versions of the * package can be published directly to the repository.

*/ inline PackageOriginRestrictions& WithPublish(AllowPublish&& value) { SetPublish(std::move(value)); return *this;} /** *

The package origin configuration that determines if new versions of the * package can be added to the repository from an external connection or upstream * source.

*/ inline const AllowUpstream& GetUpstream() const{ return m_upstream; } /** *

The package origin configuration that determines if new versions of the * package can be added to the repository from an external connection or upstream * source.

*/ inline bool UpstreamHasBeenSet() const { return m_upstreamHasBeenSet; } /** *

The package origin configuration that determines if new versions of the * package can be added to the repository from an external connection or upstream * source.

*/ inline void SetUpstream(const AllowUpstream& value) { m_upstreamHasBeenSet = true; m_upstream = value; } /** *

The package origin configuration that determines if new versions of the * package can be added to the repository from an external connection or upstream * source.

*/ inline void SetUpstream(AllowUpstream&& value) { m_upstreamHasBeenSet = true; m_upstream = std::move(value); } /** *

The package origin configuration that determines if new versions of the * package can be added to the repository from an external connection or upstream * source.

*/ inline PackageOriginRestrictions& WithUpstream(const AllowUpstream& value) { SetUpstream(value); return *this;} /** *

The package origin configuration that determines if new versions of the * package can be added to the repository from an external connection or upstream * source.

*/ inline PackageOriginRestrictions& WithUpstream(AllowUpstream&& value) { SetUpstream(std::move(value)); return *this;} private: AllowPublish m_publish; bool m_publishHasBeenSet = false; AllowUpstream m_upstream; bool m_upstreamHasBeenSet = false; }; } // namespace Model } // namespace CodeArtifact } // namespace Aws