diff --git a/VERSION b/VERSION index cd466aa3e..65dbe9b80 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.36.1466 \ No newline at end of file +1.36.1467 \ No newline at end of file diff --git a/imgsearch/include/alibabacloud/imgsearch/model/AddImageRequest.h b/imgsearch/include/alibabacloud/imgsearch/model/AddImageRequest.h index fecfc6219..3800707d6 100644 --- a/imgsearch/include/alibabacloud/imgsearch/model/AddImageRequest.h +++ b/imgsearch/include/alibabacloud/imgsearch/model/AddImageRequest.h @@ -1,57 +1,51 @@ /* * 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_IMGSEARCH_MODEL_ADDIMAGEREQUEST_H_ -#define ALIBABACLOUD_IMGSEARCH_MODEL_ADDIMAGEREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imgsearch - { - namespace Model - { - class ALIBABACLOUD_IMGSEARCH_EXPORT AddImageRequest : public RpcServiceRequest - { - - public: - AddImageRequest(); - ~AddImageRequest(); - - std::string getEntityId()const; - void setEntityId(const std::string& entityId); - std::string getDbName()const; - void setDbName(const std::string& dbName); - std::string getImageUrl()const; - void setImageUrl(const std::string& imageUrl); - std::string getExtraData()const; - void setExtraData(const std::string& extraData); - - private: - std::string entityId_; - std::string dbName_; - std::string imageUrl_; - std::string extraData_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_ADDIMAGEREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_IMGSEARCH_MODEL_ADDIMAGEREQUEST_H_ +#define ALIBABACLOUD_IMGSEARCH_MODEL_ADDIMAGEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Imgsearch { +namespace Model { +class ALIBABACLOUD_IMGSEARCH_EXPORT AddImageRequest : public RpcServiceRequest { +public: + AddImageRequest(); + ~AddImageRequest(); + std::string getEntityId() const; + void setEntityId(const std::string &entityId); + std::string getDbName() const; + void setDbName(const std::string &dbName); + std::string getImageUrl() const; + void setImageUrl(const std::string &imageUrl); + std::string getExtraData() const; + void setExtraData(const std::string &extraData); + +private: + std::string entityId_; + std::string dbName_; + std::string imageUrl_; + std::string extraData_; +}; +} // namespace Model +} // namespace Imgsearch +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_ADDIMAGEREQUEST_H_ diff --git a/imgsearch/include/alibabacloud/imgsearch/model/CreateImageDbRequest.h b/imgsearch/include/alibabacloud/imgsearch/model/CreateImageDbRequest.h index 1b3f60afa..3c8c2eee3 100644 --- a/imgsearch/include/alibabacloud/imgsearch/model/CreateImageDbRequest.h +++ b/imgsearch/include/alibabacloud/imgsearch/model/CreateImageDbRequest.h @@ -1,48 +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_IMGSEARCH_MODEL_CREATEIMAGEDBREQUEST_H_ -#define ALIBABACLOUD_IMGSEARCH_MODEL_CREATEIMAGEDBREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imgsearch - { - namespace Model - { - class ALIBABACLOUD_IMGSEARCH_EXPORT CreateImageDbRequest : public RpcServiceRequest - { - - public: - CreateImageDbRequest(); - ~CreateImageDbRequest(); - - std::string getName()const; - void setName(const std::string& name); - - private: - std::string name_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_CREATEIMAGEDBREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_IMGSEARCH_MODEL_CREATEIMAGEDBREQUEST_H_ +#define ALIBABACLOUD_IMGSEARCH_MODEL_CREATEIMAGEDBREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Imgsearch { +namespace Model { +class ALIBABACLOUD_IMGSEARCH_EXPORT CreateImageDbRequest : public RpcServiceRequest { +public: + CreateImageDbRequest(); + ~CreateImageDbRequest(); + std::string getName() const; + void setName(const std::string &name); + +private: + std::string name_; +}; +} // namespace Model +} // namespace Imgsearch +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_CREATEIMAGEDBREQUEST_H_ diff --git a/imgsearch/include/alibabacloud/imgsearch/model/DeleteImageDbRequest.h b/imgsearch/include/alibabacloud/imgsearch/model/DeleteImageDbRequest.h index 4bd2dce7e..6ff5903a5 100644 --- a/imgsearch/include/alibabacloud/imgsearch/model/DeleteImageDbRequest.h +++ b/imgsearch/include/alibabacloud/imgsearch/model/DeleteImageDbRequest.h @@ -1,48 +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_IMGSEARCH_MODEL_DELETEIMAGEDBREQUEST_H_ -#define ALIBABACLOUD_IMGSEARCH_MODEL_DELETEIMAGEDBREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imgsearch - { - namespace Model - { - class ALIBABACLOUD_IMGSEARCH_EXPORT DeleteImageDbRequest : public RpcServiceRequest - { - - public: - DeleteImageDbRequest(); - ~DeleteImageDbRequest(); - - std::string getName()const; - void setName(const std::string& name); - - private: - std::string name_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_DELETEIMAGEDBREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_IMGSEARCH_MODEL_DELETEIMAGEDBREQUEST_H_ +#define ALIBABACLOUD_IMGSEARCH_MODEL_DELETEIMAGEDBREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Imgsearch { +namespace Model { +class ALIBABACLOUD_IMGSEARCH_EXPORT DeleteImageDbRequest : public RpcServiceRequest { +public: + DeleteImageDbRequest(); + ~DeleteImageDbRequest(); + std::string getName() const; + void setName(const std::string &name); + +private: + std::string name_; +}; +} // namespace Model +} // namespace Imgsearch +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_DELETEIMAGEDBREQUEST_H_ diff --git a/imgsearch/include/alibabacloud/imgsearch/model/DeleteImageRequest.h b/imgsearch/include/alibabacloud/imgsearch/model/DeleteImageRequest.h index 15151a463..c7ff86402 100644 --- a/imgsearch/include/alibabacloud/imgsearch/model/DeleteImageRequest.h +++ b/imgsearch/include/alibabacloud/imgsearch/model/DeleteImageRequest.h @@ -1,51 +1,45 @@ /* * 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_IMGSEARCH_MODEL_DELETEIMAGEREQUEST_H_ -#define ALIBABACLOUD_IMGSEARCH_MODEL_DELETEIMAGEREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imgsearch - { - namespace Model - { - class ALIBABACLOUD_IMGSEARCH_EXPORT DeleteImageRequest : public RpcServiceRequest - { - - public: - DeleteImageRequest(); - ~DeleteImageRequest(); - - std::string getEntityId()const; - void setEntityId(const std::string& entityId); - std::string getDbName()const; - void setDbName(const std::string& dbName); - - private: - std::string entityId_; - std::string dbName_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_DELETEIMAGEREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_IMGSEARCH_MODEL_DELETEIMAGEREQUEST_H_ +#define ALIBABACLOUD_IMGSEARCH_MODEL_DELETEIMAGEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Imgsearch { +namespace Model { +class ALIBABACLOUD_IMGSEARCH_EXPORT DeleteImageRequest : public RpcServiceRequest { +public: + DeleteImageRequest(); + ~DeleteImageRequest(); + std::string getEntityId() const; + void setEntityId(const std::string &entityId); + std::string getDbName() const; + void setDbName(const std::string &dbName); + +private: + std::string entityId_; + std::string dbName_; +}; +} // namespace Model +} // namespace Imgsearch +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_DELETEIMAGEREQUEST_H_ diff --git a/imgsearch/include/alibabacloud/imgsearch/model/ListImageDbsRequest.h b/imgsearch/include/alibabacloud/imgsearch/model/ListImageDbsRequest.h index eddf76b92..acc472b81 100644 --- a/imgsearch/include/alibabacloud/imgsearch/model/ListImageDbsRequest.h +++ b/imgsearch/include/alibabacloud/imgsearch/model/ListImageDbsRequest.h @@ -1,45 +1,39 @@ /* * 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_IMGSEARCH_MODEL_LISTIMAGEDBSREQUEST_H_ -#define ALIBABACLOUD_IMGSEARCH_MODEL_LISTIMAGEDBSREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imgsearch - { - namespace Model - { - class ALIBABACLOUD_IMGSEARCH_EXPORT ListImageDbsRequest : public RpcServiceRequest - { - - public: - ListImageDbsRequest(); - ~ListImageDbsRequest(); - - - private: - - }; - } - } -} -#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_LISTIMAGEDBSREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_IMGSEARCH_MODEL_LISTIMAGEDBSREQUEST_H_ +#define ALIBABACLOUD_IMGSEARCH_MODEL_LISTIMAGEDBSREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Imgsearch { +namespace Model { +class ALIBABACLOUD_IMGSEARCH_EXPORT ListImageDbsRequest : public RpcServiceRequest { +public: + ListImageDbsRequest(); + ~ListImageDbsRequest(); + +private: +}; +} // namespace Model +} // namespace Imgsearch +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_LISTIMAGEDBSREQUEST_H_ diff --git a/imgsearch/include/alibabacloud/imgsearch/model/ListImagesRequest.h b/imgsearch/include/alibabacloud/imgsearch/model/ListImagesRequest.h index 38b5b3849..17020f558 100644 --- a/imgsearch/include/alibabacloud/imgsearch/model/ListImagesRequest.h +++ b/imgsearch/include/alibabacloud/imgsearch/model/ListImagesRequest.h @@ -1,63 +1,57 @@ /* * 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_IMGSEARCH_MODEL_LISTIMAGESREQUEST_H_ -#define ALIBABACLOUD_IMGSEARCH_MODEL_LISTIMAGESREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imgsearch - { - namespace Model - { - class ALIBABACLOUD_IMGSEARCH_EXPORT ListImagesRequest : public RpcServiceRequest - { - - public: - ListImagesRequest(); - ~ListImagesRequest(); - - std::string getEntityIdPrefix()const; - void setEntityIdPrefix(const std::string& entityIdPrefix); - int getLimit()const; - void setLimit(int limit); - std::string getOrder()const; - void setOrder(const std::string& order); - int getOffset()const; - void setOffset(int offset); - std::string getToken()const; - void setToken(const std::string& token); - std::string getDbName()const; - void setDbName(const std::string& dbName); - - private: - std::string entityIdPrefix_; - int limit_; - std::string order_; - int offset_; - std::string token_; - std::string dbName_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_LISTIMAGESREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_IMGSEARCH_MODEL_LISTIMAGESREQUEST_H_ +#define ALIBABACLOUD_IMGSEARCH_MODEL_LISTIMAGESREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Imgsearch { +namespace Model { +class ALIBABACLOUD_IMGSEARCH_EXPORT ListImagesRequest : public RpcServiceRequest { +public: + ListImagesRequest(); + ~ListImagesRequest(); + std::string getEntityIdPrefix() const; + void setEntityIdPrefix(const std::string &entityIdPrefix); + int getLimit() const; + void setLimit(int limit); + std::string getOrder() const; + void setOrder(const std::string &order); + int getOffset() const; + void setOffset(int offset); + std::string getToken() const; + void setToken(const std::string &token); + std::string getDbName() const; + void setDbName(const std::string &dbName); + +private: + std::string entityIdPrefix_; + int limit_; + std::string order_; + int offset_; + std::string token_; + std::string dbName_; +}; +} // namespace Model +} // namespace Imgsearch +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_LISTIMAGESREQUEST_H_ diff --git a/imgsearch/include/alibabacloud/imgsearch/model/SearchImageRequest.h b/imgsearch/include/alibabacloud/imgsearch/model/SearchImageRequest.h index 858224419..f8326a609 100644 --- a/imgsearch/include/alibabacloud/imgsearch/model/SearchImageRequest.h +++ b/imgsearch/include/alibabacloud/imgsearch/model/SearchImageRequest.h @@ -1,54 +1,48 @@ /* * 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_IMGSEARCH_MODEL_SEARCHIMAGEREQUEST_H_ -#define ALIBABACLOUD_IMGSEARCH_MODEL_SEARCHIMAGEREQUEST_H_ - -#include -#include -#include -#include - -namespace AlibabaCloud -{ - namespace Imgsearch - { - namespace Model - { - class ALIBABACLOUD_IMGSEARCH_EXPORT SearchImageRequest : public RpcServiceRequest - { - - public: - SearchImageRequest(); - ~SearchImageRequest(); - - std::string getDbName()const; - void setDbName(const std::string& dbName); - std::string getImageUrl()const; - void setImageUrl(const std::string& imageUrl); - int getLimit()const; - void setLimit(int limit); - - private: - std::string dbName_; - std::string imageUrl_; - int limit_; - - }; - } - } -} -#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_SEARCHIMAGEREQUEST_H_ \ No newline at end of file + */ + +#ifndef ALIBABACLOUD_IMGSEARCH_MODEL_SEARCHIMAGEREQUEST_H_ +#define ALIBABACLOUD_IMGSEARCH_MODEL_SEARCHIMAGEREQUEST_H_ + +#include +#include +#include +#include +#include + +namespace AlibabaCloud { +namespace Imgsearch { +namespace Model { +class ALIBABACLOUD_IMGSEARCH_EXPORT SearchImageRequest : public RpcServiceRequest { +public: + SearchImageRequest(); + ~SearchImageRequest(); + std::string getDbName() const; + void setDbName(const std::string &dbName); + std::string getImageUrl() const; + void setImageUrl(const std::string &imageUrl); + int getLimit() const; + void setLimit(int limit); + +private: + std::string dbName_; + std::string imageUrl_; + int limit_; +}; +} // namespace Model +} // namespace Imgsearch +} // namespace AlibabaCloud +#endif // !ALIBABACLOUD_IMGSEARCH_MODEL_SEARCHIMAGEREQUEST_H_ diff --git a/imgsearch/src/ImgsearchClient.cc b/imgsearch/src/ImgsearchClient.cc index 0a164b3d1..e73484389 100644 --- a/imgsearch/src/ImgsearchClient.cc +++ b/imgsearch/src/ImgsearchClient.cc @@ -31,21 +31,21 @@ ImgsearchClient::ImgsearchClient(const Credentials &credentials, const ClientCon RpcServiceClient(SERVICE_NAME, std::make_shared(credentials), configuration) { auto locationClient = std::make_shared(credentials, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "imgsearch"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } ImgsearchClient::ImgsearchClient(const std::shared_ptr& credentialsProvider, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, credentialsProvider, configuration) { auto locationClient = std::make_shared(credentialsProvider, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "imgsearch"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } ImgsearchClient::ImgsearchClient(const std::string & accessKeyId, const std::string & accessKeySecret, const ClientConfiguration & configuration) : RpcServiceClient(SERVICE_NAME, std::make_shared(accessKeyId, accessKeySecret), configuration) { auto locationClient = std::make_shared(accessKeyId, accessKeySecret, configuration); - endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, "imgsearch"); + endpointProvider_ = std::make_shared(locationClient, configuration.regionId(), SERVICE_NAME, ""); } ImgsearchClient::~ImgsearchClient() diff --git a/imgsearch/src/model/AddImageRequest.cc b/imgsearch/src/model/AddImageRequest.cc index 79408f897..88d697004 100644 --- a/imgsearch/src/model/AddImageRequest.cc +++ b/imgsearch/src/model/AddImageRequest.cc @@ -1,73 +1,63 @@ /* * 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::Imgsearch::Model::AddImageRequest; - -AddImageRequest::AddImageRequest() : - RpcServiceRequest("imgsearch", "2020-03-20", "AddImage") -{ - setMethod(HttpRequest::Method::Post); -} - -AddImageRequest::~AddImageRequest() -{} - -std::string AddImageRequest::getEntityId()const -{ - return entityId_; + */ + +#include + +using AlibabaCloud::Imgsearch::Model::AddImageRequest; + +AddImageRequest::AddImageRequest() + : RpcServiceRequest("imgsearch", "2020-03-20", "AddImage") { + setMethod(HttpRequest::Method::Post); } -void AddImageRequest::setEntityId(const std::string& entityId) -{ - entityId_ = entityId; - setBodyParameter("EntityId", entityId); +AddImageRequest::~AddImageRequest() {} + +std::string AddImageRequest::getEntityId() const { + return entityId_; } -std::string AddImageRequest::getDbName()const -{ - return dbName_; +void AddImageRequest::setEntityId(const std::string &entityId) { + entityId_ = entityId; + setBodyParameter(std::string("EntityId"), entityId); } -void AddImageRequest::setDbName(const std::string& dbName) -{ - dbName_ = dbName; - setBodyParameter("DbName", dbName); +std::string AddImageRequest::getDbName() const { + return dbName_; } -std::string AddImageRequest::getImageUrl()const -{ - return imageUrl_; +void AddImageRequest::setDbName(const std::string &dbName) { + dbName_ = dbName; + setBodyParameter(std::string("DbName"), dbName); } -void AddImageRequest::setImageUrl(const std::string& imageUrl) -{ - imageUrl_ = imageUrl; - setBodyParameter("ImageUrl", imageUrl); +std::string AddImageRequest::getImageUrl() const { + return imageUrl_; } -std::string AddImageRequest::getExtraData()const -{ - return extraData_; +void AddImageRequest::setImageUrl(const std::string &imageUrl) { + imageUrl_ = imageUrl; + setBodyParameter(std::string("ImageUrl"), imageUrl); } -void AddImageRequest::setExtraData(const std::string& extraData) -{ - extraData_ = extraData; - setBodyParameter("ExtraData", extraData); +std::string AddImageRequest::getExtraData() const { + return extraData_; +} + +void AddImageRequest::setExtraData(const std::string &extraData) { + extraData_ = extraData; + setBodyParameter(std::string("ExtraData"), extraData); } diff --git a/imgsearch/src/model/CreateImageDbRequest.cc b/imgsearch/src/model/CreateImageDbRequest.cc index 56b5e1375..df6a06bd1 100644 --- a/imgsearch/src/model/CreateImageDbRequest.cc +++ b/imgsearch/src/model/CreateImageDbRequest.cc @@ -1,40 +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::Imgsearch::Model::CreateImageDbRequest; - -CreateImageDbRequest::CreateImageDbRequest() : - RpcServiceRequest("imgsearch", "2020-03-20", "CreateImageDb") -{ - setMethod(HttpRequest::Method::Post); -} - -CreateImageDbRequest::~CreateImageDbRequest() -{} - -std::string CreateImageDbRequest::getName()const -{ - return name_; + */ + +#include + +using AlibabaCloud::Imgsearch::Model::CreateImageDbRequest; + +CreateImageDbRequest::CreateImageDbRequest() + : RpcServiceRequest("imgsearch", "2020-03-20", "CreateImageDb") { + setMethod(HttpRequest::Method::Post); } -void CreateImageDbRequest::setName(const std::string& name) -{ - name_ = name; - setBodyParameter("Name", name); +CreateImageDbRequest::~CreateImageDbRequest() {} + +std::string CreateImageDbRequest::getName() const { + return name_; +} + +void CreateImageDbRequest::setName(const std::string &name) { + name_ = name; + setBodyParameter(std::string("Name"), name); } diff --git a/imgsearch/src/model/DeleteImageDbRequest.cc b/imgsearch/src/model/DeleteImageDbRequest.cc index 4d57e89d2..544f14c22 100644 --- a/imgsearch/src/model/DeleteImageDbRequest.cc +++ b/imgsearch/src/model/DeleteImageDbRequest.cc @@ -1,40 +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::Imgsearch::Model::DeleteImageDbRequest; - -DeleteImageDbRequest::DeleteImageDbRequest() : - RpcServiceRequest("imgsearch", "2020-03-20", "DeleteImageDb") -{ - setMethod(HttpRequest::Method::Post); -} - -DeleteImageDbRequest::~DeleteImageDbRequest() -{} - -std::string DeleteImageDbRequest::getName()const -{ - return name_; + */ + +#include + +using AlibabaCloud::Imgsearch::Model::DeleteImageDbRequest; + +DeleteImageDbRequest::DeleteImageDbRequest() + : RpcServiceRequest("imgsearch", "2020-03-20", "DeleteImageDb") { + setMethod(HttpRequest::Method::Post); } -void DeleteImageDbRequest::setName(const std::string& name) -{ - name_ = name; - setBodyParameter("Name", name); +DeleteImageDbRequest::~DeleteImageDbRequest() {} + +std::string DeleteImageDbRequest::getName() const { + return name_; +} + +void DeleteImageDbRequest::setName(const std::string &name) { + name_ = name; + setBodyParameter(std::string("Name"), name); } diff --git a/imgsearch/src/model/DeleteImageRequest.cc b/imgsearch/src/model/DeleteImageRequest.cc index 8583d0c07..9a75867d7 100644 --- a/imgsearch/src/model/DeleteImageRequest.cc +++ b/imgsearch/src/model/DeleteImageRequest.cc @@ -1,51 +1,45 @@ /* * 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::Imgsearch::Model::DeleteImageRequest; - -DeleteImageRequest::DeleteImageRequest() : - RpcServiceRequest("imgsearch", "2020-03-20", "DeleteImage") -{ - setMethod(HttpRequest::Method::Post); -} - -DeleteImageRequest::~DeleteImageRequest() -{} - -std::string DeleteImageRequest::getEntityId()const -{ - return entityId_; + */ + +#include + +using AlibabaCloud::Imgsearch::Model::DeleteImageRequest; + +DeleteImageRequest::DeleteImageRequest() + : RpcServiceRequest("imgsearch", "2020-03-20", "DeleteImage") { + setMethod(HttpRequest::Method::Post); } -void DeleteImageRequest::setEntityId(const std::string& entityId) -{ - entityId_ = entityId; - setBodyParameter("EntityId", entityId); +DeleteImageRequest::~DeleteImageRequest() {} + +std::string DeleteImageRequest::getEntityId() const { + return entityId_; } -std::string DeleteImageRequest::getDbName()const -{ - return dbName_; +void DeleteImageRequest::setEntityId(const std::string &entityId) { + entityId_ = entityId; + setBodyParameter(std::string("EntityId"), entityId); } -void DeleteImageRequest::setDbName(const std::string& dbName) -{ - dbName_ = dbName; - setBodyParameter("DbName", dbName); +std::string DeleteImageRequest::getDbName() const { + return dbName_; +} + +void DeleteImageRequest::setDbName(const std::string &dbName) { + dbName_ = dbName; + setBodyParameter(std::string("DbName"), dbName); } diff --git a/imgsearch/src/model/ListImageDbsRequest.cc b/imgsearch/src/model/ListImageDbsRequest.cc index 2c9252e41..08570411d 100644 --- a/imgsearch/src/model/ListImageDbsRequest.cc +++ b/imgsearch/src/model/ListImageDbsRequest.cc @@ -1,29 +1,27 @@ /* * 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::Imgsearch::Model::ListImageDbsRequest; - -ListImageDbsRequest::ListImageDbsRequest() : - RpcServiceRequest("imgsearch", "2020-03-20", "ListImageDbs") -{ - setMethod(HttpRequest::Method::Post); -} - -ListImageDbsRequest::~ListImageDbsRequest() -{} - + */ + +#include + +using AlibabaCloud::Imgsearch::Model::ListImageDbsRequest; + +ListImageDbsRequest::ListImageDbsRequest() + : RpcServiceRequest("imgsearch", "2020-03-20", "ListImageDbs") { + setMethod(HttpRequest::Method::Post); +} + +ListImageDbsRequest::~ListImageDbsRequest() {} + diff --git a/imgsearch/src/model/ListImagesRequest.cc b/imgsearch/src/model/ListImagesRequest.cc index 2d34c7029..c74dc3d79 100644 --- a/imgsearch/src/model/ListImagesRequest.cc +++ b/imgsearch/src/model/ListImagesRequest.cc @@ -1,95 +1,81 @@ /* * 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::Imgsearch::Model::ListImagesRequest; - -ListImagesRequest::ListImagesRequest() : - RpcServiceRequest("imgsearch", "2020-03-20", "ListImages") -{ - setMethod(HttpRequest::Method::Post); -} - -ListImagesRequest::~ListImagesRequest() -{} - -std::string ListImagesRequest::getEntityIdPrefix()const -{ - return entityIdPrefix_; + */ + +#include + +using AlibabaCloud::Imgsearch::Model::ListImagesRequest; + +ListImagesRequest::ListImagesRequest() + : RpcServiceRequest("imgsearch", "2020-03-20", "ListImages") { + setMethod(HttpRequest::Method::Post); } -void ListImagesRequest::setEntityIdPrefix(const std::string& entityIdPrefix) -{ - entityIdPrefix_ = entityIdPrefix; - setBodyParameter("EntityIdPrefix", entityIdPrefix); +ListImagesRequest::~ListImagesRequest() {} + +std::string ListImagesRequest::getEntityIdPrefix() const { + return entityIdPrefix_; } -int ListImagesRequest::getLimit()const -{ - return limit_; +void ListImagesRequest::setEntityIdPrefix(const std::string &entityIdPrefix) { + entityIdPrefix_ = entityIdPrefix; + setBodyParameter(std::string("EntityIdPrefix"), entityIdPrefix); } -void ListImagesRequest::setLimit(int limit) -{ - limit_ = limit; - setBodyParameter("Limit", std::to_string(limit)); +int ListImagesRequest::getLimit() const { + return limit_; } -std::string ListImagesRequest::getOrder()const -{ - return order_; +void ListImagesRequest::setLimit(int limit) { + limit_ = limit; + setBodyParameter(std::string("Limit"), std::to_string(limit)); } -void ListImagesRequest::setOrder(const std::string& order) -{ - order_ = order; - setBodyParameter("Order", order); +std::string ListImagesRequest::getOrder() const { + return order_; } -int ListImagesRequest::getOffset()const -{ - return offset_; +void ListImagesRequest::setOrder(const std::string &order) { + order_ = order; + setBodyParameter(std::string("Order"), order); } -void ListImagesRequest::setOffset(int offset) -{ - offset_ = offset; - setBodyParameter("Offset", std::to_string(offset)); +int ListImagesRequest::getOffset() const { + return offset_; } -std::string ListImagesRequest::getToken()const -{ - return token_; +void ListImagesRequest::setOffset(int offset) { + offset_ = offset; + setBodyParameter(std::string("Offset"), std::to_string(offset)); } -void ListImagesRequest::setToken(const std::string& token) -{ - token_ = token; - setBodyParameter("Token", token); +std::string ListImagesRequest::getToken() const { + return token_; } -std::string ListImagesRequest::getDbName()const -{ - return dbName_; +void ListImagesRequest::setToken(const std::string &token) { + token_ = token; + setBodyParameter(std::string("Token"), token); } -void ListImagesRequest::setDbName(const std::string& dbName) -{ - dbName_ = dbName; - setBodyParameter("DbName", dbName); +std::string ListImagesRequest::getDbName() const { + return dbName_; +} + +void ListImagesRequest::setDbName(const std::string &dbName) { + dbName_ = dbName; + setBodyParameter(std::string("DbName"), dbName); } diff --git a/imgsearch/src/model/ListImagesResult.cc b/imgsearch/src/model/ListImagesResult.cc index f06507d8b..b272a1a43 100644 --- a/imgsearch/src/model/ListImagesResult.cc +++ b/imgsearch/src/model/ListImagesResult.cc @@ -48,16 +48,16 @@ void ListImagesResult::parse(const std::string &payload) for (auto dataNodeImageListImageListItem : allImageListNode) { Data::ImageListItem imageListItemObject; + if(!dataNodeImageListImageListItem["EntityId"].isNull()) + imageListItemObject.entityId = dataNodeImageListImageListItem["EntityId"].asString(); + if(!dataNodeImageListImageListItem["CreatedAt"].isNull()) + imageListItemObject.createdAt = std::stol(dataNodeImageListImageListItem["CreatedAt"].asString()); + if(!dataNodeImageListImageListItem["UpdatedAt"].isNull()) + imageListItemObject.updatedAt = std::stol(dataNodeImageListImageListItem["UpdatedAt"].asString()); if(!dataNodeImageListImageListItem["DataId"].isNull()) imageListItemObject.dataId = dataNodeImageListImageListItem["DataId"].asString(); if(!dataNodeImageListImageListItem["ExtraData"].isNull()) imageListItemObject.extraData = dataNodeImageListImageListItem["ExtraData"].asString(); - if(!dataNodeImageListImageListItem["EntityId"].isNull()) - imageListItemObject.entityId = dataNodeImageListImageListItem["EntityId"].asString(); - if(!dataNodeImageListImageListItem["UpdatedAt"].isNull()) - imageListItemObject.updatedAt = std::stol(dataNodeImageListImageListItem["UpdatedAt"].asString()); - if(!dataNodeImageListImageListItem["CreatedAt"].isNull()) - imageListItemObject.createdAt = std::stol(dataNodeImageListImageListItem["CreatedAt"].asString()); data_.imageList.push_back(imageListItemObject); } diff --git a/imgsearch/src/model/SearchImageRequest.cc b/imgsearch/src/model/SearchImageRequest.cc index 72dff463e..fbf2d1649 100644 --- a/imgsearch/src/model/SearchImageRequest.cc +++ b/imgsearch/src/model/SearchImageRequest.cc @@ -1,62 +1,54 @@ /* * 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::Imgsearch::Model::SearchImageRequest; - -SearchImageRequest::SearchImageRequest() : - RpcServiceRequest("imgsearch", "2020-03-20", "SearchImage") -{ - setMethod(HttpRequest::Method::Post); -} - -SearchImageRequest::~SearchImageRequest() -{} - -std::string SearchImageRequest::getDbName()const -{ - return dbName_; + */ + +#include + +using AlibabaCloud::Imgsearch::Model::SearchImageRequest; + +SearchImageRequest::SearchImageRequest() + : RpcServiceRequest("imgsearch", "2020-03-20", "SearchImage") { + setMethod(HttpRequest::Method::Post); } -void SearchImageRequest::setDbName(const std::string& dbName) -{ - dbName_ = dbName; - setBodyParameter("DbName", dbName); +SearchImageRequest::~SearchImageRequest() {} + +std::string SearchImageRequest::getDbName() const { + return dbName_; } -std::string SearchImageRequest::getImageUrl()const -{ - return imageUrl_; +void SearchImageRequest::setDbName(const std::string &dbName) { + dbName_ = dbName; + setBodyParameter(std::string("DbName"), dbName); } -void SearchImageRequest::setImageUrl(const std::string& imageUrl) -{ - imageUrl_ = imageUrl; - setBodyParameter("ImageUrl", imageUrl); +std::string SearchImageRequest::getImageUrl() const { + return imageUrl_; } -int SearchImageRequest::getLimit()const -{ - return limit_; +void SearchImageRequest::setImageUrl(const std::string &imageUrl) { + imageUrl_ = imageUrl; + setBodyParameter(std::string("ImageUrl"), imageUrl); } -void SearchImageRequest::setLimit(int limit) -{ - limit_ = limit; - setBodyParameter("Limit", std::to_string(limit)); +int SearchImageRequest::getLimit() const { + return limit_; +} + +void SearchImageRequest::setLimit(int limit) { + limit_ = limit; + setBodyParameter(std::string("Limit"), std::to_string(limit)); } diff --git a/imgsearch/src/model/SearchImageResult.cc b/imgsearch/src/model/SearchImageResult.cc index 2b1c61d4f..62d302a27 100644 --- a/imgsearch/src/model/SearchImageResult.cc +++ b/imgsearch/src/model/SearchImageResult.cc @@ -44,16 +44,16 @@ void SearchImageResult::parse(const std::string &payload) for (auto dataNodeMatchListMatchListItem : allMatchListNode) { Data::MatchListItem matchListItemObject; + if(!dataNodeMatchListMatchListItem["ImageUrl"].isNull()) + matchListItemObject.imageUrl = dataNodeMatchListMatchListItem["ImageUrl"].asString(); + if(!dataNodeMatchListMatchListItem["EntityId"].isNull()) + matchListItemObject.entityId = dataNodeMatchListMatchListItem["EntityId"].asString(); + if(!dataNodeMatchListMatchListItem["Score"].isNull()) + matchListItemObject.score = std::stof(dataNodeMatchListMatchListItem["Score"].asString()); if(!dataNodeMatchListMatchListItem["DataId"].isNull()) matchListItemObject.dataId = dataNodeMatchListMatchListItem["DataId"].asString(); if(!dataNodeMatchListMatchListItem["ExtraData"].isNull()) matchListItemObject.extraData = dataNodeMatchListMatchListItem["ExtraData"].asString(); - if(!dataNodeMatchListMatchListItem["EntityId"].isNull()) - matchListItemObject.entityId = dataNodeMatchListMatchListItem["EntityId"].asString(); - if(!dataNodeMatchListMatchListItem["ImageUrl"].isNull()) - matchListItemObject.imageUrl = dataNodeMatchListMatchListItem["ImageUrl"].asString(); - if(!dataNodeMatchListMatchListItem["Score"].isNull()) - matchListItemObject.score = std::stof(dataNodeMatchListMatchListItem["Score"].asString()); data_.matchList.push_back(matchListItemObject); }