| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463 |
- /*
- * 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 <alibabacloud/emr/model/CreateClusterTemplateRequest.h>
- using AlibabaCloud::Emr::Model::CreateClusterTemplateRequest;
- CreateClusterTemplateRequest::CreateClusterTemplateRequest() :
- RpcServiceRequest("emr", "2016-04-08", "CreateClusterTemplate")
- {
- setMethod(HttpRequest::Method::Post);
- }
- CreateClusterTemplateRequest::~CreateClusterTemplateRequest()
- {}
- long CreateClusterTemplateRequest::getResourceOwnerId()const
- {
- return resourceOwnerId_;
- }
- void CreateClusterTemplateRequest::setResourceOwnerId(long resourceOwnerId)
- {
- resourceOwnerId_ = resourceOwnerId;
- setParameter("ResourceOwnerId", std::to_string(resourceOwnerId));
- }
- std::string CreateClusterTemplateRequest::getLogPath()const
- {
- return logPath_;
- }
- void CreateClusterTemplateRequest::setLogPath(const std::string& logPath)
- {
- logPath_ = logPath;
- setParameter("LogPath", logPath);
- }
- std::string CreateClusterTemplateRequest::getMasterPwd()const
- {
- return masterPwd_;
- }
- void CreateClusterTemplateRequest::setMasterPwd(const std::string& masterPwd)
- {
- masterPwd_ = masterPwd;
- setParameter("MasterPwd", masterPwd);
- }
- std::string CreateClusterTemplateRequest::getConfigurations()const
- {
- return configurations_;
- }
- void CreateClusterTemplateRequest::setConfigurations(const std::string& configurations)
- {
- configurations_ = configurations;
- setParameter("Configurations", configurations);
- }
- bool CreateClusterTemplateRequest::getSshEnable()const
- {
- return sshEnable_;
- }
- void CreateClusterTemplateRequest::setSshEnable(bool sshEnable)
- {
- sshEnable_ = sshEnable;
- setParameter("SshEnable", sshEnable ? "true" : "false");
- }
- std::string CreateClusterTemplateRequest::getKeyPairName()const
- {
- return keyPairName_;
- }
- void CreateClusterTemplateRequest::setKeyPairName(const std::string& keyPairName)
- {
- keyPairName_ = keyPairName;
- setParameter("KeyPairName", keyPairName);
- }
- std::string CreateClusterTemplateRequest::getMetaStoreType()const
- {
- return metaStoreType_;
- }
- void CreateClusterTemplateRequest::setMetaStoreType(const std::string& metaStoreType)
- {
- metaStoreType_ = metaStoreType;
- setParameter("MetaStoreType", metaStoreType);
- }
- std::string CreateClusterTemplateRequest::getSecurityGroupName()const
- {
- return securityGroupName_;
- }
- void CreateClusterTemplateRequest::setSecurityGroupName(const std::string& securityGroupName)
- {
- securityGroupName_ = securityGroupName;
- setParameter("SecurityGroupName", securityGroupName);
- }
- std::string CreateClusterTemplateRequest::getMachineType()const
- {
- return machineType_;
- }
- void CreateClusterTemplateRequest::setMachineType(const std::string& machineType)
- {
- machineType_ = machineType;
- setParameter("MachineType", machineType);
- }
- std::vector<CreateClusterTemplateRequest::BootstrapAction> CreateClusterTemplateRequest::getBootstrapAction()const
- {
- return bootstrapAction_;
- }
- void CreateClusterTemplateRequest::setBootstrapAction(const std::vector<BootstrapAction>& bootstrapAction)
- {
- bootstrapAction_ = bootstrapAction;
- for(int dep1 = 0; dep1!= bootstrapAction.size(); dep1++) {
- auto bootstrapActionObj = bootstrapAction.at(dep1);
- std::string bootstrapActionObjStr = "BootstrapAction." + std::to_string(dep1 + 1);
- setParameter(bootstrapActionObjStr + ".Path", bootstrapActionObj.path);
- setParameter(bootstrapActionObjStr + ".Arg", bootstrapActionObj.arg);
- setParameter(bootstrapActionObjStr + ".Name", bootstrapActionObj.name);
- }
- }
- std::string CreateClusterTemplateRequest::getMetaStoreConf()const
- {
- return metaStoreConf_;
- }
- void CreateClusterTemplateRequest::setMetaStoreConf(const std::string& metaStoreConf)
- {
- metaStoreConf_ = metaStoreConf;
- setParameter("MetaStoreConf", metaStoreConf);
- }
- std::string CreateClusterTemplateRequest::getEmrVer()const
- {
- return emrVer_;
- }
- void CreateClusterTemplateRequest::setEmrVer(const std::string& emrVer)
- {
- emrVer_ = emrVer;
- setParameter("EmrVer", emrVer);
- }
- bool CreateClusterTemplateRequest::getIsOpenPublicIp()const
- {
- return isOpenPublicIp_;
- }
- void CreateClusterTemplateRequest::setIsOpenPublicIp(bool isOpenPublicIp)
- {
- isOpenPublicIp_ = isOpenPublicIp;
- setParameter("IsOpenPublicIp", isOpenPublicIp ? "true" : "false");
- }
- int CreateClusterTemplateRequest::getPeriod()const
- {
- return period_;
- }
- void CreateClusterTemplateRequest::setPeriod(int period)
- {
- period_ = period;
- setParameter("Period", std::to_string(period));
- }
- std::string CreateClusterTemplateRequest::getInstanceGeneration()const
- {
- return instanceGeneration_;
- }
- void CreateClusterTemplateRequest::setInstanceGeneration(const std::string& instanceGeneration)
- {
- instanceGeneration_ = instanceGeneration;
- setParameter("InstanceGeneration", instanceGeneration);
- }
- std::string CreateClusterTemplateRequest::getVSwitchId()const
- {
- return vSwitchId_;
- }
- void CreateClusterTemplateRequest::setVSwitchId(const std::string& vSwitchId)
- {
- vSwitchId_ = vSwitchId;
- setParameter("VSwitchId", vSwitchId);
- }
- std::string CreateClusterTemplateRequest::getClusterType()const
- {
- return clusterType_;
- }
- void CreateClusterTemplateRequest::setClusterType(const std::string& clusterType)
- {
- clusterType_ = clusterType;
- setParameter("ClusterType", clusterType);
- }
- bool CreateClusterTemplateRequest::getAutoRenew()const
- {
- return autoRenew_;
- }
- void CreateClusterTemplateRequest::setAutoRenew(bool autoRenew)
- {
- autoRenew_ = autoRenew;
- setParameter("AutoRenew", autoRenew ? "true" : "false");
- }
- std::vector<std::string> CreateClusterTemplateRequest::getOptionSoftWareList()const
- {
- return optionSoftWareList_;
- }
- void CreateClusterTemplateRequest::setOptionSoftWareList(const std::vector<std::string>& optionSoftWareList)
- {
- optionSoftWareList_ = optionSoftWareList;
- for(int dep1 = 0; dep1!= optionSoftWareList.size(); dep1++) {
- setParameter("OptionSoftWareList."+ std::to_string(dep1), optionSoftWareList.at(dep1));
- }
- }
- std::string CreateClusterTemplateRequest::getNetType()const
- {
- return netType_;
- }
- void CreateClusterTemplateRequest::setNetType(const std::string& netType)
- {
- netType_ = netType;
- setParameter("NetType", netType);
- }
- std::string CreateClusterTemplateRequest::getZoneId()const
- {
- return zoneId_;
- }
- void CreateClusterTemplateRequest::setZoneId(const std::string& zoneId)
- {
- zoneId_ = zoneId;
- setParameter("ZoneId", zoneId);
- }
- bool CreateClusterTemplateRequest::getUseCustomHiveMetaDb()const
- {
- return useCustomHiveMetaDb_;
- }
- void CreateClusterTemplateRequest::setUseCustomHiveMetaDb(bool useCustomHiveMetaDb)
- {
- useCustomHiveMetaDb_ = useCustomHiveMetaDb;
- setParameter("UseCustomHiveMetaDb", useCustomHiveMetaDb ? "true" : "false");
- }
- bool CreateClusterTemplateRequest::getInitCustomHiveMetaDb()const
- {
- return initCustomHiveMetaDb_;
- }
- void CreateClusterTemplateRequest::setInitCustomHiveMetaDb(bool initCustomHiveMetaDb)
- {
- initCustomHiveMetaDb_ = initCustomHiveMetaDb;
- setParameter("InitCustomHiveMetaDb", initCustomHiveMetaDb ? "true" : "false");
- }
- bool CreateClusterTemplateRequest::getIoOptimized()const
- {
- return ioOptimized_;
- }
- void CreateClusterTemplateRequest::setIoOptimized(bool ioOptimized)
- {
- ioOptimized_ = ioOptimized;
- setParameter("IoOptimized", ioOptimized ? "true" : "false");
- }
- std::string CreateClusterTemplateRequest::getSecurityGroupId()const
- {
- return securityGroupId_;
- }
- void CreateClusterTemplateRequest::setSecurityGroupId(const std::string& securityGroupId)
- {
- securityGroupId_ = securityGroupId;
- setParameter("SecurityGroupId", securityGroupId);
- }
- bool CreateClusterTemplateRequest::getEasEnable()const
- {
- return easEnable_;
- }
- void CreateClusterTemplateRequest::setEasEnable(bool easEnable)
- {
- easEnable_ = easEnable;
- setParameter("EasEnable", easEnable ? "true" : "false");
- }
- std::string CreateClusterTemplateRequest::getDepositType()const
- {
- return depositType_;
- }
- void CreateClusterTemplateRequest::setDepositType(const std::string& depositType)
- {
- depositType_ = depositType;
- setParameter("DepositType", depositType);
- }
- std::string CreateClusterTemplateRequest::getAccessKeyId()const
- {
- return accessKeyId_;
- }
- void CreateClusterTemplateRequest::setAccessKeyId(const std::string& accessKeyId)
- {
- accessKeyId_ = accessKeyId;
- setParameter("AccessKeyId", accessKeyId);
- }
- std::string CreateClusterTemplateRequest::getRegionId()const
- {
- return regionId_;
- }
- void CreateClusterTemplateRequest::setRegionId(const std::string& regionId)
- {
- regionId_ = regionId;
- setParameter("RegionId", regionId);
- }
- bool CreateClusterTemplateRequest::getUseLocalMetaDb()const
- {
- return useLocalMetaDb_;
- }
- void CreateClusterTemplateRequest::setUseLocalMetaDb(bool useLocalMetaDb)
- {
- useLocalMetaDb_ = useLocalMetaDb;
- setParameter("UseLocalMetaDb", useLocalMetaDb ? "true" : "false");
- }
- std::string CreateClusterTemplateRequest::getTemplateName()const
- {
- return templateName_;
- }
- void CreateClusterTemplateRequest::setTemplateName(const std::string& templateName)
- {
- templateName_ = templateName;
- setParameter("TemplateName", templateName);
- }
- std::string CreateClusterTemplateRequest::getUserDefinedEmrEcsRole()const
- {
- return userDefinedEmrEcsRole_;
- }
- void CreateClusterTemplateRequest::setUserDefinedEmrEcsRole(const std::string& userDefinedEmrEcsRole)
- {
- userDefinedEmrEcsRole_ = userDefinedEmrEcsRole;
- setParameter("UserDefinedEmrEcsRole", userDefinedEmrEcsRole);
- }
- std::string CreateClusterTemplateRequest::getVpcId()const
- {
- return vpcId_;
- }
- void CreateClusterTemplateRequest::setVpcId(const std::string& vpcId)
- {
- vpcId_ = vpcId;
- setParameter("VpcId", vpcId);
- }
- std::vector<CreateClusterTemplateRequest::HostGroup> CreateClusterTemplateRequest::getHostGroup()const
- {
- return hostGroup_;
- }
- void CreateClusterTemplateRequest::setHostGroup(const std::vector<HostGroup>& hostGroup)
- {
- hostGroup_ = hostGroup;
- for(int dep1 = 0; dep1!= hostGroup.size(); dep1++) {
- auto hostGroupObj = hostGroup.at(dep1);
- std::string hostGroupObjStr = "HostGroup." + std::to_string(dep1 + 1);
- setParameter(hostGroupObjStr + ".Period", std::to_string(hostGroupObj.period));
- setParameter(hostGroupObjStr + ".SysDiskCapacity", std::to_string(hostGroupObj.sysDiskCapacity));
- setParameter(hostGroupObjStr + ".DiskCapacity", std::to_string(hostGroupObj.diskCapacity));
- setParameter(hostGroupObjStr + ".SysDiskType", hostGroupObj.sysDiskType);
- setParameter(hostGroupObjStr + ".ClusterId", hostGroupObj.clusterId);
- setParameter(hostGroupObjStr + ".DiskType", hostGroupObj.diskType);
- setParameter(hostGroupObjStr + ".HostGroupName", hostGroupObj.hostGroupName);
- setParameter(hostGroupObjStr + ".VSwitchId", hostGroupObj.vSwitchId);
- setParameter(hostGroupObjStr + ".DiskCount", std::to_string(hostGroupObj.diskCount));
- setParameter(hostGroupObjStr + ".AutoRenew", hostGroupObj.autoRenew ? "true" : "false");
- setParameter(hostGroupObjStr + ".HostGroupId", hostGroupObj.hostGroupId);
- setParameter(hostGroupObjStr + ".NodeCount", std::to_string(hostGroupObj.nodeCount));
- setParameter(hostGroupObjStr + ".InstanceType", hostGroupObj.instanceType);
- setParameter(hostGroupObjStr + ".Comment", hostGroupObj.comment);
- setParameter(hostGroupObjStr + ".ChargeType", hostGroupObj.chargeType);
- setParameter(hostGroupObjStr + ".MultiInstanceTypes", hostGroupObj.multiInstanceTypes);
- setParameter(hostGroupObjStr + ".CreateType", hostGroupObj.createType);
- setParameter(hostGroupObjStr + ".HostGroupType", hostGroupObj.hostGroupType);
- }
- }
- std::vector<CreateClusterTemplateRequest::Config> CreateClusterTemplateRequest::getConfig()const
- {
- return config_;
- }
- void CreateClusterTemplateRequest::setConfig(const std::vector<Config>& config)
- {
- config_ = config;
- for(int dep1 = 0; dep1!= config.size(); dep1++) {
- auto configObj = config.at(dep1);
- std::string configObjStr = "Config." + std::to_string(dep1 + 1);
- setParameter(configObjStr + ".ConfigKey", configObj.configKey);
- setParameter(configObjStr + ".FileName", configObj.fileName);
- setParameter(configObjStr + ".Encrypt", configObj.encrypt);
- setParameter(configObjStr + ".Replace", configObj.replace);
- setParameter(configObjStr + ".ConfigValue", configObj.configValue);
- setParameter(configObjStr + ".ServiceName", configObj.serviceName);
- }
- }
- bool CreateClusterTemplateRequest::getHighAvailabilityEnable()const
- {
- return highAvailabilityEnable_;
- }
- void CreateClusterTemplateRequest::setHighAvailabilityEnable(bool highAvailabilityEnable)
- {
- highAvailabilityEnable_ = highAvailabilityEnable;
- setParameter("HighAvailabilityEnable", highAvailabilityEnable ? "true" : "false");
- }
|