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 #pragma once 18 #include <string> 19 #include <alibabacloud/oss/Export.h> 20 21 namespace AlibabaCloud 22 { 23 namespace OSS 24 { 25 class ALIBABACLOUD_OSS_EXPORT Owner 26 { 27 public: 28 Owner() = default; Owner(const std::string & id,const std::string & name)29 Owner(const std::string& id, const std::string& name) : 30 id_(id), 31 displayName_(name) 32 {} Owner(const Owner & rhs)33 Owner(const Owner& rhs) : 34 id_(rhs.id_), 35 displayName_(rhs.displayName_) 36 {} Owner(Owner && lhs)37 Owner(Owner&& lhs) : 38 id_(std::move(lhs.id_)), 39 displayName_(std::move(lhs.displayName_)) 40 {} 41 Owner& operator=(const Owner& rhs) 42 { 43 id_ = rhs.id_; 44 displayName_ = rhs.displayName_; 45 return *this; 46 } 47 Owner& operator=(Owner&& lhs) 48 { 49 id_ = std::move(lhs.id_); 50 displayName_ = std::move(lhs.displayName_); 51 return *this; 52 } Id()53 const std::string& Id() const { return id_; } DisplayName()54 const std::string& DisplayName() const { return displayName_; }; 55 private: 56 std::string id_; 57 std::string displayName_; 58 }; 59 } 60 } 61