public void ListDatasetsMarshallTest() { var operation = service_model.FindOperation("ListDatasets"); var request = InstantiateClassGenerator.Execute <ListDatasetsRequest>(); var marshaller = new ListDatasetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("ListDatasets", 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 = ListDatasetsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListDatasetsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
internal ListDatasetsResponse ListDatasets(ListDatasetsRequest request) { var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.Instance; return(Invoke <ListDatasetsRequest, ListDatasetsResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the ListDatasets operation. /// <seealso cref="Amazon.CognitoSync.IAmazonCognitoSync"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListDatasets 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 <ListDatasetsResponse> ListDatasetsAsync(ListDatasetsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.Instance; return(Invoke <IRequest, ListDatasetsRequest, ListDatasetsResponse>(request, marshaller, unmarshaller, signer, cancellationToken)); }
IAsyncResult invokeListDatasets(ListDatasetsRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.Instance; return(Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer)); }
public void ListDatasetsMarshallTest() { var request = InstantiateClassGenerator.Execute <ListDatasetsRequest>(); var marshaller = new ListDatasetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <ListDatasetsRequest>(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("ListDatasets").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = ListDatasetsResponseUnmarshaller.Instance.Unmarshall(context) as ListDatasetsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the ListDatasets operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListDatasets 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/cognito-sync-2014-06-30/ListDatasets">REST API Reference for ListDatasets Operation</seealso> public virtual Task <ListDatasetsResponse> ListDatasetsAsync(ListDatasetsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.Instance; return(InvokeAsync <ListDatasetsRequest, ListDatasetsResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the ListDatasets operation. /// <seealso cref="Amazon.CognitoSync.IAmazonCognitoSync"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListDatasets operation on AmazonCognitoSyncClient.</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 EndListDatasets /// operation.</returns> public IAsyncResult BeginListDatasets(ListDatasetsRequest request, AsyncCallback callback, object state) { var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.Instance; return(BeginInvoke <ListDatasetsRequest>(request, marshaller, unmarshaller, callback, state)); }
/// <summary> /// Initiates the asynchronous execution of the ListDatasets operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListDatasets operation on AmazonCognitoSyncClient.</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 ListDatasetsAsync(ListDatasetsRequest request, AmazonServiceCallback <ListDatasetsRequest, ListDatasetsResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.Instance; Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if (callback != null) { callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult <ListDatasetsRequest, ListDatasetsResponse> responseObject = new AmazonServiceResult <ListDatasetsRequest, ListDatasetsResponse>((ListDatasetsRequest)req, (ListDatasetsResponse)res, ex, ao.State); callback(responseObject); } } ; BeginInvoke <ListDatasetsRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the ListDatasets operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListDatasets operation on AmazonCognitoSyncClient.</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 ListDatasetsAsync(ListDatasetsRequest request, AmazonServiceCallback<ListDatasetsRequest, ListDatasetsResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<ListDatasetsRequest,ListDatasetsResponse> responseObject = new AmazonServiceResult<ListDatasetsRequest,ListDatasetsResponse>((ListDatasetsRequest)req, (ListDatasetsResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<ListDatasetsRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the ListDatasets operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListDatasets 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<ListDatasetsResponse> ListDatasetsAsync(ListDatasetsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.Instance; return InvokeAsync<ListDatasetsRequest,ListDatasetsResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Lists datasets for an identity. With Amazon Cognito Sync, each identity has access /// only to its own data. Thus, the credentials used to make this API call need to have /// access to the identity data. /// /// /// <para> /// ListDatasets can be called with temporary user credentials provided by Cognito Identity /// or with developer credentials. You should use the Cognito Identity credentials to /// make this API call. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the ListDatasets service method.</param> /// /// <returns>The response from the ListDatasets service method, as returned by CognitoSync.</returns> /// <exception cref="Amazon.CognitoSync.Model.InternalErrorException"> /// Indicates an internal service error. /// </exception> /// <exception cref="Amazon.CognitoSync.Model.InvalidParameterException"> /// Thrown when a request parameter does not comply with the associated constraints. /// </exception> /// <exception cref="Amazon.CognitoSync.Model.NotAuthorizedException"> /// Thrown when a user is not authorized to access the requested resource. /// </exception> /// <exception cref="Amazon.CognitoSync.Model.TooManyRequestsException"> /// Thrown if the request is throttled. /// </exception> public ListDatasetsResponse ListDatasets(ListDatasetsRequest request) { var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.Instance; return Invoke<ListDatasetsRequest,ListDatasetsResponse>(request, marshaller, unmarshaller); }
public void ListDatasetsMarshallTest() { var operation = service_model.FindOperation("ListDatasets"); var request = InstantiateClassGenerator.Execute<ListDatasetsRequest>(); var marshaller = new ListDatasetsRequestMarshaller(); var internalRequest = marshaller.Marshall(request); RequestValidator.Validate("ListDatasets", 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.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString()); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = ListDatasetsResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as ListDatasetsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the ListDatasets operation. /// <seealso cref="Amazon.CognitoSync.IAmazonCognitoSync.ListDatasets"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListDatasets 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<ListDatasetsResponse> ListDatasetsAsync(ListDatasetsRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.GetInstance(); return Invoke<IRequest, ListDatasetsRequest, ListDatasetsResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the ListDatasets operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the ListDatasets operation on AmazonCognitoSyncClient.</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 EndListDatasets /// operation.</returns> public IAsyncResult BeginListDatasets(ListDatasetsRequest request, AsyncCallback callback, object state) { var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.Instance; return BeginInvoke<ListDatasetsRequest>(request, marshaller, unmarshaller, callback, state); }
IAsyncResult invokeListDatasets(ListDatasetsRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new ListDatasetsRequestMarshaller(); var unmarshaller = ListDatasetsResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }