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,177 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/ecs/ECS_EXPORTS.h>
#include <aws/ecs/ECSRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace ECS
{
namespace Model
{
/**
*/
class AWS_ECS_API DeleteServiceRequest : public ECSRequest
{
public:
DeleteServiceRequest();
// 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 "DeleteService"; }
Aws::String SerializePayload() const override;
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
/**
* <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts
* the service to delete. If you do not specify a cluster, the default cluster is
* assumed.</p>
*/
inline const Aws::String& GetCluster() const{ return m_cluster; }
/**
* <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts
* the service to delete. If you do not specify a cluster, the default cluster is
* assumed.</p>
*/
inline bool ClusterHasBeenSet() const { return m_clusterHasBeenSet; }
/**
* <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts
* the service to delete. If you do not specify a cluster, the default cluster is
* assumed.</p>
*/
inline void SetCluster(const Aws::String& value) { m_clusterHasBeenSet = true; m_cluster = value; }
/**
* <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts
* the service to delete. If you do not specify a cluster, the default cluster is
* assumed.</p>
*/
inline void SetCluster(Aws::String&& value) { m_clusterHasBeenSet = true; m_cluster = std::move(value); }
/**
* <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts
* the service to delete. If you do not specify a cluster, the default cluster is
* assumed.</p>
*/
inline void SetCluster(const char* value) { m_clusterHasBeenSet = true; m_cluster.assign(value); }
/**
* <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts
* the service to delete. If you do not specify a cluster, the default cluster is
* assumed.</p>
*/
inline DeleteServiceRequest& WithCluster(const Aws::String& value) { SetCluster(value); return *this;}
/**
* <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts
* the service to delete. If you do not specify a cluster, the default cluster is
* assumed.</p>
*/
inline DeleteServiceRequest& WithCluster(Aws::String&& value) { SetCluster(std::move(value)); return *this;}
/**
* <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts
* the service to delete. If you do not specify a cluster, the default cluster is
* assumed.</p>
*/
inline DeleteServiceRequest& WithCluster(const char* value) { SetCluster(value); return *this;}
/**
* <p>The name of the service to delete.</p>
*/
inline const Aws::String& GetService() const{ return m_service; }
/**
* <p>The name of the service to delete.</p>
*/
inline bool ServiceHasBeenSet() const { return m_serviceHasBeenSet; }
/**
* <p>The name of the service to delete.</p>
*/
inline void SetService(const Aws::String& value) { m_serviceHasBeenSet = true; m_service = value; }
/**
* <p>The name of the service to delete.</p>
*/
inline void SetService(Aws::String&& value) { m_serviceHasBeenSet = true; m_service = std::move(value); }
/**
* <p>The name of the service to delete.</p>
*/
inline void SetService(const char* value) { m_serviceHasBeenSet = true; m_service.assign(value); }
/**
* <p>The name of the service to delete.</p>
*/
inline DeleteServiceRequest& WithService(const Aws::String& value) { SetService(value); return *this;}
/**
* <p>The name of the service to delete.</p>
*/
inline DeleteServiceRequest& WithService(Aws::String&& value) { SetService(std::move(value)); return *this;}
/**
* <p>The name of the service to delete.</p>
*/
inline DeleteServiceRequest& WithService(const char* value) { SetService(value); return *this;}
/**
* <p>If <code>true</code>, allows you to delete a service even if it has not been
* scaled down to zero tasks. It is only necessary to use this if the service is
* using the <code>REPLICA</code> scheduling strategy.</p>
*/
inline bool GetForce() const{ return m_force; }
/**
* <p>If <code>true</code>, allows you to delete a service even if it has not been
* scaled down to zero tasks. It is only necessary to use this if the service is
* using the <code>REPLICA</code> scheduling strategy.</p>
*/
inline bool ForceHasBeenSet() const { return m_forceHasBeenSet; }
/**
* <p>If <code>true</code>, allows you to delete a service even if it has not been
* scaled down to zero tasks. It is only necessary to use this if the service is
* using the <code>REPLICA</code> scheduling strategy.</p>
*/
inline void SetForce(bool value) { m_forceHasBeenSet = true; m_force = value; }
/**
* <p>If <code>true</code>, allows you to delete a service even if it has not been
* scaled down to zero tasks. It is only necessary to use this if the service is
* using the <code>REPLICA</code> scheduling strategy.</p>
*/
inline DeleteServiceRequest& WithForce(bool value) { SetForce(value); return *this;}
private:
Aws::String m_cluster;
bool m_clusterHasBeenSet;
Aws::String m_service;
bool m_serviceHasBeenSet;
bool m_force;
bool m_forceHasBeenSet;
};
} // namespace Model
} // namespace ECS
} // namespace Aws