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,680 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/medialive/MediaLive_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/medialive/model/ChannelClass.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/medialive/model/EncoderSettings.h>
#include <aws/medialive/model/InputSpecification.h>
#include <aws/medialive/model/LogLevel.h>
#include <aws/medialive/model/ChannelState.h>
#include <aws/core/utils/memory/stl/AWSMap.h>
#include <aws/medialive/model/OutputDestination.h>
#include <aws/medialive/model/ChannelEgressEndpoint.h>
#include <aws/medialive/model/InputAttachment.h>
#include <aws/medialive/model/PipelineDetail.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace MediaLive
{
namespace Model
{
/**
* Placeholder documentation for Channel<p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/Channel">AWS
* API Reference</a></p>
*/
class AWS_MEDIALIVE_API Channel
{
public:
Channel();
Channel(Aws::Utils::Json::JsonView jsonValue);
Channel& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* The unique arn of the channel.
*/
inline const Aws::String& GetArn() const{ return m_arn; }
/**
* The unique arn of the channel.
*/
inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
/**
* The unique arn of the channel.
*/
inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; }
/**
* The unique arn of the channel.
*/
inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); }
/**
* The unique arn of the channel.
*/
inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); }
/**
* The unique arn of the channel.
*/
inline Channel& WithArn(const Aws::String& value) { SetArn(value); return *this;}
/**
* The unique arn of the channel.
*/
inline Channel& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;}
/**
* The unique arn of the channel.
*/
inline Channel& WithArn(const char* value) { SetArn(value); return *this;}
/**
* The class for this channel. STANDARD for a channel with two pipelines or
* SINGLE_PIPELINE for a channel with one pipeline.
*/
inline const ChannelClass& GetChannelClass() const{ return m_channelClass; }
/**
* The class for this channel. STANDARD for a channel with two pipelines or
* SINGLE_PIPELINE for a channel with one pipeline.
*/
inline bool ChannelClassHasBeenSet() const { return m_channelClassHasBeenSet; }
/**
* The class for this channel. STANDARD for a channel with two pipelines or
* SINGLE_PIPELINE for a channel with one pipeline.
*/
inline void SetChannelClass(const ChannelClass& value) { m_channelClassHasBeenSet = true; m_channelClass = value; }
/**
* The class for this channel. STANDARD for a channel with two pipelines or
* SINGLE_PIPELINE for a channel with one pipeline.
*/
inline void SetChannelClass(ChannelClass&& value) { m_channelClassHasBeenSet = true; m_channelClass = std::move(value); }
/**
* The class for this channel. STANDARD for a channel with two pipelines or
* SINGLE_PIPELINE for a channel with one pipeline.
*/
inline Channel& WithChannelClass(const ChannelClass& value) { SetChannelClass(value); return *this;}
/**
* The class for this channel. STANDARD for a channel with two pipelines or
* SINGLE_PIPELINE for a channel with one pipeline.
*/
inline Channel& WithChannelClass(ChannelClass&& value) { SetChannelClass(std::move(value)); return *this;}
/**
* A list of destinations of the channel. For UDP outputs, there is one
destination
* per output. For other types (HLS, for example), there is
one destination per
* packager.
*/
inline const Aws::Vector<OutputDestination>& GetDestinations() const{ return m_destinations; }
/**
* A list of destinations of the channel. For UDP outputs, there is one
destination
* per output. For other types (HLS, for example), there is
one destination per
* packager.
*/
inline bool DestinationsHasBeenSet() const { return m_destinationsHasBeenSet; }
/**
* A list of destinations of the channel. For UDP outputs, there is one
destination
* per output. For other types (HLS, for example), there is
one destination per
* packager.
*/
inline void SetDestinations(const Aws::Vector<OutputDestination>& value) { m_destinationsHasBeenSet = true; m_destinations = value; }
/**
* A list of destinations of the channel. For UDP outputs, there is one
destination
* per output. For other types (HLS, for example), there is
one destination per
* packager.
*/
inline void SetDestinations(Aws::Vector<OutputDestination>&& value) { m_destinationsHasBeenSet = true; m_destinations = std::move(value); }
/**
* A list of destinations of the channel. For UDP outputs, there is one
destination
* per output. For other types (HLS, for example), there is
one destination per
* packager.
*/
inline Channel& WithDestinations(const Aws::Vector<OutputDestination>& value) { SetDestinations(value); return *this;}
/**
* A list of destinations of the channel. For UDP outputs, there is one
destination
* per output. For other types (HLS, for example), there is
one destination per
* packager.
*/
inline Channel& WithDestinations(Aws::Vector<OutputDestination>&& value) { SetDestinations(std::move(value)); return *this;}
/**
* A list of destinations of the channel. For UDP outputs, there is one
destination
* per output. For other types (HLS, for example), there is
one destination per
* packager.
*/
inline Channel& AddDestinations(const OutputDestination& value) { m_destinationsHasBeenSet = true; m_destinations.push_back(value); return *this; }
/**
* A list of destinations of the channel. For UDP outputs, there is one
destination
* per output. For other types (HLS, for example), there is
one destination per
* packager.
*/
inline Channel& AddDestinations(OutputDestination&& value) { m_destinationsHasBeenSet = true; m_destinations.push_back(std::move(value)); return *this; }
/**
* The endpoints where outgoing connections initiate from
*/
inline const Aws::Vector<ChannelEgressEndpoint>& GetEgressEndpoints() const{ return m_egressEndpoints; }
/**
* The endpoints where outgoing connections initiate from
*/
inline bool EgressEndpointsHasBeenSet() const { return m_egressEndpointsHasBeenSet; }
/**
* The endpoints where outgoing connections initiate from
*/
inline void SetEgressEndpoints(const Aws::Vector<ChannelEgressEndpoint>& value) { m_egressEndpointsHasBeenSet = true; m_egressEndpoints = value; }
/**
* The endpoints where outgoing connections initiate from
*/
inline void SetEgressEndpoints(Aws::Vector<ChannelEgressEndpoint>&& value) { m_egressEndpointsHasBeenSet = true; m_egressEndpoints = std::move(value); }
/**
* The endpoints where outgoing connections initiate from
*/
inline Channel& WithEgressEndpoints(const Aws::Vector<ChannelEgressEndpoint>& value) { SetEgressEndpoints(value); return *this;}
/**
* The endpoints where outgoing connections initiate from
*/
inline Channel& WithEgressEndpoints(Aws::Vector<ChannelEgressEndpoint>&& value) { SetEgressEndpoints(std::move(value)); return *this;}
/**
* The endpoints where outgoing connections initiate from
*/
inline Channel& AddEgressEndpoints(const ChannelEgressEndpoint& value) { m_egressEndpointsHasBeenSet = true; m_egressEndpoints.push_back(value); return *this; }
/**
* The endpoints where outgoing connections initiate from
*/
inline Channel& AddEgressEndpoints(ChannelEgressEndpoint&& value) { m_egressEndpointsHasBeenSet = true; m_egressEndpoints.push_back(std::move(value)); return *this; }
inline const EncoderSettings& GetEncoderSettings() const{ return m_encoderSettings; }
inline bool EncoderSettingsHasBeenSet() const { return m_encoderSettingsHasBeenSet; }
inline void SetEncoderSettings(const EncoderSettings& value) { m_encoderSettingsHasBeenSet = true; m_encoderSettings = value; }
inline void SetEncoderSettings(EncoderSettings&& value) { m_encoderSettingsHasBeenSet = true; m_encoderSettings = std::move(value); }
inline Channel& WithEncoderSettings(const EncoderSettings& value) { SetEncoderSettings(value); return *this;}
inline Channel& WithEncoderSettings(EncoderSettings&& value) { SetEncoderSettings(std::move(value)); return *this;}
/**
* The unique id of the channel.
*/
inline const Aws::String& GetId() const{ return m_id; }
/**
* The unique id of the channel.
*/
inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
/**
* The unique id of the channel.
*/
inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
/**
* The unique id of the channel.
*/
inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
/**
* The unique id of the channel.
*/
inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
/**
* The unique id of the channel.
*/
inline Channel& WithId(const Aws::String& value) { SetId(value); return *this;}
/**
* The unique id of the channel.
*/
inline Channel& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
/**
* The unique id of the channel.
*/
inline Channel& WithId(const char* value) { SetId(value); return *this;}
/**
* List of input attachments for channel.
*/
inline const Aws::Vector<InputAttachment>& GetInputAttachments() const{ return m_inputAttachments; }
/**
* List of input attachments for channel.
*/
inline bool InputAttachmentsHasBeenSet() const { return m_inputAttachmentsHasBeenSet; }
/**
* List of input attachments for channel.
*/
inline void SetInputAttachments(const Aws::Vector<InputAttachment>& value) { m_inputAttachmentsHasBeenSet = true; m_inputAttachments = value; }
/**
* List of input attachments for channel.
*/
inline void SetInputAttachments(Aws::Vector<InputAttachment>&& value) { m_inputAttachmentsHasBeenSet = true; m_inputAttachments = std::move(value); }
/**
* List of input attachments for channel.
*/
inline Channel& WithInputAttachments(const Aws::Vector<InputAttachment>& value) { SetInputAttachments(value); return *this;}
/**
* List of input attachments for channel.
*/
inline Channel& WithInputAttachments(Aws::Vector<InputAttachment>&& value) { SetInputAttachments(std::move(value)); return *this;}
/**
* List of input attachments for channel.
*/
inline Channel& AddInputAttachments(const InputAttachment& value) { m_inputAttachmentsHasBeenSet = true; m_inputAttachments.push_back(value); return *this; }
/**
* List of input attachments for channel.
*/
inline Channel& AddInputAttachments(InputAttachment&& value) { m_inputAttachmentsHasBeenSet = true; m_inputAttachments.push_back(std::move(value)); return *this; }
inline const InputSpecification& GetInputSpecification() const{ return m_inputSpecification; }
inline bool InputSpecificationHasBeenSet() const { return m_inputSpecificationHasBeenSet; }
inline void SetInputSpecification(const InputSpecification& value) { m_inputSpecificationHasBeenSet = true; m_inputSpecification = value; }
inline void SetInputSpecification(InputSpecification&& value) { m_inputSpecificationHasBeenSet = true; m_inputSpecification = std::move(value); }
inline Channel& WithInputSpecification(const InputSpecification& value) { SetInputSpecification(value); return *this;}
inline Channel& WithInputSpecification(InputSpecification&& value) { SetInputSpecification(std::move(value)); return *this;}
/**
* The log level being written to CloudWatch Logs.
*/
inline const LogLevel& GetLogLevel() const{ return m_logLevel; }
/**
* The log level being written to CloudWatch Logs.
*/
inline bool LogLevelHasBeenSet() const { return m_logLevelHasBeenSet; }
/**
* The log level being written to CloudWatch Logs.
*/
inline void SetLogLevel(const LogLevel& value) { m_logLevelHasBeenSet = true; m_logLevel = value; }
/**
* The log level being written to CloudWatch Logs.
*/
inline void SetLogLevel(LogLevel&& value) { m_logLevelHasBeenSet = true; m_logLevel = std::move(value); }
/**
* The log level being written to CloudWatch Logs.
*/
inline Channel& WithLogLevel(const LogLevel& value) { SetLogLevel(value); return *this;}
/**
* The log level being written to CloudWatch Logs.
*/
inline Channel& WithLogLevel(LogLevel&& value) { SetLogLevel(std::move(value)); return *this;}
/**
* The name of the channel. (user-mutable)
*/
inline const Aws::String& GetName() const{ return m_name; }
/**
* The name of the channel. (user-mutable)
*/
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
/**
* The name of the channel. (user-mutable)
*/
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
/**
* The name of the channel. (user-mutable)
*/
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
/**
* The name of the channel. (user-mutable)
*/
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
/**
* The name of the channel. (user-mutable)
*/
inline Channel& WithName(const Aws::String& value) { SetName(value); return *this;}
/**
* The name of the channel. (user-mutable)
*/
inline Channel& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
/**
* The name of the channel. (user-mutable)
*/
inline Channel& WithName(const char* value) { SetName(value); return *this;}
/**
* Runtime details for the pipelines of a running channel.
*/
inline const Aws::Vector<PipelineDetail>& GetPipelineDetails() const{ return m_pipelineDetails; }
/**
* Runtime details for the pipelines of a running channel.
*/
inline bool PipelineDetailsHasBeenSet() const { return m_pipelineDetailsHasBeenSet; }
/**
* Runtime details for the pipelines of a running channel.
*/
inline void SetPipelineDetails(const Aws::Vector<PipelineDetail>& value) { m_pipelineDetailsHasBeenSet = true; m_pipelineDetails = value; }
/**
* Runtime details for the pipelines of a running channel.
*/
inline void SetPipelineDetails(Aws::Vector<PipelineDetail>&& value) { m_pipelineDetailsHasBeenSet = true; m_pipelineDetails = std::move(value); }
/**
* Runtime details for the pipelines of a running channel.
*/
inline Channel& WithPipelineDetails(const Aws::Vector<PipelineDetail>& value) { SetPipelineDetails(value); return *this;}
/**
* Runtime details for the pipelines of a running channel.
*/
inline Channel& WithPipelineDetails(Aws::Vector<PipelineDetail>&& value) { SetPipelineDetails(std::move(value)); return *this;}
/**
* Runtime details for the pipelines of a running channel.
*/
inline Channel& AddPipelineDetails(const PipelineDetail& value) { m_pipelineDetailsHasBeenSet = true; m_pipelineDetails.push_back(value); return *this; }
/**
* Runtime details for the pipelines of a running channel.
*/
inline Channel& AddPipelineDetails(PipelineDetail&& value) { m_pipelineDetailsHasBeenSet = true; m_pipelineDetails.push_back(std::move(value)); return *this; }
/**
* The number of currently healthy pipelines.
*/
inline int GetPipelinesRunningCount() const{ return m_pipelinesRunningCount; }
/**
* The number of currently healthy pipelines.
*/
inline bool PipelinesRunningCountHasBeenSet() const { return m_pipelinesRunningCountHasBeenSet; }
/**
* The number of currently healthy pipelines.
*/
inline void SetPipelinesRunningCount(int value) { m_pipelinesRunningCountHasBeenSet = true; m_pipelinesRunningCount = value; }
/**
* The number of currently healthy pipelines.
*/
inline Channel& WithPipelinesRunningCount(int value) { SetPipelinesRunningCount(value); return *this;}
/**
* The Amazon Resource Name (ARN) of the role assumed when running the Channel.
*/
inline const Aws::String& GetRoleArn() const{ return m_roleArn; }
/**
* The Amazon Resource Name (ARN) of the role assumed when running the Channel.
*/
inline bool RoleArnHasBeenSet() const { return m_roleArnHasBeenSet; }
/**
* The Amazon Resource Name (ARN) of the role assumed when running the Channel.
*/
inline void SetRoleArn(const Aws::String& value) { m_roleArnHasBeenSet = true; m_roleArn = value; }
/**
* The Amazon Resource Name (ARN) of the role assumed when running the Channel.
*/
inline void SetRoleArn(Aws::String&& value) { m_roleArnHasBeenSet = true; m_roleArn = std::move(value); }
/**
* The Amazon Resource Name (ARN) of the role assumed when running the Channel.
*/
inline void SetRoleArn(const char* value) { m_roleArnHasBeenSet = true; m_roleArn.assign(value); }
/**
* The Amazon Resource Name (ARN) of the role assumed when running the Channel.
*/
inline Channel& WithRoleArn(const Aws::String& value) { SetRoleArn(value); return *this;}
/**
* The Amazon Resource Name (ARN) of the role assumed when running the Channel.
*/
inline Channel& WithRoleArn(Aws::String&& value) { SetRoleArn(std::move(value)); return *this;}
/**
* The Amazon Resource Name (ARN) of the role assumed when running the Channel.
*/
inline Channel& WithRoleArn(const char* value) { SetRoleArn(value); return *this;}
inline const ChannelState& GetState() const{ return m_state; }
inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
inline void SetState(const ChannelState& value) { m_stateHasBeenSet = true; m_state = value; }
inline void SetState(ChannelState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); }
inline Channel& WithState(const ChannelState& value) { SetState(value); return *this;}
inline Channel& WithState(ChannelState&& value) { SetState(std::move(value)); return *this;}
/**
* A collection of key-value pairs.
*/
inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
/**
* A collection of key-value pairs.
*/
inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
/**
* A collection of key-value pairs.
*/
inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
/**
* A collection of key-value pairs.
*/
inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
/**
* A collection of key-value pairs.
*/
inline Channel& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
/**
* A collection of key-value pairs.
*/
inline Channel& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
/**
* A collection of key-value pairs.
*/
inline Channel& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
/**
* A collection of key-value pairs.
*/
inline Channel& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
/**
* A collection of key-value pairs.
*/
inline Channel& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
/**
* A collection of key-value pairs.
*/
inline Channel& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
/**
* A collection of key-value pairs.
*/
inline Channel& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
/**
* A collection of key-value pairs.
*/
inline Channel& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
/**
* A collection of key-value pairs.
*/
inline Channel& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
private:
Aws::String m_arn;
bool m_arnHasBeenSet;
ChannelClass m_channelClass;
bool m_channelClassHasBeenSet;
Aws::Vector<OutputDestination> m_destinations;
bool m_destinationsHasBeenSet;
Aws::Vector<ChannelEgressEndpoint> m_egressEndpoints;
bool m_egressEndpointsHasBeenSet;
EncoderSettings m_encoderSettings;
bool m_encoderSettingsHasBeenSet;
Aws::String m_id;
bool m_idHasBeenSet;
Aws::Vector<InputAttachment> m_inputAttachments;
bool m_inputAttachmentsHasBeenSet;
InputSpecification m_inputSpecification;
bool m_inputSpecificationHasBeenSet;
LogLevel m_logLevel;
bool m_logLevelHasBeenSet;
Aws::String m_name;
bool m_nameHasBeenSet;
Aws::Vector<PipelineDetail> m_pipelineDetails;
bool m_pipelineDetailsHasBeenSet;
int m_pipelinesRunningCount;
bool m_pipelinesRunningCountHasBeenSet;
Aws::String m_roleArn;
bool m_roleArnHasBeenSet;
ChannelState m_state;
bool m_stateHasBeenSet;
Aws::Map<Aws::String, Aws::String> m_tags;
bool m_tagsHasBeenSet;
};
} // namespace Model
} // namespace MediaLive
} // namespace Aws