// SetHITReviewPolicy sets the HITReviewPolicy field's value.
175608
func (s *ListReviewPolicyResultsForHITOutput) SetHITReviewPolicy(v *ReviewPolicy) *ListReviewPolicyResultsForHITOutput {
	s.HITReviewPolicy = v
	return s
}
1203586
func (c *ACLCaches) GetPolicy(policyID string) *PolicyCacheEntry {
	if c == nil || c.policies == nil {
		return nil
	}

	if raw, ok := c.policies.Get(policyID); ok {
		return raw.(*PolicyCacheEntry)
	}

	return nil
}
266471
func (s *UpdateExpirationForHITInput) SetHITId(v string) *UpdateExpirationForHITInput {
	s.HITId = &v
	return s
}
1356366
func ValidatePolicy(policy string) error {
	_, err := casbin.NewEnforcerSafe(newBuiltInModel(), newAdapter("", "", policy))
	if err != nil {
		return fmt.Errorf("policy syntax error: %s", policy)
	}
	return nil
}
292142
func (a *Client) DeletePolicy(params *DeletePolicyParams) (*DeletePolicyOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewDeletePolicyParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "DeletePolicy",
		Method:             "DELETE",
		PathPattern:        "/policy",
		ProducesMediaTypes: []string{"application/json"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http"},
		Params:             params,
		Reader:             &DeletePolicyReader{formats: a.formats},
		Context:            params.Context,
		Client:             params.HTTPClient,
	})
	if err != nil {
		return nil, err
	}
	return result.(*DeletePolicyOK), nil

}
1277306
func (q *Query) RetryPolicy(r RetryPolicy) *Query {
	q.rt = r
	return q
}
519348
func (s *CreateHITInput) SetAssignmentReviewPolicy(v *ReviewPolicy) *CreateHITInput {
	s.AssignmentReviewPolicy = v
	return s
}
606598
func (s *CreateHITInput) SetHITLayoutParameters(v []*HITLayoutParameter) *CreateHITInput {
	s.HITLayoutParameters = v
	return s
}
11366
func (model Model) GetPolicy(sec string, ptype string) [][]string {
	return model[sec][ptype].Policy
}
1141693
func (s *SupportImpl) CheckInstantiationPolicy(name, version string, cd ccprovider.ChaincodeDefinition) error {
	return ccprovider.CheckInstantiationPolicy(name, version, cd.(*ccprovider.ChaincodeData))
}
544697
func (c *Connection) GetDataRetrievalPolicy() (DataRetrievalPolicy, int, error) {
	// Build request.
	request, err := http.NewRequest("GET", c.policy("data-retrieval"), nil)
	if err != nil {
		return 0, 0, err
	}
	request.Header.Add("x-amz-glacier-version", "2012-06-01")

	c.Signature.Sign(request, nil)

	// Perform request.
	response, err := c.client().Do(request)
	if err != nil {
		return 0, 0, err
	}
	defer response.Body.Close()

	if response.StatusCode != http.StatusOK {
		return 0, 0, aws.ParseError(response)
	}

	// Parse success response.
	var policy dataRetrievalPolicy
	decoder := json.NewDecoder(response.Body)
	err = decoder.Decode(&policy)
	if err != nil {
		return 0, 0, err
	}

	var bytesPerHour int
	if policy.Policy.Rules[0].BytesPerHour != nil {
		bytesPerHour = *policy.Policy.Rules[0].BytesPerHour
	}
	strategy := ToDataRetrievalPolicy(policy.Policy.Rules[0].Strategy)

	return strategy, bytesPerHour, nil
}
823722
func (a *AdapterMock) AddPolicy(sec string, ptype string, rule []string) error {
	return a.GetMockErr()
}
15703
func (s *UpdateHITReviewStatusInput) SetHITId(v string) *UpdateHITReviewStatusInput {
	s.HITId = &v
	return s
}
901381
func (s *Listener) SetHealthCheck(v *HealthCheckPolicy) *Listener {
	s.HealthCheck = v
	return s
}
880168
func (s *ListReviewableHITsOutput) SetHITs(v []*HIT) *ListReviewableHITsOutput {
	s.HITs = v
	return s
}
1094897
func hookHasDeletePolicy(h *release.Hook, policy string) bool {
	if dp, ok := deletePolices[policy]; ok {
		for _, v := range h.DeletePolicies {
			if dp == v {
				return true
			}
		}
	}
	return false
}
1243720
func (tpm *TPM) GetPolicy(poltype int) (*Policy, error) {
	var policyHandle C.TSS_HPOLICY
	err := tspiError(C.Tspi_GetPolicyObject((C.TSS_HOBJECT)(tpm.handle), (C.TSS_FLAG)(poltype), &policyHandle))
	return &Policy{handle: policyHandle, context: tpm.context}, err
}