// SetPartitionsToGet sets the PartitionsToGet field's value.
425350
func (s *BatchGetPartitionInput) SetPartitionsToGet(v []*PartitionValueList) *BatchGetPartitionInput {
	s.PartitionsToGet = v
	return s
}
619036
func (s *TraceSummary) SetIsPartial(v bool) *TraceSummary {
	s.IsPartial = &v
	return s
}
466765
func (s *CancelResizeOutput) SetTotalResizeDataInMegaBytes(v int64) *CancelResizeOutput {
	s.TotalResizeDataInMegaBytes = &v
	return s
}
63595
func (s *HeadObjectOutput) SetPartsCount(v int64) *HeadObjectOutput {
	s.PartsCount = &v
	return s
}
139223
func (s *ReservationAggregates) SetTotalPotentialRISavings(v string) *ReservationAggregates {
	s.TotalPotentialRISavings = &v
	return s
}
840704
func (b *Builder) SetMaxPartitionCount(v int) {
	if v < 1 {
		v = 1
	}
	b.ring.MaxPartitionCount = v
}
896437
func (s *ScanInput) SetTotalSegments(v int64) *ScanInput {
	s.TotalSegments = &v
	return s
}
146329
func (s *ListPartsOutput) SetParts(v []*Part) *ListPartsOutput {
	s.Parts = v
	return s
}
506306
func (s *KinesisParameters) SetPartitionKeyPath(v string) *KinesisParameters {
	s.PartitionKeyPath = &v
	return s
}
4663
func (s *BatchCreatePartitionInput) SetPartitionInputList(v []*PartitionInput) *BatchCreatePartitionInput {
	s.PartitionInputList = v
	return s
}
192225
func (c Client) GetPartitions(appName, serviceName string) (*PartitionItemsPage, error) {
	var aggregatePartitionItemsPages PartitionItemsPage
	var continueToken string
	for {
		basePath := "Applications/" + appName + "/$/GetServices/" + serviceName + "/$/GetPartitions/"
		res, err := c.getHTTP(basePath, withContinue(continueToken))
		if err != nil {
			return nil, err
		}

		var partitionsItemsPage PartitionItemsPage
		err = json.Unmarshal(res, &partitionsItemsPage)
		if err != nil {
			return nil, fmt.Errorf("could not deserialise JSON response: %+v", err)
		}

		aggregatePartitionItemsPages.Items = append(aggregatePartitionItemsPages.Items, partitionsItemsPage.Items...)

		continueToken = getString(partitionsItemsPage.ContinuationToken)
		if continueToken == "" {
			break
		}
	}
	return &aggregatePartitionItemsPages, nil
}
326703
func (ref *Config) SetPartitioner(val string) {
	switch val {
	default:
		ref.Errorf("Invalid partitioner %s - defaulting to ''", val)
		fallthrough
	case "":
		if ref.Partition >= 0 {
			ref.Partitioner = sarama.NewManualPartitioner
		} else {
			ref.Partitioner = sarama.NewHashPartitioner
		}
	case Hash:
		ref.Partitioner = sarama.NewHashPartitioner
		ref.Partition = -1
	case Random:
		ref.Partitioner = sarama.NewRandomPartitioner
		ref.Partition = -1
	case Manual:
		ref.Partitioner = sarama.NewManualPartitioner
		if ref.Partition < 0 {
			ref.Infof("Invalid partition %d - defaulting to 0", ref.Partition)
			ref.Partition = 0
		}
	}
}
125744
func (t *Topic) parsePartitions(value []byte) (PartitionList, error) {
	var tm topicMetadata
	if err := json.Unmarshal(value, &tm); err != nil {
		return nil, err
	}

	result := make(PartitionList, len(tm.Partitions))
	for partitionNumber, replicas := range tm.Partitions {
		partitionID, err := strconv.ParseInt(partitionNumber, 10, 32)
		if err != nil {
			return nil, err
		}

		replicaIDs := make([]int32, 0, len(replicas))
		for _, r := range replicas {
			replicaIDs = append(replicaIDs, int32(r))
		}
		result[partitionID] = t.Partition(int32(partitionID), replicaIDs)
	}

	return result, nil
}
318564
func (s *Cluster) SetTotalNodes(v int64) *Cluster {
	s.TotalNodes = &v
	return s
}
32997
func (s *ExportJobResponse) SetTotalPieces(v int64) *ExportJobResponse {
	s.TotalPieces = &v
	return s
}
753960
func (s *Limits) SetMaximumPartitionCount(v int64) *Limits {
	s.MaximumPartitionCount = &v
	return s
}
1324009
func (s *PutRecordInput) SetPartitionKey(v string) *PutRecordInput {
	s.PartitionKey = &v
	return s
}