public void ListStreamsMarshallTest() { var request = InstantiateClassGenerator.Execute <ListStreamsRequest>(); var marshaller = new ListStreamsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <ListStreamsRequest>(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("ListStreams").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = ListStreamsResponseUnmarshaller.Instance.Unmarshall(context) as ListStreamsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Returns an array of stream ARNs associated with the current account and endpoint. /// If the <code>TableName</code> parameter is present, then <i>ListStreams</i> will return /// only the streams ARNs for that table. /// /// <note> /// <para> /// You can call <i>ListStreams</i> at a maximum rate of 5 times per second. /// </para> /// </note> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListStreams service method.</param> /// /// <returns>The response from the ListStreams service method, as returned by DynamoDBStreams.</returns> /// <exception cref="Amazon.DynamoDBv2.Model.InternalServerErrorException"> /// An error occurred on the server side. /// </exception> /// <exception cref="Amazon.DynamoDBv2.Model.ResourceNotFoundException"> /// The operation tried to access a nonexistent stream. /// </exception> public ListStreamsResponse ListStreams(ListStreamsRequest request) { var marshaller = new ListStreamsRequestMarshaller(); var unmarshaller = ListStreamsResponseUnmarshaller.Instance; return(Invoke <ListStreamsRequest, ListStreamsResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the ListStreams operation. /// <seealso cref="Amazon.Kinesis.IAmazonKinesis.ListStreams"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListStreams 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 <ListStreamsResponse> ListStreamsAsync(ListStreamsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListStreamsRequestMarshaller(); var unmarshaller = ListStreamsResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, ListStreamsRequest, ListStreamsResponse>(request, marshaller, unmarshaller, signer, cancellationToken)); }
public void ListStreamsMarshallTest() { var operation = service_model.FindOperation("ListStreams"); var request = InstantiateClassGenerator.Execute <ListStreamsRequest>(); var marshaller = new ListStreamsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListStreams", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers["Content-Length"] = UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString(); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListStreamsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListStreamsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void ListStreams_ResourceNotFoundExceptionMarshallTest() { var operation = service_model.FindOperation("ListStreams"); var request = InstantiateClassGenerator.Execute <ListStreamsRequest>(); var marshaller = new ListStreamsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <ListStreamsRequest>(request, jsonRequest); var exception = operation.Exceptions.First(e => e.Name.Equals("ResourceNotFoundException")); var jsonResponse = new JsonSampleGenerator(service_model, exception).Execute(); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" }, { "x-amzn-ErrorType", "ResourceNotFoundException" }, { "Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString() } } }; var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), true, webResponse, true); var response = ListStreamsResponseUnmarshaller.Instance.UnmarshallException(context, null, System.Net.HttpStatusCode.OK); InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the ListStreams operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListStreams operation on AmazonDynamoDBStreamsClient.</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 EndListStreams /// operation.</returns> public IAsyncResult BeginListStreams(ListStreamsRequest request, AsyncCallback callback, object state) { var marshaller = new ListStreamsRequestMarshaller(); var unmarshaller = ListStreamsResponseUnmarshaller.Instance; return(BeginInvoke <ListStreamsRequest>(request, marshaller, unmarshaller, callback, state)); }
/// <summary> /// Initiates the asynchronous execution of the ListStreams operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListStreams 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> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/kinesisvideo-2017-09-30/ListStreams">REST API Reference for ListStreams Operation</seealso> public virtual Task <ListStreamsResponse> ListStreamsAsync(ListStreamsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListStreamsRequestMarshaller(); var unmarshaller = ListStreamsResponseUnmarshaller.Instance; return(InvokeAsync <ListStreamsRequest, ListStreamsResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListStreams operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListStreams operation on AmazonKinesisClient.</param> /// <param name="callback">An Action delegate that is invoked when the operation completes.</param> /// <param name="options">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> public void ListStreamsAsync(ListStreamsRequest request, AmazonServiceCallback <ListStreamsRequest, ListStreamsResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new ListStreamsRequestMarshaller(); var unmarshaller = ListStreamsResponseUnmarshaller.Instance; Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if (callback != null) { callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult <ListStreamsRequest, ListStreamsResponse> responseObject = new AmazonServiceResult <ListStreamsRequest, ListStreamsResponse>((ListStreamsRequest)req, (ListStreamsResponse)res, ex, ao.State); callback(responseObject); } } ; BeginInvoke <ListStreamsRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// <para> This operation returns an array of the names of all the streams that are associated with the AWS account making the /// <c>ListStreams</c> request. A given AWS account can have many streams active at one time. </para> <para> The number of streams may be too /// large to return from a single call to <c>ListStreams</c> . /// You can limit the number of returned streams using the <c>Limit</c> parameter. If you do not specify a value for the /// <c>Limit</c> parameter, Amazon Kinesis uses the default limit, which is currently 10.</para> <para> You can detect if there are more streams /// available to list by using the <c>HasMoreStreams</c> flag from the returned output. If there are more streams available, you can request /// more streams by using the name of the last stream returned by the <c>ListStreams</c> request in the <c>ExclusiveStartStreamName</c> /// parameter in a subsequent request to <c>ListStreams</c> . /// The group of stream names returned by the subsequent request is then added to the list. You can continue this process until all /// the stream names have been collected in the list. </para> <para> <c>ListStreams</c> has a limit of 5 transactions per second per /// account.</para> /// </summary> /// /// <param name="listStreamsRequest">Container for the necessary parameters to execute the ListStreams service method on AmazonKinesis.</param> /// /// <returns>The response from the ListStreams service method, as returned by AmazonKinesis.</returns> /// /// <exception cref="T:Amazon.Kinesis.Model.LimitExceededException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<ListStreamsResponse> ListStreamsAsync(ListStreamsRequest listStreamsRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListStreamsRequestMarshaller(); var unmarshaller = ListStreamsResponseUnmarshaller.GetInstance(); return Invoke<IRequest, ListStreamsRequest, ListStreamsResponse>(listStreamsRequest, marshaller, unmarshaller, signer, cancellationToken); }
public void ListStreamsMarshallTest() { var request = InstantiateClassGenerator.Execute<ListStreamsRequest>(); var marshaller = new ListStreamsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<ListStreamsRequest>(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("ListStreams").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = ListStreamsResponseUnmarshaller.Instance.Unmarshall(context) as ListStreamsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the ListStreams operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListStreams 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<ListStreamsResponse> ListStreamsAsync(ListStreamsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListStreamsRequestMarshaller(); var unmarshaller = ListStreamsResponseUnmarshaller.Instance; return InvokeAsync<ListStreamsRequest,ListStreamsResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal ListStreamsResponse ListStreams(ListStreamsRequest request) { var marshaller = new ListStreamsRequestMarshaller(); var unmarshaller = ListStreamsResponseUnmarshaller.Instance; return Invoke<ListStreamsRequest,ListStreamsResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the ListStreams operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListStreams operation on AmazonKinesisClient.</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 EndListStreams /// operation.</returns> public IAsyncResult BeginListStreams(ListStreamsRequest request, AsyncCallback callback, object state) { var marshaller = new ListStreamsRequestMarshaller(); var unmarshaller = ListStreamsResponseUnmarshaller.Instance; return BeginInvoke<ListStreamsRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the ListStreams operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListStreams operation on AmazonKinesisClient.</param> /// <param name="callback">An Action delegate that is invoked when the operation completes.</param> /// <param name="options">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> public void ListStreamsAsync(ListStreamsRequest request, AmazonServiceCallback<ListStreamsRequest, ListStreamsResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new ListStreamsRequestMarshaller(); var unmarshaller = ListStreamsResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<ListStreamsRequest,ListStreamsResponse> responseObject = new AmazonServiceResult<ListStreamsRequest,ListStreamsResponse>((ListStreamsRequest)req, (ListStreamsResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<ListStreamsRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
IAsyncResult invokeListStreams(ListStreamsRequest listStreamsRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new ListStreamsRequestMarshaller().Marshall(listStreamsRequest); var unmarshaller = ListStreamsResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }