// AddAttachedPicture adds the picture frame to tag.
347387
func (tag *Tag) AddAttachedPicture(pf PictureFrame) {
	tag.AddFrame(tag.CommonID("Attached picture"), pf)
}
409152
func (m *Message) NewAttachment() *Attachment {
	a := &Attachment{}
	m.AddAttachment(a)

	return a
}
863954
func (r Ticket) AddAttachedDedicatedHost(dedicatedHostId *int) (resp datatypes.Ticket_Attachment_Dedicated_Host, err error) {
	params := []interface{}{
		dedicatedHostId,
	}
	err = r.Session.DoRequest("SoftLayer_Ticket", "addAttachedDedicatedHost", params, &r.Options, &resp)
	return
}
176488
func (tag *Tag) AddUserDefinedTextFrame(udtf UserDefinedTextFrame) {
	tag.AddFrame(tag.CommonID("User defined text information frame"), udtf)
}
740406
func (s *Service) AddOnAttachmentResolution(ctx context.Context, o AddOnAttachmentResolutionOpts) (AddOnAttachmentResolutionResult, error) {
	var addOnAttachment AddOnAttachmentResolutionResult
	return addOnAttachment, s.Post(ctx, &addOnAttachment, fmt.Sprintf("/actions/addon-attachments/resolve"), o)
}
49138
func HotAttachEndpoint(containerID string, endpointID string) error {
	endpoint, err := GetHNSEndpointByID(endpointID)
	isAttached, err := endpoint.IsAttached(containerID)
	if isAttached {
		return err
	}
	return modifyNetworkEndpoint(containerID, endpointID, Add)
}
480394
func (s Session) AddRepeatTimesCompact(interval, duration time.Duration,
	offsets ...time.Duration) Session {
	return s.addRepeatTimes(true, interval, duration, offsets...)
}
726443
func (s *ListAttachedUserPoliciesOutput) SetAttachedPolicies(v []*AttachedPolicy) *ListAttachedUserPoliciesOutput {
	s.AttachedPolicies = v
	return s
}
1048230
func (ds *DiskSpec) newAttached() *compute.AttachedDisk {
	// TODO(ericsnow) Fail if SizeHintGB is 0?
	diskType := diskPersistenceTypePersistent
	if ds.Scratch {
		diskType = diskPersistenceTypeScratch
	}
	mode := ModeRW
	if ds.Readonly {
		mode = ModeRO
	}

	disk := compute.AttachedDisk{
		Type:       diskType,
		Boot:       ds.Boot,
		Mode:       string(mode),
		AutoDelete: ds.AutoDelete,
		InitializeParams: &compute.AttachedDiskInitializeParams{
			// DiskName (defaults to instance name)
			DiskSizeGb: int64(ds.SizeGB()),
			// DiskType (defaults to pd-standard, pd-ssd, local-ssd)
			SourceImage: ds.ImageURL,
		},
		// Interface (defaults to SCSI)
		// DeviceName (GCE sets this, persistent disk only)
	}
	return &disk
}
1374491
func (s *GatewayAttachment) SetAttachmentType(v string) *GatewayAttachment {
	s.AttachmentType = &v
	return s
}
1311110
func (c *Client) AddStickerToSet(userID int, name, fileID, emojis string, opts ...sendOption) error {
	req := url.Values{}
	req.Set("user_id", fmt.Sprint(userID))
	req.Set("name", name)
	req.Set("png_sticker", fileID)
	req.Set("emojis", emojis)
	for _, opt := range opts {
		opt(req)
	}
	var added bool
	return c.doRequestWithFiles("addStickerToSet", req, &added)
}
63067
func (m *Message) AddAttachment(attachment io.Reader) error {
	m.attachment = attachment
	return nil
}
672099
func (s *CreateInstancesFromSnapshotInput) SetAttachedDiskMapping(v map[string][]*DiskMap) *CreateInstancesFromSnapshotInput {
	s.AttachedDiskMapping = v
	return s
}
641903
func (c *Card) AddAttribute(mainLabel, subLabel, url, iconURL string) {
	attr := Attribute{Label: mainLabel}
	attr.Value = AttributeValue{Label: subLabel, URL: url, Icon: &Icon{URL: iconURL}}

	c.Attributes = append(c.Attributes, attr)
}
1149724
func (cache *schedulerCache) addNodeImageStates(node *v1.Node, nodeInfo *schedulernodeinfo.NodeInfo) {
	newSum := make(map[string]*schedulernodeinfo.ImageStateSummary)

	for _, image := range node.Status.Images {
		for _, name := range image.Names {
			// update the entry in imageStates
			state, ok := cache.imageStates[name]
			if !ok {
				state = &imageState{
					size:  image.SizeBytes,
					nodes: sets.NewString(node.Name),
				}
				cache.imageStates[name] = state
			} else {
				state.nodes.Insert(node.Name)
			}
			// create the imageStateSummary for this image
			if _, ok := newSum[name]; !ok {
				newSum[name] = cache.createImageStateSummary(state)
			}
		}
	}
	nodeInfo.SetImageStates(newSum)
}
389775
func (s *AddAttachmentsToSetInput) SetAttachmentSetId(v string) *AddAttachmentsToSetInput {
	s.AttachmentSetId = &v
	return s
}
898698
func (c *CCache) AddIfHot(metric schema.AMKey, prev uint32, itergen chunk.IterGen) {
	if c == nil {
		return
	}
	c.RLock()

	var met *CCacheMetric
	var ok bool

	// if this metric is not cached at all it is not hot
	if met, ok = c.metricCache[metric]; !ok {
		c.RUnlock()
		return
	}

	// if the previous chunk is not cached we consider the metric not hot enough to cache this chunk
	// only works reliably if the last chunk of that metric is span aware, otherwise lastTs() will be guessed
	// conservatively which means that the returned value will probably be lower than the real last ts
	if met.lastTs() < itergen.T0 {
		c.RUnlock()
		return
	}

	accnt.CacheChunkPushHot.Inc()

	c.RUnlock()
	met.Add(prev, itergen)
}