public void DeleteIdentitiesMarshallTest() { var request = InstantiateClassGenerator.Execute <DeleteIdentitiesRequest>(); var marshaller = new DeleteIdentitiesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <DeleteIdentitiesRequest>(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("DeleteIdentities").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = DeleteIdentitiesResponseUnmarshaller.Instance.Unmarshall(context) as DeleteIdentitiesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
internal DeleteIdentitiesResponse DeleteIdentities(DeleteIdentitiesRequest request) { DeleteIdentitiesRequestMarshaller marshaller = new DeleteIdentitiesRequestMarshaller(); DeleteIdentitiesResponseUnmarshaller instance = DeleteIdentitiesResponseUnmarshaller.Instance; return(Invoke <DeleteIdentitiesRequest, DeleteIdentitiesResponse>(request, marshaller, instance)); }
public void DeleteIdentitiesAsync(DeleteIdentitiesRequest request, AmazonServiceCallback <DeleteIdentitiesRequest, DeleteIdentitiesResponse> callback, AsyncOptions options = null) { options = ((options == null) ? new AsyncOptions() : options); DeleteIdentitiesRequestMarshaller marshaller = new DeleteIdentitiesRequestMarshaller(); DeleteIdentitiesResponseUnmarshaller instance = DeleteIdentitiesResponseUnmarshaller.Instance; Action <AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if (callback != null) { callbackHelper = delegate(AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) { AmazonServiceResult <DeleteIdentitiesRequest, DeleteIdentitiesResponse> responseObject = new AmazonServiceResult <DeleteIdentitiesRequest, DeleteIdentitiesResponse>((DeleteIdentitiesRequest)req, (DeleteIdentitiesResponse)res, ex, ao.State); callback(responseObject); }; } BeginInvoke(request, marshaller, instance, options, callbackHelper); }
public void DeleteIdentitiesMarshallTest() { var request = InstantiateClassGenerator.Execute<DeleteIdentitiesRequest>(); var marshaller = new DeleteIdentitiesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<DeleteIdentitiesRequest>(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("DeleteIdentities").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = DeleteIdentitiesResponseUnmarshaller.Instance.Unmarshall(context) as DeleteIdentitiesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the DeleteIdentities operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteIdentities 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<DeleteIdentitiesResponse> DeleteIdentitiesAsync(DeleteIdentitiesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteIdentitiesRequestMarshaller(); var unmarshaller = DeleteIdentitiesResponseUnmarshaller.Instance; return InvokeAsync<DeleteIdentitiesRequest,DeleteIdentitiesResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Deletes identities from an identity pool. You can specify a list of 1-60 identities /// that you want to delete. /// /// /// <para> /// You must use AWS Developer credentials to call this API. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteIdentities service method.</param> /// /// <returns>The response from the DeleteIdentities service method, as returned by CognitoIdentity.</returns> /// <exception cref="Amazon.CognitoIdentity.Model.InternalErrorException"> /// Thrown when the service encounters an error during processing the request. /// </exception> /// <exception cref="Amazon.CognitoIdentity.Model.InvalidParameterException"> /// Thrown for missing or bad input parameter(s). /// </exception> /// <exception cref="Amazon.CognitoIdentity.Model.TooManyRequestsException"> /// Thrown when a request is throttled. /// </exception> public DeleteIdentitiesResponse DeleteIdentities(DeleteIdentitiesRequest request) { var marshaller = new DeleteIdentitiesRequestMarshaller(); var unmarshaller = DeleteIdentitiesResponseUnmarshaller.Instance; return Invoke<DeleteIdentitiesRequest,DeleteIdentitiesResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DeleteIdentities operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteIdentities operation on AmazonCognitoIdentityClient.</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 EndDeleteIdentities /// operation.</returns> public IAsyncResult BeginDeleteIdentities(DeleteIdentitiesRequest request, AsyncCallback callback, object state) { var marshaller = new DeleteIdentitiesRequestMarshaller(); var unmarshaller = DeleteIdentitiesResponseUnmarshaller.Instance; return BeginInvoke<DeleteIdentitiesRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Initiates the asynchronous execution of the DeleteIdentities operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteIdentities operation on AmazonCognitoIdentityClient.</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 DeleteIdentitiesAsync(DeleteIdentitiesRequest request, AmazonServiceCallback<DeleteIdentitiesRequest, DeleteIdentitiesResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new DeleteIdentitiesRequestMarshaller(); var unmarshaller = DeleteIdentitiesResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<DeleteIdentitiesRequest,DeleteIdentitiesResponse> responseObject = new AmazonServiceResult<DeleteIdentitiesRequest,DeleteIdentitiesResponse>((DeleteIdentitiesRequest)req, (DeleteIdentitiesResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<DeleteIdentitiesRequest>(request, marshaller, unmarshaller, options, callbackHelper); }