// StartViolationsReportWithParams - start violation reporting.
167572
func (c *Log) StartViolationsReportWithParams(v *LogStartViolationsReportParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Log.startViolationsReport", Params: v})
}
506484
func (c *Overlay) SetShowViewportSizeOnResizeWithParams(v *OverlaySetShowViewportSizeOnResizeParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "Overlay.setShowViewportSizeOnResize", Params: v})
}
595081
func StartReportingExtendedMetrics(
	scope tally.Scope,
	reportInterval time.Duration,
	metricsType ExtendedMetricsType,
) (Reporter, error) {
	reporter := NewExtendedMetricsReporter(scope, reportInterval, metricsType)
	if err := reporter.Start(); err != nil {
		return nil, err
	}
	return reporter, nil
}
1325304
func (e *Enforcer) InitWithAdapter(modelPath string, adapter persist.Adapter) {
	m := NewModel(modelPath, "")
	e.InitWithModelAndAdapter(m, adapter)

	e.modelPath = modelPath
}
129577
func (c *Client) PostWithParams(endpoint string, params url.Values) (tumblr.Response, error) {
	return getResponse(c.GetHttpClient().PostForm(appendPath(apiBase, endpoint), params))
}
1093988
func (r *Resource) WithParameter(name string, value string) *Resource {
	parameter := url.Values{}
	parameter.Set(name, value)
	r.u.RawQuery = parameter.Encode()
	return r
}
132658
func (s *VirtualMachineService) NewGetVMPasswordParams(id string) *GetVMPasswordParams {
	p := &GetVMPasswordParams{}
	p.p = make(map[string]interface{})
	p.p["id"] = id
	return p
}
1037999
func (vis *VarVisitor) WithParams(params VarVisitorParams) *VarVisitor {
	vis.params = params
	return vis
}
633816
func (c *ServiceWorker) StartWorkerWithParams(v *ServiceWorkerStartWorkerParams) (*gcdmessage.ChromeResponse, error) {
	return gcdmessage.SendDefaultRequest(c.target, c.target.GetSendCh(), &gcdmessage.ParamRequest{Id: c.target.GetId(), Method: "ServiceWorker.startWorker", Params: v})
}
711465
func withNamedPort(portName string, spec labels.Func, gen chain) chain {
	portName = spec(portName)
	if portName == "" {
		return gen
	}
	return func(records ...string) {
		// generate without port-name prefix
		gen(records...)

		// generate with port-name prefix
		for i := range records {
			records[i] = "_" + portName + "." + records[i]
		}
		gen(records...)
	}
}
460839
func VolumeActionParamSimpleValueOf(s string) (VolumeActionParam, error) {
	obj, err := simpleValueOf("volume_action_param", VolumeActionParam_value, s)
	return VolumeActionParam(obj), err
}
473353
func initParams(c context.Context, streams []*coordinator.LogStream, project types.ProjectName) ([]fetchParams, error) {
	states := make([]*coordinator.LogStreamState, len(streams))
	for i, stream := range streams {
		states[i] = stream.State(c)
	}
	// Get the log states, which we use to fetch the backend storage.
	switch err := datastore.Get(c, states); {
	case datastore.IsErrNoSuchEntity(err):
		return nil, coordinator.ErrPathNotFound
	case err != nil:
		return nil, err
	}

	// Get the backend storage instances.  These will be closed in fetch.
	params := make([]fetchParams, len(streams))
	for i, stream := range streams {
		st, err := flex.GetServices(c).StorageForStream(c, states[i], project)
		if err != nil {
			return nil, err
		}
		params[i] = fetchParams{
			storage: st,
			stream:  stream,
			state:   states[i],
		}
	}

	return params, nil
}
691420
func (c *Consumer) StartStaticPartitions(topicPartitionMap map[string][]int32) {
	topicsToNumStreamsMap := make(map[string]int)
	for topic := range topicPartitionMap {
		topicsToNumStreamsMap[topic] = c.config.NumConsumerFetchers
	}

	c.topicCount = &StaticTopicsToNumStreams{
		ConsumerId:            c.config.Consumerid,
		TopicsToNumStreamsMap: topicsToNumStreamsMap,
	}

	c.config.Coordinator.RegisterConsumer(c.config.Consumerid, c.config.Groupid, c.topicCount)
	allTopics, err := c.config.Coordinator.GetAllTopics()
	if err != nil {
		panic(err)
	}
	brokers, err := c.config.Coordinator.GetAllBrokers()
	if err != nil {
		panic(err)
	}

	time.Sleep(c.config.DeploymentTimeout)

	assignmentContext := newStaticAssignmentContext(c.config.Groupid, c.config.Consumerid, []string{c.config.Consumerid}, allTopics, brokers, c.topicCount, topicPartitionMap)
	partitionOwnershipDecision := newPartitionAssignor(c.config.PartitionAssignmentStrategy)(assignmentContext)

	topicPartitions := make([]*TopicAndPartition, 0)
	for topicPartition, _ := range partitionOwnershipDecision {
		topicPartitions = append(topicPartitions, &TopicAndPartition{topicPartition.Topic, topicPartition.Partition})
	}

	offsets, err := c.fetchOffsets(topicPartitions)
	if err != nil {
		panic(fmt.Sprintf("Failed to fetch offsets during rebalance: %s", err))
	}
	for _, topicPartition := range topicPartitions {
		offset := offsets[*topicPartition]
		threadId := partitionOwnershipDecision[*topicPartition]
		c.addPartitionTopicInfo(c.topicRegistry, topicPartition, offset, threadId)
	}

	if c.reflectPartitionOwnershipDecision(partitionOwnershipDecision) {
		c.updateFetcher(c.config.NumConsumerFetchers)
		c.initializeWorkerManagers()
	} else {
		panic("Could not reflect partition ownership")
	}

	go func() {
		Infof(c, "Restarted streams")
		c.connectChannels <- true
	}()

	c.startStreams()
}
1096839
func (c *Context) AbortWithStatusJSON(code int, jsonObj interface{}) {
	c.Abort()
	c.JSON(code, jsonObj)
}
64887
func (s *VPCService) NewCreateVPCOfferingParams(displaytext string, name string, supportedservices []string) *CreateVPCOfferingParams {
	p := &CreateVPCOfferingParams{}
	p.p = make(map[string]interface{})
	p.p["displaytext"] = displaytext
	p.p["name"] = name
	p.p["supportedservices"] = supportedservices
	return p
}
68567
func servicesWithPorts(state *catalog.ServicesState) map[string][]*service.Service {
	serviceMap := make(map[string][]*service.Service)

	state.EachService(
		func(hostname *string, serviceId *string, svc *service.Service) {
			if len(svc.Ports) < 1 {
				return
			}

			// We only want things that are alive and healthy!
			if !svc.IsAlive() {
				return
			}

			// If this is the first one, just set it
			if _, ok := serviceMap[svc.Name]; !ok {
				serviceMap[svc.Name] = []*service.Service{svc}
				return
			}

			// Otherwise we need to make sure the ServicePorts match
			match := serviceMap[svc.Name][0] // Get the first entry for comparison

			// Build up a sorted list of ServicePorts from the existing service
			portsToMatch := getSortedServicePorts(match)

			// Get the list of our ports
			portsWeHave := getSortedServicePorts(svc)

			// Compare the two sorted lists
			for i, port := range portsToMatch {
				if portsWeHave[i] != port {
					// TODO should we just add another service with this port added
					// to the name? We have to find out which port.
					log.Warnf("%s service from %s not added: non-matching ports! (%v vs %v)",
						svc.Name, svc.Hostname, port, portsWeHave[i])
					return
				}
			}

			// It was a match! Append to the list.
			serviceMap[svc.Name] = append(serviceMap[svc.Name], svc)
		},
	)

	return serviceMap
}
713368
func (s *ViolationEvent) SetViolationEventTime(v time.Time) *ViolationEvent {
	s.ViolationEventTime = &v
	return s
}