code: func (v *VM) Validate(c *validation.Context) {
  	if len(v.GetDisk()) == 0 {
  		c.Errorf("at least one disk is required")
  	}
  	if v.GetMachineType() == "" {
  		c.Errorf("machine type is required")
  	}
  	for i, meta := range v.GetMetadata() {
  		c.Enter("metadata %d", i)
  		// Implicitly rejects FromFile.
  		// FromFile must be converted to FromText before calling.
  		if !strings.Contains(meta.GetFromText(), ":") {
  			c.Errorf("metadata from text must be in key:value form")
  		}
  		c.Exit()
  	}
  	if len(v.GetNetworkInterface()) == 0 {
  		c.Errorf("at least one network interface is required")
  	}
  	if v.GetProject() == "" {
  		c.Errorf("project is required")
  	}
  	if v.GetZone() == "" {
  		c.Errorf("zone is required")
  	}
  }
docs: // Validate validates this VM description.
  // Metadata FromFile must already be converted to FromText.