// EntityId returns a unique identifier for a unit across
// models.
978572
func (i *UnitInfo) EntityId() EntityId {
	return EntityId{
		Kind:      "unit",
		ModelUUID: i.ModelUUID,
		Id:        i.Name,
	}
}
305459
func (engine *Engine) Id(id interface{}) *Session {
	session := engine.NewSession()
	session.isAutoClose = true
	return session.Id(id)
}
713857
func (ca *CertAuthorityV2) ID() *CertAuthID {
	return &CertAuthID{DomainName: ca.Spec.ClusterName, Type: ca.Spec.Type}
}
120710
func (s *DisassociateDelegateFromResourceInput) SetEntityId(v string) *DisassociateDelegateFromResourceInput {
	s.EntityId = &v
	return s
}
1087292
func (inst *environInstance) Id() instance.Id {
	return instance.Id(inst.base.Name)
}
983477
func (r renderer) Entity(out *bytes.Buffer, entity []byte) {
	out.Write(entity)
}
1138798
func (f *contextFactory) newId(name string) string {
	return fmt.Sprintf("%s-%s-%d", f.unit.Name(), name, f.rand.Int63())
}
621640
func (r *RandomID) ModelID() string {
	if r.ID == "" {
		r.ID = generateRandomID()
	}
	return r.ID
}
869436
func (s *GetService) Id(id string) *GetService {
	s.id = id
	return s
}
1242606
func (c *Connection) ID() int {
	c.RLock()
	defer c.RUnlock()
	return c.id
}
1011265
func (s *IngestPutPipelineService) Id(id string) *IngestPutPipelineService {
	s.id = id
	return s
}
982098
func InstanceID(ctx types.Context) (*types.InstanceID, error) {
	req, err := http.NewRequest(http.MethodGet, iidURL, nil)
	if err != nil {
		return nil, err
	}

	res, err := doRequest(ctx, req)
	if err != nil {
		return nil, err
	}
	defer res.Body.Close()

	iid := instanceIdentityDoc{}
	dec := json.NewDecoder(res.Body)
	if err := dec.Decode(&iid); err != nil {
		return nil, err
	}

	mac, err := getMAC(ctx)
	if err != nil {
		return nil, err
	}

	subnetID, err := ResolveSubnetWithMAC(ctx, mac)
	if err != nil {
		return nil, err
	}

	secGroups, err := getSecurityGroups(ctx, mac)
	if err != nil {
		return nil, err
	}

	iidFields := map[string]string{
		efs.InstanceIDFieldRegion:           iid.Region,
		efs.InstanceIDFieldAvailabilityZone: iid.AvailabilityZone,
	}

	if len(secGroups) > 0 {
		iidFields[efs.InstanceIDFieldSecurityGroups] = strings.Join(
			secGroups, ";")
	}

	return &types.InstanceID{
		ID:     subnetID,
		Driver: efs.Name,
		Fields: iidFields,
	}, nil
}
1032663
func docId(metadata *Metadata) string {
	return fmt.Sprintf("%s-%s-%s-%s", metadata.ModelUUID, metadata.Kind, metadata.Series, metadata.Arch)
}
486580
func (s *GetTemplateService) Id(id string) *GetTemplateService {
	s.id = id
	return s
}
94962
func (tx *VTGateTx) ExecuteEntityIds(ctx context.Context, query string, keyspace string, entityColumnName string, entityKeyspaceIDs []*vtgatepb.ExecuteEntityIdsRequest_EntityId, bindVars map[string]*querypb.BindVariable, tabletType topodatapb.TabletType, options *querypb.ExecuteOptions) (*sqltypes.Result, error) {
	if tx.session == nil {
		return nil, fmt.Errorf("executeEntityIds: not in transaction")
	}
	session, res, err := tx.conn.impl.ExecuteEntityIds(ctx, query, keyspace, entityColumnName, entityKeyspaceIDs, bindVars, tabletType, tx.session, options)
	tx.session = session
	return res, err
}
39314
func (s *PutTemplateService) Id(id string) *PutTemplateService {
	s.id = id
	return s
}
461357
func (i *environInstance) Id() instance.Id {
	return instance.Id(i.container.Name)
}