Пример #1
0
        internal PutAttributesResponse PutAttributes(PutAttributesRequest request)
        {
            var marshaller   = new PutAttributesRequestMarshaller();
            var unmarshaller = PutAttributesResponseUnmarshaller.Instance;

            return(Invoke <PutAttributesRequest, PutAttributesResponse>(request, marshaller, unmarshaller));
        }
        /// <summary>
        /// Initiates the asynchronous execution of the PutAttributes operation.
        /// <seealso cref="Amazon.SimpleDB.IAmazonSimpleDB.PutAttributes"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the PutAttributes 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 <PutAttributesResponse> PutAttributesAsync(PutAttributesRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new PutAttributesRequestMarshaller();
            var unmarshaller = PutAttributesResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, PutAttributesRequest, PutAttributesResponse>(request, marshaller, unmarshaller, signer, cancellationToken));
        }
Пример #3
0
        public void PutAttributesMarshallTest()
        {
            var request    = InstantiateClassGenerator.Execute <PutAttributesRequest>();
            var marshaller = new PutAttributesRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest     = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson <PutAttributesRequest>(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("PutAttributes").ResponseStructure).Execute();

            webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
            UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
            var response = PutAttributesResponseUnmarshaller.Instance.Unmarshall(context)
                           as PutAttributesResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
Пример #4
0
        /// <summary>
        /// Initiates the asynchronous execution of the PutAttributes operation.
        /// <seealso cref="Amazon.SimpleDB.IAmazonSimpleDB"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the PutAttributes 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 <PutAttributesResponse> PutAttributesAsync(PutAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new PutAttributesRequestMarshaller();
            var unmarshaller = PutAttributesResponseUnmarshaller.Instance;

            return(InvokeAsync <PutAttributesRequest, PutAttributesResponse>(request, marshaller,
                                                                             unmarshaller, cancellationToken));
        }
        public void PutAttributesMarshallTest()
        {
            var operation = service_model.FindOperation("PutAttributes");

            var request         = InstantiateClassGenerator.Execute <PutAttributesRequest>();
            var marshaller      = new PutAttributesRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator       = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);

            validator.Validate();
        }
        /// <summary>
        /// <para> The PutAttributes operation creates or replaces attributes in an item. The client may specify new attributes using a combination of
        /// the <c>Attribute.X.Name</c> and <c>Attribute.X.Value</c> parameters. The client specifies the first attribute by the parameters
        /// <c>Attribute.0.Name</c> and <c>Attribute.0.Value</c> ,
        /// the second attribute by the parameters <c>Attribute.1.Name</c> and <c>Attribute.1.Value</c> , and so on. </para> <para> Attributes are
        /// uniquely identified in an item by their name/value combination. For example, a single item can have the attributes <c>{ "first_name",
        /// "first_value" }</c> and <c>{ "first_name", second_value" }</c> . However, it cannot have two attribute instances where both the
        /// <c>Attribute.X.Name</c> and <c>Attribute.X.Value</c> are the same. </para> <para> Optionally, the requestor can supply the <c>Replace</c>
        /// parameter for each individual attribute. Setting this value to <c>true</c> causes the new attribute value to replace the existing attribute
        /// value(s). For example, if an item has the attributes <c>{ 'a', '1' }</c> ,
        /// 
        /// <c>{ 'b', '2'}</c> and <c>{ 'b', '3' }</c> and the requestor calls <c>PutAttributes</c> using the attributes <c>{ 'b',
        /// '4' }</c> with the <c>Replace</c> parameter set to true, the final attributes of the item are changed to <c>{ 'a', '1' }</c> and <c>{ 'b',
        /// '4' }</c> , which replaces the previous values of the 'b' attribute with the new value. </para> <para><b>NOTE:</b> Using PutAttributes to
        /// replace attribute values that do not exist will not result in an error response. </para> <para> You cannot specify an empty string as an
        /// attribute name. </para> <para> Because Amazon SimpleDB makes multiple copies of client data and uses an eventual consistency update model,
        /// an immediate GetAttributes or Select operation (read) immediately after a PutAttributes or DeleteAttributes operation (write) might not
        /// return the updated data. </para> <para> The following limitations are enforced for this operation:
        /// <ul>
        /// <li>256 total attribute name-value pairs per item</li>
        /// <li>One billion attributes per domain</li>
        /// <li>10 GB of total user data storage per domain</li>
        /// 
        /// </ul>
        /// </para>
        /// </summary>
        /// 
        /// <param name="putAttributesRequest">Container for the necessary parameters to execute the PutAttributes service method on
        /// AmazonSimpleDB.</param>
        /// 
        /// <exception cref="T:Amazon.SimpleDB.Model.InvalidParameterValueException" />
        /// <exception cref="T:Amazon.SimpleDB.Model.NumberDomainBytesExceededException" />
        /// <exception cref="T:Amazon.SimpleDB.Model.NumberDomainAttributesExceededException" />
        /// <exception cref="T:Amazon.SimpleDB.Model.NoSuchDomainException" />
        /// <exception cref="T:Amazon.SimpleDB.Model.NumberItemAttributesExceededException" />
        /// <exception cref="T:Amazon.SimpleDB.Model.AttributeDoesNotExistException" />
        /// <exception cref="T:Amazon.SimpleDB.Model.MissingParameterException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<PutAttributesResponse> PutAttributesAsync(PutAttributesRequest putAttributesRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new PutAttributesRequestMarshaller();
            var unmarshaller = PutAttributesResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, PutAttributesRequest, PutAttributesResponse>(putAttributesRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
        /// <summary>
        /// Initiates the asynchronous execution of the PutAttributes operation.
        /// <seealso cref="Amazon.SimpleDB.IAmazonSimpleDB"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the PutAttributes 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<PutAttributesResponse> PutAttributesAsync(PutAttributesRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new PutAttributesRequestMarshaller();
            var unmarshaller = PutAttributesResponseUnmarshaller.Instance;

            return InvokeAsync<PutAttributesRequest,PutAttributesResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        /// <summary>
        /// The PutAttributes operation creates or replaces attributes in an item. The client
        /// may specify new attributes using a combination of the <code>Attribute.X.Name</code>
        /// and <code>Attribute.X.Value</code> parameters. The client specifies the first attribute
        /// by the parameters <code>Attribute.0.Name</code> and <code>Attribute.0.Value</code>,
        /// the second attribute by the parameters <code>Attribute.1.Name</code> and <code>Attribute.1.Value</code>,
        /// and so on. 
        /// 
        ///  
        /// <para>
        ///  Attributes are uniquely identified in an item by their name/value combination. For
        /// example, a single item can have the attributes <code>{ "first_name", "first_value"
        /// }</code> and <code>{ "first_name", second_value" }</code>. However, it cannot have
        /// two attribute instances where both the <code>Attribute.X.Name</code> and <code>Attribute.X.Value</code>
        /// are the same. 
        /// </para>
        ///  
        /// <para>
        ///  Optionally, the requestor can supply the <code>Replace</code> parameter for each
        /// individual attribute. Setting this value to <code>true</code> causes the new attribute
        /// value to replace the existing attribute value(s). For example, if an item has the
        /// attributes <code>{ 'a', '1' }</code>, <code>{ 'b', '2'}</code> and <code>{ 'b', '3'
        /// }</code> and the requestor calls <code>PutAttributes</code> using the attributes <code>{
        /// 'b', '4' }</code> with the <code>Replace</code> parameter set to true, the final attributes
        /// of the item are changed to <code>{ 'a', '1' }</code> and <code>{ 'b', '4' }</code>,
        /// which replaces the previous values of the 'b' attribute with the new value. 
        /// </para>
        ///  
        /// <para>
        ///  You cannot specify an empty string as an attribute name. 
        /// </para>
        ///  
        /// <para>
        ///  Because Amazon SimpleDB makes multiple copies of client data and uses an eventual
        /// consistency update model, an immediate <a>GetAttributes</a> or <a>Select</a> operation
        /// (read) immediately after a <a>PutAttributes</a> or <a>DeleteAttributes</a> operation
        /// (write) might not return the updated data. 
        /// </para>
        ///  
        /// <para>
        ///  The following limitations are enforced for this operation: <ul> <li>256 total attribute
        /// name-value pairs per item</li> <li>One billion attributes per domain</li> <li>10 GB
        /// of total user data storage per domain</li> </ul> 
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the PutAttributes service method.</param>
        /// 
        /// <returns>The response from the PutAttributes service method, as returned by SimpleDB.</returns>
        /// <exception cref="AttributeDoesNotExistException">
        /// The specified attribute does not exist.
        /// </exception>
        /// <exception cref="InvalidParameterValueException">
        /// The value for a parameter is invalid.
        /// </exception>
        /// <exception cref="MissingParameterException">
        /// The request must contain the specified missing parameter.
        /// </exception>
        /// <exception cref="NoSuchDomainException">
        /// The specified domain does not exist.
        /// </exception>
        /// <exception cref="NumberDomainAttributesExceededException">
        /// Too many attributes in this domain.
        /// </exception>
        /// <exception cref="NumberDomainBytesExceededException">
        /// Too many bytes in this domain.
        /// </exception>
        /// <exception cref="NumberItemAttributesExceededException">
        /// Too many attributes in this item.
        /// </exception>
        public PutAttributesResponse PutAttributes(PutAttributesRequest request)
        {
            var marshaller = new PutAttributesRequestMarshaller();
            var unmarshaller = PutAttributesResponseUnmarshaller.Instance;

            return Invoke<PutAttributesRequest,PutAttributesResponse>(request, marshaller, unmarshaller);
        }
 IAsyncResult invokePutAttributes(PutAttributesRequest putAttributesRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new PutAttributesRequestMarshaller().Marshall(putAttributesRequest);
     var unmarshaller = PutAttributesResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
Пример #10
0
        /// <summary>
        /// Initiates the asynchronous execution of the PutAttributes operation.
        /// <seealso cref="Amazon.SimpleDB.IAmazonSimpleDB.PutAttributes"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the PutAttributes 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<PutAttributesResponse> PutAttributesAsync(PutAttributesRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new PutAttributesRequestMarshaller();
            var unmarshaller = PutAttributesResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, PutAttributesRequest, PutAttributesResponse>(request, marshaller, unmarshaller, signer, cancellationToken);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the PutAttributes operation.
        /// <seealso cref="Amazon.SimpleDB.IAmazonSimpleDB"/>
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the PutAttributes operation on AmazonSimpleDBClient.</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 EndPutAttributes
        ///         operation.</returns>
        public IAsyncResult BeginPutAttributes(PutAttributesRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new PutAttributesRequestMarshaller();
            var unmarshaller = PutAttributesResponseUnmarshaller.Instance;

            return BeginInvoke<PutAttributesRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
        public void PutAttributesMarshallTest()
        {
            var operation = service_model.FindOperation("PutAttributes");

            var request = InstantiateClassGenerator.Execute<PutAttributesRequest>();
            var marshaller = new PutAttributesRequestMarshaller();
            var internalRequest = marshaller.Marshall(request);
            var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation);
            validator.Validate();


        }