/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace EC2 { namespace Model { /** *

Contains the parameters for CreateNetworkInterfacePermission.

See * Also:

AWS * API Reference

*/ class CreateNetworkInterfacePermissionRequest : public EC2Request { public: AWS_EC2_API CreateNetworkInterfacePermissionRequest(); // 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 "CreateNetworkInterfacePermission"; } AWS_EC2_API Aws::String SerializePayload() const override; protected: AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override; public: /** *

The ID of the network interface.

*/ inline const Aws::String& GetNetworkInterfaceId() const{ return m_networkInterfaceId; } /** *

The ID of the network interface.

*/ inline bool NetworkInterfaceIdHasBeenSet() const { return m_networkInterfaceIdHasBeenSet; } /** *

The ID of the network interface.

*/ inline void SetNetworkInterfaceId(const Aws::String& value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId = value; } /** *

The ID of the network interface.

*/ inline void SetNetworkInterfaceId(Aws::String&& value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId = std::move(value); } /** *

The ID of the network interface.

*/ inline void SetNetworkInterfaceId(const char* value) { m_networkInterfaceIdHasBeenSet = true; m_networkInterfaceId.assign(value); } /** *

The ID of the network interface.

*/ inline CreateNetworkInterfacePermissionRequest& WithNetworkInterfaceId(const Aws::String& value) { SetNetworkInterfaceId(value); return *this;} /** *

The ID of the network interface.

*/ inline CreateNetworkInterfacePermissionRequest& WithNetworkInterfaceId(Aws::String&& value) { SetNetworkInterfaceId(std::move(value)); return *this;} /** *

The ID of the network interface.

*/ inline CreateNetworkInterfacePermissionRequest& WithNetworkInterfaceId(const char* value) { SetNetworkInterfaceId(value); return *this;} /** *

The Amazon Web Services account ID.

*/ inline const Aws::String& GetAwsAccountId() const{ return m_awsAccountId; } /** *

The Amazon Web Services account ID.

*/ inline bool AwsAccountIdHasBeenSet() const { return m_awsAccountIdHasBeenSet; } /** *

The Amazon Web Services account ID.

*/ inline void SetAwsAccountId(const Aws::String& value) { m_awsAccountIdHasBeenSet = true; m_awsAccountId = value; } /** *

The Amazon Web Services account ID.

*/ inline void SetAwsAccountId(Aws::String&& value) { m_awsAccountIdHasBeenSet = true; m_awsAccountId = std::move(value); } /** *

The Amazon Web Services account ID.

*/ inline void SetAwsAccountId(const char* value) { m_awsAccountIdHasBeenSet = true; m_awsAccountId.assign(value); } /** *

The Amazon Web Services account ID.

*/ inline CreateNetworkInterfacePermissionRequest& WithAwsAccountId(const Aws::String& value) { SetAwsAccountId(value); return *this;} /** *

The Amazon Web Services account ID.

*/ inline CreateNetworkInterfacePermissionRequest& WithAwsAccountId(Aws::String&& value) { SetAwsAccountId(std::move(value)); return *this;} /** *

The Amazon Web Services account ID.

*/ inline CreateNetworkInterfacePermissionRequest& WithAwsAccountId(const char* value) { SetAwsAccountId(value); return *this;} /** *

The Amazon Web Service. Currently not supported.

*/ inline const Aws::String& GetAwsService() const{ return m_awsService; } /** *

The Amazon Web Service. Currently not supported.

*/ inline bool AwsServiceHasBeenSet() const { return m_awsServiceHasBeenSet; } /** *

The Amazon Web Service. Currently not supported.

*/ inline void SetAwsService(const Aws::String& value) { m_awsServiceHasBeenSet = true; m_awsService = value; } /** *

The Amazon Web Service. Currently not supported.

*/ inline void SetAwsService(Aws::String&& value) { m_awsServiceHasBeenSet = true; m_awsService = std::move(value); } /** *

The Amazon Web Service. Currently not supported.

*/ inline void SetAwsService(const char* value) { m_awsServiceHasBeenSet = true; m_awsService.assign(value); } /** *

The Amazon Web Service. Currently not supported.

*/ inline CreateNetworkInterfacePermissionRequest& WithAwsService(const Aws::String& value) { SetAwsService(value); return *this;} /** *

The Amazon Web Service. Currently not supported.

*/ inline CreateNetworkInterfacePermissionRequest& WithAwsService(Aws::String&& value) { SetAwsService(std::move(value)); return *this;} /** *

The Amazon Web Service. Currently not supported.

*/ inline CreateNetworkInterfacePermissionRequest& WithAwsService(const char* value) { SetAwsService(value); return *this;} /** *

The type of permission to grant.

*/ inline const InterfacePermissionType& GetPermission() const{ return m_permission; } /** *

The type of permission to grant.

*/ inline bool PermissionHasBeenSet() const { return m_permissionHasBeenSet; } /** *

The type of permission to grant.

*/ inline void SetPermission(const InterfacePermissionType& value) { m_permissionHasBeenSet = true; m_permission = value; } /** *

The type of permission to grant.

*/ inline void SetPermission(InterfacePermissionType&& value) { m_permissionHasBeenSet = true; m_permission = std::move(value); } /** *

The type of permission to grant.

*/ inline CreateNetworkInterfacePermissionRequest& WithPermission(const InterfacePermissionType& value) { SetPermission(value); return *this;} /** *

The type of permission to grant.

*/ inline CreateNetworkInterfacePermissionRequest& WithPermission(InterfacePermissionType&& value) { SetPermission(std::move(value)); return *this;} /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool GetDryRun() const{ return m_dryRun; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; } /** *

Checks whether you have the required permissions for the action, without * actually making the request, and provides an error response. If you have the * required permissions, the error response is DryRunOperation. * Otherwise, it is UnauthorizedOperation.

*/ inline CreateNetworkInterfacePermissionRequest& WithDryRun(bool value) { SetDryRun(value); return *this;} private: Aws::String m_networkInterfaceId; bool m_networkInterfaceIdHasBeenSet = false; Aws::String m_awsAccountId; bool m_awsAccountIdHasBeenSet = false; Aws::String m_awsService; bool m_awsServiceHasBeenSet = false; InterfacePermissionType m_permission; bool m_permissionHasBeenSet = false; bool m_dryRun; bool m_dryRunHasBeenSet = false; }; } // namespace Model } // namespace EC2 } // namespace Aws