/// <summary> /// Obtains information about the specified WorkSpaces. /// /// /// <para> /// Only one of the filter parameters, such as <code>BundleId</code>, <code>DirectoryId</code>, /// or <code>WorkspaceIds</code>, can be specified at a time. /// </para> /// /// <para> /// This operation supports pagination with the use of the <code>NextToken</code> request /// and response parameters. If more results are available, the <code>NextToken</code> /// response member contains a token that you pass in the next call to this operation /// to retrieve the next set of items. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeWorkspaces service method.</param> /// /// <returns>The response from the DescribeWorkspaces service method, as returned by WorkSpaces.</returns> /// <exception cref="Amazon.WorkSpaces.Model.InvalidParameterValuesException"> /// One or more parameter values are not valid. /// </exception> /// <exception cref="Amazon.WorkSpaces.Model.ResourceUnavailableException"> /// The specified resource is not available. /// </exception> public DescribeWorkspacesResponse DescribeWorkspaces(DescribeWorkspacesRequest request) { var marshaller = new DescribeWorkspacesRequestMarshaller(); var unmarshaller = DescribeWorkspacesResponseUnmarshaller.Instance; return(Invoke <DescribeWorkspacesRequest, DescribeWorkspacesResponse>(request, marshaller, unmarshaller)); }
public void DescribeWorkspacesMarshallTest() { var request = InstantiateClassGenerator.Execute <DescribeWorkspacesRequest>(); var marshaller = new DescribeWorkspacesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <DescribeWorkspacesRequest>(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("DescribeWorkspaces").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = DescribeWorkspacesResponseUnmarshaller.Instance.Unmarshall(context) as DescribeWorkspacesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the DescribeWorkspaces operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeWorkspaces operation on AmazonWorkSpacesClient.</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 EndDescribeWorkspaces /// operation.</returns> public IAsyncResult BeginDescribeWorkspaces(DescribeWorkspacesRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeWorkspacesRequestMarshaller(); var unmarshaller = DescribeWorkspacesResponseUnmarshaller.Instance; return(BeginInvoke <DescribeWorkspacesRequest>(request, marshaller, unmarshaller, callback, state)); }
/// <summary> /// Initiates the asynchronous execution of the DescribeWorkspaces operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeWorkspaces 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 <DescribeWorkspacesResponse> DescribeWorkspacesAsync(DescribeWorkspacesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeWorkspacesRequestMarshaller(); var unmarshaller = DescribeWorkspacesResponseUnmarshaller.Instance; return(InvokeAsync <DescribeWorkspacesRequest, DescribeWorkspacesResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the DescribeWorkspaces operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeWorkspaces 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<DescribeWorkspacesResponse> DescribeWorkspacesAsync(DescribeWorkspacesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DescribeWorkspacesRequestMarshaller(); var unmarshaller = DescribeWorkspacesResponseUnmarshaller.Instance; return InvokeAsync<DescribeWorkspacesRequest,DescribeWorkspacesResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Obtains information about the specified WorkSpaces. /// /// /// <para> /// Only one of the filter parameters, such as <code>BundleId</code>, <code>DirectoryId</code>, /// or <code>WorkspaceIds</code>, can be specified at a time. /// </para> /// /// <para> /// This operation supports pagination with the use of the <code>NextToken</code> request /// and response parameters. If more results are available, the <code>NextToken</code> /// response member contains a token that you pass in the next call to this operation /// to retrieve the next set of items. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DescribeWorkspaces service method.</param> /// /// <returns>The response from the DescribeWorkspaces service method, as returned by WorkSpaces.</returns> /// <exception cref="Amazon.WorkSpaces.Model.InvalidParameterValuesException"> /// One or more parameter values are not valid. /// </exception> /// <exception cref="Amazon.WorkSpaces.Model.ResourceUnavailableException"> /// The specified resource is not available. /// </exception> public DescribeWorkspacesResponse DescribeWorkspaces(DescribeWorkspacesRequest request) { var marshaller = new DescribeWorkspacesRequestMarshaller(); var unmarshaller = DescribeWorkspacesResponseUnmarshaller.Instance; return Invoke<DescribeWorkspacesRequest,DescribeWorkspacesResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DescribeWorkspaces operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DescribeWorkspaces operation on AmazonWorkSpacesClient.</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 EndDescribeWorkspaces /// operation.</returns> public IAsyncResult BeginDescribeWorkspaces(DescribeWorkspacesRequest request, AsyncCallback callback, object state) { var marshaller = new DescribeWorkspacesRequestMarshaller(); var unmarshaller = DescribeWorkspacesResponseUnmarshaller.Instance; return BeginInvoke<DescribeWorkspacesRequest>(request, marshaller, unmarshaller, callback, state); }
public void DescribeWorkspacesMarshallTest() { var request = InstantiateClassGenerator.Execute<DescribeWorkspacesRequest>(); var marshaller = new DescribeWorkspacesRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<DescribeWorkspacesRequest>(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("DescribeWorkspaces").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = DescribeWorkspacesResponseUnmarshaller.Instance.Unmarshall(context) as DescribeWorkspacesResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }