// GetQuota returns the resource aggregate for the given role
504585
func (r *realisClient) GetQuota(role string) (*aurora.Response, error) {

	resp, retryErr := r.thriftCallWithRetries(func() (*aurora.Response, error) {
		return r.adminClient.GetQuota(nil, role)
	})

	if retryErr != nil {
		return resp, errors.Wrap(retryErr, "Unable to get role quota")
	}
	return resp, retryErr
}
211779
func GetQuotaServiceType(service *corev1.Service) corev1.ServiceType {
	switch service.Spec.Type {
	case corev1.ServiceTypeNodePort:
		return corev1.ServiceTypeNodePort
	case corev1.ServiceTypeLoadBalancer:
		return corev1.ServiceTypeLoadBalancer
	}
	return corev1.ServiceType("")
}
359790
func (c *FakeRoleBindingRestrictions) Get(name string, options v1.GetOptions) (result *authorization.RoleBindingRestriction, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewGetAction(rolebindingrestrictionsResource, c.ns, name), &authorization.RoleBindingRestriction{})

	if obj == nil {
		return nil, err
	}
	return obj.(*authorization.RoleBindingRestriction), err
}
512262
func GetAtt(ref, attr interface{}) interface{} {
	switch v := ref.(type) {
	case NamedResource:
		ref = v.Name
	}
	return map[string][]interface{}{"Fn::GetAtt": []interface{}{ref, attr}}
}
922053
func (api *ProjectsAPI) modifyQuota(method string, projectId string, spec *QuotaSpec) (task *Task, err error) {
	body, err := json.Marshal(spec)
	if err != nil {
		return
	}
	res, err := api.client.restClient.SendRequestCommon(
		method,
		api.client.Endpoint+projectUrl+projectId+"/quota",
		"application/json",
		bytes.NewReader(body),
		api.client.options.TokenOptions)
	if err != nil {
		return
	}
	defer res.Body.Close()
	task, err = getTask(getError(res))
	return
}
280831
func (p *AuroraAdminClient) SetQuota(ctx context.Context, ownerRole string, quota *ResourceAggregate) (r *Response, err error) {
  var _args316 AuroraAdminSetQuotaArgs
  _args316.OwnerRole = ownerRole
  _args316.Quota = quota
  var _result317 AuroraAdminSetQuotaResult
  if err = p.Client_().Call(ctx, "setQuota", &_args316, &_result317); err != nil {
    return
  }
  return _result317.GetSuccess(), nil
}
35787
func (api *TenantsAPI) GetQuota(tenantId string) (quota *Quota, err error) {
	uri := api.client.Endpoint + tenantUrl + "/" + tenantId + "/quota"
	res, err := api.client.restClient.Get(uri, api.client.options.TokenOptions)

	if err != nil {
		return
	}

	defer res.Body.Close()
	res, err = getError(res)
	if err != nil {
		return
	}

	body, err := ioutil.ReadAll(res.Body)
	if err != nil {
		return
	}

	quota = &Quota{}
	err = json.Unmarshal(body, quota)
	return
}
614597
func (es OfflineStore) GetKey(role data.RoleName) ([]byte, error) {
	return nil, err
}
846780
func (s *resourceQuotaLister) ResourceQuotas(namespace string) ResourceQuotaNamespaceLister {
	return resourceQuotaNamespaceLister{indexer: s.indexer, namespace: namespace}
}
383139
func (api *ProjectsAPI) ExcludeQuota(projectId string, spec *QuotaSpec) (task *Task, err error) {
	task, err = api.modifyQuota("DELETE", projectId, spec)
	return
}
321072
func (v *vaultClient) getRole() string {
	if v.config.Role != "" {
		return v.config.Role
	}

	return v.tokenData.Role
}
428598
func ValidateResourceQuota(resourceQuota *core.ResourceQuota) field.ErrorList {
	allErrs := ValidateObjectMeta(&resourceQuota.ObjectMeta, true, ValidateResourceQuotaName, field.NewPath("metadata"))

	allErrs = append(allErrs, ValidateResourceQuotaSpec(&resourceQuota.Spec, field.NewPath("spec"))...)
	allErrs = append(allErrs, ValidateResourceQuotaStatus(&resourceQuota.Status, field.NewPath("status"))...)

	return allErrs
}
1134243
func (client *Client) GetSpaceQuotaDefinition(guid string) (SpaceQuota, Warnings, error) {
	request, err := client.newHTTPRequest(requestOptions{
		RequestName: internal.GetSpaceQuotaDefinitionRequest,
		URIParams:   Params{"space_quota_guid": guid},
	})
	if err != nil {
		return SpaceQuota{}, nil, err
	}

	var spaceQuota SpaceQuota
	response := cloudcontroller.Response{
		DecodeJSONResponseInto: &spaceQuota,
	}

	err = client.connection.Make(request, &response)
	return spaceQuota, response.Warnings, err
}
799805
func (rm *RoleManager) GetRoles(name string, domain ...string) ([]string, error) {
	if len(domain) == 1 {
		name = domain[0] + "::" + name
	} else if len(domain) > 1 {
		return nil, errors.New("error: domain should be 1 parameter")
	}

	if !rm.hasRole(name) {
		return []string{}, nil
	}

	roles := rm.createRole(name).getRoles()
	if len(domain) == 1 {
		for i := range roles {
			roles[i] = roles[i][len(domain[0])+2:]
		}
	}
	return roles, nil
}
372725
func (e *RoleService) Get(name string) (data *Role, err error) {
	path := fmt.Sprintf("roles/%s", name)
	err = e.client.magicRequestDecoder("GET", path, nil, &data)
	return
}
656042
func (b *BlockServerDisk) GetTeamQuotaInfo(
	ctx context.Context, _ keybase1.TeamID) (
	info *kbfsblock.QuotaInfo, err error) {
	if err := checkContext(ctx); err != nil {
		return nil, err
	}

	// TODO: check team membership and return error if not a reader?

	// Return a dummy value here.
	return &kbfsblock.QuotaInfo{Limit: math.MaxInt64}, nil
}
827679
func GetQuotedScopes(ss raml.DefinitionChoice) ([]string, error) {
	var quoted []string
	scopes, err := getSecurityScopes(ss)
	if err != nil {
		return quoted, err
	}
	for _, s := range scopes {
		quoted = append(quoted, fmt.Sprintf(`"%v"`, s))
	}
	return quoted, nil
}