feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,147 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/lightsail/Lightsail_EXPORTS.h>
#include <aws/lightsail/LightsailRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/lightsail/model/Tag.h>
#include <utility>
namespace Aws
{
namespace Lightsail
{
namespace Model
{
/**
*/
class AWS_LIGHTSAIL_API CreateKeyPairRequest : public LightsailRequest
{
public:
CreateKeyPairRequest();
// 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 "CreateKeyPair"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The name for your new key pair.</p>
*/
inline const Aws::String& GetKeyPairName() const{ return m_keyPairName; }
/**
* <p>The name for your new key pair.</p>
*/
inline bool KeyPairNameHasBeenSet() const { return m_keyPairNameHasBeenSet; }
/**
* <p>The name for your new key pair.</p>
*/
inline void SetKeyPairName(const Aws::String& value) { m_keyPairNameHasBeenSet = true; m_keyPairName = value; }
/**
* <p>The name for your new key pair.</p>
*/
inline void SetKeyPairName(Aws::String&& value) { m_keyPairNameHasBeenSet = true; m_keyPairName = std::move(value); }
/**
* <p>The name for your new key pair.</p>
*/
inline void SetKeyPairName(const char* value) { m_keyPairNameHasBeenSet = true; m_keyPairName.assign(value); }
/**
* <p>The name for your new key pair.</p>
*/
inline CreateKeyPairRequest& WithKeyPairName(const Aws::String& value) { SetKeyPairName(value); return *this;}
/**
* <p>The name for your new key pair.</p>
*/
inline CreateKeyPairRequest& WithKeyPairName(Aws::String&& value) { SetKeyPairName(std::move(value)); return *this;}
/**
* <p>The name for your new key pair.</p>
*/
inline CreateKeyPairRequest& WithKeyPairName(const char* value) { SetKeyPairName(value); return *this;}
/**
* <p>The tag keys and optional values to add to the resource during create.</p>
* <p>Use the <code>TagResource</code> action to tag a resource after it's
* created.</p>
*/
inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
/**
* <p>The tag keys and optional values to add to the resource during create.</p>
* <p>Use the <code>TagResource</code> action to tag a resource after it's
* created.</p>
*/
inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
/**
* <p>The tag keys and optional values to add to the resource during create.</p>
* <p>Use the <code>TagResource</code> action to tag a resource after it's
* created.</p>
*/
inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
/**
* <p>The tag keys and optional values to add to the resource during create.</p>
* <p>Use the <code>TagResource</code> action to tag a resource after it's
* created.</p>
*/
inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
/**
* <p>The tag keys and optional values to add to the resource during create.</p>
* <p>Use the <code>TagResource</code> action to tag a resource after it's
* created.</p>
*/
inline CreateKeyPairRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
/**
* <p>The tag keys and optional values to add to the resource during create.</p>
* <p>Use the <code>TagResource</code> action to tag a resource after it's
* created.</p>
*/
inline CreateKeyPairRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
/**
* <p>The tag keys and optional values to add to the resource during create.</p>
* <p>Use the <code>TagResource</code> action to tag a resource after it's
* created.</p>
*/
inline CreateKeyPairRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
/**
* <p>The tag keys and optional values to add to the resource during create.</p>
* <p>Use the <code>TagResource</code> action to tag a resource after it's
* created.</p>
*/
inline CreateKeyPairRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
private:
Aws::String m_keyPairName;
bool m_keyPairNameHasBeenSet;
Aws::Vector<Tag> m_tags;
bool m_tagsHasBeenSet;
};
} // namespace Model
} // namespace Lightsail
} // namespace Aws