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


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


            return(response);
        }
Example #3
0
        public static DeleteCertificateResponse Unmarshall(UnmarshallerContext context)
        {
            DeleteCertificateResponse deleteCertificateResponse = new DeleteCertificateResponse();

            deleteCertificateResponse.HttpResponse = context.HttpResponse;
            deleteCertificateResponse.RequestId    = context.StringValue("DeleteCertificate.RequestId");

            return(deleteCertificateResponse);
        }
        /// <summary>
        /// 删除设备CA证书
        /// </summary>
        public DeleteCertificateResponse DeleteCertificate(DeleteCertificateRequest deleteCertificateRequest)
        {
            Dictionary <string, string> urlParam = new Dictionary <string, string>();

            urlParam.Add("certificate_id", deleteCertificateRequest.CertificateId.ToString());
            string                    urlPath  = HttpUtils.AddUrlPath("/v5/iot/{project_id}/certificates/{certificate_id}", urlParam);
            SdkRequest                request  = HttpUtils.InitSdkRequest(urlPath, deleteCertificateRequest);
            HttpResponseMessage       response = DoHttpRequestSync("DELETE", request);
            DeleteCertificateResponse deleteCertificateResponse = JsonUtils.DeSerializeNull <DeleteCertificateResponse>(response);

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

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

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

            return(response);
        }