// SetItem sets the Item field's value.
512348
func (s *ImportJobsResponse) SetItem(v []*ImportJobResponse) *ImportJobsResponse {
	s.Item = v
	return s
}
834204
func (s *StoragePacker) PutItem(_ context.Context, item *Item) error {
	if item == nil {
		return fmt.Errorf("nil item")
	}

	if item.ID == "" {
		return fmt.Errorf("missing ID in item")
	}

	var err error
	bucketKey := s.BucketKey(item.ID)
	bucketPath := s.BucketPath(bucketKey)

	bucket := &Bucket{
		Key: bucketPath,
	}

	// In this case, we persist the storage entry regardless of the read
	// storageEntry below is nil or not. Hence, directly acquire write lock
	// even to read the entry.
	lock := locksutil.LockForKey(s.storageLocks, bucketPath)
	lock.Lock()
	defer lock.Unlock()

	// Check if there is an existing bucket for a given key
	storageEntry, err := s.view.Get(context.Background(), bucketPath)
	if err != nil {
		return errwrap.Wrapf("failed to read packed storage bucket entry: {{err}}", err)
	}

	if storageEntry == nil {
		// If the bucket entry does not exist, this will be the only item the
		// bucket that is going to be persisted.
		bucket.Items = []*Item{
			item,
		}
	} else {
		uncompressedData, notCompressed, err := compressutil.Decompress(storageEntry.Value)
		if err != nil {
			return errwrap.Wrapf("failed to decompress packed storage entry: {{err}}", err)
		}
		if notCompressed {
			uncompressedData = storageEntry.Value
		}

		err = proto.Unmarshal(uncompressedData, bucket)
		if err != nil {
			return errwrap.Wrapf("failed to decode packed storage entry: {{err}}", err)
		}

		err = bucket.upsert(item)
		if err != nil {
			return errwrap.Wrapf("failed to update entry in packed storage entry: {{err}}", err)
		}
	}

	// Persist the result
	return s.PutBucket(bucket)
}
1178862
func (s *PutAttributesInput) SetItemName(v string) *PutAttributesInput {
	s.ItemName = &v
	return s
}
1031702
func (s *TrustedSigners) SetItems(v []*string) *TrustedSigners {
	s.Items = v
	return s
}
106670
func (s *Put) SetItem(v map[string]*AttributeValue) *Put {
	s.Item = v
	return s
}
839277
func (s *FieldLevelEncryptionList) SetItems(v []*FieldLevelEncryptionSummary) *FieldLevelEncryptionList {
	s.Items = v
	return s
}
750405
func (s *SegmentsResponse) SetItem(v []*SegmentResponse) *SegmentsResponse {
	s.Item = v
	return s
}
484849
func (s *TableDescription) SetItemCount(v int64) *TableDescription {
	s.ItemCount = &v
	return s
}
839971
func (s *Tags) SetItems(v []*Tag) *Tags {
	s.Items = v
	return s
}
894986
func SetItem(key, item string) (err error) {
	if localStorage == nil || localStorage == js.Undefined {
		return ErrLocalStorageNotSupported
	}
	defer func() {
		if r := recover(); r != nil {
			var ok bool
			err, ok = r.(error)
			if !ok {
				err = fmt.Errorf("could not use local storage: %v", r)
			}
		}
	}()

	localStorage.Call("setItem", key, item)
	return nil
}
227341
func (c *DOMStorage) SetDOMStorageItem(storageId *DOMStorageStorageId, key string, value string) (*gcdmessage.ChromeResponse, error) {
	var v DOMStorageSetDOMStorageItemParams
	v.StorageId = storageId
	v.Key = key
	v.Value = value
	return c.SetDOMStorageItemWithParams(&v)
}
1008148
func (s *GetUsagePlansOutput) SetItems(v []*UsagePlan) *GetUsagePlansOutput {
	s.Items = v
	return s
}
950923
func (s *Headers) SetItems(v []*string) *Headers {
	s.Items = v
	return s
}
971193
func (s *OriginGroups) SetItems(v []*OriginGroup) *OriginGroups {
	s.Items = v
	return s
}
758805
func (s *CachedMethods) SetItems(v []*string) *CachedMethods {
	s.Items = v
	return s
}
885463
func (s *GetDomainNamesOutput) SetItems(v []*DomainName) *GetDomainNamesOutput {
	s.Items = v
	return s
}
1087024
func (s *QueryArgProfiles) SetItems(v []*QueryArgProfile) *QueryArgProfiles {
	s.Items = v
	return s
}