core: Rename vdlutil.Any to vdl.AnyRep.

This simplifies usage and code-generation, since all generated
code only depends on the vdl package.

Change-Id: Ibe6cde9c9e54bc6d838177920a4d323444afe6b7
MultiPart: 1/6
diff --git a/runtimes/google/ipc/benchmark/service.vdl.go b/runtimes/google/ipc/benchmark/service.vdl.go
index a09b115..a2a64ff 100644
--- a/runtimes/google/ipc/benchmark/service.vdl.go
+++ b/runtimes/google/ipc/benchmark/service.vdl.go
@@ -13,7 +13,7 @@
 	__veyron2 "v.io/core/veyron2"
 	__context "v.io/core/veyron2/context"
 	__ipc "v.io/core/veyron2/ipc"
-	__vdlutil "v.io/core/veyron2/vdl/vdlutil"
+	__vdl "v.io/core/veyron2/vdl"
 )
 
 // BenchmarkClientMethods is the client interface
@@ -261,7 +261,7 @@
 				{"", ``}, // []byte
 				{"", ``}, // error
 			},
-			Tags: []__vdlutil.Any{access.Tag("Read")},
+			Tags: []__vdl.AnyRep{access.Tag("Read")},
 		},
 		{
 			Name: "EchoStream",
@@ -269,7 +269,7 @@
 			OutArgs: []__ipc.ArgDesc{
 				{"", ``}, // error
 			},
-			Tags: []__vdlutil.Any{access.Tag("Read")},
+			Tags: []__vdl.AnyRep{access.Tag("Read")},
 		},
 	},
 }
diff --git a/runtimes/google/ipc/client.go b/runtimes/google/ipc/client.go
index 7c59e5d..e52b8f1 100644
--- a/runtimes/google/ipc/client.go
+++ b/runtimes/google/ipc/client.go
@@ -17,7 +17,7 @@
 	"v.io/core/veyron2/naming"
 	"v.io/core/veyron2/options"
 	"v.io/core/veyron2/security"
-	"v.io/core/veyron2/vdl/vdlutil"
+	"v.io/core/veyron2/vdl"
 	old_verror "v.io/core/veyron2/verror"
 	verror "v.io/core/veyron2/verror2"
 	"v.io/core/veyron2/vlog"
@@ -305,9 +305,9 @@
 	}
 	impetus.Method = method
 	if len(args) > 0 {
-		impetus.Arguments = make([]vdlutil.Any, len(args))
+		impetus.Arguments = make([]vdl.AnyRep, len(args))
 		for i, a := range args {
-			impetus.Arguments[i] = vdlutil.Any(a)
+			impetus.Arguments[i] = vdl.AnyRep(a)
 		}
 	}
 	return impetus
@@ -732,7 +732,7 @@
 		blessingsRequest = clientEncodeBlessings(fc.flow.VCDataCache(), fc.blessings)
 	}
 	// TODO(suharshs, ataly): Make security.Discharge a vdl type.
-	anyDischarges := make([]vdlutil.Any, len(fc.discharges))
+	anyDischarges := make([]vdl.AnyRep, len(fc.discharges))
 	for i, d := range fc.discharges {
 		anyDischarges[i] = d
 	}
diff --git a/runtimes/google/ipc/discharges.go b/runtimes/google/ipc/discharges.go
index f12f554..8334bbb 100644
--- a/runtimes/google/ipc/discharges.go
+++ b/runtimes/google/ipc/discharges.go
@@ -8,7 +8,7 @@
 	"v.io/core/veyron2/context"
 	"v.io/core/veyron2/ipc"
 	"v.io/core/veyron2/security"
-	"v.io/core/veyron2/vdl/vdlutil"
+	"v.io/core/veyron2/vdl"
 	"v.io/core/veyron2/vlog"
 	"v.io/core/veyron2/vtrace"
 )
@@ -107,7 +107,7 @@
 					vlog.VI(3).Infof("Discharge fetch for %v failed: %v", cav, err)
 					return
 				}
