1 /*
2  * Copyright 2009-2017 Alibaba Cloud All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #include <alibabacloud/oss/model/GetBucketPolicyResult.h>
19 using namespace AlibabaCloud::OSS;
20 
GetBucketPolicyResult()21 GetBucketPolicyResult::GetBucketPolicyResult() :
22     OssResult()
23 {
24 }
25 
GetBucketPolicyResult(const std::string & result)26 GetBucketPolicyResult::GetBucketPolicyResult(const std::string& result):
27     GetBucketPolicyResult()
28 {
29     *this = result;
30 }
31 
GetBucketPolicyResult(const std::shared_ptr<std::iostream> & result)32 GetBucketPolicyResult::GetBucketPolicyResult(const std::shared_ptr<std::iostream>& result):
33     GetBucketPolicyResult()
34 {
35     std::istreambuf_iterator<char> isb(*result.get()), end;
36     std::string str(isb, end);
37     *this = str;
38 }
39 
operator =(const std::string & result)40 GetBucketPolicyResult& GetBucketPolicyResult::operator =(const std::string& result)
41 {
42     policy_ = result;
43     parseDone_ = true;
44     return *this;
45 }
46