func (a Artifact) ArtifactID() string {
	switch name := a.name.(type) {
	case projectArtifact:
		return name.ArtifactID
	case apiArtifact:
		return name.ArtifactID
	case versionArtifact:
		return name.ArtifactID
	case specArtifact:
		return name.ArtifactID
	default:
		return ""
	}
}
ArtifactID returns the artifact's ID.
package names
import (
	"fmt"
	"regexp"
)
var (
	projectArtifactRegexp = regexp.MustCompile(fmt.Sprintf("^projects/%s/locations/%s/artifacts/%s", identifier, Location, identifier))
	apiArtifactRegexp     = regexp.MustCompile(fmt.Sprintf("^projects/%s/locations/%s/apis/%s/artifacts/%s", identifier, Location, identifier, identifier))
	versionArtifactRegexp = regexp.MustCompile(fmt.Sprintf("^projects/%s/locations/%s/apis/%s/versions/%s/artifacts/%s", identifier, Location, identifier, identifier, identifier))
	specArtifactRegexp    = regexp.MustCompile(fmt.Sprintf("^projects/%s/locations/%s/apis/%s/versions/%s/specs/%s/artifacts/%s", identifier, Location, identifier, identifier, identifier, identifier))
)
type Artifact struct {
	name interface {
		String() string
		Validate() error
	}
}
func (a Artifact) ProjectID() string {
	switch name := a.name.(type) {
	case projectArtifact:
		return name.ProjectID
	case apiArtifact:
		return name.ProjectID
	case versionArtifact:
		return name.ProjectID
	case specArtifact:
		return name.ProjectID
	default:
		return ""
	}
}
func (a Artifact) ApiID() string {
	switch name := a.name.(type) {
	case apiArtifact:
		return name.ApiID
	case versionArtifact:
		return name.ApiID
	case specArtifact:
		return name.ApiID
	default:
		return ""
	}
}
func (a Artifact) VersionID() string {
	switch name := a.name.(type) {
	case versionArtifact:
		return name.VersionID
	case specArtifact:
		return name.VersionID
	default:
		return ""
	}
}
func (a Artifact) SpecID() string {
	switch name := a.name.(type) {
	case specArtifact:
		return name.SpecID
	default:
		return ""
	}
}