// NewResourceIDFilter creates a filter that matches on <resourceType>/<alertType>/<resourceID>
168363
func NewResourceIDFilter(resourceID string, alertType int64, resourceType api.ResourceType, options ...Option) Filter {
	return &filter{filterType: resourceIDFilter, value: alertInfo{
		resourceID: resourceID, alertType: alertType, resourceType: resourceType},
		options: options}
}
785190
func resourceID(id, subType, subID string) string {
	if subType == "" {
		return fmt.Sprintf("resource#%s", id)
	}
	return fmt.Sprintf("resource#%s#%s-%s", id, subType, subID)
}
1010777
func newFilter(name string, indexCollectionType IndexCollectionType, valueParticleType int, begin Value, end Value) *Filter {
	return &Filter{
		name:              name,
		idxType:           indexCollectionType,
		valueParticleType: valueParticleType,
		begin:             begin,
		end:               end,
	}
}
742416
func NewResource(context hap.Context, imgFn GetImageFunc) *Resource {
	r := Resource{
		context: context,
		imgFn:   imgFn,
	}

	return &r
}
925837
func (m *DefaultRESTMapper) ResourceIsValid(resource string) bool {
	_, err := m.KindFor(resource)
	return err == nil
}
786274
func NewAlertTypeFilter(alertType int64, resourceType api.ResourceType, options ...Option) Filter {
	return &filter{filterType: alertTypeFilter, value: alertInfo{
		alertType: alertType, resourceType: resourceType},
		options: options}
}
933906
func makeIdFilter(backend modelBackend, marker string, receivers ...ActionReceiver) func(interface{}) bool {
	if len(receivers) == 0 {
		return nil
	}
	ensureMarkerFn := ensureSuffixFn(marker)
	prefixes := make([]string, len(receivers))
	for ix, receiver := range receivers {
		prefixes[ix] = backend.docID(ensureMarkerFn(receiver.Tag().Id()))
	}

	return func(key interface{}) bool {
		switch key.(type) {
		case string:
			for _, prefix := range prefixes {
				if strings.HasPrefix(key.(string), prefix) {
					return true
				}
			}
		default:
			watchLogger.Errorf("key is not type string, got %T", key)
		}
		return false
	}
}
592534
func (s *ModifyClientPropertiesInput) SetResourceId(v string) *ModifyClientPropertiesInput {
	s.ResourceId = &v
	return s
}
478807
func NewRelicFilter(c *revel.Controller, fc []revel.Filter) {
	if nr, ok := revel.CurrentEngine.Engine().(*ServerNewRelic); ok {
		if nr.NewRelicApp != nil {
			txn := nr.NewRelicApp.StartTransaction(c.Action,
				c.Response.Out.Server.(*revel.GoResponse).Original,
				c.Request.In.(*revel.GoRequest).Original)
			defer txn.End()
		} else {
			serverLog.Error("Newrelic application not initialized before filter called")
		}
	}

	fc[0](c, fc[1:])
}
318551
func (id PKIidType) IsNotSameFilter(that PKIidType) bool {
	return !bytes.Equal(id, that)
}
769850
func (s *ApplyPendingMaintenanceActionInput) SetResourceIdentifier(v string) *ApplyPendingMaintenanceActionInput {
	s.ResourceIdentifier = &v
	return s
}
7461
func WithResourceID(id int64) MarshalOption {
	return func(c *MarshalConfig) error {
		c.ID = id
		return nil
	}
}
786446
func (s *PutMethodResponseInput) SetResourceId(v string) *PutMethodResponseInput {
	s.ResourceId = &v
	return s
}
1100425
func NewResourceDefinition(name string, dsl func()) *ResourceDefinition {
	return &ResourceDefinition{
		Name:      name,
		MediaType: "text/plain",
		DSLFunc:   dsl,
	}
}
182863
func (s *DescribePendingMaintenanceActionsInput) SetResourceIdentifier(v string) *DescribePendingMaintenanceActionsInput {
	s.ResourceIdentifier = &v
	return s
}
134200
func (s *ResourceFilters) SetResourceId(v string) *ResourceFilters {
	s.ResourceId = &v
	return s
}
152870
func (s *AssociationExecutionTarget) SetResourceId(v string) *AssociationExecutionTarget {
	s.ResourceId = &v
	return s
}