-				var dAny vdlutil.Any
+				var dAny vdl.AnyRep
 				if ierr := call.Finish(&dAny, &err); ierr != nil || err != nil {
 					vlog.VI(3).Infof("Discharge fetch for %v failed: (%v, %v)", cav, err, ierr)
 					return
@@ -195,7 +195,7 @@
 		after.Method = before.Method
 	}
 	if r.ReportArguments && len(before.Arguments) > 0 {
-		after.Arguments = make([]vdlutil.Any, len(before.Arguments))
+		after.Arguments = make([]vdl.AnyRep, len(before.Arguments))
 		for i := range before.Arguments {
 			after.Arguments[i] = before.Arguments[i]
 		}
diff --git a/runtimes/google/ipc/full_test.go b/runtimes/google/ipc/full_test.go
index 2612001..8ff2250 100644
--- a/runtimes/google/ipc/full_test.go
+++ b/runtimes/google/ipc/full_test.go
@@ -24,7 +24,6 @@
 	"v.io/core/veyron2/services/security/access"
 	"v.io/core/veyron2/uniqueid"
 	"v.io/core/veyron2/vdl"
-	"v.io/core/veyron2/vdl/vdlutil"
 	verror "v.io/core/veyron2/verror2"
 	"v.io/core/veyron2/vlog"
 	"v.io/core/veyron2/vtrace"
@@ -186,7 +185,7 @@
 
 type dischargeServer struct{}
 
-func (*dischargeServer) Discharge(ctx ipc.ServerCall, cav vdlutil.Any, _ security.DischargeImpetus) (vdlutil.Any, error) {
+func (*dischargeServer) Discharge(ctx ipc.ServerCall, cav vdl.AnyRep, _ security.DischargeImpetus) (vdl.AnyRep, error) {
 	c, ok := cav.(security.ThirdPartyCaveat)
 	if !ok {
 		return nil, fmt.Errorf("discharger: unknown caveat(%T)", cav)
@@ -715,7 +714,7 @@
 	traceid []uniqueid.ID
 }
 
-func (s *dischargeTestServer) Discharge(ctx ipc.ServerContext, cav vdlutil.Any, impetus security.DischargeImpetus) (vdlutil.Any, error) {
+func (s *dischargeTestServer) Discharge(ctx ipc.ServerContext, cav vdl.AnyRep, impetus security.DischargeImpetus) (vdl.AnyRep, error) {
 	s.impetus = append(s.impetus, impetus)
 	s.traceid = append(s.traceid, vtrace.GetSpan(ctx.Context()).Trace())
 	return nil, fmt.Errorf("discharges not issued")
@@ -820,7 +819,7 @@
 		},
 		{ // Require everything
 			Requirements: security.ThirdPartyRequirements{ReportServer: true, ReportMethod: true, ReportArguments: true},
-			Impetus:      security.DischargeImpetus{Server: []security.BlessingPattern{"server"}, Method: "Method", Arguments: []vdlutil.Any{vdlutil.Any("argument")}},
+			Impetus:      security.DischargeImpetus{Server: []security.BlessingPattern{"server"}, Method: "Method", Arguments: []vdl.AnyRep{vdl.AnyRep("argument")}},
 		},
 		{ // Require only the method name
 			Requirements: security.ThirdPartyRequirements{ReportMethod: true},
@@ -1431,7 +1430,7 @@
 	called bool
 }
 
-func (m *mockDischarger) Discharge(ctx ipc.ServerContext, caveatAny vdlutil.Any, _ security.DischargeImpetus) (vdlutil.Any, error) {
+func (m *mockDischarger) Discharge(ctx ipc.ServerContext, caveatAny vdl.AnyRep, _ security.DischargeImpetus) (vdl.AnyRep, error) {
 	m.mu.Lock()
 	m.called = true
 	m.mu.Unlock()
diff --git a/runtimes/google/rt/ipc_test.go b/runtimes/google/rt/ipc_test.go
index f62178a..8dee8a4 100644
--- a/runtimes/google/rt/ipc_test.go
+++ b/runtimes/google/rt/ipc_test.go
@@ -15,7 +15,7 @@
 	"v.io/core/veyron/lib/testutil"
 	tsecurity "v.io/core/veyron/lib/testutil/security"
 	"v.io/core/veyron/profiles"
-	"v.io/core/veyron2/vdl/vdlutil"
+	"v.io/core/veyron2/vdl"
 	"v.io/core/veyron2/verror"
 )
 
@@ -29,7 +29,7 @@
 
 type dischargeService struct{}
 
-func (dischargeService) Discharge(ctx ipc.ServerCall, cav vdlutil.Any, _ security.DischargeImpetus) (vdlutil.Any, error) {
+func (dischargeService) Discharge(ctx ipc.ServerCall, cav vdl.AnyRep, _ security.DischargeImpetus) (vdl.AnyRep, error) {
 	c, ok := cav.(security.ThirdPartyCaveat)
 	if !ok {
 		return nil, fmt.Errorf("discharger: unknown caveat(%T)", cav)
diff --git a/security/agent/client.go b/security/agent/client.go
index 0c2912a..87e0849 100644
--- a/security/agent/client.go
+++ b/security/agent/client.go
@@ -13,7 +13,7 @@
 	"v.io/core/veyron2/naming"
 	"v.io/core/veyron2/options"
 	"v.io/core/veyron2/security"
-	"v.io/core/veyron2/vdl/vdlutil"
+	"v.io/core/veyron2/vdl"
 	"v.io/core/veyron2/vlog"
 	"v.io/core/veyron2/vtrace"
 )
@@ -121,7 +121,7 @@
 
 func (c *client) MintDischarge(tp security.ThirdPartyCaveat, caveat security.Caveat, additionalCaveats ...security.Caveat) (security.Discharge, error) {
 	var discharge security.Discharge
-	err := c.caller.call("MintDischarge", results(&discharge), vdlutil.Any(tp), caveat, additionalCaveats)
+	err := c.caller.call("MintDischarge", results(&discharge), vdl.AnyRep(tp), caveat, additionalCaveats)
 	if err != nil {
 		return nil, err
 	}
diff --git a/security/agent/server/server.go b/security/agent/server/server.go
index 808b5a5..7175a57 100644
--- a/security/agent/server/server.go
+++ b/security/agent/server/server.go
@@ -22,7 +22,7 @@
 	"v.io/core/veyron2/ipc"
 	"v.io/core/veyron2/options"
 	"v.io/core/veyron2/security"
-	"v.io/core/veyron2/vdl/vdlutil"
+	"v.io/core/veyron2/vdl"
 	verror "v.io/core/veyron2/verror2"
 	"v.io/core/veyron2/vlog"
 )
@@ -253,7 +253,7 @@
 	return a.principal.Sign(message)
 }
 
-func (a agentd) MintDischarge(_ ipc.ServerContext, tp vdlutil.Any, caveat security.Caveat, additionalCaveats []security.Caveat) (vdlutil.Any, error) {
+func (a agentd) MintDischarge(_ ipc.ServerContext, tp vdl.AnyRep, caveat security.Caveat, additionalCaveats []security.Caveat) (vdl.AnyRep, error) {
 	tpCaveat, ok := tp.(security.ThirdPartyCaveat)
 	if !ok {
 		return nil, fmt.Errorf("provided caveat of type %T does not implement security.ThirdPartyCaveat", tp)
diff --git a/security/agent/server/wire.vdl.go b/security/agent/server/wire.vdl.go
index ddd4eab..4a8922a 100644
--- a/security/agent/server/wire.vdl.go
+++ b/security/agent/server/wire.vdl.go
@@ -10,7 +10,7 @@
 	__veyron2 "v.io/core/veyron2"
 	__context "v.io/core/veyron2/context"
 	__ipc "v.io/core/veyron2/ipc"
-	__vdlutil "v.io/core/veyron2/vdl/vdlutil"
+	__vdl "v.io/core/veyron2/vdl"
 )
 
 // AgentClientMethods is the client interface
@@ -19,7 +19,7 @@
 	Bless(ctx *__context.T, key []byte, wit security.WireBlessings, extension string, caveat security.Caveat, additionalCaveats []security.Caveat, opts ...__ipc.CallOpt) (security.WireBlessings, error)
 	BlessSelf(ctx *__context.T, name string, caveats []security.Caveat, opts ...__ipc.CallOpt) (security.WireBlessings, error)
 	Sign(ctx *__context.T, message []byte, opts ...__ipc.CallOpt) (security.Signature, error)
-	MintDischarge(ctx *__context.T, tp __vdlutil.Any, caveat security.Caveat, additionalCaveats []security.Caveat, opts ...__ipc.CallOpt) (__vdlutil.Any, error)
+	MintDischarge(ctx *__context.T, tp __vdl.AnyRep, caveat security.Caveat, additionalCaveats []security.Caveat, opts ...__ipc.CallOpt) (__vdl.AnyRep, error)
 	PublicKey(*__context.T, ...__ipc.CallOpt) ([]byte, error)
 	BlessingsByName(ctx *__context.T, name security.BlessingPattern, opts ...__ipc.CallOpt) ([]security.WireBlessings, error)
 	BlessingsInfo(ctx *__context.T, blessings security.WireBlessings, opts ...__ipc.CallOpt) (map[string][]security.Caveat, error)
@@ -97,7 +97,7 @@
 	return
 }
 
-func (c implAgentClientStub) MintDischarge(ctx *__context.T, i0 __vdlutil.Any, i1 security.Caveat, i2 []security.Caveat, opts ...__ipc.CallOpt) (o0 __vdlutil.Any, err error) {
+func (c implAgentClientStub) MintDischarge(ctx *__context.T, i0 __vdl.AnyRep, i1 security.Caveat, i2 []security.Caveat, opts ...__ipc.CallOpt) (o0 __vdl.AnyRep, err error) {
 	var call __ipc.Call
 	if call, err = c.c(ctx).StartCall(ctx, c.name, "MintDischarge", []interface{}{i0, i1, i2}, opts...); err != nil {
 		return
@@ -257,7 +257,7 @@
 	Bless(ctx __ipc.ServerContext, key []byte, wit security.WireBlessings, extension string, caveat security.Caveat, additionalCaveats []security.Caveat) (security.WireBlessings, error)
 	BlessSelf(ctx __ipc.ServerContext, name string, caveats []security.Caveat) (security.WireBlessings, error)
 	Sign(ctx __ipc.ServerContext, message []byte) (security.Signature, error)
-	MintDischarge(ctx __ipc.ServerContext, tp __vdlutil.Any, caveat security.Caveat, additionalCaveats []security.Caveat) (__vdlutil.Any, error)
+	MintDischarge(ctx __ipc.ServerContext, tp __vdl.AnyRep, caveat security.Caveat, additionalCaveats []security.Caveat) (__vdl.AnyRep, error)
 	PublicKey(__ipc.ServerContext) ([]byte, error)
 	BlessingsByName(ctx __ipc.ServerContext, name security.BlessingPattern) ([]security.WireBlessings, error)
 	BlessingsInfo(ctx __ipc.ServerContext, blessings security.WireBlessings) (map[string][]security.Caveat, error)
@@ -320,7 +320,7 @@
 	return s.impl.Sign(ctx, i0)
 }
 
-func (s implAgentServerStub) MintDischarge(ctx __ipc.ServerContext, i0 __vdlutil.Any, i1 security.Caveat, i2 []security.Caveat) (__vdlutil.Any, error) {
+func (s implAgentServerStub) MintDischarge(ctx __ipc.ServerContext, i0 __vdl.AnyRep, i1 security.Caveat, i2 []security.Caveat) (__vdl.AnyRep, error) {
 	return s.impl.MintDischarge(ctx, i0, i1, i2)
 }
 
@@ -430,12 +430,12 @@
 		{
 			Name: "MintDischarge",
 			InArgs: []__ipc.ArgDesc{
-				{"tp", ``},                // __vdlutil.Any
+				{"tp", ``},                // __vdl.AnyRep
 				{"caveat", ``},            // security.Caveat
 				{"additionalCaveats", ``}, // []security.Caveat
 			},
 			OutArgs: []__ipc.ArgDesc{
-				{"", ``}, // __vdlutil.Any
+				{"", ``}, // __vdl.AnyRep
 				{"", ``}, // error
 			},
 		},
diff --git a/services/mgmt/repository/repository.vdl.go b/services/mgmt/repository/repository.vdl.go
index b320b6c..1812a12 100644
--- a/services/mgmt/repository/repository.vdl.go
+++ b/services/mgmt/repository/repository.vdl.go
@@ -18,7 +18,7 @@
 	__veyron2 "v.io/core/veyron2"
 	__context "v.io/core/veyron2/context"
 	__ipc "v.io/core/veyron2/ipc"
-	__vdlutil "v.io/core/veyron2/vdl/vdlutil"
+	__vdl "v.io/core/veyron2/vdl"
 )
 
 // ApplicationClientMethods is the client interface
@@ -213,7 +213,7 @@
 			OutArgs: []__ipc.ArgDesc{
 				{"", ``}, // error
 			},
-			Tags: []__vdlutil.Any{access.Tag("Write")},
+			Tags: []__vdl.AnyRep{access.Tag("Write")},
 		},
 		{
 			Name: "Remove",
@@ -224,7 +224,7 @@
 			OutArgs: []__ipc.ArgDesc{
 				{"", ``}, // error
 			},
-			Tags: []__vdlutil.Any{access.Tag("Write")},
+			Tags: []__vdl.AnyRep{access.Tag("Write")},
 		},
 	},
 }
@@ -413,7 +413,7 @@
 				{"", ``}, // profile.Specification
 				{"", ``}, // error
 			},
-			Tags: []__vdlutil.Any{access.Tag("Read")},
+			Tags: []__vdl.AnyRep{access.Tag("Read")},
 		},
 		{
 			Name: "Put",
@@ -424,7 +424,7 @@
 			OutArgs: []__ipc.ArgDesc{
 				{"", ``}, // error
 			},
-			Tags: []__vdlutil.Any{access.Tag("Write")},
+			Tags: []__vdl.AnyRep{access.Tag("Write")},
 		},
 		{
 			Name: "Remove",
@@ -432,7 +432,7 @@
 			OutArgs: []__ipc.ArgDesc{
 				{"", ``}, // error
 			},
-			Tags: []__vdlutil.Any{access.Tag("Write")},
+			Tags: []__vdl.AnyRep{access.Tag("Write")},
 		},
 	},
 }
diff --git a/services/mgmt/stats/impl/stats.go b/services/mgmt/stats/impl/stats.go
index ed51f98..c4d2277 100644
--- a/services/mgmt/stats/impl/stats.go
+++ b/services/mgmt/stats/impl/stats.go
@@ -13,7 +13,7 @@
 	"v.io/core/veyron2/services/mgmt/stats/types"
 	"v.io/core/veyron2/services/watch"
 	watchtypes "v.io/core/veyron2/services/watch/types"
-	"v.io/core/veyron2/vdl/vdlutil"
+	"v.io/core/veyron2/vdl"
 	verror "v.io/core/veyron2/verror2"
 	"v.io/core/veyron2/vlog"
 )
@@ -96,7 +96,7 @@
 }
 
 // Value returns the value of the receiver object.
