Skip to content

Commit c33042b

Browse files
committed
Generated from e21ca66b1398fe9e197beff93b6290882760861e
Merge pull request #15 from moreOver0/yongw/fix fix cp field
1 parent bb17cdb commit c33042b

File tree

3 files changed

+14
-16
lines changed

3 files changed

+14
-16
lines changed

sdk/cognitiveservices/azure-cognitiveservices-anomalydetector/azure/cognitiveservices/anomalydetector/models/change_point_detect_on_timestamp_response.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ class ChangePointDetectOnTimestampResponse(Model):
2020
:param period: Required. Frequency extracted from the series, zero means
2121
no recurrent pattern has been found.
2222
:type period: int
23-
:param is_change_point: Required. Change point property. True means a
24-
change point has been detected.
25-
:type is_change_point: bool
23+
:param change_point: Required. The closest change point's timestamp.
24+
:type change_point: datetime
2625
:param confidence_score: Required. The change point confidence score.
2726
:type confidence_score: float
2827
:param timestamp: Required. Timestamp of a data point (ISO8601 format).
@@ -31,21 +30,21 @@ class ChangePointDetectOnTimestampResponse(Model):
3130

3231
_validation = {
3332
'period': {'required': True},
34-
'is_change_point': {'required': True},
33+
'change_point': {'required': True},
3534
'confidence_score': {'required': True},
3635
'timestamp': {'required': True},
3736
}
3837

3938
_attribute_map = {
4039
'period': {'key': 'period', 'type': 'int'},
41-
'is_change_point': {'key': 'isChangePoint', 'type': 'bool'},
40+
'change_point': {'key': 'changePoint', 'type': 'iso-8601'},
4241
'confidence_score': {'key': 'confidenceScore', 'type': 'float'},
4342
'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
4443
}
4544

4645
def __init__(self, **kwargs):
4746
super(ChangePointDetectOnTimestampResponse, self).__init__(**kwargs)
4847
self.period = kwargs.get('period', None)
49-
self.is_change_point = kwargs.get('is_change_point', None)
48+
self.change_point = kwargs.get('change_point', None)
5049
self.confidence_score = kwargs.get('confidence_score', None)
5150
self.timestamp = kwargs.get('timestamp', None)

sdk/cognitiveservices/azure-cognitiveservices-anomalydetector/azure/cognitiveservices/anomalydetector/models/change_point_detect_on_timestamp_response_py3.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ class ChangePointDetectOnTimestampResponse(Model):
2020
:param period: Required. Frequency extracted from the series, zero means
2121
no recurrent pattern has been found.
2222
:type period: int
23-
:param is_change_point: Required. Change point property. True means a
24-
change point has been detected.
25-
:type is_change_point: bool
23+
:param change_point: Required. The closest change point's timestamp.
24+
:type change_point: datetime
2625
:param confidence_score: Required. The change point confidence score.
2726
:type confidence_score: float
2827
:param timestamp: Required. Timestamp of a data point (ISO8601 format).
@@ -31,21 +30,21 @@ class ChangePointDetectOnTimestampResponse(Model):
3130

3231
_validation = {
3332
'period': {'required': True},
34-
'is_change_point': {'required': True},
33+
'change_point': {'required': True},
3534
'confidence_score': {'required': True},
3635
'timestamp': {'required': True},
3736
}
3837

3938
_attribute_map = {
4039
'period': {'key': 'period', 'type': 'int'},
41-
'is_change_point': {'key': 'isChangePoint', 'type': 'bool'},
40+
'change_point': {'key': 'changePoint', 'type': 'iso-8601'},
4241
'confidence_score': {'key': 'confidenceScore', 'type': 'float'},
4342
'timestamp': {'key': 'timestamp', 'type': 'iso-8601'},
4443
}
4544

46-
def __init__(self, *, period: int, is_change_point: bool, confidence_score: float, timestamp, **kwargs) -> None:
45+
def __init__(self, *, period: int, change_point, confidence_score: float, timestamp, **kwargs) -> None:
4746
super(ChangePointDetectOnTimestampResponse, self).__init__(**kwargs)
4847
self.period = period
49-
self.is_change_point = is_change_point
48+
self.change_point = change_point
5049
self.confidence_score = confidence_score
5150
self.timestamp = timestamp

sdk/cognitiveservices/azure-cognitiveservices-anomalydetector/azure/cognitiveservices/anomalydetector/operations/time_series_operations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -386,10 +386,10 @@ def detect_on_timestamp(
386386

387387
def change_point_detect_on_timestamp(
388388
self, time_series_id, body, custom_headers=None, raw=False, **operation_config):
389-
"""Detect change point for the interval series.
389+
"""Detect the closest change point before the given timestamp.
390390
391-
Evaluate change point score of every series point between start and
392-
end.
391+
Evaluate change point score before the given timestamp and give the
392+
closest change point.
393393
394394
:param time_series_id: Unique id for time series.
395395
:type time_series_id: str

0 commit comments

Comments
 (0)