Esempio n. 1
0
        internal StartApplicationResponse StartApplication(StartApplicationRequest request)
        {
            var marshaller   = new StartApplicationRequestMarshaller();
            var unmarshaller = StartApplicationResponseUnmarshaller.Instance;

            return(Invoke <StartApplicationRequest, StartApplicationResponse>(request, marshaller, unmarshaller));
        }
Esempio n. 2
0
        public void StartApplicationMarshallTest()
        {
            var request    = InstantiateClassGenerator.Execute <StartApplicationRequest>();
            var marshaller = new StartApplicationRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest     = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson <StartApplicationRequest>(request, jsonRequest);

            var webResponse = new WebResponseData
            {
                Headers =
                {
                    { "x-amzn-RequestId", Guid.NewGuid().ToString() },
                    { "x-amz-crc32",      "0"                       }
                }
            };
            var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("StartApplication").ResponseStructure).Execute();

            webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
            UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
            var response = StartApplicationResponseUnmarshaller.Instance.Unmarshall(context)
                           as StartApplicationResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
Esempio n. 3
0
        /// <summary>
        /// Initiates the asynchronous execution of the StartApplication operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the StartApplication operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task <StartApplicationResponse> StartApplicationAsync(StartApplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new StartApplicationRequestMarshaller();
            var unmarshaller = StartApplicationResponseUnmarshaller.Instance;

            return(InvokeAsync <StartApplicationRequest, StartApplicationResponse>(request, marshaller,
                                                                                   unmarshaller, cancellationToken));
        }
        public void StartApplicationMarshallTest()
        {
            var request = InstantiateClassGenerator.Execute<StartApplicationRequest>();
            var marshaller = new StartApplicationRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content);                        
            Comparer.CompareObjectToJson<StartApplicationRequest>(request,jsonRequest);

            var webResponse = new WebResponseData
            {
                Headers = {
                    {"x-amzn-RequestId", Guid.NewGuid().ToString()},
                    {"x-amz-crc32","0"}
                }
            };
            var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("StartApplication").ResponseStructure).Execute();
            webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
            UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
            var response = StartApplicationResponseUnmarshaller.Instance.Unmarshall(context)
                as StartApplicationResponse;
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the StartApplication operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the StartApplication operation on AmazonKinesisAnalyticsClient.</param>
        /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param>
        /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback
        ///          procedure using the AsyncState property.</param>
        /// 
        /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndStartApplication
        ///         operation.</returns>
        public IAsyncResult BeginStartApplication(StartApplicationRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new StartApplicationRequestMarshaller();
            var unmarshaller = StartApplicationResponseUnmarshaller.Instance;

            return BeginInvoke<StartApplicationRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        /// <summary>
        /// Starts the specified Amazon Kinesis Analytics application. After creating an application,
        /// you must exclusively call this operation to start your application.
        /// 
        ///  
        /// <para>
        /// After the application starts, it begins consuming the input data, processes it, and
        /// writes the output to the configured destination.
        /// </para>
        ///  
        /// <para>
        ///  The application status must be <code>READY</code> for you to start an application.
        /// You can get the application status in the console or using the <a>DescribeApplication</a>
        /// operation.
        /// </para>
        ///  
        /// <para>
        /// After you start the application, you can stop the application from processing the
        /// input by calling the <a>StopApplication</a> operation.
        /// </para>
        ///  
        /// <para>
        /// This operation requires permissions to perform the <code>kinesisanalytics:StartApplication</code>
        /// action.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the StartApplication service method.</param>
        /// 
        /// <returns>The response from the StartApplication service method, as returned by KinesisAnalytics.</returns>
        /// <exception cref="Amazon.KinesisAnalytics.Model.InvalidApplicationConfigurationException">
        /// User-provided application configuration is not valid.
        /// </exception>
        /// <exception cref="Amazon.KinesisAnalytics.Model.InvalidArgumentException">
        /// Specified input parameter value is invalid.
        /// </exception>
        /// <exception cref="Amazon.KinesisAnalytics.Model.ResourceInUseException">
        /// Application is not available for this operation.
        /// </exception>
        /// <exception cref="Amazon.KinesisAnalytics.Model.ResourceNotFoundException">
        /// Specified application can't be found.
        /// </exception>
        public StartApplicationResponse StartApplication(StartApplicationRequest request)
        {
            var marshaller = new StartApplicationRequestMarshaller();
            var unmarshaller = StartApplicationResponseUnmarshaller.Instance;

            return Invoke<StartApplicationRequest,StartApplicationResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the StartApplication operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the StartApplication operation.</param>
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
        /// <returns>The task object representing the asynchronous operation.</returns>
        public Task<StartApplicationResponse> StartApplicationAsync(StartApplicationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new StartApplicationRequestMarshaller();
            var unmarshaller = StartApplicationResponseUnmarshaller.Instance;

            return InvokeAsync<StartApplicationRequest,StartApplicationResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }