Skip to content

Commit 4e0ef82

Browse files
committed
Add generated code
1 parent 2f2dd77 commit 4e0ef82

File tree

148 files changed

+56214
-7159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+56214
-7159
lines changed

cloudstack/AccountService.go

Lines changed: 287 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ type AccountServiceIface interface {
3838
NewEnableAccountParams() *EnableAccountParams
3939
GetSolidFireAccountId(p *GetSolidFireAccountIdParams) (*GetSolidFireAccountIdResponse, error)
4040
NewGetSolidFireAccountIdParams(accountid string, storageid string) *GetSolidFireAccountIdParams
41+
IsAccountAllowedToCreateOfferingsWithTags(p *IsAccountAllowedToCreateOfferingsWithTagsParams) (*IsAccountAllowedToCreateOfferingsWithTagsResponse, error)
42+
NewIsAccountAllowedToCreateOfferingsWithTagsParams() *IsAccountAllowedToCreateOfferingsWithTagsParams
43+
LinkAccountToLdap(p *LinkAccountToLdapParams) (*LinkAccountToLdapResponse, error)
44+
NewLinkAccountToLdapParams(account string, domainid string, ldapdomain string) *LinkAccountToLdapParams
4145
ListAccounts(p *ListAccountsParams) (*ListAccountsResponse, error)
4246
NewListAccountsParams() *ListAccountsParams
4347
GetAccountID(name string, opts ...OptionFunc) (string, int, error)
@@ -1144,6 +1148,289 @@ type GetSolidFireAccountIdResponse struct {
11441148
SolidFireAccountId int64 `json:"solidFireAccountId"`
11451149
}
11461150

1151+
type IsAccountAllowedToCreateOfferingsWithTagsParams struct {
1152+
p map[string]interface{}
1153+
}
1154+
1155+
func (p *IsAccountAllowedToCreateOfferingsWithTagsParams) toURLValues() url.Values {
1156+
u := url.Values{}
1157+
if p.p == nil {
1158+
return u
1159+
}
1160+
if v, found := p.p["id"]; found {
1161+
u.Set("id", v.(string))
1162+
}
1163+
return u
1164+
}
1165+
1166+
func (p *IsAccountAllowedToCreateOfferingsWithTagsParams) SetId(v string) {
1167+
if p.p == nil {
1168+
p.p = make(map[string]interface{})
1169+
}
1170+
p.p["id"] = v
1171+
}
1172+
1173+
func (p *IsAccountAllowedToCreateOfferingsWithTagsParams) ResetId() {
1174+
if p.p != nil && p.p["id"] != nil {
1175+
delete(p.p, "id")
1176+
}
1177+
}
1178+
1179+
func (p *IsAccountAllowedToCreateOfferingsWithTagsParams) GetId() (string, bool) {
1180+
if p.p == nil {
1181+
p.p = make(map[string]interface{})
1182+
}
1183+
value, ok := p.p["id"].(string)
1184+
return value, ok
1185+
}
1186+
1187+
// You should always use this function to get a new IsAccountAllowedToCreateOfferingsWithTagsParams instance,
1188+
// as then you are sure you have configured all required params
1189+
func (s *AccountService) NewIsAccountAllowedToCreateOfferingsWithTagsParams() *IsAccountAllowedToCreateOfferingsWithTagsParams {
1190+
p := &IsAccountAllowedToCreateOfferingsWithTagsParams{}
1191+
p.p = make(map[string]interface{})
1192+
return p
1193+
}
1194+
1195+
// Return true if the specified account is allowed to create offerings with tags.
1196+
func (s *AccountService) IsAccountAllowedToCreateOfferingsWithTags(p *IsAccountAllowedToCreateOfferingsWithTagsParams) (*IsAccountAllowedToCreateOfferingsWithTagsResponse, error) {
1197+
resp, err := s.cs.newRequest("isAccountAllowedToCreateOfferingsWithTags", p.toURLValues())
1198+
if err != nil {
1199+
return nil, err
1200+
}
1201+
1202+
var r IsAccountAllowedToCreateOfferingsWithTagsResponse
1203+
if err := json.Unmarshal(resp, &r); err != nil {
1204+
return nil, err
1205+
}
1206+
1207+
return &r, nil
1208+
}
1209+
1210+
type IsAccountAllowedToCreateOfferingsWithTagsResponse struct {
1211+
Isallowed bool `json:"isallowed"`
1212+
JobID string `json:"jobid"`
1213+
Jobstatus int `json:"jobstatus"`
1214+
}
1215+
1216+
type LinkAccountToLdapParams struct {
1217+
p map[string]interface{}
1218+
}
1219+
1220+
func (p *LinkAccountToLdapParams) toURLValues() url.Values {
1221+
u := url.Values{}
1222+
if p.p == nil {
1223+
return u
1224+
}
1225+
if v, found := p.p["account"]; found {
1226+
u.Set("account", v.(string))
1227+
}
1228+
if v, found := p.p["accounttype"]; found {
1229+
vv := strconv.Itoa(v.(int))
1230+
u.Set("accounttype", vv)
1231+
}
1232+
if v, found := p.p["admin"]; found {
1233+
u.Set("admin", v.(string))
1234+
}
1235+
if v, found := p.p["domainid"]; found {
1236+
u.Set("domainid", v.(string))
1237+
}
1238+
if v, found := p.p["ldapdomain"]; found {
1239+
u.Set("ldapdomain", v.(string))
1240+
}
1241+
if v, found := p.p["roleid"]; found {
1242+
u.Set("roleid", v.(string))
1243+
}
1244+
if v, found := p.p["type"]; found {
1245+
u.Set("type", v.(string))
1246+
}
1247+
return u
1248+
}
1249+
1250+
func (p *LinkAccountToLdapParams) SetAccount(v string) {
1251+
if p.p == nil {
1252+
p.p = make(map[string]interface{})
1253+
}
1254+
p.p["account"] = v
1255+
}
1256+
1257+
func (p *LinkAccountToLdapParams) ResetAccount() {
1258+
if p.p != nil && p.p["account"] != nil {
1259+
delete(p.p, "account")
1260+
}
1261+
}
1262+
1263+
func (p *LinkAccountToLdapParams) GetAccount() (string, bool) {
1264+
if p.p == nil {
1265+
p.p = make(map[string]interface{})
1266+
}
1267+
value, ok := p.p["account"].(string)
1268+
return value, ok
1269+
}
1270+
1271+
func (p *LinkAccountToLdapParams) SetAccounttype(v int) {
1272+
if p.p == nil {
1273+
p.p = make(map[string]interface{})
1274+
}
1275+
p.p["accounttype"] = v
1276+
}
1277+
1278+
func (p *LinkAccountToLdapParams) ResetAccounttype() {
1279+
if p.p != nil && p.p["accounttype"] != nil {
1280+
delete(p.p, "accounttype")
1281+
}
1282+
}
1283+
1284+
func (p *LinkAccountToLdapParams) GetAccounttype() (int, bool) {
1285+
if p.p == nil {
1286+
p.p = make(map[string]interface{})
1287+
}
1288+
value, ok := p.p["accounttype"].(int)
1289+
return value, ok
1290+
}
1291+
1292+
func (p *LinkAccountToLdapParams) SetAdmin(v string) {
1293+
if p.p == nil {
1294+
p.p = make(map[string]interface{})
1295+
}
1296+
p.p["admin"] = v
1297+
}
1298+
1299+
func (p *LinkAccountToLdapParams) ResetAdmin() {
1300+
if p.p != nil && p.p["admin"] != nil {
1301+
delete(p.p, "admin")
1302+
}
1303+
}
1304+
1305+
func (p *LinkAccountToLdapParams) GetAdmin() (string, bool) {
1306+
if p.p == nil {
1307+
p.p = make(map[string]interface{})
1308+
}
1309+
value, ok := p.p["admin"].(string)
1310+
return value, ok
1311+
}
1312+
1313+
func (p *LinkAccountToLdapParams) SetDomainid(v string) {
1314+
if p.p == nil {
1315+
p.p = make(map[string]interface{})
1316+
}
1317+
p.p["domainid"] = v
1318+
}
1319+
1320+
func (p *LinkAccountToLdapParams) ResetDomainid() {
1321+
if p.p != nil && p.p["domainid"] != nil {
1322+
delete(p.p, "domainid")
1323+
}
1324+
}
1325+
1326+
func (p *LinkAccountToLdapParams) GetDomainid() (string, bool) {
1327+
if p.p == nil {
1328+
p.p = make(map[string]interface{})
1329+
}
1330+
value, ok := p.p["domainid"].(string)
1331+
return value, ok
1332+
}
1333+
1334+
func (p *LinkAccountToLdapParams) SetLdapdomain(v string) {
1335+
if p.p == nil {
1336+
p.p = make(map[string]interface{})
1337+
}
1338+
p.p["ldapdomain"] = v
1339+
}
1340+
1341+
func (p *LinkAccountToLdapParams) ResetLdapdomain() {
1342+
if p.p != nil && p.p["ldapdomain"] != nil {
1343+
delete(p.p, "ldapdomain")
1344+
}
1345+
}
1346+
1347+
func (p *LinkAccountToLdapParams) GetLdapdomain() (string, bool) {
1348+
if p.p == nil {
1349+
p.p = make(map[string]interface{})
1350+
}
1351+
value, ok := p.p["ldapdomain"].(string)
1352+
return value, ok
1353+
}
1354+
1355+
func (p *LinkAccountToLdapParams) SetRoleid(v string) {
1356+
if p.p == nil {
1357+
p.p = make(map[string]interface{})
1358+
}
1359+
p.p["roleid"] = v
1360+
}
1361+
1362+
func (p *LinkAccountToLdapParams) ResetRoleid() {
1363+
if p.p != nil && p.p["roleid"] != nil {
1364+
delete(p.p, "roleid")
1365+
}
1366+
}
1367+
1368+
func (p *LinkAccountToLdapParams) GetRoleid() (string, bool) {
1369+
if p.p == nil {
1370+
p.p = make(map[string]interface{})
1371+
}
1372+
value, ok := p.p["roleid"].(string)
1373+
return value, ok
1374+
}
1375+
1376+
func (p *LinkAccountToLdapParams) SetType(v string) {
1377+
if p.p == nil {
1378+
p.p = make(map[string]interface{})
1379+
}
1380+
p.p["type"] = v
1381+
}
1382+
1383+
func (p *LinkAccountToLdapParams) ResetType() {
1384+
if p.p != nil && p.p["type"] != nil {
1385+
delete(p.p, "type")
1386+
}
1387+
}
1388+
1389+
func (p *LinkAccountToLdapParams) GetType() (string, bool) {
1390+
if p.p == nil {
1391+
p.p = make(map[string]interface{})
1392+
}
1393+
value, ok := p.p["type"].(string)
1394+
return value, ok
1395+
}
1396+
1397+
// You should always use this function to get a new LinkAccountToLdapParams instance,
1398+
// as then you are sure you have configured all required params
1399+
func (s *AccountService) NewLinkAccountToLdapParams(account string, domainid string, ldapdomain string) *LinkAccountToLdapParams {
1400+
p := &LinkAccountToLdapParams{}
1401+
p.p = make(map[string]interface{})
1402+
p.p["account"] = account
1403+
p.p["domainid"] = domainid
1404+
p.p["ldapdomain"] = ldapdomain
1405+
return p
1406+
}
1407+
1408+
// link a cloudstack account to a group or OU in ldap
1409+
func (s *AccountService) LinkAccountToLdap(p *LinkAccountToLdapParams) (*LinkAccountToLdapResponse, error) {
1410+
resp, err := s.cs.newRequest("linkAccountToLdap", p.toURLValues())
1411+
if err != nil {
1412+
return nil, err
1413+
}
1414+
1415+
var r LinkAccountToLdapResponse
1416+
if err := json.Unmarshal(resp, &r); err != nil {
1417+
return nil, err
1418+
}
1419+
1420+
return &r, nil
1421+
}
1422+
1423+
type LinkAccountToLdapResponse struct {
1424+
Accountid string `json:"accountid"`
1425+
Accounttype int `json:"accounttype"`
1426+
Domainid string `json:"domainid"`
1427+
JobID string `json:"jobid"`
1428+
Jobstatus int `json:"jobstatus"`
1429+
Ldapdomain string `json:"ldapdomain"`
1430+
Name string `json:"name"`
1431+
Type string `json:"type"`
1432+
}
1433+
11471434
type ListAccountsParams struct {
11481435
p map[string]interface{}
11491436
}

cloudstack/AccountService_mock.go

Lines changed: 58 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)