/** * 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 Lambda { namespace Model { /** */ class AddLayerVersionPermissionRequest : public LambdaRequest { public: AWS_LAMBDA_API AddLayerVersionPermissionRequest(); // 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 "AddLayerVersionPermission"; } AWS_LAMBDA_API Aws::String SerializePayload() const override; AWS_LAMBDA_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; /** *

The name or Amazon Resource Name (ARN) of the layer.

*/ inline const Aws::String& GetLayerName() const{ return m_layerName; } /** *

The name or Amazon Resource Name (ARN) of the layer.

*/ inline bool LayerNameHasBeenSet() const { return m_layerNameHasBeenSet; } /** *

The name or Amazon Resource Name (ARN) of the layer.

*/ inline void SetLayerName(const Aws::String& value) { m_layerNameHasBeenSet = true; m_layerName = value; } /** *

The name or Amazon Resource Name (ARN) of the layer.

*/ inline void SetLayerName(Aws::String&& value) { m_layerNameHasBeenSet = true; m_layerName = std::move(value); } /** *

The name or Amazon Resource Name (ARN) of the layer.

*/ inline void SetLayerName(const char* value) { m_layerNameHasBeenSet = true; m_layerName.assign(value); } /** *

The name or Amazon Resource Name (ARN) of the layer.

*/ inline AddLayerVersionPermissionRequest& WithLayerName(const Aws::String& value) { SetLayerName(value); return *this;} /** *

The name or Amazon Resource Name (ARN) of the layer.

*/ inline AddLayerVersionPermissionRequest& WithLayerName(Aws::String&& value) { SetLayerName(std::move(value)); return *this;} /** *

The name or Amazon Resource Name (ARN) of the layer.

*/ inline AddLayerVersionPermissionRequest& WithLayerName(const char* value) { SetLayerName(value); return *this;} /** *

The version number.

*/ inline long long GetVersionNumber() const{ return m_versionNumber; } /** *

The version number.

*/ inline bool VersionNumberHasBeenSet() const { return m_versionNumberHasBeenSet; } /** *

The version number.

*/ inline void SetVersionNumber(long long value) { m_versionNumberHasBeenSet = true; m_versionNumber = value; } /** *

The version number.

*/ inline AddLayerVersionPermissionRequest& WithVersionNumber(long long value) { SetVersionNumber(value); return *this;} /** *

An identifier that distinguishes the policy from others on the same layer * version.

*/ inline const Aws::String& GetStatementId() const{ return m_statementId; } /** *

An identifier that distinguishes the policy from others on the same layer * version.

*/ inline bool StatementIdHasBeenSet() const { return m_statementIdHasBeenSet; } /** *

An identifier that distinguishes the policy from others on the same layer * version.

*/ inline void SetStatementId(const Aws::String& value) { m_statementIdHasBeenSet = true; m_statementId = value; } /** *

An identifier that distinguishes the policy from others on the same layer * version.

*/ inline void SetStatementId(Aws::String&& value) { m_statementIdHasBeenSet = true; m_statementId = std::move(value); } /** *

An identifier that distinguishes the policy from others on the same layer * version.

*/ inline void SetStatementId(const char* value) { m_statementIdHasBeenSet = true; m_statementId.assign(value); } /** *

An identifier that distinguishes the policy from others on the same layer * version.

*/ inline AddLayerVersionPermissionRequest& WithStatementId(const Aws::String& value) { SetStatementId(value); return *this;} /** *

An identifier that distinguishes the policy from others on the same layer * version.

*/ inline AddLayerVersionPermissionRequest& WithStatementId(Aws::String&& value) { SetStatementId(std::move(value)); return *this;} /** *

An identifier that distinguishes the policy from others on the same layer * version.

*/ inline AddLayerVersionPermissionRequest& WithStatementId(const char* value) { SetStatementId(value); return *this;} /** *

The API action that grants access to the layer. For example, * lambda:GetLayerVersion.

*/ inline const Aws::String& GetAction() const{ return m_action; } /** *

The API action that grants access to the layer. For example, * lambda:GetLayerVersion.

*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *

The API action that grants access to the layer. For example, * lambda:GetLayerVersion.

*/ inline void SetAction(const Aws::String& value) { m_actionHasBeenSet = true; m_action = value; } /** *

The API action that grants access to the layer. For example, * lambda:GetLayerVersion.

*/ inline void SetAction(Aws::String&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *

The API action that grants access to the layer. For example, * lambda:GetLayerVersion.

*/ inline void SetAction(const char* value) { m_actionHasBeenSet = true; m_action.assign(value); } /** *

The API action that grants access to the layer. For example, * lambda:GetLayerVersion.

*/ inline AddLayerVersionPermissionRequest& WithAction(const Aws::String& value) { SetAction(value); return *this;} /** *

The API action that grants access to the layer. For example, * lambda:GetLayerVersion.

*/ inline AddLayerVersionPermissionRequest& WithAction(Aws::String&& value) { SetAction(std::move(value)); return *this;} /** *

The API action that grants access to the layer. For example, * lambda:GetLayerVersion.

*/ inline AddLayerVersionPermissionRequest& WithAction(const char* value) { SetAction(value); return *this;} /** *

An account ID, or * to grant layer usage permission to all * accounts in an organization, or all Amazon Web Services accounts (if * organizationId is not specified). For the last case, make sure that * you really do want all Amazon Web Services accounts to have usage permission to * this layer.

*/ inline const Aws::String& GetPrincipal() const{ return m_principal; } /** *

An account ID, or * to grant layer usage permission to all * accounts in an organization, or all Amazon Web Services accounts (if * organizationId is not specified). For the last case, make sure that * you really do want all Amazon Web Services accounts to have usage permission to * this layer.

*/ inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; } /** *

An account ID, or * to grant layer usage permission to all * accounts in an organization, or all Amazon Web Services accounts (if * organizationId is not specified). For the last case, make sure that * you really do want all Amazon Web Services accounts to have usage permission to * this layer.

*/ inline void SetPrincipal(const Aws::String& value) { m_principalHasBeenSet = true; m_principal = value; } /** *

An account ID, or * to grant layer usage permission to all * accounts in an organization, or all Amazon Web Services accounts (if * organizationId is not specified). For the last case, make sure that * you really do want all Amazon Web Services accounts to have usage permission to * this layer.

*/ inline void SetPrincipal(Aws::String&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); } /** *

An account ID, or * to grant layer usage permission to all * accounts in an organization, or all Amazon Web Services accounts (if * organizationId is not specified). For the last case, make sure that * you really do want all Amazon Web Services accounts to have usage permission to * this layer.

*/ inline void SetPrincipal(const char* value) { m_principalHasBeenSet = true; m_principal.assign(value); } /** *

An account ID, or * to grant layer usage permission to all * accounts in an organization, or all Amazon Web Services accounts (if * organizationId is not specified). For the last case, make sure that * you really do want all Amazon Web Services accounts to have usage permission to * this layer.

*/ inline AddLayerVersionPermissionRequest& WithPrincipal(const Aws::String& value) { SetPrincipal(value); return *this;} /** *

An account ID, or * to grant layer usage permission to all * accounts in an organization, or all Amazon Web Services accounts (if * organizationId is not specified). For the last case, make sure that * you really do want all Amazon Web Services accounts to have usage permission to * this layer.

*/ inline AddLayerVersionPermissionRequest& WithPrincipal(Aws::String&& value) { SetPrincipal(std::move(value)); return *this;} /** *

An account ID, or * to grant layer usage permission to all * accounts in an organization, or all Amazon Web Services accounts (if * organizationId is not specified). For the last case, make sure that * you really do want all Amazon Web Services accounts to have usage permission to * this layer.

*/ inline AddLayerVersionPermissionRequest& WithPrincipal(const char* value) { SetPrincipal(value); return *this;} /** *

With the principal set to *, grant permission to all accounts in * the specified organization.

*/ inline const Aws::String& GetOrganizationId() const{ return m_organizationId; } /** *

With the principal set to *, grant permission to all accounts in * the specified organization.

*/ inline bool OrganizationIdHasBeenSet() const { return m_organizationIdHasBeenSet; } /** *

With the principal set to *, grant permission to all accounts in * the specified organization.

*/ inline void SetOrganizationId(const Aws::String& value) { m_organizationIdHasBeenSet = true; m_organizationId = value; } /** *

With the principal set to *, grant permission to all accounts in * the specified organization.

*/ inline void SetOrganizationId(Aws::String&& value) { m_organizationIdHasBeenSet = true; m_organizationId = std::move(value); } /** *

With the principal set to *, grant permission to all accounts in * the specified organization.

*/ inline void SetOrganizationId(const char* value) { m_organizationIdHasBeenSet = true; m_organizationId.assign(value); } /** *

With the principal set to *, grant permission to all accounts in * the specified organization.

*/ inline AddLayerVersionPermissionRequest& WithOrganizationId(const Aws::String& value) { SetOrganizationId(value); return *this;} /** *

With the principal set to *, grant permission to all accounts in * the specified organization.

*/ inline AddLayerVersionPermissionRequest& WithOrganizationId(Aws::String&& value) { SetOrganizationId(std::move(value)); return *this;} /** *

With the principal set to *, grant permission to all accounts in * the specified organization.

*/ inline AddLayerVersionPermissionRequest& WithOrganizationId(const char* value) { SetOrganizationId(value); return *this;} /** *

Only update the policy if the revision ID matches the ID specified. Use this * option to avoid modifying a policy that has changed since you last read it.

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

Only update the policy if the revision ID matches the ID specified. Use this * option to avoid modifying a policy that has changed since you last read it.

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

Only update the policy if the revision ID matches the ID specified. Use this * option to avoid modifying a policy that has changed since you last read it.

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

Only update the policy if the revision ID matches the ID specified. Use this * option to avoid modifying a policy that has changed since you last read it.

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

Only update the policy if the revision ID matches the ID specified. Use this * option to avoid modifying a policy that has changed since you last read it.

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

Only update the policy if the revision ID matches the ID specified. Use this * option to avoid modifying a policy that has changed since you last read it.

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

Only update the policy if the revision ID matches the ID specified. Use this * option to avoid modifying a policy that has changed since you last read it.

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

Only update the policy if the revision ID matches the ID specified. Use this * option to avoid modifying a policy that has changed since you last read it.

*/ inline AddLayerVersionPermissionRequest& WithRevisionId(const char* value) { SetRevisionId(value); return *this;} private: Aws::String m_layerName; bool m_layerNameHasBeenSet = false; long long m_versionNumber; bool m_versionNumberHasBeenSet = false; Aws::String m_statementId; bool m_statementIdHasBeenSet = false; Aws::String m_action; bool m_actionHasBeenSet = false; Aws::String m_principal; bool m_principalHasBeenSet = false; Aws::String m_organizationId; bool m_organizationIdHasBeenSet = false; Aws::String m_revisionId; bool m_revisionIdHasBeenSet = false; }; } // namespace Model } // namespace Lambda } // namespace Aws