// GetTargetID returns the TargetID field if it's non-nil, zero value otherwise.
321435
func (i *Installation) GetTargetID() int64 {
	if i == nil || i.TargetID == nil {
		return 0
	}
	return *i.TargetID
}
1080315
func (s *ReviewActionDetail) SetTargetId(v string) *ReviewActionDetail {
	s.TargetId = &v
	return s
}
731717
func (s *MaintenanceWindowTarget) SetWindowTargetId(v string) *MaintenanceWindowTarget {
	s.WindowTargetId = &v
	return s
}
330218
func (l *LabelResult) GetID() int64 {
	if l == nil || l.ID == nil {
		return 0
	}
	return *l.ID
}
80634
func (s *ScraperService) AddTarget(ctx context.Context, target *influxdb.ScraperTarget, userID influxdb.ID) error {
	url, err := newURL(s.Addr, targetsPath)
	if err != nil {
		return err
	}

	if !target.OrgID.Valid() {
		return &influxdb.Error{
			Code: influxdb.EInvalid,
			Msg:  "provided organization ID has invalid format",
			Op:   s.OpPrefix + influxdb.OpAddTarget,
		}
	}
	if !target.BucketID.Valid() {
		return &influxdb.Error{
			Code: influxdb.EInvalid,
			Msg:  "provided bucket ID has invalid format",
			Op:   s.OpPrefix + influxdb.OpAddTarget,
		}
	}

	octets, err := json.Marshal(target)
	if err != nil {
		return err
	}

	req, err := http.NewRequest("POST", url.String(), bytes.NewReader(octets))
	if err != nil {
		return err
	}

	req.Header.Set("Content-Type", "application/json")
	SetToken(s.Token, req)

	hc := newClient(url.Scheme, s.InsecureSkipVerify)

	resp, err := hc.Do(req)
	if err != nil {
		return err
	}
	defer resp.Body.Close()

	// TODO(jsternberg): Should this check for a 201 explicitly?
	if err := CheckError(resp); err != nil {
		return err
	}

	targetResp := new(targetResponse)
	if err := json.NewDecoder(resp.Body).Decode(targetResp); err != nil {
		return err
	}

	return nil
}
184734
func (s *StatusEvent) GetTargetURL() string {
	if s == nil || s.TargetURL == nil {
		return ""
	}
	return *s.TargetURL
}
554946
func (d *domainClient) GetTargetInfo(ctx context.Context, args *GetTargetInfoArgs) (reply *GetTargetInfoReply, err error) {
	reply = new(GetTargetInfoReply)
	if args != nil {
		err = rpcc.Invoke(ctx, "Target.getTargetInfo", args, reply, d.conn)
	} else {
		err = rpcc.Invoke(ctx, "Target.getTargetInfo", nil, reply, d.conn)
	}
	if err != nil {
		err = &internal.OpError{Domain: "Target", Op: "GetTargetInfo", Err: err}
	}
	return
}
104874
func (i *Installation) GetTargetType() string {
	if i == nil || i.TargetType == nil {
		return ""
	}
	return *i.TargetType
}
607651
func (s *ModifyMountTargetSecurityGroupsInput) SetMountTargetId(v string) *ModifyMountTargetSecurityGroupsInput {
	s.MountTargetId = &v
	return s
}
699946
func (s *AliasListEntry) SetTargetKeyId(v string) *AliasListEntry {
	s.TargetKeyId = &v
	return s
}
1163635
func (s *ScraperTargetStoreService) GetTargetByID(ctx context.Context, id platform.ID) (*platform.ScraperTarget, error) {
	return s.GetTargetByIDF(ctx, id)
}
631126
func (s *DescribeCopyProductStatusOutput) SetTargetProductId(v string) *DescribeCopyProductStatusOutput {
	s.TargetProductId = &v
	return s
}
502017
func (s *GetMaintenanceWindowExecutionTaskInvocationOutput) SetWindowTargetId(v string) *GetMaintenanceWindowExecutionTaskInvocationOutput {
	s.WindowTargetId = &v
	return s
}
889975
func (t *TeamLDAPMapping) GetID() int64 {
	if t == nil || t.ID == nil {
		return 0
	}
	return *t.ID
}
579097
func (launcher *Launcher) GetTarget() string {
	launcher.Mutex.RLock()
	arg := launcher.target
	launcher.Mutex.RUnlock()
	return arg
}
1040347
func (c *Target) ActivateTarget(targetId string) (*gcdmessage.ChromeResponse, error) {
	var v TargetActivateTargetParams
	v.TargetId = targetId
	return c.ActivateTargetWithParams(&v)
}
984309
func (s *DescribeMountTargetSecurityGroupsInput) SetMountTargetId(v string) *DescribeMountTargetSecurityGroupsInput {
	s.MountTargetId = &v
	return s
}