/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { template class AmazonWebServiceResult; namespace S3Crt { namespace Model { class GetBucketPolicyResult { public: AWS_S3CRT_API GetBucketPolicyResult(); //We have to define these because Microsoft doesn't auto generate them AWS_S3CRT_API GetBucketPolicyResult(GetBucketPolicyResult&&); AWS_S3CRT_API GetBucketPolicyResult& operator=(GetBucketPolicyResult&&); //we delete these because Microsoft doesn't handle move generation correctly //and we therefore don't trust them to get it right here either. GetBucketPolicyResult(const GetBucketPolicyResult&) = delete; GetBucketPolicyResult& operator=(const GetBucketPolicyResult&) = delete; AWS_S3CRT_API GetBucketPolicyResult(Aws::AmazonWebServiceResult&& result); AWS_S3CRT_API GetBucketPolicyResult& operator=(Aws::AmazonWebServiceResult&& result); /** *

The bucket policy as a JSON document.

*/ inline Aws::IOStream& GetPolicy() const { return m_policy.GetUnderlyingStream(); } /** *

The bucket policy as a JSON document.

*/ inline void ReplaceBody(Aws::IOStream* body) { m_policy = Aws::Utils::Stream::ResponseStream(body); } inline const Aws::String& GetRequestId() const{ return m_requestId; } inline void SetRequestId(const Aws::String& value) { m_requestId = value; } inline void SetRequestId(Aws::String&& value) { m_requestId = std::move(value); } inline void SetRequestId(const char* value) { m_requestId.assign(value); } inline GetBucketPolicyResult& WithRequestId(const Aws::String& value) { SetRequestId(value); return *this;} inline GetBucketPolicyResult& WithRequestId(Aws::String&& value) { SetRequestId(std::move(value)); return *this;} inline GetBucketPolicyResult& WithRequestId(const char* value) { SetRequestId(value); return *this;} private: Aws::Utils::Stream::ResponseStream m_policy; Aws::String m_requestId; }; } // namespace Model } // namespace S3Crt } // namespace Aws