func projectWithLocationRegexp() *regexp.Regexp {
	return regexp.MustCompile(fmt.Sprintf("^projects/%s/locations/%s$", identifier, identifier))
}
projectWithLocationRegexp returns a regular expression that matches a project resource name followed by a location.
package names
import (
	"fmt"
	"regexp"
)
type Project struct {
	ProjectID string
}
func (p Project) Validate() error {
	r := ProjectRegexp()
	if name := p.String(); !r.MatchString(name) {
		return fmt.Errorf("invalid project name %q: must match %q", name, r)
	}
	return validateID(p.ProjectID)
}
func (p Project) Api(id string) Api {
	return Api{
		ProjectID: p.ProjectID,
		ApiID:     id,
	}
}
func (p Project) Artifact(id string) Artifact {
	return Artifact{
		name: projectArtifact{
			ProjectID:  p.ProjectID,
			ArtifactID: id,
		},
	}
}
func (p Project) String() string {
	return normalize(fmt.Sprintf("projects/%s", p.ProjectID))
}
func ProjectsRegexp() *regexp.Regexp {
	return regexp.MustCompile("^projects$")
}
func ProjectRegexp() *regexp.Regexp {
	return regexp.MustCompile(fmt.Sprintf("^projects/%s$", identifier))
}