func (s Spec) Artifact(id string) Artifact {
	return Artifact{
		name: specArtifact{
			ProjectID:  s.ProjectID,
			ApiID:      s.ApiID,
			VersionID:  s.VersionID,
			SpecID:     s.SpecID,
			ArtifactID: id,
		},
	}
}
Artifact returns an artifact with the provided ID and this resource as its parent.
package names
import (
	"fmt"
	"regexp"
)
var specRegexp = regexp.MustCompile(fmt.Sprintf("^projects/%s/locations/%s/apis/%s/versions/%s/specs/%s$",
	identifier, Location, identifier, identifier, identifier))
type Spec struct {
	ProjectID string
	ApiID     string
	VersionID string
	SpecID    string
}
func (s Spec) Validate() error {
	r := SpecRegexp()
	if name := s.String(); !r.MatchString(name) {
		return fmt.Errorf("invalid spec name %q: must match %q", name, r)
	}
	return validateID(s.SpecID)
}
func (s Spec) Project() Project {
	return Project{
		ProjectID: s.ProjectID,
	}
}
func (s Spec) Api() Api {
	return Api{
		ProjectID: s.ProjectID,
		ApiID:     s.ApiID,
	}
}
func (s Spec) Version() Version {
	return Version{
		ProjectID: s.ProjectID,
		ApiID:     s.ApiID,
		VersionID: s.VersionID,
	}
}
func (s Spec) Revision(id string) SpecRevision {
	return SpecRevision{
		ProjectID:  s.ProjectID,
		ApiID:      s.ApiID,
		VersionID:  s.VersionID,
		SpecID:     s.SpecID,
		RevisionID: id,
	}
}