<commit_before>// Copyright 2015 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package api

// TODO(ericsnow) Eliminate the params import if possible.

import (
	"github.com/juju/errors"

	"github.com/juju/juju/apiserver/params"
)

// BulkFailure indicates that at least one arg failed.
var BulkFailure = errors.Errorf("at least one bulk arg has an error")

// RegisterProcessArgs are the arguments for the RegisterProcesses endpoint.
type RegisterProcessesArgs struct {
	// Processes is the list of Processes to register
	Processes []Process
}

// ProcessResults is the result for a call that makes one or more requests
// about processes.
type ProcessResults struct {
	// Results is the list of results.
	Results []ProcessResult
	// Error is the error (if any) for the call as a whole.
	Error *params.Error
}

// ProcessResult contains the result for a single call.
type ProcessResult struct {
	// ID is the id of the process referenced in the call..
	ID string
	// Error is the error (if any) for the call referring to ID.
	Error *params.Error
}

// ListProcessesesArgs are the arguments for the ListProcesses endpoint.
type ListProcessesArgs struct {
	// IDs is the list of IDs of the processes you want information on.
	IDs []string
}

// ListProcessesResults contains the results for a call to ListProcesses.
type ListProcessesResults struct {
	// Results is the list of process results.
	Results []ListProcessResult
	// Error is the error (if any) for the call as a whole.
	Error *params.Error
}

// ListProcessResult contains the results for a single call to ListProcess.
type ListProcessResult struct {
	// ID is the id of the process this result applies to.
	ID string
	// Info holds the details of the process.
	Info Process
	// NotFound indicates that the process was not found in state.
	NotFound bool
	// Error holds the error retrieving this information (if any).
	Error *params.Error
}

// SetProcessesStatusArgs are the arguments for the SetProcessesStatus endpoint.
type SetProcessesStatusArgs struct {
	// Args is the list of arguments to pass to this function.
	Args []SetProcessStatusArg
}

// SetProcessStatusArg are the arguments for a single call to the
// SetProcessStatus endpoint.
type SetProcessStatusArg struct {
	// ID is the ID of the process.
	ID string
	// status is the status of the process.
	Status ProcessStatus
}<commit_msg>Add ListDefinitionsResults.<commit_after>// Copyright 2015 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package api

// TODO(ericsnow) Eliminate the params import if possible.

import (
	"github.com/juju/errors"

	"github.com/juju/juju/apiserver/params"
)

// BulkFailure indicates that at least one arg failed.
var BulkFailure = errors.Errorf("at least one bulk arg has an error")

// RegisterProcessArgs are the arguments for the RegisterProcesses endpoint.
type RegisterProcessesArgs struct {
	// Processes is the list of Processes to register
	Processes []Process
}

// ProcessResults is the result for a call that makes one or more requests
// about processes.
type ProcessResults struct {
	// Results is the list of results.
	Results []ProcessResult
	// Error is the error (if any) for the call as a whole.
	Error *params.Error
}

// ProcessResult contains the result for a single call.
type ProcessResult struct {
	// ID is the id of the process referenced in the call..
	ID string
	// Error is the error (if any) for the call referring to ID.
	Error *params.Error
}

// ListProcessesesArgs are the arguments for the ListProcesses endpoint.
type ListProcessesArgs struct {
	// IDs is the list of IDs of the processes you want information on.
	IDs []string
}

// ListProcessesResults contains the results for a call to ListProcesses.
type ListProcessesResults struct {
	// Results is the list of process results.
	Results []ListProcessResult
	// Error is the error (if any) for the call as a whole.
	Error *params.Error
}

// ListProcessResult contains the results for a single call to ListProcess.
type ListProcessResult struct {
	// ID is the id of the process this result applies to.
	ID string
	// Info holds the details of the process.
	Info Process
	// NotFound indicates that the process was not found in state.
	NotFound bool
	// Error holds the error retrieving this information (if any).
	Error *params.Error
}

// ListDefinitionsResults contains the results for a call to ListDefinitions.
type ListDefinitionsResults struct {
	// Results is the list of definition results.
	Results []ProcessDefinition
	// Error is the error (if any) for the call as a whole.
	Error *params.Error
}

// SetProcessesStatusArgs are the arguments for the SetProcessesStatus endpoint.
type SetProcessesStatusArgs struct {
	// Args is the list of arguments to pass to this function.
	Args []SetProcessStatusArg
}

// SetProcessStatusArg are the arguments for a single call to the
// SetProcessStatus endpoint.
type SetProcessStatusArg struct {
	// ID is the ID of the process.
	ID string
	// status is the status of the process.
	Status ProcessStatus
}
{'fraction_non_alphanumeric': 0.06390532544378698, 'fraction_numerical': 0.0019723865877712033, 'mean_word_length': 3.7216014897579144, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5255957', 'n_tokens_mistral': 1387, 'n_tokens_neox': 1359, 'n_words': 674}