ModifyCasterProgramRequest.cc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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/live/model/ModifyCasterProgramRequest.h>
  17. using AlibabaCloud::Live::Model::ModifyCasterProgramRequest;
  18. ModifyCasterProgramRequest::ModifyCasterProgramRequest() :
  19. RpcServiceRequest("live", "2016-11-01", "ModifyCasterProgram")
  20. {}
  21. ModifyCasterProgramRequest::~ModifyCasterProgramRequest()
  22. {}
  23. std::string ModifyCasterProgramRequest::getCasterId()const
  24. {
  25. return casterId_;
  26. }
  27. void ModifyCasterProgramRequest::setCasterId(const std::string& casterId)
  28. {
  29. casterId_ = casterId;
  30. setCoreParameter("CasterId", casterId);
  31. }
  32. std::vector<ModifyCasterProgramRequest::Episode> ModifyCasterProgramRequest::getEpisode()const
  33. {
  34. return episode_;
  35. }
  36. void ModifyCasterProgramRequest::setEpisode(const std::vector<Episode>& episode)
  37. {
  38. episode_ = episode;
  39. int i = 0;
  40. for(int i = 0; i!= episode.size(); i++) {
  41. auto obj = episode.at(i);
  42. std::string str ="Episode."+ std::to_string(i);
  43. setCoreParameter(str + ".ResourceId", obj.resourceId);
  44. for(int i = 0; i!= obj.componentId.size(); i++) setCoreParameter(str + ".ComponentId."+ std::to_string(i), obj.componentId.at(i));
  45. setCoreParameter(str + ".SwitchType", obj.switchType);
  46. setCoreParameter(str + ".EpisodeType", obj.episodeType);
  47. setCoreParameter(str + ".EpisodeName", obj.episodeName);
  48. setCoreParameter(str + ".EndTime", obj.endTime);
  49. setCoreParameter(str + ".StartTime", obj.startTime);
  50. setCoreParameter(str + ".EpisodeId", obj.episodeId);
  51. }
  52. }
  53. long ModifyCasterProgramRequest::getOwnerId()const
  54. {
  55. return ownerId_;
  56. }
  57. void ModifyCasterProgramRequest::setOwnerId(long ownerId)
  58. {
  59. ownerId_ = ownerId;
  60. setCoreParameter("OwnerId", std::to_string(ownerId));
  61. }