func (s *SubjectSet) String() string {
	return fmt.Sprintf("%s:%s#%s", s.Namespace, s.Object, s.Relation)
}
String returns the string representation of the SubjectSet.
package accesscontroller
import (
	"encoding/json"
	"fmt"
	"strings"
	pb "github.com/authorizer-tech/access-controller/genprotos/authorizer/accesscontroller/v1alpha1"
)
var ErrInvalidSubjectSetString = fmt.Errorf("the provided SubjectSet string is malformed")
type Object struct {
	Namespace string
	ID        string
}
type Subject interface {
	json.Marshaler
	String() string
	FromString(string) (Subject, error)
	Equals(interface{}) bool
	ToProto() *pb.Subject
}
type SubjectID struct {
	ID string `json:"id"`
}
func (s SubjectID) MarshalJSON() ([]byte, error) {
	return []byte(`"` + s.String() + `"`), nil
}
func (s *SubjectID) Equals(v interface{}) bool {
	uv, ok := v.(*SubjectID)
	if !ok {
		return false
	}
	return uv.ID == s.ID
}
func (s *SubjectID) FromString(str string) (Subject, error) {
	s.ID = str
	return s, nil
}
func (s *SubjectID) String() string {
	return s.ID
}
func (s *SubjectID) ToProto() *pb.Subject {
	if s == nil {
		return nil
	}
	return &pb.Subject{
		Ref: &pb.Subject_Id{
			Id: s.ID,
		},
	}
}
type SubjectSet struct {
	Namespace string `json:"namespace"`
	Object    string `json:"object"`
	Relation  string `json:"relation"`
}
func (s *SubjectSet) Equals(v interface{}) bool {
	switch ss := v.(type) {
	case *SubjectSet:
		return ss.Relation == s.Relation && ss.Object == s.Object && ss.Namespace == s.Namespace
	case SubjectSet:
		return ss.Relation == s.Relation && ss.Object == s.Object && ss.Namespace == s.Namespace
	}
	return false
}