// NewMetadata creates a new Metadata for a given Client and Brokers with metadata cache TTL set to metadataTTL.
775405
func NewMetadata(kafkaClient Client, brokers *Brokers, metadataTTL time.Duration) *Metadata {
	return &Metadata{
		Brokers:            brokers,
		kafka:              kafkaClient,
		metadataTTL:        metadataTTL,
		metadata:           make(map[string]map[int32]int32),
		metadataExpires:    make(map[string]time.Time),
		offsetCoordinators: make(map[string]int32),
	}
}
717005
func (a *Driver) Metadata(id string) (map[string]string, error) {
	return nil, nil
}
870555
func (i *InstanceID) MarshalMetadata(data interface{}) error {

	if fmt.Sprintf("%v", data) == "<nil>" {
		return ErrIIDMetadataNilData
	}

	var err error
	if i.metadata, err = json.Marshal(data); err != nil {
		return err
	}
	return nil
}
1001961
func NewMetadataCmd() *cobra.Command {
	cmd := &cobra.Command{
		Use:   "metadata",
		Short: "Extract RETS metadata",
		Run:   metadata,
	}
	cmd.Flags().String(mTypeFlag, "METADATA-SYSTEM", "The type of metadata requested")
	cmd.Flags().String(mFormatFlag, "COMPACT", "Metadata format")
	cmd.Flags().String(mIDFlag, "*", "Metadata identifier")
	return cmd
}
733872
func NewMetadata(parsedMap map[string]interface{}) Metadata {
	md := Metadata{
		Variables: make(map[string]interface{}),
	}
	md.load(parsedMap)

	return md
}
1020217
func (s *GetObjectOutput) SetMetadata(v map[string]*string) *GetObjectOutput {
	s.Metadata = v
	return s
}
1206665
func (cons *SimpleConsumer) EnqueueWithMetadata(data []byte, metaData Metadata) {
	msg := NewMessage(cons, data, metaData, InvalidStreamID)
	cons.enqueueMessage(msg)
}
827378
func NewPoolMetadata(dbfile string) (*PoolMetadata, error) {
	db, err := bolt.Open(dbfile, 0600, nil)
	if err != nil {
		return nil, err
	}

	metadata := &PoolMetadata{db: db}
	if err := metadata.ensureDatabaseInitialized(); err != nil {
		return nil, errors.Wrap(err, "failed to initialize database")
	}

	return metadata, nil
}
506540
func NewDeleteBatchResultData(Metadata IsMetadata) *DeleteBatchResultData {
	s := new(DeleteBatchResultData)
	s.Metadata = Metadata
	return s
}
165904
func New(m Metadata) *Table {
	t := &Table{
		metadata: m,
	}

	// prepare primary and partition key comparators
	t.primaryKeyCmp = make([]qb.Cmp, 0, len(m.PartKey)+len(m.SortKey))
	for _, k := range m.PartKey {
		t.primaryKeyCmp = append(t.primaryKeyCmp, qb.Eq(k))
	}
	for _, k := range m.SortKey {
		t.primaryKeyCmp = append(t.primaryKeyCmp, qb.Eq(k))
	}
	t.partKeyCmp = t.primaryKeyCmp[:len(t.metadata.PartKey)]

	// prepare get stmt
	t.get.stmt, t.get.names = qb.Select(m.Name).Where(t.primaryKeyCmp...).ToCql()
	// prepare select stmt
	t.sel.stmt, t.sel.names = qb.Select(m.Name).Where(t.partKeyCmp...).ToCql()
	// prepare insert stmt
	t.insert.stmt, t.insert.names = qb.Insert(m.Name).Columns(m.Columns...).ToCql()

	return t
}
233188
func (s *CreateFolderOutput) SetMetadata(v *FolderMetadata) *CreateFolderOutput {
	s.Metadata = v
	return s
}
932364
func (s *GetReservationPurchaseRecommendationOutput) SetMetadata(v *ReservationPurchaseRecommendationMetadata) *GetReservationPurchaseRecommendationOutput {
	s.Metadata = v
	return s
}
62170
func NewGetMetadataArg(Path string) *GetMetadataArg {
	s := new(GetMetadataArg)
	s.Path = Path
	s.IncludeMediaInfo = false
	s.IncludeDeleted = false
	s.IncludeHasExplicitSharedMembers = false
	return s
}
1046646
func (s *storage) SaveMetadata(metadata []Metadata) error {
	return s.saveMetadata(metadata, true)
}
922913
func NewMetadata(path string, create bool) (*SnapshotMetadata, error) {
	// check if the metadata dir exists.  If not, return an error if create is false
	dir := filepath.Dir(path)
	_, err := os.Stat(dir)
	if os.IsNotExist(err) {
		if !create {
			return nil, ErrNoMetadata
		}
	} else if err != nil {
		glog.Errorf("Could not stat dir %s: %s", dir, err)
		return nil, err
	}

	if err := os.MkdirAll(dir, 0755); err != nil && !os.IsExist(err) {
		return nil, err
	}
	metadata := &SnapshotMetadata{
		path: path,
		snapshotMetadata: snapshotMetadata{
			Snapshots: make(map[string]string),
		},
	}
	metadata.Lock()
	defer metadata.Unlock()
	if _, err := os.Stat(path); os.IsNotExist(err) {
		if create {
			metadata.save()
		} else {
			return nil, ErrNoMetadata
		}
	} else {
		if err := metadata.load(); err != nil {
			return nil, err
		}
	}
	return metadata, nil
}
1231394
func (s *TrustedAdvisorCheckDescription) SetMetadata(v []*string) *TrustedAdvisorCheckDescription {
	s.Metadata = v
	return s
}
681833
func (s *DescribeActiveReceiptRuleSetOutput) SetMetadata(v *ReceiptRuleSetMetadata) *DescribeActiveReceiptRuleSetOutput {
	s.Metadata = v
	return s
}