/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Http { class URI; } //namespace Http namespace S3 { namespace Model { /** */ class CreateSessionRequest : public S3Request { public: AWS_S3_API CreateSessionRequest(); // 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 "CreateSession"; } AWS_S3_API Aws::String SerializePayload() const override; AWS_S3_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; AWS_S3_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * Helper function to collect parameters (configurable and static hardcoded) required for endpoint computation. */ AWS_S3_API EndpointParameters GetEndpointContextParams() const override; /** *

Specifies the mode of the session that will be created, either * ReadWrite or ReadOnly. By default, a * ReadWrite session is created. A ReadWrite session is * capable of executing all the Zonal endpoint APIs on a directory bucket. A * ReadOnly session is constrained to execute the following Zonal * endpoint APIs: GetObject, HeadObject, * ListObjectsV2, GetObjectAttributes, * ListParts, and ListMultipartUploads.

*/ inline const SessionMode& GetSessionMode() const{ return m_sessionMode; } /** *

Specifies the mode of the session that will be created, either * ReadWrite or ReadOnly. By default, a * ReadWrite session is created. A ReadWrite session is * capable of executing all the Zonal endpoint APIs on a directory bucket. A * ReadOnly session is constrained to execute the following Zonal * endpoint APIs: GetObject, HeadObject, * ListObjectsV2, GetObjectAttributes, * ListParts, and ListMultipartUploads.

*/ inline bool SessionModeHasBeenSet() const { return m_sessionModeHasBeenSet; } /** *

Specifies the mode of the session that will be created, either * ReadWrite or ReadOnly. By default, a * ReadWrite session is created. A ReadWrite session is * capable of executing all the Zonal endpoint APIs on a directory bucket. A * ReadOnly session is constrained to execute the following Zonal * endpoint APIs: GetObject, HeadObject, * ListObjectsV2, GetObjectAttributes, * ListParts, and ListMultipartUploads.

*/ inline void SetSessionMode(const SessionMode& value) { m_sessionModeHasBeenSet = true; m_sessionMode = value; } /** *

Specifies the mode of the session that will be created, either * ReadWrite or ReadOnly. By default, a * ReadWrite session is created. A ReadWrite session is * capable of executing all the Zonal endpoint APIs on a directory bucket. A * ReadOnly session is constrained to execute the following Zonal * endpoint APIs: GetObject, HeadObject, * ListObjectsV2, GetObjectAttributes, * ListParts, and ListMultipartUploads.

*/ inline void SetSessionMode(SessionMode&& value) { m_sessionModeHasBeenSet = true; m_sessionMode = std::move(value); } /** *

Specifies the mode of the session that will be created, either * ReadWrite or ReadOnly. By default, a * ReadWrite session is created. A ReadWrite session is * capable of executing all the Zonal endpoint APIs on a directory bucket. A * ReadOnly session is constrained to execute the following Zonal * endpoint APIs: GetObject, HeadObject, * ListObjectsV2, GetObjectAttributes, * ListParts, and ListMultipartUploads.

*/ inline CreateSessionRequest& WithSessionMode(const SessionMode& value) { SetSessionMode(value); return *this;} /** *

Specifies the mode of the session that will be created, either * ReadWrite or ReadOnly. By default, a * ReadWrite session is created. A ReadWrite session is * capable of executing all the Zonal endpoint APIs on a directory bucket. A * ReadOnly session is constrained to execute the following Zonal * endpoint APIs: GetObject, HeadObject, * ListObjectsV2, GetObjectAttributes, * ListParts, and ListMultipartUploads.

*/ inline CreateSessionRequest& WithSessionMode(SessionMode&& value) { SetSessionMode(std::move(value)); return *this;} /** *

The name of the bucket that you create a session for.

*/ inline const Aws::String& GetBucket() const{ return m_bucket; } /** *

The name of the bucket that you create a session for.

*/ inline bool BucketHasBeenSet() const { return m_bucketHasBeenSet; } /** *

The name of the bucket that you create a session for.

*/ inline void SetBucket(const Aws::String& value) { m_bucketHasBeenSet = true; m_bucket = value; } /** *

The name of the bucket that you create a session for.

*/ inline void SetBucket(Aws::String&& value) { m_bucketHasBeenSet = true; m_bucket = std::move(value); } /** *

The name of the bucket that you create a session for.

*/ inline void SetBucket(const char* value) { m_bucketHasBeenSet = true; m_bucket.assign(value); } /** *

The name of the bucket that you create a session for.

*/ inline CreateSessionRequest& WithBucket(const Aws::String& value) { SetBucket(value); return *this;} /** *

The name of the bucket that you create a session for.

*/ inline CreateSessionRequest& WithBucket(Aws::String&& value) { SetBucket(std::move(value)); return *this;} /** *

The name of the bucket that you create a session for.

*/ inline CreateSessionRequest& WithBucket(const char* value) { SetBucket(value); return *this;} inline const Aws::Map& GetCustomizedAccessLogTag() const{ return m_customizedAccessLogTag; } inline bool CustomizedAccessLogTagHasBeenSet() const { return m_customizedAccessLogTagHasBeenSet; } inline void SetCustomizedAccessLogTag(const Aws::Map& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = value; } inline void SetCustomizedAccessLogTag(Aws::Map&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag = std::move(value); } inline CreateSessionRequest& WithCustomizedAccessLogTag(const Aws::Map& value) { SetCustomizedAccessLogTag(value); return *this;} inline CreateSessionRequest& WithCustomizedAccessLogTag(Aws::Map&& value) { SetCustomizedAccessLogTag(std::move(value)); return *this;} inline CreateSessionRequest& AddCustomizedAccessLogTag(const Aws::String& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } inline CreateSessionRequest& AddCustomizedAccessLogTag(Aws::String&& key, const Aws::String& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } inline CreateSessionRequest& AddCustomizedAccessLogTag(const Aws::String& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } inline CreateSessionRequest& AddCustomizedAccessLogTag(Aws::String&& key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), std::move(value)); return *this; } inline CreateSessionRequest& AddCustomizedAccessLogTag(const char* key, Aws::String&& value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, std::move(value)); return *this; } inline CreateSessionRequest& AddCustomizedAccessLogTag(Aws::String&& key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(std::move(key), value); return *this; } inline CreateSessionRequest& AddCustomizedAccessLogTag(const char* key, const char* value) { m_customizedAccessLogTagHasBeenSet = true; m_customizedAccessLogTag.emplace(key, value); return *this; } private: SessionMode m_sessionMode; bool m_sessionModeHasBeenSet = false; Aws::String m_bucket; bool m_bucketHasBeenSet = false; Aws::Map m_customizedAccessLogTag; bool m_customizedAccessLogTagHasBeenSet = false; }; } // namespace Model } // namespace S3 } // namespace Aws