// PutGitMetadata implements the KeybaseService interface for
// KeybaseServiceBase.
1594
func (k *KeybaseServiceBase) PutGitMetadata(
	ctx context.Context, folder keybase1.Folder, repoID keybase1.RepoID,
	metadata keybase1.GitLocalMetadata) error {
	return k.gitClient.PutGitMetadata(ctx, keybase1.PutGitMetadataArg{
		Folder:   folder,
		RepoID:   repoID,
		Metadata: metadata,
	})
}
1214762
func (s *StackResourceDetail) SetMetadata(v string) *StackResourceDetail {
	s.Metadata = &v
	return s
}
1123243
func (h HashedUpdateBatch) Put(ns, coll string, key []byte, value []byte, version *version.Height) {
	h.PutValHashAndMetadata(ns, coll, key, value, nil, version)
}
176916
func (s *VirtualServiceData) SetMetadata(v *ResourceMetadata) *VirtualServiceData {
	s.Metadata = v
	return s
}
65308
func (o *LaunchSpecification) SetMetadata(v []*Metadata) *LaunchSpecification {
	if o.Metadata = v; o.Metadata == nil {
		o.nullFields = append(o.nullFields, "Metadata")
	}
	return o
}
1355756
func (i *ImageService) AddMetadata(imageID string, metadata *ImageMetadata, auth Authenticator) error {
	path := fmt.Sprintf("images/%s/json", imageID)
	req, err := i.client.newRequest("PUT", path, auth, metadata)
	if err != nil {
		return err
	}

	req.Header.Add("Content-Type", "application/json")

	_, err = i.client.do(req, nil)
	return err
}
861108
func (s *RedisAnnouncementStore) AddMetadata(serviceName, serviceID string, metadata ...Metadata) error {
	key := fmt.Sprintf("%s:%s", serviceName, serviceID)

	metadataStrings := make([]string, 0, len(metadata))
	for _, meta := range metadata {
		txt, err := meta.MarshalText()
		if err != nil {
			return err
		}
		metadataStrings = append(metadataStrings, string(txt))

		switch meta := meta.(type) {
		case AppIDMetadata:
			existing, err := s.byAppID.Get(meta.AppID)
			switch {
			case errors.GetErrType(err) == errors.NotFound:
				if err := s.byAppID.Create(meta.AppID, key); err != nil {
					return err
				}
			case err != nil:
				return err
			case existing == key:
				continue
			default:
				go s.metadata.Remove(existing, string(txt))
				if err := s.byAppID.Update(meta.AppID, key); err != nil {
					return err
				}
			}
		case GatewayIDMetadata:
			existing, err := s.byGatewayID.Get(meta.GatewayID)
			switch {
			case errors.GetErrType(err) == errors.NotFound:
				if err := s.byGatewayID.Create(meta.GatewayID, key); err != nil {
					return err
				}
			case err != nil:
				return err
			case existing == key:
				continue
			default:
				go s.metadata.Remove(existing, string(txt))
				if err := s.byGatewayID.Update(meta.GatewayID, key); err != nil {
					return err
				}
			}
		case AppEUIMetadata:
			existing, err := s.byAppEUI.Get(meta.AppEUI.String())
			switch {
			case errors.GetErrType(err) == errors.NotFound:
				if err := s.byAppEUI.Create(meta.AppEUI.String(), key); err != nil {
					return err
				}
			case err != nil:
				return err
			case existing == key:
				continue
			default:
				go s.metadata.Remove(existing, string(txt))
				if err := s.byAppEUI.Update(meta.AppEUI.String(), key); err != nil {
					return err
				}
			}
		}
	}
	err := s.metadata.Add(key, metadataStrings...)
	if err != nil {
		return err
	}
	return nil
}
614562
func (s *PutObjectInput) SetMetadata(v map[string]*string) *PutObjectInput {
	s.Metadata = v
	return s
}
25716
func (r *repository) saveMetadata(ignoreSnapshot bool) error {
	logrus.Debugf("Saving changes to Trusted Collection.")

	rootJSON, err := serializeCanonicalRole(r.tufRepo, data.CanonicalRootRole, nil)
	if err != nil {
		return err
	}
	err = r.cache.Set(data.CanonicalRootRole.String(), rootJSON)
	if err != nil {
		return err
	}

	targetsToSave := make(map[data.RoleName][]byte)
	for t := range r.tufRepo.Targets {
		signedTargets, err := r.tufRepo.SignTargets(t, data.DefaultExpires(data.CanonicalTargetsRole))
		if err != nil {
			return err
		}
		targetsJSON, err := json.Marshal(signedTargets)
		if err != nil {
			return err
		}
		targetsToSave[t] = targetsJSON
	}

	for role, blob := range targetsToSave {
		// If the parent directory does not exist, the cache.Set will create it
		r.cache.Set(role.String(), blob)
	}

	if ignoreSnapshot {
		return nil
	}

	snapshotJSON, err := serializeCanonicalRole(r.tufRepo, data.CanonicalSnapshotRole, nil)
	if err != nil {
		return err
	}

	return r.cache.Set(data.CanonicalSnapshotRole.String(), snapshotJSON)
}
342100
func (s *DescribeThingTypeOutput) SetThingTypeMetadata(v *ThingTypeMetadata) *DescribeThingTypeOutput {
	s.ThingTypeMetadata = v
	return s
}
850669
func (s *Service) PutBucket(ctx context.Context, b *platform.Bucket) error {
	s.bucketKV.Store(b.ID.String(), *b)
	return nil
}
998135
func putData(c *cloudwatch.CloudWatch, metrics []cloudwatch.MetricDatum) (result *aws.BaseResponse, err error) {
	// Serialize the params
	params := aws.MakeParams("PutMetricData")
	for i, metric := range metrics {
		prefix := "MetricData.member." + strconv.Itoa(i+1)
		if metric.MetricName == "" {
			err = fmt.Errorf("no metric name supplied for metric: %d", i)
			return
		}
		params[prefix+".MetricName"] = metric.MetricName
		if metric.Unit != "" {
			params[prefix+".Unit"] = metric.Unit
		}
		if metric.Value != 0 {
			params[prefix+".Value"] = strconv.FormatFloat(metric.Value, 'f', -1, 64)
		}
		if !metric.Timestamp.IsZero() {
			params[prefix+".Timestamp"] = metric.Timestamp.UTC().Format(time.RFC3339)
		}
		for j, dim := range metric.Dimensions {
			dimprefix := prefix + ".Dimensions.member." + strconv.Itoa(j+1)
			params[dimprefix+".Name"] = dim.Name
			params[dimprefix+".Value"] = dim.Value
		}
		if len(metric.StatisticValues) == 1 {
			stat := metric.StatisticValues[0]
			statprefix := prefix + ".StatisticValues"
			params[statprefix+".Maximum"] = strconv.FormatFloat(stat.Maximum, 'f', -1, 64)
			params[statprefix+".Minimum"] = strconv.FormatFloat(stat.Minimum, 'f', -1, 64)
			params[statprefix+".SampleCount"] = strconv.FormatFloat(stat.SampleCount, 'f', -1, 64)
			params[statprefix+".Sum"] = strconv.FormatFloat(stat.Sum, 'f', -1, 64)
		}
	}
	result = new(aws.BaseResponse)
	err = query(c, "POST", "/", params, result)
	return
}
174351
func (kv *KV) Put(key, value []byte) error {
	return kv.db.Update(func(tx *buntdb.Tx) error {
		_, _, err := tx.Set(gkv.Btos(key), gkv.Btos(value), nil)
		return err
	})
}
591988
func (s *Segment) AddInt64Metadata(key string, value int64) {
	s.addMetadata(key, value)
}
1208523
func (s *UploadServerCertificateOutput) SetServerCertificateMetadata(v *ServerCertificateMetadata) *UploadServerCertificateOutput {
	s.ServerCertificateMetadata = v
	return s
}
228030
func (b UpdateMap) PutValAndMetadata(ns, coll, key string, value []byte, metadata []byte, version *version.Height) {
	b.getOrCreateNsBatch(ns).PutValAndMetadata(coll, key, value, metadata, version)
}
311073
func SetMetadata(data, metadata []byte, format string) (newData []byte, err error) {
	return webpSetMetadata(data, metadata, format)
}