diff --git a/VERSION b/VERSION index faf58aee1..a1f2e07a9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1340 \ No newline at end of file +1.36.1341 \ No newline at end of file diff --git a/cas/CMakeLists.txt b/cas/CMakeLists.txt index 1209ac10d..18bb0da1c 100644 --- a/cas/CMakeLists.txt +++ b/cas/CMakeLists.txt @@ -31,8 +31,6 @@ set(cas_public_header_model include/alibabacloud/cas/model/CreateCertificateRequestResult.h include/alibabacloud/cas/model/CreateCertificateWithCsrRequestRequest.h include/alibabacloud/cas/model/CreateCertificateWithCsrRequestResult.h - include/alibabacloud/cas/model/CreateWHCertificateWithExtensionRequest.h - include/alibabacloud/cas/model/CreateWHCertificateWithExtensionResult.h include/alibabacloud/cas/model/CreateWHClientCertificateRequest.h include/alibabacloud/cas/model/CreateWHClientCertificateResult.h include/alibabacloud/cas/model/DecryptRequest.h @@ -47,6 +45,8 @@ set(cas_public_header_model include/alibabacloud/cas/model/DescribePackageStateResult.h include/alibabacloud/cas/model/EncryptRequest.h include/alibabacloud/cas/model/EncryptResult.h + include/alibabacloud/cas/model/GetCertWarehouseQuotaRequest.h + include/alibabacloud/cas/model/GetCertWarehouseQuotaResult.h include/alibabacloud/cas/model/ListCertRequest.h include/alibabacloud/cas/model/ListCertResult.h include/alibabacloud/cas/model/ListCertWarehouseRequest.h @@ -76,8 +76,6 @@ set(cas_src src/model/CreateCertificateRequestResult.cc src/model/CreateCertificateWithCsrRequestRequest.cc src/model/CreateCertificateWithCsrRequestResult.cc - src/model/CreateWHCertificateWithExtensionRequest.cc - src/model/CreateWHCertificateWithExtensionResult.cc src/model/CreateWHClientCertificateRequest.cc src/model/CreateWHClientCertificateResult.cc src/model/DecryptRequest.cc @@ -92,6 +90,8 @@ set(cas_src src/model/DescribePackageStateResult.cc src/model/EncryptRequest.cc src/model/EncryptResult.cc + src/model/GetCertWarehouseQuotaRequest.cc + src/model/GetCertWarehouseQuotaResult.cc src/model/ListCertRequest.cc src/model/ListCertResult.cc src/model/ListCertWarehouseRequest.cc diff --git a/cas/include/alibabacloud/cas/CasClient.h b/cas/include/alibabacloud/cas/CasClient.h index 114dfd802..65b0fe6f2 100644 --- a/cas/include/alibabacloud/cas/CasClient.h +++ b/cas/include/alibabacloud/cas/CasClient.h @@ -32,8 +32,6 @@ #include "model/CreateCertificateRequestResult.h" #include "model/CreateCertificateWithCsrRequestRequest.h" #include "model/CreateCertificateWithCsrRequestResult.h" -#include "model/CreateWHCertificateWithExtensionRequest.h" -#include "model/CreateWHCertificateWithExtensionResult.h" #include "model/CreateWHClientCertificateRequest.h" #include "model/CreateWHClientCertificateResult.h" #include "model/DecryptRequest.h" @@ -48,6 +46,8 @@ #include "model/DescribePackageStateResult.h" #include "model/EncryptRequest.h" #include "model/EncryptResult.h" +#include "model/GetCertWarehouseQuotaRequest.h" +#include "model/GetCertWarehouseQuotaResult.h" #include "model/ListCertRequest.h" #include "model/ListCertResult.h" #include "model/ListCertWarehouseRequest.h" @@ -88,9 +88,6 @@ namespace AlibabaCloud typedef Outcome CreateCertificateWithCsrRequestOutcome; typedef std::future CreateCertificateWithCsrRequestOutcomeCallable; typedef std::function&)> CreateCertificateWithCsrRequestAsyncHandler; - typedef Outcome CreateWHCertificateWithExtensionOutcome; - typedef std::future CreateWHCertificateWithExtensionOutcomeCallable; - typedef std::function&)> CreateWHCertificateWithExtensionAsyncHandler; typedef Outcome CreateWHClientCertificateOutcome; typedef std::future CreateWHClientCertificateOutcomeCallable; typedef std::function&)> CreateWHClientCertificateAsyncHandler; @@ -112,6 +109,9 @@ namespace AlibabaCloud typedef Outcome EncryptOutcome; typedef std::future EncryptOutcomeCallable; typedef std::function&)> EncryptAsyncHandler; + typedef Outcome GetCertWarehouseQuotaOutcome; + typedef std::future GetCertWarehouseQuotaOutcomeCallable; + typedef std::function&)> GetCertWarehouseQuotaAsyncHandler; typedef Outcome ListCertOutcome; typedef std::future ListCertOutcomeCallable; typedef std::function&)> ListCertAsyncHandler; @@ -156,9 +156,6 @@ namespace AlibabaCloud CreateCertificateWithCsrRequestOutcome createCertificateWithCsrRequest(const Model::CreateCertificateWithCsrRequestRequest &request)const; void createCertificateWithCsrRequestAsync(const Model::CreateCertificateWithCsrRequestRequest& request, const CreateCertificateWithCsrRequestAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateCertificateWithCsrRequestOutcomeCallable createCertificateWithCsrRequestCallable(const Model::CreateCertificateWithCsrRequestRequest& request) const; - CreateWHCertificateWithExtensionOutcome createWHCertificateWithExtension(const Model::CreateWHCertificateWithExtensionRequest &request)const; - void createWHCertificateWithExtensionAsync(const Model::CreateWHCertificateWithExtensionRequest& request, const CreateWHCertificateWithExtensionAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; - CreateWHCertificateWithExtensionOutcomeCallable createWHCertificateWithExtensionCallable(const Model::CreateWHCertificateWithExtensionRequest& request) const; CreateWHClientCertificateOutcome createWHClientCertificate(const Model::CreateWHClientCertificateRequest &request)const; void createWHClientCertificateAsync(const Model::CreateWHClientCertificateRequest& request, const CreateWHClientCertificateAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; CreateWHClientCertificateOutcomeCallable createWHClientCertificateCallable(const Model::CreateWHClientCertificateRequest& request) const; @@ -180,6 +177,9 @@ namespace AlibabaCloud EncryptOutcome encrypt(const Model::EncryptRequest &request)const; void encryptAsync(const Model::EncryptRequest& request, const EncryptAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; EncryptOutcomeCallable encryptCallable(const Model::EncryptRequest& request) const; + GetCertWarehouseQuotaOutcome getCertWarehouseQuota(const Model::GetCertWarehouseQuotaRequest &request)const; + void getCertWarehouseQuotaAsync(const Model::GetCertWarehouseQuotaRequest& request, const GetCertWarehouseQuotaAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; + GetCertWarehouseQuotaOutcomeCallable getCertWarehouseQuotaCallable(const Model::GetCertWarehouseQuotaRequest& request) const; ListCertOutcome listCert(const Model::ListCertRequest &request)const; void listCertAsync(const Model::ListCertRequest& request, const ListCertAsyncHandler& handler, const std::shared_ptr& context = nullptr) const; ListCertOutcomeCallable listCertCallable(const Model::ListCertRequest& request) const; diff --git a/cas/include/alibabacloud/cas/model/CreateWHCertificateWithExtensionRequest.h b/cas/include/alibabacloud/cas/model/CreateWHCertificateWithExtensionRequest.h deleted file mode 100644 index 4e3e50be9..000000000 --- a/cas/include/alibabacloud/cas/model/CreateWHCertificateWithExtensionRequest.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef ALIBABACLOUD_CAS_MODEL_CREATEWHCERTIFICATEWITHEXTENSIONREQUEST_H_ -#define ALIBABACLOUD_CAS_MODEL_CREATEWHCERTIFICATEWITHEXTENSIONREQUEST_H_ - -#include -#include -#include -#include -#include - -namespace AlibabaCloud { -namespace Cas { -namespace Model { -class ALIBABACLOUD_CAS_EXPORT CreateWHCertificateWithExtensionRequest : public RpcServiceRequest { -public: - CreateWHCertificateWithExtensionRequest(); - ~CreateWHCertificateWithExtensionRequest(); - bool getAppendCrl() const; - void setAppendCrl(bool appendCrl); - std::string getCountryCode() const; - void setCountryCode(const std::string &countryCode); - long getImmediately() const; - void setImmediately(long immediately); - std::string getCommonName() const; - void setCommonName(const std::string &commonName); - std::string getSourceIp() const; - void setSourceIp(const std::string &sourceIp); - std::string getCertType() const; - void setCertType(const std::string &certType); - std::string getState() const; - void setState(const std::string &state); - std::string getCsrPemString() const; - void setCsrPemString(const std::string &csrPemString); - std::string getAlgorithmKeySize() const; - void setAlgorithmKeySize(const std::string &algorithmKeySize); - long getAfterTime() const; - void setAfterTime(long afterTime); - std::string getSans() const; - void setSans(const std::string &sans); - std::string getLocality() const; - void setLocality(const std::string &locality); - bool getBasicConstraintsCritical() const; - void setBasicConstraintsCritical(bool basicConstraintsCritical); - std::string getAliasName() const; - void setAliasName(const std::string &aliasName); - std::string getOrganization() const; - void setOrganization(const std::string &organization); - long getBeforeTime() const; - void setBeforeTime(long beforeTime); - std::string getParentIdentifier() const; - void setParentIdentifier(const std::string &parentIdentifier); - std::string getOrganizationUnit() const; - void setOrganizationUnit(const std::string &organizationUnit); - -private: - bool appendCrl_; - std::string countryCode_; - long immediately_; - std::string commonName_; - std::string sourceIp_; - std::string certType_; - std::string state_; - std::string csrPemString_; - std::string algorithmKeySize_; - long afterTime_; - std::string sans_; - std::string locality_; - bool basicConstraintsCritical_; - std::string aliasName_; - std::string organization_; - long beforeTime_; - std::string parentIdentifier_; - std::string organizationUnit_; -}; -} // namespace Model -} // namespace Cas -} // namespace AlibabaCloud -#endif // !ALIBABACLOUD_CAS_MODEL_CREATEWHCERTIFICATEWITHEXTENSIONREQUEST_H_ diff --git a/cas/include/alibabacloud/cas/model/GetCertWarehouseQuotaRequest.h b/cas/include/alibabacloud/cas/model/GetCertWarehouseQuotaRequest.h new file mode 100644 index 000000000..e925dc2be --- /dev/null +++ b/cas/include/alibabacloud/cas/model/GetCertWarehouseQuotaRequest.h @@ -0,0 +1,42 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef ALIBABACLOUD_CAS_MODEL_GETCERTWAREHOUSEQUOTAREQUEST_H_ +#define ALIBABACLOUD_CAS_MODEL_GETCERTWAREHOUSEQUOTAREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Cas { +namespace Model { +class ALIBABACLOUD_CAS_EXPORT GetCertWarehouseQuotaRequest : public RpcServiceRequest { +public: + GetCertWarehouseQuotaRequest(); + ~GetCertWarehouseQuotaRequest(); + std::string getSourceIp() const; + void setSourceIp(const std::string &sourceIp); + +private: + std::string sourceIp_; +}; +} // namespace Model +} // namespace Cas +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_CAS_MODEL_GETCERTWAREHOUSEQUOTAREQUEST_H_ diff --git a/cas/include/alibabacloud/cas/model/CreateWHCertificateWithExtensionResult.h b/cas/include/alibabacloud/cas/model/GetCertWarehouseQuotaResult.h similarity index 57% rename from cas/include/alibabacloud/cas/model/CreateWHCertificateWithExtensionResult.h rename to cas/include/alibabacloud/cas/model/GetCertWarehouseQuotaResult.h index 12eec1a33..67166373b 100644 --- a/cas/include/alibabacloud/cas/model/CreateWHCertificateWithExtensionResult.h +++ b/cas/include/alibabacloud/cas/model/GetCertWarehouseQuotaResult.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ALIBABACLOUD_CAS_MODEL_CREATEWHCERTIFICATEWITHEXTENSIONRESULT_H_ -#define ALIBABACLOUD_CAS_MODEL_CREATEWHCERTIFICATEWITHEXTENSIONRESULT_H_ +#ifndef ALIBABACLOUD_CAS_MODEL_GETCERTWAREHOUSEQUOTARESULT_H_ +#define ALIBABACLOUD_CAS_MODEL_GETCERTWAREHOUSEQUOTARESULT_H_ #include #include @@ -29,27 +29,25 @@ namespace AlibabaCloud { namespace Model { - class ALIBABACLOUD_CAS_EXPORT CreateWHCertificateWithExtensionResult : public ServiceResult + class ALIBABACLOUD_CAS_EXPORT GetCertWarehouseQuotaResult : public ServiceResult { public: - CreateWHCertificateWithExtensionResult(); - explicit CreateWHCertificateWithExtensionResult(const std::string &payload); - ~CreateWHCertificateWithExtensionResult(); - std::string getIdentifier()const; - std::string getCertificateChain()const; - std::string getCertificate()const; + GetCertWarehouseQuotaResult(); + explicit GetCertWarehouseQuotaResult(const std::string &payload); + ~GetCertWarehouseQuotaResult(); + long getTotalQuota()const; + long getUseCount()const; protected: void parse(const std::string &payload); private: - std::string identifier_; - std::string certificateChain_; - std::string certificate_; + long totalQuota_; + long useCount_; }; } } } -#endif // !ALIBABACLOUD_CAS_MODEL_CREATEWHCERTIFICATEWITHEXTENSIONRESULT_H_ \ No newline at end of file +#endif // !ALIBABACLOUD_CAS_MODEL_GETCERTWAREHOUSEQUOTARESULT_H_ \ No newline at end of file diff --git a/cas/include/alibabacloud/cas/model/ListCertRequest.h b/cas/include/alibabacloud/cas/model/ListCertRequest.h index 877178a27..cd340bfee 100644 --- a/cas/include/alibabacloud/cas/model/ListCertRequest.h +++ b/cas/include/alibabacloud/cas/model/ListCertRequest.h @@ -30,25 +30,28 @@ class ALIBABACLOUD_CAS_EXPORT ListCertRequest : public RpcServiceRequest { public: ListCertRequest(); ~ListCertRequest(); - long getShowSize() const; - void setShowSize(long showSize); - long getCurrentPage() const; - void setCurrentPage(long currentPage); std::string getSourceIp() const; void setSourceIp(const std::string &sourceIp); long getWarehouseId() const; void setWarehouseId(long warehouseId); + std::string getSourceType() const; + void setSourceType(const std::string &sourceType); std::string getKeyWord() const; void setKeyWord(const std::string &keyWord); + long getShowSize() const; + void setShowSize(long showSize); + long getCurrentPage() const; + void setCurrentPage(long currentPage); std::string getStatus() const; void setStatus(const std::string &status); private: - long showSize_; - long currentPage_; std::string sourceIp_; long warehouseId_; + std::string sourceType_; std::string keyWord_; + long showSize_; + long currentPage_; std::string status_; }; } // namespace Model diff --git a/cas/include/alibabacloud/cas/model/ListUserCertificateOrderRequest.h b/cas/include/alibabacloud/cas/model/ListUserCertificateOrderRequest.h index bd07597e9..ce946ef71 100644 --- a/cas/include/alibabacloud/cas/model/ListUserCertificateOrderRequest.h +++ b/cas/include/alibabacloud/cas/model/ListUserCertificateOrderRequest.h @@ -30,24 +30,24 @@ class ALIBABACLOUD_CAS_EXPORT ListUserCertificateOrderRequest : public RpcServic public: ListUserCertificateOrderRequest(); ~ListUserCertificateOrderRequest(); - std::string getSourceIp() const; - void setSourceIp(const std::string &sourceIp); - std::string getKeyword() const; - void setKeyword(const std::string &keyword); long getShowSize() const; void setShowSize(long showSize); long getCurrentPage() const; void setCurrentPage(long currentPage); + std::string getSourceIp() const; + void setSourceIp(const std::string &sourceIp); + std::string getKeyword() const; + void setKeyword(const std::string &keyword); std::string getStatus() const; void setStatus(const std::string &status); std::string getOrderType() const; void setOrderType(const std::string &orderType); private: - std::string sourceIp_; - std::string keyword_; long showSize_; long currentPage_; + std::string sourceIp_; + std::string keyword_; std::string status_; std::string orderType_; }; diff --git a/cas/include/alibabacloud/cas/model/ListUserCertificateOrderResult.h b/cas/include/alibabacloud/cas/model/ListUserCertificateOrderResult.h index cf2a50e1c..6ae781065 100644 --- a/cas/include/alibabacloud/cas/model/ListUserCertificateOrderResult.h +++ b/cas/include/alibabacloud/cas/model/ListUserCertificateOrderResult.h @@ -34,25 +34,41 @@ namespace AlibabaCloud public: struct CertificateOrderListItem { - std::string status; + std::string sha2; std::string productName; - std::string instanceId; - std::string productCode; - long certEndTime; + std::string issuer; + long certificateId; std::string sourceType; std::string certType; - long wildDomainCount; + bool upload; std::string partnerOrderId; - long certStartTime; - long orderId; - std::string algorithm; + std::string orgName; std::string rootBrand; + std::string name; + std::string startDate; long aliyunOrderId; std::string domainType; std::string trusteeStatus; + std::string sans; + long domainCount; + std::string commonName; + std::string status; + std::string serialNo; + std::string fingerprint; + std::string instanceId; + std::string productCode; + long certEndTime; + long wildDomainCount; + bool expired; + std::string city; + long certStartTime; + long orderId; + std::string algorithm; + std::string endDate; + std::string province; + std::string country; std::string domain; long buyDate; - long domainCount; }; diff --git a/cas/include/alibabacloud/cas/model/UploadPCACertResult.h b/cas/include/alibabacloud/cas/model/UploadPCACertResult.h index b7f948b09..a36cc95b7 100644 --- a/cas/include/alibabacloud/cas/model/UploadPCACertResult.h +++ b/cas/include/alibabacloud/cas/model/UploadPCACertResult.h @@ -37,10 +37,12 @@ namespace AlibabaCloud UploadPCACertResult(); explicit UploadPCACertResult(const std::string &payload); ~UploadPCACertResult(); + std::string getIdentifier()const; protected: void parse(const std::string &payload); private: + std::string identifier_; }; } diff --git a/cas/src/CasClient.cc b/cas/src/CasClient.cc index 8ef3af8c7..6dbfe4411 100644 --- a/cas/src/CasClient.cc +++ b/cas/src/CasClient.cc @@ -231,42 +231,6 @@ CasClient::CreateCertificateWithCsrRequestOutcomeCallable CasClient::createCerti return task->get_future(); } -CasClient::CreateWHCertificateWithExtensionOutcome CasClient::createWHCertificateWithExtension(const CreateWHCertificateWithExtensionRequest &request) const -{ - auto endpointOutcome = endpointProvider_->getEndpoint(); - if (!endpointOutcome.isSuccess()) - return CreateWHCertificateWithExtensionOutcome(endpointOutcome.error()); - - auto outcome = makeRequest(endpointOutcome.result(), request); - - if (outcome.isSuccess()) - return CreateWHCertificateWithExtensionOutcome(CreateWHCertificateWithExtensionResult(outcome.result())); - else - return CreateWHCertificateWithExtensionOutcome(outcome.error()); -} - -void CasClient::createWHCertificateWithExtensionAsync(const CreateWHCertificateWithExtensionRequest& request, const CreateWHCertificateWithExtensionAsyncHandler& handler, const std::shared_ptr& context) const -{ - auto fn = [this, request, handler, context]() - { - handler(this, request, createWHCertificateWithExtension(request), context); - }; - - asyncExecute(new Runnable(fn)); -} - -CasClient::CreateWHCertificateWithExtensionOutcomeCallable CasClient::createWHCertificateWithExtensionCallable(const CreateWHCertificateWithExtensionRequest &request) const -{ - auto task = std::make_shared>( - [this, request]() - { - return this->createWHCertificateWithExtension(request); - }); - - asyncExecute(new Runnable([task]() { (*task)(); })); - return task->get_future(); -} - CasClient::CreateWHClientCertificateOutcome CasClient::createWHClientCertificate(const CreateWHClientCertificateRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); @@ -519,6 +483,42 @@ CasClient::EncryptOutcomeCallable CasClient::encryptCallable(const EncryptReques return task->get_future(); } +CasClient::GetCertWarehouseQuotaOutcome CasClient::getCertWarehouseQuota(const GetCertWarehouseQuotaRequest &request) const +{ + auto endpointOutcome = endpointProvider_->getEndpoint(); + if (!endpointOutcome.isSuccess()) + return GetCertWarehouseQuotaOutcome(endpointOutcome.error()); + + auto outcome = makeRequest(endpointOutcome.result(), request); + + if (outcome.isSuccess()) + return GetCertWarehouseQuotaOutcome(GetCertWarehouseQuotaResult(outcome.result())); + else + return GetCertWarehouseQuotaOutcome(outcome.error()); +} + +void CasClient::getCertWarehouseQuotaAsync(const GetCertWarehouseQuotaRequest& request, const GetCertWarehouseQuotaAsyncHandler& handler, const std::shared_ptr& context) const +{ + auto fn = [this, request, handler, context]() + { + handler(this, request, getCertWarehouseQuota(request), context); + }; + + asyncExecute(new Runnable(fn)); +} + +CasClient::GetCertWarehouseQuotaOutcomeCallable CasClient::getCertWarehouseQuotaCallable(const GetCertWarehouseQuotaRequest &request) const +{ + auto task = std::make_shared>( + [this, request]() + { + return this->getCertWarehouseQuota(request); + }); + + asyncExecute(new Runnable([task]() { (*task)(); })); + return task->get_future(); +} + CasClient::ListCertOutcome CasClient::listCert(const ListCertRequest &request) const { auto endpointOutcome = endpointProvider_->getEndpoint(); diff --git a/cas/src/model/CreateWHCertificateWithExtensionRequest.cc b/cas/src/model/CreateWHCertificateWithExtensionRequest.cc deleted file mode 100644 index 618274c78..000000000 --- a/cas/src/model/CreateWHCertificateWithExtensionRequest.cc +++ /dev/null @@ -1,189 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include - -using AlibabaCloud::Cas::Model::CreateWHCertificateWithExtensionRequest; - -CreateWHCertificateWithExtensionRequest::CreateWHCertificateWithExtensionRequest() - : RpcServiceRequest("cas", "2020-04-07", "CreateWHCertificateWithExtension") { - setMethod(HttpRequest::Method::Post); -} - -CreateWHCertificateWithExtensionRequest::~CreateWHCertificateWithExtensionRequest() {} - -bool CreateWHCertificateWithExtensionRequest::getAppendCrl() const { - return appendCrl_; -} - -void CreateWHCertificateWithExtensionRequest::setAppendCrl(bool appendCrl) { - appendCrl_ = appendCrl; - setParameter(std::string("AppendCrl"), appendCrl ? "true" : "false"); -} - -std::string CreateWHCertificateWithExtensionRequest::getCountryCode() const { - return countryCode_; -} - -void CreateWHCertificateWithExtensionRequest::setCountryCode(const std::string &countryCode) { - countryCode_ = countryCode; - setParameter(std::string("CountryCode"), countryCode); -} - -long CreateWHCertificateWithExtensionRequest::getImmediately() const { - return immediately_; -} - -void CreateWHCertificateWithExtensionRequest::setImmediately(long immediately) { - immediately_ = immediately; - setParameter(std::string("Immediately"), std::to_string(immediately)); -} - -std::string CreateWHCertificateWithExtensionRequest::getCommonName() const { - return commonName_; -} - -void CreateWHCertificateWithExtensionRequest::setCommonName(const std::string &commonName) { - commonName_ = commonName; - setParameter(std::string("CommonName"), commonName); -} - -std::string CreateWHCertificateWithExtensionRequest::getSourceIp() const { - return sourceIp_; -} - -void CreateWHCertificateWithExtensionRequest::setSourceIp(const std::string &sourceIp) { - sourceIp_ = sourceIp; - setParameter(std::string("SourceIp"), sourceIp); -} - -std::string CreateWHCertificateWithExtensionRequest::getCertType() const { - return certType_; -} - -void CreateWHCertificateWithExtensionRequest::setCertType(const std::string &certType) { - certType_ = certType; - setParameter(std::string("CertType"), certType); -} - -std::string CreateWHCertificateWithExtensionRequest::getState() const { - return state_; -} - -void CreateWHCertificateWithExtensionRequest::setState(const std::string &state) { - state_ = state; - setParameter(std::string("State"), state); -} - -std::string CreateWHCertificateWithExtensionRequest::getCsrPemString() const { - return csrPemString_; -} - -void CreateWHCertificateWithExtensionRequest::setCsrPemString(const std::string &csrPemString) { - csrPemString_ = csrPemString; - setParameter(std::string("CsrPemString"), csrPemString); -} - -std::string CreateWHCertificateWithExtensionRequest::getAlgorithmKeySize() const { - return algorithmKeySize_; -} - -void CreateWHCertificateWithExtensionRequest::setAlgorithmKeySize(const std::string &algorithmKeySize) { - algorithmKeySize_ = algorithmKeySize; - setParameter(std::string("AlgorithmKeySize"), algorithmKeySize); -} - -long CreateWHCertificateWithExtensionRequest::getAfterTime() const { - return afterTime_; -} - -void CreateWHCertificateWithExtensionRequest::setAfterTime(long afterTime) { - afterTime_ = afterTime; - setParameter(std::string("AfterTime"), std::to_string(afterTime)); -} - -std::string CreateWHCertificateWithExtensionRequest::getSans() const { - return sans_; -} - -void CreateWHCertificateWithExtensionRequest::setSans(const std::string &sans) { - sans_ = sans; - setParameter(std::string("Sans"), sans); -} - -std::string CreateWHCertificateWithExtensionRequest::getLocality() const { - return locality_; -} - -void CreateWHCertificateWithExtensionRequest::setLocality(const std::string &locality) { - locality_ = locality; - setParameter(std::string("Locality"), locality); -} - -bool CreateWHCertificateWithExtensionRequest::getBasicConstraintsCritical() const { - return basicConstraintsCritical_; -} - -void CreateWHCertificateWithExtensionRequest::setBasicConstraintsCritical(bool basicConstraintsCritical) { - basicConstraintsCritical_ = basicConstraintsCritical; - setParameter(std::string("BasicConstraintsCritical"), basicConstraintsCritical ? "true" : "false"); -} - -std::string CreateWHCertificateWithExtensionRequest::getAliasName() const { - return aliasName_; -} - -void CreateWHCertificateWithExtensionRequest::setAliasName(const std::string &aliasName) { - aliasName_ = aliasName; - setParameter(std::string("AliasName"), aliasName); -} - -std::string CreateWHCertificateWithExtensionRequest::getOrganization() const { - return organization_; -} - -void CreateWHCertificateWithExtensionRequest::setOrganization(const std::string &organization) { - organization_ = organization; - setParameter(std::string("Organization"), organization); -} - -long CreateWHCertificateWithExtensionRequest::getBeforeTime() const { - return beforeTime_; -} - -void CreateWHCertificateWithExtensionRequest::setBeforeTime(long beforeTime) { - beforeTime_ = beforeTime; - setParameter(std::string("BeforeTime"), std::to_string(beforeTime)); -} - -std::string CreateWHCertificateWithExtensionRequest::getParentIdentifier() const { - return parentIdentifier_; -} - -void CreateWHCertificateWithExtensionRequest::setParentIdentifier(const std::string &parentIdentifier) { - parentIdentifier_ = parentIdentifier; - setParameter(std::string("ParentIdentifier"), parentIdentifier); -} - -std::string CreateWHCertificateWithExtensionRequest::getOrganizationUnit() const { - return organizationUnit_; -} - -void CreateWHCertificateWithExtensionRequest::setOrganizationUnit(const std::string &organizationUnit) { - organizationUnit_ = organizationUnit; - setParameter(std::string("OrganizationUnit"), organizationUnit); -} - diff --git a/cas/src/model/CreateWHCertificateWithExtensionResult.cc b/cas/src/model/CreateWHCertificateWithExtensionResult.cc deleted file mode 100644 index cdc12777a..000000000 --- a/cas/src/model/CreateWHCertificateWithExtensionResult.cc +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2009-2017 Alibaba Cloud All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -using namespace AlibabaCloud::Cas; -using namespace AlibabaCloud::Cas::Model; - -CreateWHCertificateWithExtensionResult::CreateWHCertificateWithExtensionResult() : - ServiceResult() -{} - -CreateWHCertificateWithExtensionResult::CreateWHCertificateWithExtensionResult(const std::string &payload) : - ServiceResult() -{ - parse(payload); -} - -CreateWHCertificateWithExtensionResult::~CreateWHCertificateWithExtensionResult() -{} - -void CreateWHCertificateWithExtensionResult::parse(const std::string &payload) -{ - Json::Reader reader; - Json::Value value; - reader.parse(payload, value); - setRequestId(value["RequestId"].asString()); - if(!value["Identifier"].isNull()) - identifier_ = value["Identifier"].asString(); - if(!value["Certificate"].isNull()) - certificate_ = value["Certificate"].asString(); - if(!value["CertificateChain"].isNull()) - certificateChain_ = value["CertificateChain"].asString(); - -} - -std::string CreateWHCertificateWithExtensionResult::getIdentifier()const -{ - return identifier_; -} - -std::string CreateWHCertificateWithExtensionResult::getCertificateChain()const -{ - return certificateChain_; -} - -std::string CreateWHCertificateWithExtensionResult::getCertificate()const -{ - return certificate_; -} - diff --git a/cas/src/model/GetCertWarehouseQuotaRequest.cc b/cas/src/model/GetCertWarehouseQuotaRequest.cc new file mode 100644 index 000000000..d893bd552 --- /dev/null +++ b/cas/src/model/GetCertWarehouseQuotaRequest.cc @@ -0,0 +1,36 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using AlibabaCloud::Cas::Model::GetCertWarehouseQuotaRequest; + +GetCertWarehouseQuotaRequest::GetCertWarehouseQuotaRequest() + : RpcServiceRequest("cas", "2020-04-07", "GetCertWarehouseQuota") { + setMethod(HttpRequest::Method::Post); +} + +GetCertWarehouseQuotaRequest::~GetCertWarehouseQuotaRequest() {} + +std::string GetCertWarehouseQuotaRequest::getSourceIp() const { + return sourceIp_; +} + +void GetCertWarehouseQuotaRequest::setSourceIp(const std::string &sourceIp) { + sourceIp_ = sourceIp; + setParameter(std::string("SourceIp"), sourceIp); +} + diff --git a/cas/src/model/GetCertWarehouseQuotaResult.cc b/cas/src/model/GetCertWarehouseQuotaResult.cc new file mode 100644 index 000000000..3bc13cb20 --- /dev/null +++ b/cas/src/model/GetCertWarehouseQuotaResult.cc @@ -0,0 +1,58 @@ +/* + * Copyright 2009-2017 Alibaba Cloud All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +using namespace AlibabaCloud::Cas; +using namespace AlibabaCloud::Cas::Model; + +GetCertWarehouseQuotaResult::GetCertWarehouseQuotaResult() : + ServiceResult() +{} + +GetCertWarehouseQuotaResult::GetCertWarehouseQuotaResult(const std::string &payload) : + ServiceResult() +{ + parse(payload); +} + +GetCertWarehouseQuotaResult::~GetCertWarehouseQuotaResult() +{} + +void GetCertWarehouseQuotaResult::parse(const std::string &payload) +{ + Json::Reader reader; + Json::Value value; + reader.parse(payload, value); + setRequestId(value["RequestId"].asString()); + if(!value["TotalQuota"].isNull()) + totalQuota_ = std::stol(value["TotalQuota"].asString()); + if(!value["UseCount"].isNull()) + useCount_ = std::stol(value["UseCount"].asString()); + +} + +long GetCertWarehouseQuotaResult::getTotalQuota()const +{ + return totalQuota_; +} + +long GetCertWarehouseQuotaResult::getUseCount()const +{ + return useCount_; +} + diff --git a/cas/src/model/ListCertRequest.cc b/cas/src/model/ListCertRequest.cc index 2c69f6983..c984dac27 100644 --- a/cas/src/model/ListCertRequest.cc +++ b/cas/src/model/ListCertRequest.cc @@ -25,24 +25,6 @@ ListCertRequest::ListCertRequest() ListCertRequest::~ListCertRequest() {} -long ListCertRequest::getShowSize() const { - return showSize_; -} - -void ListCertRequest::setShowSize(long showSize) { - showSize_ = showSize; - setParameter(std::string("ShowSize"), std::to_string(showSize)); -} - -long ListCertRequest::getCurrentPage() const { - return currentPage_; -} - -void ListCertRequest::setCurrentPage(long currentPage) { - currentPage_ = currentPage; - setParameter(std::string("CurrentPage"), std::to_string(currentPage)); -} - std::string ListCertRequest::getSourceIp() const { return sourceIp_; } @@ -61,6 +43,15 @@ void ListCertRequest::setWarehouseId(long warehouseId) { setParameter(std::string("WarehouseId"), std::to_string(warehouseId)); } +std::string ListCertRequest::getSourceType() const { + return sourceType_; +} + +void ListCertRequest::setSourceType(const std::string &sourceType) { + sourceType_ = sourceType; + setParameter(std::string("SourceType"), sourceType); +} + std::string ListCertRequest::getKeyWord() const { return keyWord_; } @@ -70,6 +61,24 @@ void ListCertRequest::setKeyWord(const std::string &keyWord) { setParameter(std::string("KeyWord"), keyWord); } +long ListCertRequest::getShowSize() const { + return showSize_; +} + +void ListCertRequest::setShowSize(long showSize) { + showSize_ = showSize; + setParameter(std::string("ShowSize"), std::to_string(showSize)); +} + +long ListCertRequest::getCurrentPage() const { + return currentPage_; +} + +void ListCertRequest::setCurrentPage(long currentPage) { + currentPage_ = currentPage; + setParameter(std::string("CurrentPage"), std::to_string(currentPage)); +} + std::string ListCertRequest::getStatus() const { return status_; } diff --git a/cas/src/model/ListUserCertificateOrderRequest.cc b/cas/src/model/ListUserCertificateOrderRequest.cc index 094837b2d..3d0d71259 100644 --- a/cas/src/model/ListUserCertificateOrderRequest.cc +++ b/cas/src/model/ListUserCertificateOrderRequest.cc @@ -25,24 +25,6 @@ ListUserCertificateOrderRequest::ListUserCertificateOrderRequest() ListUserCertificateOrderRequest::~ListUserCertificateOrderRequest() {} -std::string ListUserCertificateOrderRequest::getSourceIp() const { - return sourceIp_; -} - -void ListUserCertificateOrderRequest::setSourceIp(const std::string &sourceIp) { - sourceIp_ = sourceIp; - setParameter(std::string("SourceIp"), sourceIp); -} - -std::string ListUserCertificateOrderRequest::getKeyword() const { - return keyword_; -} - -void ListUserCertificateOrderRequest::setKeyword(const std::string &keyword) { - keyword_ = keyword; - setParameter(std::string("Keyword"), keyword); -} - long ListUserCertificateOrderRequest::getShowSize() const { return showSize_; } @@ -61,6 +43,24 @@ void ListUserCertificateOrderRequest::setCurrentPage(long currentPage) { setParameter(std::string("CurrentPage"), std::to_string(currentPage)); } +std::string ListUserCertificateOrderRequest::getSourceIp() const { + return sourceIp_; +} + +void ListUserCertificateOrderRequest::setSourceIp(const std::string &sourceIp) { + sourceIp_ = sourceIp; + setParameter(std::string("SourceIp"), sourceIp); +} + +std::string ListUserCertificateOrderRequest::getKeyword() const { + return keyword_; +} + +void ListUserCertificateOrderRequest::setKeyword(const std::string &keyword) { + keyword_ = keyword; + setParameter(std::string("Keyword"), keyword); +} + std::string ListUserCertificateOrderRequest::getStatus() const { return status_; } diff --git a/cas/src/model/ListUserCertificateOrderResult.cc b/cas/src/model/ListUserCertificateOrderResult.cc index 4a6452095..7ea1fdd9a 100644 --- a/cas/src/model/ListUserCertificateOrderResult.cc +++ b/cas/src/model/ListUserCertificateOrderResult.cc @@ -81,6 +81,38 @@ void ListUserCertificateOrderResult::parse(const std::string &payload) certificateOrderListObject.trusteeStatus = valueCertificateOrderListCertificateOrderListItem["TrusteeStatus"].asString(); if(!valueCertificateOrderListCertificateOrderListItem["WildDomainCount"].isNull()) certificateOrderListObject.wildDomainCount = std::stol(valueCertificateOrderListCertificateOrderListItem["WildDomainCount"].asString()); + if(!valueCertificateOrderListCertificateOrderListItem["CertificateId"].isNull()) + certificateOrderListObject.certificateId = std::stol(valueCertificateOrderListCertificateOrderListItem["CertificateId"].asString()); + if(!valueCertificateOrderListCertificateOrderListItem["Name"].isNull()) + certificateOrderListObject.name = valueCertificateOrderListCertificateOrderListItem["Name"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["CommonName"].isNull()) + certificateOrderListObject.commonName = valueCertificateOrderListCertificateOrderListItem["CommonName"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["Fingerprint"].isNull()) + certificateOrderListObject.fingerprint = valueCertificateOrderListCertificateOrderListItem["Fingerprint"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["Sha2"].isNull()) + certificateOrderListObject.sha2 = valueCertificateOrderListCertificateOrderListItem["Sha2"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["SerialNo"].isNull()) + certificateOrderListObject.serialNo = valueCertificateOrderListCertificateOrderListItem["SerialNo"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["Issuer"].isNull()) + certificateOrderListObject.issuer = valueCertificateOrderListCertificateOrderListItem["Issuer"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["OrgName"].isNull()) + certificateOrderListObject.orgName = valueCertificateOrderListCertificateOrderListItem["OrgName"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["Province"].isNull()) + certificateOrderListObject.province = valueCertificateOrderListCertificateOrderListItem["Province"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["City"].isNull()) + certificateOrderListObject.city = valueCertificateOrderListCertificateOrderListItem["City"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["Country"].isNull()) + certificateOrderListObject.country = valueCertificateOrderListCertificateOrderListItem["Country"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["Sans"].isNull()) + certificateOrderListObject.sans = valueCertificateOrderListCertificateOrderListItem["Sans"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["Expired"].isNull()) + certificateOrderListObject.expired = valueCertificateOrderListCertificateOrderListItem["Expired"].asString() == "true"; + if(!valueCertificateOrderListCertificateOrderListItem["Upload"].isNull()) + certificateOrderListObject.upload = valueCertificateOrderListCertificateOrderListItem["Upload"].asString() == "true"; + if(!valueCertificateOrderListCertificateOrderListItem["StartDate"].isNull()) + certificateOrderListObject.startDate = valueCertificateOrderListCertificateOrderListItem["StartDate"].asString(); + if(!valueCertificateOrderListCertificateOrderListItem["EndDate"].isNull()) + certificateOrderListObject.endDate = valueCertificateOrderListCertificateOrderListItem["EndDate"].asString(); certificateOrderList_.push_back(certificateOrderListObject); } if(!value["ShowSize"].isNull()) diff --git a/cas/src/model/UploadPCACertResult.cc b/cas/src/model/UploadPCACertResult.cc index 55cdd64b0..05134fbdb 100644 --- a/cas/src/model/UploadPCACertResult.cc +++ b/cas/src/model/UploadPCACertResult.cc @@ -39,6 +39,13 @@ void UploadPCACertResult::parse(const std::string &payload) Json::Value value; reader.parse(payload, value); setRequestId(value["RequestId"].asString()); + if(!value["Identifier"].isNull()) + identifier_ = value["Identifier"].asString(); } +std::string UploadPCACertResult::getIdentifier()const +{ + return identifier_; +} +