// Get the canonical name of the dataset in an external aggregator service.
160432
func (self *Collection) GetAggregatorName() string {
	if self.IndexName != `` {
		return self.IndexName
	}

	return self.Name
}
187930
func (dc *Datacenter) GetDatastoreByName(ctx context.Context, name string) (*Datastore, error) {
	finder := getFinder(dc)
	ds, err := finder.Datastore(ctx, name)
	if err != nil {
		klog.Errorf("Failed while searching for datastore: %s. err: %+v", name, err)
		return nil, err
	}
	datastore := Datastore{ds, dc}
	return &datastore, nil
}
119592
func (t *Template) GetAWSWAFRegionalSqlInjectionMatchSetWithName(name string) (*resources.AWSWAFRegionalSqlInjectionMatchSet, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSWAFRegionalSqlInjectionMatchSet:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSWAFRegionalSqlInjectionMatchSet not found", name)
}
834728
func (g *Cloud) GetLoadBalancerName(ctx context.Context, clusterName string, svc *v1.Service) string {
	// TODO: replace DefaultLoadBalancerName to generate more meaningful loadbalancer names.
	return cloudprovider.DefaultLoadBalancerName(svc)
}
199423
func (branch *GitBranch) CanonicalName() string {
	if name := branch.BranchName; name != "" {
		return name
	} else {
		return branch.FullRemoteBranchName()
	}
}
641855
func (t *Template) GetAWSServiceCatalogCloudFormationProductWithName(name string) (*resources.AWSServiceCatalogCloudFormationProduct, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSServiceCatalogCloudFormationProduct:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSServiceCatalogCloudFormationProduct not found", name)
}
868135
func (u *User) CanonicalName() string {
	return C.GoString(C.sp_user_canonical_name(u.sp_user))
}
1148216
func (t *Template) GetAWSDAXClusterWithName(name string) (*resources.AWSDAXCluster, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSDAXCluster:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSDAXCluster not found", name)
}
708797
func canonicalTarName(name string, isDir bool) (string, error) {
	name, err := CanonicalTarNameForPath(name)
	if err != nil {
		return "", err
	}

	// suffix with '/' for directories
	if isDir && !strings.HasSuffix(name, "/") {
		name += "/"
	}
	return name, nil
}
317254
func (KNN *KNNClassifier) GetMetadata() base.ClassifierMetadataV1 {

	classifierParams := make(map[string]interface{})
	classifierParams["distance_func"] = KNN.DistanceFunc
	classifierParams["algorithm"] = KNN.Algorithm
	classifierParams["neighbours"] = KNN.NearestNeighbours
	classifierParams["weighted"] = KNN.Weighted
	classifierParams["allow_optimizations"] = KNN.AllowOptimisations

	return base.ClassifierMetadataV1{
		FormatVersion:      1,
		ClassifierName:     "KNN",
		ClassifierVersion:  "1.0",
		ClassifierMetadata: classifierParams,
	}
}
241429
func (t *Template) GetAWSGlueDatabaseWithName(name string) (*resources.AWSGlueDatabase, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSGlueDatabase:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSGlueDatabase not found", name)
}
3923
func (t *Template) GetAllAWSServiceDiscoveryPublicDnsNamespaceResources() map[string]*resources.AWSServiceDiscoveryPublicDnsNamespace {
	results := map[string]*resources.AWSServiceDiscoveryPublicDnsNamespace{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSServiceDiscoveryPublicDnsNamespace:
			results[name] = resource
		}
	}
	return results
}
291181
func (this *summaryMetricsSource) getSystemContainerName(c *stats.ContainerStats) string {
	if legacyName, ok := systemNameMap[c.Name]; ok {
		return legacyName
	}
	return c.Name
}
1285734
func (gen *RuleGen) GetDNSNames() (dnsNames []string) {
	gen.Lock()
	defer gen.Unlock()

	for name := range gen.namesToPoll {
		dnsNames = append(dnsNames, name)
	}

	return dnsNames
}
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())
}
490842
func (t *Template) GetAllAWSDocDBDBClusterResources() map[string]*resources.AWSDocDBDBCluster {
	results := map[string]*resources.AWSDocDBDBCluster{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSDocDBDBCluster:
			results[name] = resource
		}
	}
	return results
}
1242939
func (t *Template) GetAWSAppSyncDataSourceWithName(name string) (*resources.AWSAppSyncDataSource, error) {
	if untyped, ok := t.Resources[name]; ok {
		switch resource := untyped.(type) {
		case *resources.AWSAppSyncDataSource:
			return resource, nil
		}
	}
	return nil, fmt.Errorf("resource %q of type AWSAppSyncDataSource not found", name)
}