2016-10-07 10:39:28 -04:00
|
|
|
//
|
2019-02-01 14:26:40 -05:00
|
|
|
// Copyright 2018, Sander van Harmelen
|
2016-10-07 10:39:28 -04:00
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
|
|
|
|
package cloudstack
|
|
|
|
|
|
|
|
import (
|
|
|
|
"encoding/json"
|
|
|
|
"net/url"
|
|
|
|
"strconv"
|
|
|
|
)
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
type GetApiLimitParams struct {
|
2016-10-07 10:39:28 -04:00
|
|
|
p map[string]interface{}
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
func (p *GetApiLimitParams) toURLValues() url.Values {
|
2016-10-07 10:39:28 -04:00
|
|
|
u := url.Values{}
|
|
|
|
if p.p == nil {
|
|
|
|
return u
|
|
|
|
}
|
|
|
|
return u
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
// You should always use this function to get a new GetApiLimitParams instance,
|
2016-10-07 10:39:28 -04:00
|
|
|
// as then you are sure you have configured all required params
|
2019-02-01 14:26:40 -05:00
|
|
|
func (s *LimitService) NewGetApiLimitParams() *GetApiLimitParams {
|
|
|
|
p := &GetApiLimitParams{}
|
2016-10-07 10:39:28 -04:00
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
// Get API limit count for the caller
|
|
|
|
func (s *LimitService) GetApiLimit(p *GetApiLimitParams) (*GetApiLimitResponse, error) {
|
|
|
|
resp, err := s.cs.newRequest("getApiLimit", p.toURLValues())
|
2016-10-07 10:39:28 -04:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
var r GetApiLimitResponse
|
2016-10-07 10:39:28 -04:00
|
|
|
if err := json.Unmarshal(resp, &r); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
|
|
|
return &r, nil
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
type GetApiLimitResponse struct {
|
|
|
|
Account string `json:"account"`
|
|
|
|
Accountid string `json:"accountid"`
|
|
|
|
ApiAllowed int `json:"apiAllowed"`
|
|
|
|
ApiIssued int `json:"apiIssued"`
|
|
|
|
ExpireAfter int64 `json:"expireAfter"`
|
2019-05-26 05:58:26 -04:00
|
|
|
JobID string `json:"jobid"`
|
|
|
|
Jobstatus int `json:"jobstatus"`
|
2016-10-07 10:39:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
type ListResourceLimitsParams struct {
|
|
|
|
p map[string]interface{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *ListResourceLimitsParams) toURLValues() url.Values {
|
|
|
|
u := url.Values{}
|
|
|
|
if p.p == nil {
|
|
|
|
return u
|
|
|
|
}
|
|
|
|
if v, found := p.p["account"]; found {
|
|
|
|
u.Set("account", v.(string))
|
|
|
|
}
|
|
|
|
if v, found := p.p["domainid"]; found {
|
|
|
|
u.Set("domainid", v.(string))
|
|
|
|
}
|
|
|
|
if v, found := p.p["id"]; found {
|
|
|
|
vv := strconv.FormatInt(v.(int64), 10)
|
|
|
|
u.Set("id", vv)
|
|
|
|
}
|
|
|
|
if v, found := p.p["isrecursive"]; found {
|
|
|
|
vv := strconv.FormatBool(v.(bool))
|
|
|
|
u.Set("isrecursive", vv)
|
|
|
|
}
|
|
|
|
if v, found := p.p["keyword"]; found {
|
|
|
|
u.Set("keyword", v.(string))
|
|
|
|
}
|
|
|
|
if v, found := p.p["listall"]; found {
|
|
|
|
vv := strconv.FormatBool(v.(bool))
|
|
|
|
u.Set("listall", vv)
|
|
|
|
}
|
|
|
|
if v, found := p.p["page"]; found {
|
|
|
|
vv := strconv.Itoa(v.(int))
|
|
|
|
u.Set("page", vv)
|
|
|
|
}
|
|
|
|
if v, found := p.p["pagesize"]; found {
|
|
|
|
vv := strconv.Itoa(v.(int))
|
|
|
|
u.Set("pagesize", vv)
|
|
|
|
}
|
|
|
|
if v, found := p.p["projectid"]; found {
|
|
|
|
u.Set("projectid", v.(string))
|
|
|
|
}
|
|
|
|
if v, found := p.p["resourcetype"]; found {
|
|
|
|
vv := strconv.Itoa(v.(int))
|
|
|
|
u.Set("resourcetype", vv)
|
|
|
|
}
|
2019-02-01 14:26:40 -05:00
|
|
|
if v, found := p.p["resourcetypename"]; found {
|
|
|
|
u.Set("resourcetypename", v.(string))
|
|
|
|
}
|
2016-10-07 10:39:28 -04:00
|
|
|
return u
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *ListResourceLimitsParams) SetAccount(v string) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["account"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *ListResourceLimitsParams) SetDomainid(v string) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["domainid"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *ListResourceLimitsParams) SetId(v int64) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["id"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *ListResourceLimitsParams) SetIsrecursive(v bool) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["isrecursive"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *ListResourceLimitsParams) SetKeyword(v string) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["keyword"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *ListResourceLimitsParams) SetListall(v bool) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["listall"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *ListResourceLimitsParams) SetPage(v int) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["page"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *ListResourceLimitsParams) SetPagesize(v int) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["pagesize"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *ListResourceLimitsParams) SetProjectid(v string) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["projectid"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *ListResourceLimitsParams) SetResourcetype(v int) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["resourcetype"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
func (p *ListResourceLimitsParams) SetResourcetypename(v string) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["resourcetypename"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2016-10-07 10:39:28 -04:00
|
|
|
// You should always use this function to get a new ListResourceLimitsParams instance,
|
|
|
|
// as then you are sure you have configured all required params
|
|
|
|
func (s *LimitService) NewListResourceLimitsParams() *ListResourceLimitsParams {
|
|
|
|
p := &ListResourceLimitsParams{}
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
// Lists resource limits.
|
|
|
|
func (s *LimitService) ListResourceLimits(p *ListResourceLimitsParams) (*ListResourceLimitsResponse, error) {
|
|
|
|
resp, err := s.cs.newRequest("listResourceLimits", p.toURLValues())
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
|
|
|
var r ListResourceLimitsResponse
|
|
|
|
if err := json.Unmarshal(resp, &r); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2019-02-01 14:26:40 -05:00
|
|
|
|
2016-10-07 10:39:28 -04:00
|
|
|
return &r, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type ListResourceLimitsResponse struct {
|
|
|
|
Count int `json:"count"`
|
|
|
|
ResourceLimits []*ResourceLimit `json:"resourcelimit"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ResourceLimit struct {
|
2019-02-01 14:26:40 -05:00
|
|
|
Account string `json:"account"`
|
|
|
|
Domain string `json:"domain"`
|
|
|
|
Domainid string `json:"domainid"`
|
2019-05-26 05:58:26 -04:00
|
|
|
JobID string `json:"jobid"`
|
|
|
|
Jobstatus int `json:"jobstatus"`
|
2019-02-01 14:26:40 -05:00
|
|
|
Max int64 `json:"max"`
|
|
|
|
Project string `json:"project"`
|
|
|
|
Projectid string `json:"projectid"`
|
|
|
|
Resourcetype string `json:"resourcetype"`
|
|
|
|
Resourcetypename string `json:"resourcetypename"`
|
2016-10-07 10:39:28 -04:00
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
type ResetApiLimitParams struct {
|
2016-10-07 10:39:28 -04:00
|
|
|
p map[string]interface{}
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
func (p *ResetApiLimitParams) toURLValues() url.Values {
|
2016-10-07 10:39:28 -04:00
|
|
|
u := url.Values{}
|
|
|
|
if p.p == nil {
|
|
|
|
return u
|
|
|
|
}
|
2019-02-01 14:26:40 -05:00
|
|
|
if v, found := p.p["account"]; found {
|
|
|
|
u.Set("account", v.(string))
|
|
|
|
}
|
2016-10-07 10:39:28 -04:00
|
|
|
return u
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
func (p *ResetApiLimitParams) SetAccount(v string) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["account"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// You should always use this function to get a new ResetApiLimitParams instance,
|
2016-10-07 10:39:28 -04:00
|
|
|
// as then you are sure you have configured all required params
|
2019-02-01 14:26:40 -05:00
|
|
|
func (s *LimitService) NewResetApiLimitParams() *ResetApiLimitParams {
|
|
|
|
p := &ResetApiLimitParams{}
|
2016-10-07 10:39:28 -04:00
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
// Reset api count
|
|
|
|
func (s *LimitService) ResetApiLimit(p *ResetApiLimitParams) (*ResetApiLimitResponse, error) {
|
|
|
|
resp, err := s.cs.newRequest("resetApiLimit", p.toURLValues())
|
2016-10-07 10:39:28 -04:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
var r ResetApiLimitResponse
|
2016-10-07 10:39:28 -04:00
|
|
|
if err := json.Unmarshal(resp, &r); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2019-02-01 14:26:40 -05:00
|
|
|
|
2016-10-07 10:39:28 -04:00
|
|
|
return &r, nil
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
type ResetApiLimitResponse struct {
|
|
|
|
Account string `json:"account"`
|
|
|
|
Accountid string `json:"accountid"`
|
|
|
|
ApiAllowed int `json:"apiAllowed"`
|
|
|
|
ApiIssued int `json:"apiIssued"`
|
|
|
|
ExpireAfter int64 `json:"expireAfter"`
|
2019-05-26 05:58:26 -04:00
|
|
|
JobID string `json:"jobid"`
|
|
|
|
Jobstatus int `json:"jobstatus"`
|
2016-10-07 10:39:28 -04:00
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
type UpdateResourceCountParams struct {
|
2016-10-07 10:39:28 -04:00
|
|
|
p map[string]interface{}
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
func (p *UpdateResourceCountParams) toURLValues() url.Values {
|
2016-10-07 10:39:28 -04:00
|
|
|
u := url.Values{}
|
|
|
|
if p.p == nil {
|
|
|
|
return u
|
|
|
|
}
|
|
|
|
if v, found := p.p["account"]; found {
|
|
|
|
u.Set("account", v.(string))
|
|
|
|
}
|
2019-02-01 14:26:40 -05:00
|
|
|
if v, found := p.p["domainid"]; found {
|
|
|
|
u.Set("domainid", v.(string))
|
|
|
|
}
|
|
|
|
if v, found := p.p["projectid"]; found {
|
|
|
|
u.Set("projectid", v.(string))
|
|
|
|
}
|
|
|
|
if v, found := p.p["resourcetype"]; found {
|
|
|
|
vv := strconv.Itoa(v.(int))
|
|
|
|
u.Set("resourcetype", vv)
|
|
|
|
}
|
2016-10-07 10:39:28 -04:00
|
|
|
return u
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
func (p *UpdateResourceCountParams) SetAccount(v string) {
|
2016-10-07 10:39:28 -04:00
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["account"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
func (p *UpdateResourceCountParams) SetDomainid(v string) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["domainid"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *UpdateResourceCountParams) SetProjectid(v string) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["projectid"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *UpdateResourceCountParams) SetResourcetype(v int) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["resourcetype"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// You should always use this function to get a new UpdateResourceCountParams instance,
|
2016-10-07 10:39:28 -04:00
|
|
|
// as then you are sure you have configured all required params
|
2019-02-01 14:26:40 -05:00
|
|
|
func (s *LimitService) NewUpdateResourceCountParams(domainid string) *UpdateResourceCountParams {
|
|
|
|
p := &UpdateResourceCountParams{}
|
2016-10-07 10:39:28 -04:00
|
|
|
p.p = make(map[string]interface{})
|
2019-02-01 14:26:40 -05:00
|
|
|
p.p["domainid"] = domainid
|
2016-10-07 10:39:28 -04:00
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
// Recalculate and update resource count for an account or domain.
|
|
|
|
func (s *LimitService) UpdateResourceCount(p *UpdateResourceCountParams) (*UpdateResourceCountResponse, error) {
|
|
|
|
resp, err := s.cs.newRequest("updateResourceCount", p.toURLValues())
|
2016-10-07 10:39:28 -04:00
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
var r UpdateResourceCountResponse
|
2016-10-07 10:39:28 -04:00
|
|
|
if err := json.Unmarshal(resp, &r); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
2019-02-01 14:26:40 -05:00
|
|
|
|
2016-10-07 10:39:28 -04:00
|
|
|
return &r, nil
|
|
|
|
}
|
|
|
|
|
2019-02-01 14:26:40 -05:00
|
|
|
type UpdateResourceCountResponse struct {
|
|
|
|
Account string `json:"account"`
|
|
|
|
Domain string `json:"domain"`
|
|
|
|
Domainid string `json:"domainid"`
|
2019-05-26 05:58:26 -04:00
|
|
|
JobID string `json:"jobid"`
|
|
|
|
Jobstatus int `json:"jobstatus"`
|
2019-02-01 14:26:40 -05:00
|
|
|
Project string `json:"project"`
|
|
|
|
Projectid string `json:"projectid"`
|
|
|
|
Resourcecount int64 `json:"resourcecount"`
|
|
|
|
Resourcetype string `json:"resourcetype"`
|
|
|
|
Resourcetypename string `json:"resourcetypename"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateResourceLimitParams struct {
|
|
|
|
p map[string]interface{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *UpdateResourceLimitParams) toURLValues() url.Values {
|
|
|
|
u := url.Values{}
|
|
|
|
if p.p == nil {
|
|
|
|
return u
|
|
|
|
}
|
|
|
|
if v, found := p.p["account"]; found {
|
|
|
|
u.Set("account", v.(string))
|
|
|
|
}
|
|
|
|
if v, found := p.p["domainid"]; found {
|
|
|
|
u.Set("domainid", v.(string))
|
|
|
|
}
|
|
|
|
if v, found := p.p["max"]; found {
|
|
|
|
vv := strconv.FormatInt(v.(int64), 10)
|
|
|
|
u.Set("max", vv)
|
|
|
|
}
|
|
|
|
if v, found := p.p["projectid"]; found {
|
|
|
|
u.Set("projectid", v.(string))
|
|
|
|
}
|
|
|
|
if v, found := p.p["resourcetype"]; found {
|
|
|
|
vv := strconv.Itoa(v.(int))
|
|
|
|
u.Set("resourcetype", vv)
|
|
|
|
}
|
|
|
|
return u
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *UpdateResourceLimitParams) SetAccount(v string) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["account"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *UpdateResourceLimitParams) SetDomainid(v string) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["domainid"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *UpdateResourceLimitParams) SetMax(v int64) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["max"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *UpdateResourceLimitParams) SetProjectid(v string) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["projectid"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *UpdateResourceLimitParams) SetResourcetype(v int) {
|
|
|
|
if p.p == nil {
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
}
|
|
|
|
p.p["resourcetype"] = v
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// You should always use this function to get a new UpdateResourceLimitParams instance,
|
|
|
|
// as then you are sure you have configured all required params
|
|
|
|
func (s *LimitService) NewUpdateResourceLimitParams(resourcetype int) *UpdateResourceLimitParams {
|
|
|
|
p := &UpdateResourceLimitParams{}
|
|
|
|
p.p = make(map[string]interface{})
|
|
|
|
p.p["resourcetype"] = resourcetype
|
|
|
|
return p
|
|
|
|
}
|
|
|
|
|
|
|
|
// Updates resource limits for an account or domain.
|
|
|
|
func (s *LimitService) UpdateResourceLimit(p *UpdateResourceLimitParams) (*UpdateResourceLimitResponse, error) {
|
|
|
|
resp, err := s.cs.newRequest("updateResourceLimit", p.toURLValues())
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
|
|
|
var r UpdateResourceLimitResponse
|
|
|
|
if err := json.Unmarshal(resp, &r); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
|
|
|
|
return &r, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
type UpdateResourceLimitResponse struct {
|
|
|
|
Account string `json:"account"`
|
|
|
|
Domain string `json:"domain"`
|
|
|
|
Domainid string `json:"domainid"`
|
2019-05-26 05:58:26 -04:00
|
|
|
JobID string `json:"jobid"`
|
|
|
|
Jobstatus int `json:"jobstatus"`
|
2019-02-01 14:26:40 -05:00
|
|
|
Max int64 `json:"max"`
|
|
|
|
Project string `json:"project"`
|
|
|
|
Projectid string `json:"projectid"`
|
|
|
|
Resourcetype string `json:"resourcetype"`
|
|
|
|
Resourcetypename string `json:"resourcetypename"`
|
2016-10-07 10:39:28 -04:00
|
|
|
}
|