RepositoryMetricSummary

class oci.devops.models.RepositoryMetricSummary(**kwargs)

Bases: object

The metrics details of a repository resource.

Attributes

METRIC_NAME_COMMITS A constant which can be used with the metric_name property of a RepositoryMetricSummary.
METRIC_NAME_LINES_ADDED A constant which can be used with the metric_name property of a RepositoryMetricSummary.
METRIC_NAME_LINES_DELETED A constant which can be used with the metric_name property of a RepositoryMetricSummary.
METRIC_NAME_PULL_REQUEST_APPROVED A constant which can be used with the metric_name property of a RepositoryMetricSummary.
METRIC_NAME_PULL_REQUEST_COMMENTS A constant which can be used with the metric_name property of a RepositoryMetricSummary.
METRIC_NAME_PULL_REQUEST_CREATED A constant which can be used with the metric_name property of a RepositoryMetricSummary.
METRIC_NAME_PULL_REQUEST_DECLINED A constant which can be used with the metric_name property of a RepositoryMetricSummary.
METRIC_NAME_PULL_REQUEST_MERGED A constant which can be used with the metric_name property of a RepositoryMetricSummary.
METRIC_NAME_PULL_REQUEST_REVIEWED A constant which can be used with the metric_name property of a RepositoryMetricSummary.
METRIC_NAME_PULL_REQUEST_REVIEW_DURATION_IN_DAYS A constant which can be used with the metric_name property of a RepositoryMetricSummary.
METRIC_NAME_PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS A constant which can be used with the metric_name property of a RepositoryMetricSummary.
count Gets the count of this RepositoryMetricSummary.
dimensions Gets the dimensions of this RepositoryMetricSummary.
duration_in_seconds Gets the duration_in_seconds of this RepositoryMetricSummary.
metric_name Gets the metric_name of this RepositoryMetricSummary.
start_timestamp_in_epoch_seconds Gets the start_timestamp_in_epoch_seconds of this RepositoryMetricSummary.
sum Gets the sum of this RepositoryMetricSummary.

Methods

__init__(**kwargs) Initializes a new RepositoryMetricSummary object with values from keyword arguments.
METRIC_NAME_COMMITS = 'COMMITS'

A constant which can be used with the metric_name property of a RepositoryMetricSummary. This constant has a value of “COMMITS”

METRIC_NAME_LINES_ADDED = 'LINES_ADDED'

A constant which can be used with the metric_name property of a RepositoryMetricSummary. This constant has a value of “LINES_ADDED”

METRIC_NAME_LINES_DELETED = 'LINES_DELETED'

A constant which can be used with the metric_name property of a RepositoryMetricSummary. This constant has a value of “LINES_DELETED”

METRIC_NAME_PULL_REQUEST_APPROVED = 'PULL_REQUEST_APPROVED'

A constant which can be used with the metric_name property of a RepositoryMetricSummary. This constant has a value of “PULL_REQUEST_APPROVED”

METRIC_NAME_PULL_REQUEST_COMMENTS = 'PULL_REQUEST_COMMENTS'

A constant which can be used with the metric_name property of a RepositoryMetricSummary. This constant has a value of “PULL_REQUEST_COMMENTS”

METRIC_NAME_PULL_REQUEST_CREATED = 'PULL_REQUEST_CREATED'

A constant which can be used with the metric_name property of a RepositoryMetricSummary. This constant has a value of “PULL_REQUEST_CREATED”

METRIC_NAME_PULL_REQUEST_DECLINED = 'PULL_REQUEST_DECLINED'

A constant which can be used with the metric_name property of a RepositoryMetricSummary. This constant has a value of “PULL_REQUEST_DECLINED”

METRIC_NAME_PULL_REQUEST_MERGED = 'PULL_REQUEST_MERGED'

A constant which can be used with the metric_name property of a RepositoryMetricSummary. This constant has a value of “PULL_REQUEST_MERGED”

METRIC_NAME_PULL_REQUEST_REVIEWED = 'PULL_REQUEST_REVIEWED'

A constant which can be used with the metric_name property of a RepositoryMetricSummary. This constant has a value of “PULL_REQUEST_REVIEWED”

METRIC_NAME_PULL_REQUEST_REVIEW_DURATION_IN_DAYS = 'PULL_REQUEST_REVIEW_DURATION_IN_DAYS'

A constant which can be used with the metric_name property of a RepositoryMetricSummary. This constant has a value of “PULL_REQUEST_REVIEW_DURATION_IN_DAYS”

METRIC_NAME_PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS = 'PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS'

A constant which can be used with the metric_name property of a RepositoryMetricSummary. This constant has a value of “PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS”

__init__(**kwargs)

Initializes a new RepositoryMetricSummary object with values from keyword arguments. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • metric_name (str) – The value to assign to the metric_name property of this RepositoryMetricSummary. Allowed values for this property are: “COMMITS”, “LINES_ADDED”, “LINES_DELETED”, “PULL_REQUEST_CREATED”, “PULL_REQUEST_MERGED”, “PULL_REQUEST_DECLINED”, “PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS”, “PULL_REQUEST_REVIEW_DURATION_IN_DAYS”, “PULL_REQUEST_APPROVED”, “PULL_REQUEST_REVIEWED”, “PULL_REQUEST_COMMENTS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
  • duration_in_seconds (int) – The value to assign to the duration_in_seconds property of this RepositoryMetricSummary.
  • dimensions (dict(str, str)) – The value to assign to the dimensions property of this RepositoryMetricSummary.
  • start_timestamp_in_epoch_seconds (int) – The value to assign to the start_timestamp_in_epoch_seconds property of this RepositoryMetricSummary.
  • count (float) – The value to assign to the count property of this RepositoryMetricSummary.
  • sum (float) – The value to assign to the sum property of this RepositoryMetricSummary.
count

Gets the count of this RepositoryMetricSummary. Represents the total number of the metric being calculated.

Returns:The count of this RepositoryMetricSummary.
Return type:float
dimensions

Gets the dimensions of this RepositoryMetricSummary. The qualifiers provided in the definition of the returned metric.

Returns:The dimensions of this RepositoryMetricSummary.
Return type:dict(str, str)
duration_in_seconds

Gets the duration_in_seconds of this RepositoryMetricSummary. The duration of the returned aggregated data in seconds.

Returns:The duration_in_seconds of this RepositoryMetricSummary.
Return type:int
metric_name

Gets the metric_name of this RepositoryMetricSummary. Type of metric

Allowed values for this property are: “COMMITS”, “LINES_ADDED”, “LINES_DELETED”, “PULL_REQUEST_CREATED”, “PULL_REQUEST_MERGED”, “PULL_REQUEST_DECLINED”, “PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS”, “PULL_REQUEST_REVIEW_DURATION_IN_DAYS”, “PULL_REQUEST_APPROVED”, “PULL_REQUEST_REVIEWED”, “PULL_REQUEST_COMMENTS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.

Returns:The metric_name of this RepositoryMetricSummary.
Return type:str
start_timestamp_in_epoch_seconds

Gets the start_timestamp_in_epoch_seconds of this RepositoryMetricSummary. The start time associated with the value of the metric.

Returns:The start_timestamp_in_epoch_seconds of this RepositoryMetricSummary.
Return type:int
sum

Gets the sum of this RepositoryMetricSummary. Represents the total duration in days calculated corresponding to the total no. of PRs. This is used only for “PULL_REQUEST_REVIEW_START_DURATION_IN_DAYS” and “PULL_REQUEST_REVIEW_DURATION_IN_DAYS” metrics.

Returns:The sum of this RepositoryMetricSummary.
Return type:float