/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ /* This file is generated. */ #include #include #include namespace Aws { namespace Greengrass { GreengrassCoreIpcClient::GreengrassCoreIpcClient( Aws::Crt::Io::ClientBootstrap &clientBootstrap, Aws::Crt::Allocator *allocator) noexcept : m_connection(allocator), m_clientBootstrap(clientBootstrap), m_allocator(allocator), m_asyncLaunchMode(std::launch::deferred) { m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#InvalidArgumentsError"), InvalidArgumentsError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#ServiceError"), ServiceError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#UnauthorizedError"), UnauthorizedError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#InvalidTokenError"), InvalidTokenError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#ConflictError"), ConflictError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#ResourceNotFoundError"), ResourceNotFoundError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#FailedUpdateConditionCheckError"), FailedUpdateConditionCheckError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#ComponentNotFoundError"), ComponentNotFoundError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#InvalidCredentialError"), InvalidCredentialError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#InvalidArtifactsDirectoryPathError"), InvalidArtifactsDirectoryPathError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#InvalidRecipeDirectoryPathError"), InvalidRecipeDirectoryPathError::s_allocateFromPayload); m_greengrassCoreIpcServiceModel.AssignModelNameToErrorResponse( Aws::Crt::String("aws.greengrass#InvalidClientDeviceAuthTokenError"), InvalidClientDeviceAuthTokenError::s_allocateFromPayload); } std::future GreengrassCoreIpcClient::Connect( ConnectionLifecycleHandler &lifecycleHandler, const ConnectionConfig &connectionConfig) noexcept { return m_connection.Connect(connectionConfig, &lifecycleHandler, m_clientBootstrap); } void GreengrassCoreIpcClient::Close() noexcept { m_connection.Close(); } void GreengrassCoreIpcClient::WithLaunchMode(std::launch mode) noexcept { m_asyncLaunchMode = mode; } GreengrassCoreIpcClient::~GreengrassCoreIpcClient() noexcept { Close(); } std::shared_ptr GreengrassCoreIpcClient::NewSubscribeToIoTCore( std::shared_ptr streamHandler) noexcept { return Aws::Crt::MakeShared( m_allocator, m_connection, std::move(streamHandler), m_greengrassCoreIpcServiceModel.m_subscribeToIoTCoreOperationContext, m_allocator); } std::shared_ptr GreengrassCoreIpcClient::NewResumeComponent() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_resumeComponentOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewPublishToIoTCore() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_publishToIoTCoreOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient:: NewSubscribeToConfigurationUpdate( std::shared_ptr streamHandler) noexcept { return Aws::Crt::MakeShared( m_allocator, m_connection, std::move(streamHandler), m_greengrassCoreIpcServiceModel.m_subscribeToConfigurationUpdateOperationContext, m_allocator); } std::shared_ptr GreengrassCoreIpcClient::NewDeleteThingShadow() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_deleteThingShadowOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewPutComponentMetric() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_putComponentMetricOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewDeferComponentUpdate() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_deferComponentUpdateOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient:: NewSubscribeToValidateConfigurationUpdates( std::shared_ptr streamHandler) noexcept { return Aws::Crt::MakeShared( m_allocator, m_connection, std::move(streamHandler), m_greengrassCoreIpcServiceModel.m_subscribeToValidateConfigurationUpdatesOperationContext, m_allocator); } std::shared_ptr GreengrassCoreIpcClient::NewGetConfiguration() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_getConfigurationOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewSubscribeToTopic( std::shared_ptr streamHandler) noexcept { return Aws::Crt::MakeShared( m_allocator, m_connection, std::move(streamHandler), m_greengrassCoreIpcServiceModel.m_subscribeToTopicOperationContext, m_allocator); } std::shared_ptr GreengrassCoreIpcClient::NewGetComponentDetails() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_getComponentDetailsOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient:: NewGetClientDeviceAuthToken() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_getClientDeviceAuthTokenOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewPublishToTopic() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_publishToTopicOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient:: NewSubscribeToCertificateUpdates( std::shared_ptr streamHandler) noexcept { return Aws::Crt::MakeShared( m_allocator, m_connection, std::move(streamHandler), m_greengrassCoreIpcServiceModel.m_subscribeToCertificateUpdatesOperationContext, m_allocator); } std::shared_ptr GreengrassCoreIpcClient:: NewVerifyClientDeviceIdentity() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_verifyClientDeviceIdentityOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient:: NewAuthorizeClientDeviceAction() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_authorizeClientDeviceActionOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewListComponents() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_listComponentsOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewCreateDebugPassword() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_createDebugPasswordOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewGetThingShadow() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_getThingShadowOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient:: NewSendConfigurationValidityReport() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_sendConfigurationValidityReportOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewUpdateThingShadow() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_updateThingShadowOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewUpdateConfiguration() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_updateConfigurationOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient:: NewValidateAuthorizationToken() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_validateAuthorizationTokenOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewRestartComponent() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_restartComponentOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient:: NewGetLocalDeploymentStatus() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_getLocalDeploymentStatusOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewGetSecretValue() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_getSecretValueOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewUpdateState() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_updateStateOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewCancelLocalDeployment() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_cancelLocalDeploymentOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient:: NewListNamedShadowsForThing() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_listNamedShadowsForThingOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewSubscribeToComponentUpdates( std::shared_ptr streamHandler) noexcept { return Aws::Crt::MakeShared( m_allocator, m_connection, std::move(streamHandler), m_greengrassCoreIpcServiceModel.m_subscribeToComponentUpdatesOperationContext, m_allocator); } std::shared_ptr GreengrassCoreIpcClient::NewListLocalDeployments() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_listLocalDeploymentsOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewStopComponent() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_stopComponentOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewPauseComponent() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_pauseComponentOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } std::shared_ptr GreengrassCoreIpcClient::NewCreateLocalDeployment() noexcept { auto operation = Aws::Crt::MakeShared( m_allocator, m_connection, m_greengrassCoreIpcServiceModel.m_createLocalDeploymentOperationContext, m_allocator); operation->WithLaunchMode(m_asyncLaunchMode); return operation; } } // namespace Greengrass } // namespace Aws