// ResourceName returns resource name of an endpoint
173994
func (ep Endpoint) ResourceName() string {
	name := ep.Addr
	splt := strings.Split(name, "/")
	if len(splt) > 0 {
		name = splt[0]
	}
	return strings.TrimSuffix(strings.TrimPrefix(name, "/"), "/")
}
1157409
func (t *Template) GetAWSApiGatewayUsagePlanKeyWithName(name string) (*resources.AWSApiGatewayUsagePlanKey, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSApiGatewayUsagePlanKey:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSApiGatewayUsagePlanKey not found", name)
}
216134
func (s *DescribeEndpointInput) SetEndpointName(v string) *DescribeEndpointInput {
	s.EndpointName = &v
	return s
}
211096
func (s *DeleteEndpointInput) SetEndpointName(v string) *DeleteEndpointInput {
	s.EndpointName = &v
	return s
}
860804
func (t *Template) GetAWSApiGatewayDomainNameWithName(name string) (*resources.AWSApiGatewayDomainName, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSApiGatewayDomainName:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSApiGatewayDomainName not found", name)
}
296620
func portName(port int, protocol corev1.Protocol) string {
	if protocol == "" {
		protocol = corev1.ProtocolTCP
	}
	return strings.ToLower(fmt.Sprintf("%d-%s", port, protocol))
}
1256109
func (conn *Conn) RequestName(name string, flags RequestNameFlags) (RequestNameReply, error) {
	var r uint32
	err := conn.busObj.Call("org.freedesktop.DBus.RequestName", 0, name, flags).Store(&r)
	if err != nil {
		return 0, err
	}
	return RequestNameReply(r), nil
}
258176
func (s *ConfigurationItem) SetResourceName(v string) *ConfigurationItem {
	s.ResourceName = &v
	return s
}
769736
func SortedResourceNames(list corev1.ResourceList) []corev1.ResourceName {
	resources := make([]corev1.ResourceName, 0, len(list))
	for res := range list {
		resources = append(resources, res)
	}
	sort.Sort(SortableResourceNames(resources))
	return resources
}
1056967
func (info *LambdaAWSInfo) LogicalResourceName() string {
	// Per http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resources-section-structure.html,
	// we can only use alphanumeric, so we'll take the sanitized name and
	// remove all underscores
	// Prefer the user-supplied stable name to the internal one.
	baseName := info.lambdaFunctionName()
	resourceName := strings.Replace(sanitizedName(baseName), "_", "", -1)
	prefix := fmt.Sprintf("%sLambda", resourceName)
	return CloudFormationResourceName(prefix, info.lambdaFunctionName())
}
947896
func IsQuotaHugePageResourceName(name core.ResourceName) bool {
	return strings.HasPrefix(string(name), core.ResourceHugePagesPrefix) || strings.HasPrefix(string(name), core.ResourceRequestsHugePagesPrefix)
}
123370
func (t *Template) GetAWSSSMResourceDataSyncWithName(name string) (*resources.AWSSSMResourceDataSync, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSSSMResourceDataSync:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSSSMResourceDataSync not found", name)
}
1068013
func (r *Client) GetDatasourceByName(name string) (Datasource, error) {
	var (
		raw  []byte
		ds   Datasource
		code int
		err  error
	)
	if raw, code, err = r.get(fmt.Sprintf("api/datasources/name/%s", name), nil); err != nil {
		return ds, err
	}
	if code != 200 {
		return ds, fmt.Errorf("HTTP error %d: returns %s", code, raw)
	}
	err = json.Unmarshal(raw, &ds)
	return ds, err
}
119657
func (s *DescribeEndpointOutput) SetEndpointName(v string) *DescribeEndpointOutput {
	s.EndpointName = &v
	return s
}
1063200
func (r *Request) Name(s string) *Request {
	r.resourceName = &s
	return r
}
1319389
func IsIntegerResourceName(str string) bool {
	return integerResources.Has(str) || IsExtendedResourceName(core.ResourceName(str))
}
905892
func (s *ListTagsForResourceInput) SetResourceName(v string) *ListTagsForResourceInput {
	s.ResourceName = &v
	return s
}