/// <summary> /// Adds one or more attachments to an attachment set. If an <code>AttachmentSetId</code> /// is not specified, a new attachment set is created, and the ID of the set is returned /// in the response. If an <code>AttachmentSetId</code> is specified, the attachments /// are added to the specified set, if it exists. /// /// /// <para> /// An attachment set is a temporary container for attachments that are to be added to /// a case or case communication. The set is available for one hour after it is created; /// the <code>ExpiryTime</code> returned in the response indicates when the set expires. /// The maximum number of attachments in a set is 3, and the maximum size of any attachment /// in the set is 5 MB. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddAttachmentsToSet service method.</param> /// /// <returns>The response from the AddAttachmentsToSet service method, as returned by AWSSupport.</returns> /// <exception cref="T:Amazon.AWSSupport.Model.AttachmentLimitExceededException"> /// The limit for the number of attachment sets created in a short period of time has /// been exceeded. /// </exception> /// <exception cref="T:Amazon.AWSSupport.Model.AttachmentSetExpiredException"> /// The expiration time of the attachment set has passed. The set expires 1 hour after /// it is created. /// </exception> /// <exception cref="T:Amazon.AWSSupport.Model.AttachmentSetIdNotFoundException"> /// An attachment set with the specified ID could not be found. /// </exception> /// <exception cref="T:Amazon.AWSSupport.Model.AttachmentSetSizeLimitExceededException"> /// A limit for the size of an attachment set has been exceeded. The limits are 3 attachments /// and 5 MB per attachment. /// </exception> /// <exception cref="T:Amazon.AWSSupport.Model.InternalServerErrorException"> /// An internal server error occurred. /// </exception> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task <AddAttachmentsToSetResponse> AddAttachmentsToSetAsync(AddAttachmentsToSetRequest addAttachmentsToSetRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AddAttachmentsToSetRequestMarshaller(); var unmarshaller = AddAttachmentsToSetResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, AddAttachmentsToSetRequest, AddAttachmentsToSetResponse>(addAttachmentsToSetRequest, marshaller, unmarshaller, signer, cancellationToken)); }
internal AddAttachmentsToSetResponse AddAttachmentsToSet(AddAttachmentsToSetRequest request) { var marshaller = new AddAttachmentsToSetRequestMarshaller(); var unmarshaller = AddAttachmentsToSetResponseUnmarshaller.Instance; return(Invoke <AddAttachmentsToSetRequest, AddAttachmentsToSetResponse>(request, marshaller, unmarshaller)); }
public void AddAttachmentsToSetMarshallTest() { var request = InstantiateClassGenerator.Execute <AddAttachmentsToSetRequest>(); var marshaller = new AddAttachmentsToSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <AddAttachmentsToSetRequest>(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("AddAttachmentsToSet").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = AddAttachmentsToSetResponseUnmarshaller.Instance.Unmarshall(context) as AddAttachmentsToSetResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the AddAttachmentsToSet operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AddAttachmentsToSet 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/support-2013-04-15/AddAttachmentsToSet">REST API Reference for AddAttachmentsToSet Operation</seealso> public Task <AddAttachmentsToSetResponse> AddAttachmentsToSetAsync(AddAttachmentsToSetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AddAttachmentsToSetRequestMarshaller(); var unmarshaller = AddAttachmentsToSetResponseUnmarshaller.Instance; return(InvokeAsync <AddAttachmentsToSetRequest, AddAttachmentsToSetResponse>(request, marshaller, unmarshaller, cancellationToken)); }
public void AddAttachmentsToSetMarshallTest() { var request = InstantiateClassGenerator.Execute<AddAttachmentsToSetRequest>(); var marshaller = new AddAttachmentsToSetRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<AddAttachmentsToSetRequest>(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("AddAttachmentsToSet").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = AddAttachmentsToSetResponseUnmarshaller.Instance.Unmarshall(context) as AddAttachmentsToSetResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the AddAttachmentsToSet operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AddAttachmentsToSet operation on AmazonAWSSupportClient.</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 EndAddAttachmentsToSet /// operation.</returns> public IAsyncResult BeginAddAttachmentsToSet(AddAttachmentsToSetRequest request, AsyncCallback callback, object state) { var marshaller = new AddAttachmentsToSetRequestMarshaller(); var unmarshaller = AddAttachmentsToSetResponseUnmarshaller.Instance; return BeginInvoke<AddAttachmentsToSetRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Adds one or more attachments to an attachment set. If an <code>AttachmentSetId</code> /// is not specified, a new attachment set is created, and the ID of the set is returned /// in the response. If an <code>AttachmentSetId</code> is specified, the attachments /// are added to the specified set, if it exists. /// /// /// <para> /// An attachment set is a temporary container for attachments that are to be added to /// a case or case communication. The set is available for one hour after it is created; /// the <code>ExpiryTime</code> returned in the response indicates when the set expires. /// The maximum number of attachments in a set is 3, and the maximum size of any attachment /// in the set is 5 MB. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the AddAttachmentsToSet service method.</param> /// /// <returns>The response from the AddAttachmentsToSet service method, as returned by AWSSupport.</returns> /// <exception cref="Amazon.AWSSupport.Model.AttachmentLimitExceededException"> /// The limit for the number of attachment sets created in a short period of time has /// been exceeded. /// </exception> /// <exception cref="Amazon.AWSSupport.Model.AttachmentSetExpiredException"> /// The expiration time of the attachment set has passed. The set expires 1 hour after /// it is created. /// </exception> /// <exception cref="Amazon.AWSSupport.Model.AttachmentSetIdNotFoundException"> /// An attachment set with the specified ID could not be found. /// </exception> /// <exception cref="Amazon.AWSSupport.Model.AttachmentSetSizeLimitExceededException"> /// A limit for the size of an attachment set has been exceeded. The limits are 3 attachments /// and 5 MB per attachment. /// </exception> /// <exception cref="Amazon.AWSSupport.Model.InternalServerErrorException"> /// An internal server error occurred. /// </exception> public AddAttachmentsToSetResponse AddAttachmentsToSet(AddAttachmentsToSetRequest request) { var marshaller = new AddAttachmentsToSetRequestMarshaller(); var unmarshaller = AddAttachmentsToSetResponseUnmarshaller.Instance; return Invoke<AddAttachmentsToSetRequest,AddAttachmentsToSetResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the AddAttachmentsToSet operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AddAttachmentsToSet 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<AddAttachmentsToSetResponse> AddAttachmentsToSetAsync(AddAttachmentsToSetRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AddAttachmentsToSetRequestMarshaller(); var unmarshaller = AddAttachmentsToSetResponseUnmarshaller.Instance; return InvokeAsync<AddAttachmentsToSetRequest,AddAttachmentsToSetResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Initiates the asynchronous execution of the AddAttachmentsToSet operation. /// <seealso cref="Amazon.AWSSupport.IAmazonAWSSupport.AddAttachmentsToSet"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the AddAttachmentsToSet 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<AddAttachmentsToSetResponse> AddAttachmentsToSetAsync(AddAttachmentsToSetRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new AddAttachmentsToSetRequestMarshaller(); var unmarshaller = AddAttachmentsToSetResponseUnmarshaller.GetInstance(); return Invoke<IRequest, AddAttachmentsToSetRequest, AddAttachmentsToSetResponse>(request, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeAddAttachmentsToSet(AddAttachmentsToSetRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new AddAttachmentsToSetRequestMarshaller(); var unmarshaller = AddAttachmentsToSetResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }