/** * 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 Http { class URI; } //namespace Http namespace Schemas { namespace Model { /** *

The name of the policy.

See Also:

AWS * API Reference

*/ class PutResourcePolicyRequest : public SchemasRequest { public: AWS_SCHEMAS_API PutResourcePolicyRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "PutResourcePolicy"; } AWS_SCHEMAS_API Aws::String SerializePayload() const override; AWS_SCHEMAS_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; /** *

The resource-based policy.

*/ inline const Aws::String& GetPolicy() const{ return m_policy; } /** *

The resource-based policy.

*/ inline bool PolicyHasBeenSet() const { return m_policyHasBeenSet; } /** *

The resource-based policy.

*/ inline void SetPolicy(const Aws::String& value) { m_policyHasBeenSet = true; m_policy = value; } /** *

The resource-based policy.

*/ inline void SetPolicy(Aws::String&& value) { m_policyHasBeenSet = true; m_policy = std::move(value); } /** *

The resource-based policy.

*/ inline void SetPolicy(const char* value) { m_policyHasBeenSet = true; m_policy.assign(value); } /** *

The resource-based policy.

*/ inline PutResourcePolicyRequest& WithPolicy(const Aws::String& value) { SetPolicy(value); return *this;} /** *

The resource-based policy.

*/ inline PutResourcePolicyRequest& WithPolicy(Aws::String&& value) { SetPolicy(std::move(value)); return *this;} /** *

The resource-based policy.

*/ inline PutResourcePolicyRequest& WithPolicy(const char* value) { SetPolicy(value); return *this;} /** *

The name of the registry.

*/ inline const Aws::String& GetRegistryName() const{ return m_registryName; } /** *

The name of the registry.

*/ inline bool RegistryNameHasBeenSet() const { return m_registryNameHasBeenSet; } /** *

The name of the registry.

*/ inline void SetRegistryName(const Aws::String& value) { m_registryNameHasBeenSet = true; m_registryName = value; } /** *

The name of the registry.

*/ inline void SetRegistryName(Aws::String&& value) { m_registryNameHasBeenSet = true; m_registryName = std::move(value); } /** *

The name of the registry.

*/ inline void SetRegistryName(const char* value) { m_registryNameHasBeenSet = true; m_registryName.assign(value); } /** *

The name of the registry.

*/ inline PutResourcePolicyRequest& WithRegistryName(const Aws::String& value) { SetRegistryName(value); return *this;} /** *

The name of the registry.

*/ inline PutResourcePolicyRequest& WithRegistryName(Aws::String&& value) { SetRegistryName(std::move(value)); return *this;} /** *

The name of the registry.

*/ inline PutResourcePolicyRequest& WithRegistryName(const char* value) { SetRegistryName(value); return *this;} /** *

The revision ID of the policy.

*/ inline const Aws::String& GetRevisionId() const{ return m_revisionId; } /** *

The revision ID of the policy.

*/ inline bool RevisionIdHasBeenSet() const { return m_revisionIdHasBeenSet; } /** *

The revision ID of the policy.

*/ inline void SetRevisionId(const Aws::String& value) { m_revisionIdHasBeenSet = true; m_revisionId = value; } /** *

The revision ID of the policy.

*/ inline void SetRevisionId(Aws::String&& value) { m_revisionIdHasBeenSet = true; m_revisionId = std::move(value); } /** *

The revision ID of the policy.

*/ inline void SetRevisionId(const char* value) { m_revisionIdHasBeenSet = true; m_revisionId.assign(value); } /** *

The revision ID of the policy.

*/ inline PutResourcePolicyRequest& WithRevisionId(const Aws::String& value) { SetRevisionId(value); return *this;} /** *

The revision ID of the policy.

*/ inline PutResourcePolicyRequest& WithRevisionId(Aws::String&& value) { SetRevisionId(std::move(value)); return *this;} /** *

The revision ID of the policy.

*/ inline PutResourcePolicyRequest& WithRevisionId(const char* value) { SetRevisionId(value); return *this;} private: Aws::String m_policy; bool m_policyHasBeenSet = false; Aws::String m_registryName; bool m_registryNameHasBeenSet = false; Aws::String m_revisionId; bool m_revisionIdHasBeenSet = false; }; } // namespace Model } // namespace Schemas } // namespace Aws