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::vector<ModifyCasterProgramRequest::Episode> ModifyCasterProgramRequest::getEpisode()const
  24. {
  25. return episode_;
  26. }
  27. void ModifyCasterProgramRequest::setEpisode(const std::vector<Episode>& episode)
  28. {
  29. episode_ = episode;
  30. int i = 0;
  31. for(int i = 0; i!= episode.size(); i++) {
  32. auto obj = episode.at(i);
  33. std::string str ="Episode."+ std::to_string(i);
  34. setCoreParameter(str + ".EpisodeId", obj.episodeId);
  35. setCoreParameter(str + ".EpisodeType", obj.episodeType);
  36. setCoreParameter(str + ".EpisodeName", obj.episodeName);
  37. setCoreParameter(str + ".ResourceId", obj.resourceId);
  38. for(int i = 0; i!= obj.componentId.size(); i++) setCoreParameter(str + ".ComponentId."+ std::to_string(i), obj.componentId.at(i));
  39. setCoreParameter(str + ".StartTime", obj.startTime);
  40. setCoreParameter(str + ".EndTime", obj.endTime);
  41. setCoreParameter(str + ".SwitchType", obj.switchType);
  42. }
  43. }
  44. std::string ModifyCasterProgramRequest::getCasterId()const
  45. {
  46. return casterId_;
  47. }
  48. void ModifyCasterProgramRequest::setCasterId(const std::string& casterId)
  49. {
  50. casterId_ = casterId;
  51. setCoreParameter("CasterId", casterId);
  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. }