/// <summary>
        /// Gets the attribute verification code for the specified attribute using
        /// an asynchronous call
        /// </summary>
        /// <param name="medium">Name of the attribute the verification code is being sent to.
        /// Should be either email or phone_number.</param>
        /// <returns>Returns the delivery details for the attribute verification code request</returns>
        public async Task <CodeDeliveryDetailsType> GetAttributeVerificationCodeAsync(string medium)
        {
            GetUserAttributeVerificationCodeRequest getAttributeCodeRequest =
                CreateGetUserAttributeVerificationCodeRequest(medium);

            GetUserAttributeVerificationCodeResponse response = await Provider
                                                                .GetUserAttributeVerificationCodeAsync(getAttributeCodeRequest).ConfigureAwait(false);

            return(response.CodeDeliveryDetails);
        }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            GetUserAttributeVerificationCodeResponse response = new GetUserAttributeVerificationCodeResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("CodeDeliveryDetails", targetDepth))
                {
                    var unmarshaller = CodeDeliveryDetailsTypeUnmarshaller.Instance;
                    response.CodeDeliveryDetails = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }