// Read returns a Maintenance for a given ID.
170289
func (cs *MaintenanceService) Read(id int) (*MaintenanceResponse, error) {
	req, err := cs.client.NewRequest("GET", "/maintenance/"+strconv.Itoa(id), nil)
	if err != nil {
		return nil, err
	}

	m := &maintenanceDetailsJSONResponse{}
	_, err = cs.client.Do(req, m)
	if err != nil {
		return nil, err
	}

	return m.Maintenance, err
}
1078104
func (c *Connector) Read(ctx context.Context, ei *dosa.EntityInfo, values map[string]dosa.FieldValue, minimumFields []string) (map[string]dosa.FieldValue, error) {

	return Data(ei, minimumFields), nil
}
561388
func Read(c *messagebird.Client, id string) (*Verify, error) {
	verify := &Verify{}

	if err := c.Request(verify, http.MethodGet, path+"/"+id, nil); err != nil {
		return nil, err
	}

	return verify, nil
}
1069810
func (s *DnetOperState) Read(id string) error {
	key := fmt.Sprintf(docknetOperPath, id)
	return s.StateDriver.ReadState(key, s, json.Unmarshal)
}
1369902
func (c *NoteCollection) Read(ref string, id *Oid) (*Note, error) {
	var cref *C.char
	if ref == "" {
		cref = nil
	} else {
		cref = C.CString(ref)
		defer C.free(unsafe.Pointer(cref))
	}

	runtime.LockOSThread()
	defer runtime.UnlockOSThread()

	var ptr *C.git_note
	ret := C.git_note_read(&ptr, c.repo.ptr, cref, id.toC())
	runtime.KeepAlive(c)
	runtime.KeepAlive(id)
	if ret < 0 {
		return nil, MakeGitError(ret)
	}

	return newNoteFromC(ptr, c.repo), nil
}
1369814
func (m *Manager) Read(sid string) (RawStore, error) {
	// Ensure we're trying to read a valid session ID
	if _, err := m.validSessionID(sid); err != nil {
		return nil, err
	}

	return m.provider.Read(sid)
}
345301
func (s *sysSocket) read(f func(fd int) bool) error {
	s.mu.RLock()
	defer s.mu.RUnlock()

	if s.closed {
		return syscall.EBADF
	}

	var err error
	s.g.run(func() {
		err = fdread(s.fd, f)
	})
	return err
}
1348675
func (r *AutoVXLANOperResource) Read(id string) error {
	key := fmt.Sprintf(vXLANResourceOperPath, id)
	return r.StateDriver.ReadState(key, r, json.Unmarshal)
}
154269
func (col *Collection) Read(id int) []byte {
	if id < 0 || id > col.Used-DocHeader || col.Buf[id] != 1 {
		return nil
	} else if room, _ := binary.Varint(col.Buf[id+1 : id+11]); room > int64(col.DocMaxRoom) {
		return nil
	} else if docEnd := id + DocHeader + int(room); docEnd >= col.Size {
		return nil
	} else {
		docCopy := make([]byte, room)
		copy(docCopy, col.Buf[id+DocHeader:docEnd])
		return docCopy
	}
}
1220827
func (s *CfgPolicyRule) Read(id string) error {
	key := fmt.Sprintf(policyRuleConfigPath, id)
	return s.StateDriver.ReadState(key, s, json.Unmarshal)
}
872743
func (s *GlobConfig) Read(id string) error {
	key := globalConfigPath
	return s.StateDriver.ReadState(key, s, json.Unmarshal)
}
187903
func Read(c *messagebird.Client, id string) (*Conversation, error) {
	conv := &Conversation{}
	if err := request(c, conv, http.MethodGet, path+"/"+id, nil); err != nil {
		return nil, err
	}

	return conv, nil
}
342301
func (c *client) Read(ctx context.Context, fieldsToRead []string, entity DomainObject) error {
	if !c.initialized {
		return &ErrNotInitialized{}
	}

	// lookup registered entity, the registrar will return error if it is not found
	re, err := c.registrar.Find(entity)
	if err != nil {
		return err
	}

	// translate entity field values to a map of primary key name/values pairs
	// required to perform a read
	fieldValues := re.KeyFieldValues(entity)

	// build a list of column names from a list of entities field names
	columnsToRead, err := re.ColumnNames(fieldsToRead)
	if err != nil {
		return err
	}

	results, err := c.connector.Read(ctx, re.EntityInfo(), fieldValues, columnsToRead)
	if err != nil {
		return err
	}

	// map results to entity fields
	re.SetFieldValues(entity, results, columnsToRead)

	return nil
}
672855
func (c *digisparkI2cConnection) Read(b []byte) (read int, err error) {
	if !c.adaptor.i2c {
		err = errors.New("Digispark i2c not initialized")
		return
	}
	if err = c.adaptor.littleWire.i2cStart(c.address, 1); err != nil {
		return
	}
	l := 8
	stop := uint8(0)

	for stop == 0 {
		if read+l >= len(b) {
			l = len(b) - read
			stop = 1
		}
		if err = c.adaptor.littleWire.i2cRead(b[read:read+l], l, stop); err != nil {
			return
		}
		read += l
	}
	return
}
1085400
func (cd service) Read(uuid string, transId string) (interface{}, bool, error) {

	results := []struct {
		UUID                   string                 `json:"uuid"`
		Type                   []string               `json:"type"`
		ProperName             string                 `json:"properName"`
		PrefLabel              string                 `json:"prefLabel"`
		LegalName              string                 `json:"legalName"`
		ShortName              string                 `json:"shortName"`
		HiddenLabel            string                 `json:"hiddenLabel"`
		AlternativeIdentifiers alternativeIdentifiers `json:"alternativeIdentifiers"`
		TradeNames             []string               `json:"tradeNames"`
		LocalNames             []string               `json:"localNames"`
		FormerNames            []string               `json:"formerNames"`
		Aliases                []string               `json:"aliases"`
		IndustryClassification string                 `json:"industryClassification"`
		ParentOrganisation     string                 `json:"parentOrganisation"`
	}{}

	readQuery := &neoism.CypherQuery{
		Statement: `MATCH (o:Organisation:Concept{uuid:{uuid}})
            			OPTIONAL MATCH (o)-[:SUB_ORGANISATION_OF]->(par:Thing)
            			OPTIONAL MATCH (o)-[:HAS_CLASSIFICATION]->(ind:Thing)
           			OPTIONAL MATCH (upp:UPPIdentifier)-[:IDENTIFIES]->(o)
	    			OPTIONAL MATCH (factset:FactsetIdentifier)-[:IDENTIFIES]->(o)
	   			OPTIONAL MATCH (tme:TMEIdentifier)-[:IDENTIFIES]->(o)
	    			OPTIONAL MATCH (lei:LegalEntityIdentifier)-[:IDENTIFIES]->(o)
            		 	RETURN o.uuid as uuid,
					o.properName as properName,
					labels(o) as Type,
					o.prefLabel as prefLabel,
					o.legalName as legalName,
					o.shortName as shortName,
					o.hiddenLabel as hiddenLabel,
					o.formerNames as formerNames,
					o.tradeNames as tradeNames,
					o.localNames as localNames,
					o.aliases as aliases,
					ind.uuid as industryClassification,
					par.uuid as parentOrganisation,
					{uuids:collect(distinct upp.value),
					 TME:collect(distinct tme.value),
					 factsetIdentifier:factset.value,
					 leiCode:lei.value} as alternativeIdentifiers`,
		Parameters: map[string]interface{}{
			"uuid": uuid,
		},
		Result: &results,
	}

	if err := cd.conn.CypherBatch([]*neoism.CypherQuery{readQuery}); err != nil || len(results) == 0 {
		return organisation{}, false, err
	}

	result := results[0]

	o := organisation{
		UUID:                   result.UUID,
		ProperName:             result.ProperName,
		PrefLabel:              result.PrefLabel,
		LegalName:              result.LegalName,
		ShortName:              result.ShortName,
		HiddenLabel:            result.HiddenLabel,
		TradeNames:             result.TradeNames,
		LocalNames:             result.LocalNames,
		FormerNames:            result.FormerNames,
		AlternativeIdentifiers: result.AlternativeIdentifiers,
		Aliases:                result.Aliases,
		ParentOrganisation:     result.ParentOrganisation,
		IndustryClassification: result.IndustryClassification,
	}

	addType(&o.Type, &result.Type)
	sort.Strings(o.AlternativeIdentifiers.TME)
	sort.Strings(o.AlternativeIdentifiers.UUIDS)

	return o, true, nil
}
641634
func (r *Reader) Read() (sql.Record, error) {
	v, ok := <-r.valueCh
	if !ok {
		if err := r.decoder.Err(); err != nil {
			return nil, errJSONParsingError(err)
		}
		return nil, io.EOF
	}

	var kvs jstream.KVS
	if v.ValueType == jstream.Object {
		// This is a JSON object type (that preserves key
		// order)
		kvs = v.Value.(jstream.KVS)
	} else {
		// To be AWS S3 compatible Select for JSON needs to
		// output non-object JSON as single column value
		// i.e. a map with `_1` as key and value as the
		// non-object.
		kvs = jstream.KVS{jstream.KV{Key: "_1", Value: v.Value}}
	}

	return &Record{
		KVS:          kvs,
		SelectFormat: sql.SelectFmtJSON,
	}, nil
}
314074
func (r *AutoVLANCfgResource) Read(id string) error {
	key := fmt.Sprintf(vLANResourceConfigPath, id)
	return r.StateDriver.ReadState(key, r, json.Unmarshal)
}