CertPreflightRequest.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * Licensed to the Apache Software Foundation (ASF) under one
  3. * or more contributor license agreements. See the NOTICE file
  4. * distributed with this work for additional information
  5. * regarding copyright ownership. The ASF licenses this file
  6. * to you under the Apache License, Version 2.0 (the
  7. * "License"); you may not use this file except in compliance
  8. * with the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing,
  13. * software distributed under the License is distributed on an
  14. * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  15. * KIND, either express or implied. See the License for the
  16. * specific language governing permissions and limitations
  17. * under the License.
  18. */
  19. using Aliyun.Acs.Core;
  20. using Aliyun.Acs.Core.Http;
  21. using Aliyun.Acs.Core.Transform;
  22. using Aliyun.Acs.Core.Utils;
  23. using Aliyun.Acs.Push.Transform;
  24. using Aliyun.Acs.Push.Transform.V20160801;
  25. using System.Collections.Generic;
  26. namespace Aliyun.Acs.Push.Model.V20160801
  27. {
  28. public class CertPreflightRequest : RpcAcsRequest<CertPreflightResponse>
  29. {
  30. public CertPreflightRequest()
  31. : base("Push", "2016-08-01", "CertPreflight")
  32. {
  33. }
  34. private long? appKey;
  35. private string deviceToken;
  36. private string pass;
  37. private string body;
  38. private bool? isDevCert;
  39. public long? AppKey
  40. {
  41. get
  42. {
  43. return appKey;
  44. }
  45. set
  46. {
  47. appKey = value;
  48. DictionaryUtil.Add(QueryParameters, "AppKey", value.ToString());
  49. }
  50. }
  51. public string DeviceToken
  52. {
  53. get
  54. {
  55. return deviceToken;
  56. }
  57. set
  58. {
  59. deviceToken = value;
  60. DictionaryUtil.Add(QueryParameters, "DeviceToken", value);
  61. }
  62. }
  63. public string Pass
  64. {
  65. get
  66. {
  67. return pass;
  68. }
  69. set
  70. {
  71. pass = value;
  72. DictionaryUtil.Add(QueryParameters, "Pass", value);
  73. }
  74. }
  75. public string Body
  76. {
  77. get
  78. {
  79. return body;
  80. }
  81. set
  82. {
  83. body = value;
  84. DictionaryUtil.Add(QueryParameters, "Body", value);
  85. }
  86. }
  87. public bool? IsDevCert
  88. {
  89. get
  90. {
  91. return isDevCert;
  92. }
  93. set
  94. {
  95. isDevCert = value;
  96. DictionaryUtil.Add(QueryParameters, "IsDevCert", value.ToString());
  97. }
  98. }
  99. public override CertPreflightResponse GetResponse(Core.Transform.UnmarshallerContext unmarshallerContext)
  100. {
  101. return CertPreflightResponseUnmarshaller.Unmarshall(unmarshallerContext);
  102. }
  103. }
  104. }