/* tslint:disable */
/* eslint-disable */
/**
* TeamCity REST API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2018.1 (current)
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
// May contain unused imports in some cases
// @ts-ignore
import type { Agent } from './agent';
// May contain unused imports in some cases
// @ts-ignore
import type { Agents } from './agents';
// May contain unused imports in some cases
// @ts-ignore
import type { ApprovalInfo } from './approval-info';
// May contain unused imports in some cases
// @ts-ignore
import type { ArtifactDependencies } from './artifact-dependencies';
// May contain unused imports in some cases
// @ts-ignore
import type { BuildChanges } from './build-changes';
// May contain unused imports in some cases
// @ts-ignore
import type { BuildExecutor } from './build-executor';
// May contain unused imports in some cases
// @ts-ignore
import type { BuildTriggeringOptions } from './build-triggering-options';
// May contain unused imports in some cases
// @ts-ignore
import type { BuildType } from './build-type';
// May contain unused imports in some cases
// @ts-ignore
import type { Builds } from './builds';
// May contain unused imports in some cases
// @ts-ignore
import type { Changes } from './changes';
// May contain unused imports in some cases
// @ts-ignore
import type { CloudImages } from './cloud-images';
// May contain unused imports in some cases
// @ts-ignore
import type { Comment } from './comment';
// May contain unused imports in some cases
// @ts-ignore
import type { Customizations } from './customizations';
// May contain unused imports in some cases
// @ts-ignore
import type { Datas } from './datas';
// May contain unused imports in some cases
// @ts-ignore
import type { DownloadedArtifacts } from './downloaded-artifacts';
// May contain unused imports in some cases
// @ts-ignore
import type { Entries } from './entries';
// May contain unused imports in some cases
// @ts-ignore
import type { Files } from './files';
// May contain unused imports in some cases
// @ts-ignore
import type { IssuesUsages } from './issues-usages';
// May contain unused imports in some cases
// @ts-ignore
import type { Items } from './items';
// May contain unused imports in some cases
// @ts-ignore
import type { Links } from './links';
// May contain unused imports in some cases
// @ts-ignore
import type { MatrixConfiguration } from './matrix-configuration';
// May contain unused imports in some cases
// @ts-ignore
import type { ProblemOccurrences } from './problem-occurrences';
// May contain unused imports in some cases
// @ts-ignore
import type { ProgressInfo } from './progress-info';
// May contain unused imports in some cases
// @ts-ignore
import type { Properties } from './properties';
// May contain unused imports in some cases
// @ts-ignore
import type { Related } from './related';
// May contain unused imports in some cases
// @ts-ignore
import type { Revision } from './revision';
// May contain unused imports in some cases
// @ts-ignore
import type { Revisions } from './revisions';
// May contain unused imports in some cases
// @ts-ignore
import type { Tags } from './tags';
// May contain unused imports in some cases
// @ts-ignore
import type { TestOccurrences } from './test-occurrences';
// May contain unused imports in some cases
// @ts-ignore
import type { TriggeredBy } from './triggered-by';
// May contain unused imports in some cases
// @ts-ignore
import type { User } from './user';
// May contain unused imports in some cases
// @ts-ignore
import type { VcsLabel } from './vcs-label';
/**
* A process that performs a certain CI/CD job. Most builds comprise multiple sequential steps executing their own granular actions. A build is executed according to the settings specified in its build configuration (BuildType). See the [Manage Builds](https://www.jetbrains.com/help/teamcity/rest/start-and-cancel-builds.html) section for the examples on various build actions.
* @export
* @interface Build
*/
export interface Build {
/**
* The automatically generated unique ID of the build.
* @type {number}
* @memberof Build
*/
id?: number;
/**
*
* @type {number}
* @memberof Build
*/
taskId?: number;
/**
* Returns the ID of the corresponding build configuration. To obtain this configuration itself, use the *buildType* property instead.
* @type {string}
* @memberof Build
*/
buildTypeId?: string;
/**
* This property supports the internal infrastructure and is not intented to be used. Use the *buildTypeId* property instead to access the regular build configuration ID.
* @type {string}
* @memberof Build
*/
buildTypeInternalId?: string;
/**
* Returns a public build number this build is assigned in its build configuration, *null* if a build is still queued, or *N/A* if a queued build was canceled before it started.
* @type {string}
* @memberof Build
*/
number?: string;
/**
* Returns whether a build has finished successfully (or is expected to finish so, if still running). Possible values: * *null* for queued builds. * *SUCCESS* for builds that have successfully finished or still running without errors. * *FAILURE* for builds that failed to start or failed during their run. * *UNKNOWN* for canceled builds.
* @type {string}
* @memberof Build
*/
status?: string;
/**
* Returns the actual stage of the build\'s lifecycle: queued, running, or finished.
* @type {string}
* @memberof Build
*/
state?: BuildStateEnum;
/**
* Returns *true* if the build is currently running; otherwise, *false*.
* @type {boolean}
* @memberof Build
*/
running?: boolean;
/**
* Returns *true* if this is build is composite; otherwise, *false*.Composite builds aggregate results of multiple child builds. These builds can belong to [composite build configurations](https://www.jetbrains.com/help/teamcity/composite-build-configuration.html) or can be spawned automatically (for example, to aggregate results of parallel tests).
* @type {boolean}
* @memberof Build
*/
composite?: boolean;
/**
* Returns *true* if this build was automatically removed from the building queue (for example, if an error occured or the appointed reviewers failed to [approve the build](https://www.jetbrains.com/help/teamcity/cloud/build-approval.html) in time); otherwise, *false*.Does not return *true* for manually cancelled builds
* @type {boolean}
* @memberof Build
*/
failedToStart?: boolean;
/**
* Returns *true* for [personal builds](https://www.jetbrains.com/help/teamcity/personal-build.html) and *false* for regular builds.
* @type {boolean}
* @memberof Build
*/
personal?: boolean;
/**
* This property is deprecated, see *running-info* property instead.
* @type {number}
* @memberof Build
*/
percentageComplete?: number;
/**
* Returns the name of the repository branch whose changes are processed in the current build. This property returns the [logical branch name](https://www.jetbrains.com/help/teamcity/working-with-feature-branches.html#Logical+Branch+Name) (*main*), not a fully specified VCS branch name (*refs/heads/main*).
* @type {string}
* @memberof Build
*/
branchName?: string;
/**
* Returns *true* if the current build processes changes from the branch specified as default branch in VCS root settings; otherwise, *false*.
* @type {boolean}
* @memberof Build
*/
defaultBranch?: boolean;
/**
* Returns *true* if the branch name equals `<unspecified>`; otherwise, *false*. A branch can have this name if TeamCity fails to retrieve a valid branch name.
* @type {boolean}
* @memberof Build
*/
unspecifiedBranch?: boolean;
/**
* Returns *true* for [history builds](https://www.jetbrains.com/help/teamcity/history-build.html) that started after a build with most recent code changes; otherwise, *false*.
* @type {boolean}
* @memberof Build
*/
history?: boolean;
/**
* Returns *true* if the build is currently [pinned](https://www.jetbrains.com/help/teamcity/build-actions.html#Pin+Build); otherwise, *false*.Send GET and PUT requests to `/app/rest/builds/<build-locator>/pinInfo` to get the detailed information about pinned builds and manually pin/unpin these builds.
* @type {boolean}
* @memberof Build
*/
pinned?: boolean;
/**
* Returns the shortened (without the server URL) link to the current build. To obtain the full URL, use the *webUrl* property instead.
* @type {string}
* @memberof Build
*/
href?: string;
/**
* Returns the full web link to access this build. To get a link without the server URL, read the *href* property instead.
* @type {string}
* @memberof Build
*/
webUrl?: string;
/**
* Returns the build\'s position in the building queue.
* @type {number}
* @memberof Build
*/
queuePosition?: number;
/**
* Returns the number of changes processed in this build.
* @type {number}
* @memberof Build
*/
limitedChangesCount?: number;
/**
* Returns the path to the built-in artifact storage.
* @type {string}
* @memberof Build
*/
artifactsDirectory?: string;
/**
*
* @type {Links}
* @memberof Build
*/
links?: Links;
/**
* Returns the additional information about the finished or running build. Returns nothing if a build is still queued, read the *waitReason* property instead to get the current status of a queued build.In TeamCity UI, this string is displayed next to the build status icon (\"Canceled\", \"Step 3/7\", \"Error while applying patch\", and so on).
* @type {string}
* @memberof Build
*/
statusText?: string;
/**
*
* @type {BuildType}
* @memberof Build
*/
buildType?: BuildType;
/**
*
* @type {Comment}
* @memberof Build
*/
comment?: Comment;
/**
*
* @type {Tags}
* @memberof Build
*/
tags?: Tags;
/**
*
* @type {Comment}
* @memberof Build
*/
pinInfo?: Comment;
/**
*
* @type {User}
* @memberof Build
*/
user?: User;
/**
* If this build is still queued, this property returns the estimated time (UTC) of an actual build start.
* @type {string}
* @memberof Build
*/
startEstimate?: string;
/**
* Returns the actual reason why this build remains in build queue. This property returns the most recent wait reason from the *queuedWaitReasons* array.
* @type {string}
* @memberof Build
*/
waitReason?: string;
/**
* Returns the estimated time this build will finish. Returns a value only for queued builds and *null* for those that already run.
* @type {string}
* @memberof Build
*/
finishEstimate?: string;
/**
*
* @type {Build}
* @memberof Build
*/
delayedByBuild?: Build;
/**
*
* @type {Agent}
* @memberof Build
*/
plannedAgent?: Agent;
/**
*
* @type {ApprovalInfo}
* @memberof Build
*/
approvalInfo?: ApprovalInfo;
/**
*
* @type {ProgressInfo}
* @memberof Build
*/
'running-info'?: ProgressInfo;
/**
*
* @type {Comment}
* @memberof Build
*/
canceledInfo?: Comment;
/**
* Returns the date and time (UTC) when this build was queued. Note that the moment this build actually starts is stored in the different property (*startDate*)..
* @type {string}
* @memberof Build
*/
queuedDate?: string;
/**
* Returns the date and time (UTC) of the moment the build actually started. Note that the moment a build was triggered is stored in the *queuedDate* property.
* @type {string}
* @memberof Build
*/
startDate?: string;
/**
* Returns the date and time of the moment the build was removed from the queue (finished, failed, or was canceled). The value is in UTC and corresponds to the server timezone.
* @type {string}
* @memberof Build
*/
finishDate?: string;
/**
*
* @type {TriggeredBy}
* @memberof Build
*/
triggered?: TriggeredBy;
/**
*
* @type {Changes}
* @memberof Build
*/
lastChanges?: Changes;
/**
*
* @type {Changes}
* @memberof Build
*/
changes?: Changes;
/**
*
* @type {Revisions}
* @memberof Build
*/
revisions?: Revisions;
/**
*
* @type {Revision}
* @memberof Build
*/
versionedSettingsRevision?: Revision;
/**
*
* @type {BuildChanges}
* @memberof Build
*/
artifactDependencyChanges?: BuildChanges;
/**
*
* @type {Agent}
* @memberof Build
*/
agent?: Agent;
/**
*
* @type {Agents}
* @memberof Build
*/
compatibleAgents?: Agents;
/**
*
* @type {CloudImages}
* @memberof Build
*/
compatibleCloudImages?: CloudImages;
/**
*
* @type {TestOccurrences}
* @memberof Build
*/
testOccurrences?: TestOccurrences;
/**
*
* @type {ProblemOccurrences}
* @memberof Build
*/
problemOccurrences?: ProblemOccurrences;
/**
*
* @type {Files}
* @memberof Build
*/
artifacts?: Files;
/**
*
* @type {IssuesUsages}
* @memberof Build
*/
relatedIssues?: IssuesUsages;
/**
*
* @type {Properties}
* @memberof Build
*/
properties?: Properties;
/**
*
* @type {Properties}
* @memberof Build
*/
resultingProperties?: Properties;
/**
*
* @type {Properties}
* @memberof Build
*/
originalProperties?: Properties;
/**
*
* @type {Properties}
* @memberof Build
*/
startProperties?: Properties;
/**
*
* @type {Entries}
* @memberof Build
*/
attributes?: Entries;
/**
*
* @type {Properties}
* @memberof Build
*/
statistics?: Properties;
/**
*
* @type {Datas}
* @memberof Build
*/
metadata?: Datas;
/**
*
* @type {Builds}
* @memberof Build
*/
'snapshot-dependencies'?: Builds;
/**
*
* @type {Builds}
* @memberof Build
*/
'artifact-dependencies'?: Builds;
/**
*
* @type {ArtifactDependencies}
* @memberof Build
*/
'custom-artifact-dependencies'?: ArtifactDependencies;
/**
*
* @type {string}
* @memberof Build
*/
settingsHash?: string;
/**
*
* @type {string}
* @memberof Build
*/
currentSettingsHash?: string;
/**
*
* @type {string}
* @memberof Build
*/
modificationId?: string;
/**
*
* @type {string}
* @memberof Build
*/
chainModificationId?: string;
/**
*
* @type {Items}
* @memberof Build
*/
replacementIds?: Items;
/**
*
* @type {Related}
* @memberof Build
*/
related?: Related;
/**
*
* @type {BuildTriggeringOptions}
* @memberof Build
*/
triggeringOptions?: BuildTriggeringOptions;
/**
* Returns *true* if at least one dependent build has [reused this build](https://www.jetbrains.com/help/teamcity/snapshot-dependencies.html#Suitable+Builds) instead of triggering a new one.
* @type {boolean}
* @memberof Build
*/
usedByOtherBuilds?: boolean;
/**
*
* @type {Comment}
* @memberof Build
*/
statusChangeComment?: Comment;
/**
* Returns a list of [labels](https://www.jetbrains.com/help/teamcity/vcs-labeling.html) that tag sources of this particular build.
* @type {Array<VcsLabel>}
* @memberof Build
*/
vcsLabels?: Array<VcsLabel>;
/**
* Returns *true*, if running build no longer [occupies a build agent](https://www.jetbrains.com/help/teamcity/detaching-build-from-agent.html); otherwise, *false*.
* @type {boolean}
* @memberof Build
*/
detachedFromAgent?: boolean;
/**
* Similar to the *finishDate* property, but adjusts the date and time according to the agent timezone.
* @type {string}
* @memberof Build
*/
finishOnAgentDate?: string;
/**
* Returns *true* if the build is running with non-default parameter, dependency, and (or) changes settings (for example, reuses the manually selected build or targets the specific changes revision instead of building latest changes); otherwise, *false*.
* @type {boolean}
* @memberof Build
*/
customized?: boolean;
/**
*
* @type {Customizations}
* @memberof Build
*/
customization?: Customizations;
/**
* Returns *true* if the build is currently collecting changes from a remote repository; otherwise, *false*.
* @type {boolean}
* @memberof Build
*/
changesCollectingInProgress?: boolean;
/**
*
* @type {Properties}
* @memberof Build
*/
queuedWaitReasons?: Properties;
/**
*
* @type {DownloadedArtifacts}
* @memberof Build
*/
downloadedArtifacts?: DownloadedArtifacts;
/**
*
* @type {MatrixConfiguration}
* @memberof Build
*/
matrixConfiguration?: MatrixConfiguration;
/**
*
* @type {Build}
* @memberof Build
*/
firstBuildWithSameChanges?: Build;
/**
*
* @type {BuildExecutor}
* @memberof Build
*/
executor?: BuildExecutor;
/**
*
* @type {string}
* @memberof Build
*/
locator?: string;
}
export const BuildStateEnum = {
Queued: 'queued',
Finished: 'finished',
Running: 'running',
Deleted: 'deleted',
Unknown: 'unknown',
} as const;
export type BuildStateEnum = (typeof BuildStateEnum)[keyof typeof BuildStateEnum];