CreateSegmentBodyJobRequest.cc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /*
  2. * Copyright 2009-2017 Alibaba Cloud All rights reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #include <alibabacloud/ivpd/model/CreateSegmentBodyJobRequest.h>
  17. using AlibabaCloud::Ivpd::Model::CreateSegmentBodyJobRequest;
  18. CreateSegmentBodyJobRequest::CreateSegmentBodyJobRequest() :
  19. RpcServiceRequest("ivpd", "2019-06-25", "CreateSegmentBodyJob")
  20. {
  21. setMethod(HttpRequest::Method::Post);
  22. }
  23. CreateSegmentBodyJobRequest::~CreateSegmentBodyJobRequest()
  24. {}
  25. std::vector<CreateSegmentBodyJobRequest::DataList> CreateSegmentBodyJobRequest::getDataList()const
  26. {
  27. return dataList_;
  28. }
  29. void CreateSegmentBodyJobRequest::setDataList(const std::vector<DataList>& dataList)
  30. {
  31. dataList_ = dataList;
  32. for(int dep1 = 0; dep1!= dataList.size(); dep1++) {
  33. auto dataListObj = dataList.at(dep1);
  34. std::string dataListObjStr = "DataList." + std::to_string(dep1 + 1);
  35. setParameter(dataListObjStr + ".DataId", dataListObj.dataId);
  36. setParameter(dataListObjStr + ".ImageUrl", dataListObj.imageUrl);
  37. }
  38. }
  39. bool CreateSegmentBodyJobRequest::getAsync()const
  40. {
  41. return async_;
  42. }
  43. void CreateSegmentBodyJobRequest::setAsync(bool async)
  44. {
  45. async_ = async;
  46. setBodyParameter("Async", async ? "true" : "false");
  47. }
  48. std::string CreateSegmentBodyJobRequest::getJobId()const
  49. {
  50. return jobId_;
  51. }
  52. void CreateSegmentBodyJobRequest::setJobId(const std::string& jobId)
  53. {
  54. jobId_ = jobId;
  55. setBodyParameter("JobId", jobId);
  56. }
  57. int CreateSegmentBodyJobRequest::getTimeToLive()const
  58. {
  59. return timeToLive_;
  60. }
  61. void CreateSegmentBodyJobRequest::setTimeToLive(int timeToLive)
  62. {
  63. timeToLive_ = timeToLive;
  64. setBodyParameter("TimeToLive", std::to_string(timeToLive));
  65. }