-func (i *statsService) Value(ctx ipc.ServerContext) (vdlutil.Any, error) {
+func (i *statsService) Value(ctx ipc.ServerContext) (vdl.AnyRep, error) {
 	vlog.VI(1).Infof("%v.Value()", i.suffix)
 
 	v, err := libstats.Value(i.suffix)
diff --git a/services/security/discharger.vdl.go b/services/security/discharger.vdl.go
index 46805eb..771c5f1 100644
--- a/services/security/discharger.vdl.go
+++ b/services/security/discharger.vdl.go
@@ -10,7 +10,7 @@
 	__veyron2 "v.io/core/veyron2"
 	__context "v.io/core/veyron2/context"
 	__ipc "v.io/core/veyron2/ipc"
-	__vdlutil "v.io/core/veyron2/vdl/vdlutil"
+	__vdl "v.io/core/veyron2/vdl"
 )
 
 // DischargerClientMethods is the client interface
@@ -26,7 +26,7 @@
 	// respectively. (not enforced here because vdl does not know these types)
 	// TODO(ataly,ashankar): Figure out a VDL representation for ThirdPartyCaveat
 	// and Discharge and use those here?
-	Discharge(ctx *__context.T, Caveat __vdlutil.Any, Impetus security.DischargeImpetus, opts ...__ipc.CallOpt) (Discharge __vdlutil.Any, err error)
+	Discharge(ctx *__context.T, Caveat __vdl.AnyRep, Impetus security.DischargeImpetus, opts ...__ipc.CallOpt) (Discharge __vdl.AnyRep, err error)
 }
 
 // DischargerClientStub adds universal methods to DischargerClientMethods.
