// NewAttributes returns a new attributes struct and parsed request uri
// if needed
768147
func NewAttributes(event *audit.Event) (authorizer.Attributes, error) {
	a := attributes{
		event: event,
	}
	if event.ObjectRef == nil {
		u, err := url.ParseRequestURI(a.event.RequestURI)
		if err != nil {
			return nil, fmt.Errorf("could not parse url: %v", err)
		}
		a.path = u.Path
	}
	return &a, nil
}
524659
func (s *AddAttributesToFindingsInput) SetAttributes(v []*Attribute) *AddAttributesToFindingsInput {
	s.Attributes = v
	return s
}
328924
func (s *PlatformApplication) SetAttributes(v map[string]*string) *PlatformApplication {
	s.Attributes = v
	return s
}
848573
func (s *InstanceSummary) SetAttributes(v map[string]*string) *InstanceSummary {
	s.Attributes = v
	return s
}
412406
func (s *CreateFacetInput) SetAttributes(v []*FacetAttribute) *CreateFacetInput {
	s.Attributes = v
	return s
}
950483
func (s *UpdatePlacementInput) SetAttributes(v map[string]*string) *UpdatePlacementInput {
	s.Attributes = v
	return s
}
1279046
func newAttribute(baseMT string) *design.AttributeDefinition {
	var base design.DataType
	if mt := design.Design.MediaTypeWithIdentifier(baseMT); mt != nil {
		base = mt.Type
	}
	return &design.AttributeDefinition{Reference: base}
}
316335
func (s *UpdateAppInput) SetAttributes(v map[string]*string) *UpdateAppInput {
	s.Attributes = v
	return s
}
195288
func (r *Request) SetAttribute(name string, value interface{}) {
	r.attributes[name] = value
}
806423
func (s *AddAttributesActivity) SetAttributes(v map[string]*string) *AddAttributesActivity {
	s.Attributes = v
	return s
}
713222
func (t *Table) AddAttribute(attr Attribute) error {
	t.attributes = append(t.attributes, attr)
	return nil
}
878677
func (s *GetPlatformApplicationAttributesOutput) SetAttributes(v map[string]*string) *GetPlatformApplicationAttributesOutput {
	s.Attributes = v
	return s
}
124836
func (s *ReservationUtilizationGroup) SetAttributes(v map[string]*string) *ReservationUtilizationGroup {
	s.Attributes = v
	return s
}
1022539
func (s *GetContactAttributesOutput) SetAttributes(v map[string]*string) *GetContactAttributesOutput {
	s.Attributes = v
	return s
}
383791
func (s *CloneStackInput) SetAttributes(v map[string]*string) *CloneStackInput {
	s.Attributes = v
	return s
}
486520
func (s *SamplingRuleUpdate) SetAttributes(v map[string]*string) *SamplingRuleUpdate {
	s.Attributes = v
	return s
}
96908
func newRawAttributes(attributes []pkix.AttributeTypeAndValueSET) ([]asn1.RawValue, error) {
	var rawAttributes []asn1.RawValue
	b, err := asn1.Marshal(attributes)
	if err != nil {
		return nil, err
	}
	rest, err := asn1.Unmarshal(b, &rawAttributes)
	if err != nil {
		return nil, err
	}
	if len(rest) != 0 {
		return nil, errors.New("x509: failed to unmarshal raw CSR Attributes")
	}
	return rawAttributes, nil
}