@@ -58,7 +58,7 @@
 	return __veyron2.GetClient(ctx)
 }
 
-func (c implDischargerClientStub) Discharge(ctx *__context.T, i0 __vdlutil.Any, i1 security.DischargeImpetus, opts ...__ipc.CallOpt) (o0 __vdlutil.Any, err error) {
+func (c implDischargerClientStub) Discharge(ctx *__context.T, i0 __vdl.AnyRep, i1 security.DischargeImpetus, opts ...__ipc.CallOpt) (o0 __vdl.AnyRep, err error) {
 	var call __ipc.Call
 	if call, err = c.c(ctx).StartCall(ctx, c.name, "Discharge", []interface{}{i0, i1}, opts...); err != nil {
 		return
@@ -82,7 +82,7 @@
 	// respectively. (not enforced here because vdl does not know these types)
 	// TODO(ataly,ashankar): Figure out a VDL representation for ThirdPartyCaveat
 	// and Discharge and use those here?
-	Discharge(ctx __ipc.ServerContext, Caveat __vdlutil.Any, Impetus security.DischargeImpetus) (Discharge __vdlutil.Any, err error)
+	Discharge(ctx __ipc.ServerContext, Caveat __vdl.AnyRep, Impetus security.DischargeImpetus) (Discharge __vdl.AnyRep, err error)
 }
 
 // DischargerServerStubMethods is the server interface containing
@@ -120,7 +120,7 @@
 	gs   *__ipc.GlobState
 }
 
-func (s implDischargerServerStub) Discharge(ctx __ipc.ServerContext, i0 __vdlutil.Any, i1 security.DischargeImpetus) (__vdlutil.Any, error) {
+func (s implDischargerServerStub) Discharge(ctx __ipc.ServerContext, i0 __vdl.AnyRep, i1 security.DischargeImpetus) (__vdl.AnyRep, error) {
 	return s.impl.Discharge(ctx, i0, i1)
 }
 
@@ -145,11 +145,11 @@
 			Name: "Discharge",
 			Doc:  "// Discharge is called by a principal that holds a blessing with a third\n// party caveat and seeks to get a discharge that proves the fulfillment of\n// this caveat.\n//\n// Caveat and Discharge are of type ThirdPartyCaveat and Discharge\n// respectively. (not enforced here because vdl does not know these types)\n// TODO(ataly,ashankar): Figure out a VDL representation for ThirdPartyCaveat\n// and Discharge and use those here?",
 			InArgs: []__ipc.ArgDesc{
-				{"Caveat", ``},  // __vdlutil.Any
+				{"Caveat", ``},  // __vdl.AnyRep
 				{"Impetus", ``}, // security.DischargeImpetus
 			},
 			OutArgs: []__ipc.ArgDesc{
-				{"Discharge", ``}, // __vdlutil.Any
+				{"Discharge", ``}, // __vdl.AnyRep
 				{"err", ``},       // error
 			},
 		},
diff --git a/services/security/discharger/discharger.go b/services/security/discharger/discharger.go
index dfc4247..86dfbc5 100644
--- a/services/security/discharger/discharger.go
+++ b/services/security/discharger/discharger.go
@@ -7,14 +7,14 @@
 	services "v.io/core/veyron/services/security"
 	"v.io/core/veyron2/ipc"
 	"v.io/core/veyron2/security"
-	"v.io/core/veyron2/vdl/vdlutil"
+	"v.io/core/veyron2/vdl"
 )
 
 // dischargerd issues discharges for all caveats present in the current
 // namespace with no additional caveats iff the caveat is valid.
 type dischargerd struct{}
 
-func (dischargerd) Discharge(ctx ipc.ServerContext, caveatAny vdlutil.Any, _ security.DischargeImpetus) (vdlutil.Any, error) {
+func (dischargerd) Discharge(ctx ipc.ServerContext, caveatAny vdl.AnyRep, _ security.DischargeImpetus) (vdl.AnyRep, error) {
 	caveat, ok := caveatAny.(security.ThirdPartyCaveat)
 	if !ok {
 		return nil, fmt.Errorf("type %T does not implement security.ThirdPartyCaveat", caveatAny)